Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
5d3e9357
Commit
5d3e9357
authored
Oct 07, 2017
by
Carl Eugen Hoyos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavfi: Rename local variables "main" as "master".
Silences several warnings: main is usually a function
parent
2386cfc1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
22 deletions
+22
-22
vf_lut3d.c
libavfilter/vf_lut3d.c
+4
-4
vf_paletteuse.c
libavfilter/vf_paletteuse.c
+5
-5
vf_psnr.c
libavfilter/vf_psnr.c
+7
-7
vf_ssim.c
libavfilter/vf_ssim.c
+6
-6
No files found.
libavfilter/vf_lut3d.c
View file @
5d3e9357
...
@@ -752,16 +752,16 @@ static int update_apply_clut(FFFrameSync *fs)
...
@@ -752,16 +752,16 @@ static int update_apply_clut(FFFrameSync *fs)
{
{
AVFilterContext
*
ctx
=
fs
->
parent
;
AVFilterContext
*
ctx
=
fs
->
parent
;
AVFilterLink
*
inlink
=
ctx
->
inputs
[
0
];
AVFilterLink
*
inlink
=
ctx
->
inputs
[
0
];
AVFrame
*
ma
in
,
*
second
,
*
out
;
AVFrame
*
ma
ster
,
*
second
,
*
out
;
int
ret
;
int
ret
;
ret
=
ff_framesync_dualinput_get
(
fs
,
&
ma
in
,
&
second
);
ret
=
ff_framesync_dualinput_get
(
fs
,
&
ma
ster
,
&
second
);
if
(
ret
<
0
)
if
(
ret
<
0
)
return
ret
;
return
ret
;
if
(
!
second
)
if
(
!
second
)
return
ff_filter_frame
(
ctx
->
outputs
[
0
],
ma
in
);
return
ff_filter_frame
(
ctx
->
outputs
[
0
],
ma
ster
);
update_clut
(
ctx
->
priv
,
second
);
update_clut
(
ctx
->
priv
,
second
);
out
=
apply_lut
(
inlink
,
ma
in
);
out
=
apply_lut
(
inlink
,
ma
ster
);
return
ff_filter_frame
(
ctx
->
outputs
[
0
],
out
);
return
ff_filter_frame
(
ctx
->
outputs
[
0
],
out
);
}
}
...
...
libavfilter/vf_paletteuse.c
View file @
5d3e9357
...
@@ -967,25 +967,25 @@ static int load_apply_palette(FFFrameSync *fs)
...
@@ -967,25 +967,25 @@ static int load_apply_palette(FFFrameSync *fs)
AVFilterContext
*
ctx
=
fs
->
parent
;
AVFilterContext
*
ctx
=
fs
->
parent
;
AVFilterLink
*
inlink
=
ctx
->
inputs
[
0
];
AVFilterLink
*
inlink
=
ctx
->
inputs
[
0
];
PaletteUseContext
*
s
=
ctx
->
priv
;
PaletteUseContext
*
s
=
ctx
->
priv
;
AVFrame
*
ma
in
,
*
second
,
*
out
;
AVFrame
*
ma
ster
,
*
second
,
*
out
;
int
ret
;
int
ret
;
// writable for error diffusal dithering
// writable for error diffusal dithering
ret
=
ff_framesync_dualinput_get_writable
(
fs
,
&
ma
in
,
&
second
);
ret
=
ff_framesync_dualinput_get_writable
(
fs
,
&
ma
ster
,
&
second
);
if
(
ret
<
0
)
if
(
ret
<
0
)
return
ret
;
return
ret
;
if
(
!
ma
in
||
!
second
)
{
if
(
!
ma
ster
||
!
second
)
{
ret
=
AVERROR_BUG
;
ret
=
AVERROR_BUG
;
goto
error
;
goto
error
;
}
}
if
(
!
s
->
palette_loaded
)
{
if
(
!
s
->
palette_loaded
)
{
load_palette
(
s
,
second
);
load_palette
(
s
,
second
);
}
}
out
=
apply_palette
(
inlink
,
ma
in
);
out
=
apply_palette
(
inlink
,
ma
ster
);
return
ff_filter_frame
(
ctx
->
outputs
[
0
],
out
);
return
ff_filter_frame
(
ctx
->
outputs
[
0
],
out
);
error:
error:
av_frame_free
(
&
ma
in
);
av_frame_free
(
&
ma
ster
);
av_frame_free
(
&
second
);
av_frame_free
(
&
second
);
return
ret
;
return
ret
;
}
}
...
...
libavfilter/vf_psnr.c
View file @
5d3e9357
...
@@ -146,21 +146,21 @@ static int do_psnr(FFFrameSync *fs)
...
@@ -146,21 +146,21 @@ static int do_psnr(FFFrameSync *fs)
{
{
AVFilterContext
*
ctx
=
fs
->
parent
;
AVFilterContext
*
ctx
=
fs
->
parent
;
PSNRContext
*
s
=
ctx
->
priv
;
PSNRContext
*
s
=
ctx
->
priv
;
AVFrame
*
ma
in
,
*
ref
;
AVFrame
*
ma
ster
,
*
ref
;
double
comp_mse
[
4
],
mse
=
0
;
double
comp_mse
[
4
],
mse
=
0
;
int
ret
,
j
,
c
;
int
ret
,
j
,
c
;
AVDictionary
**
metadata
;
AVDictionary
**
metadata
;
ret
=
ff_framesync_dualinput_get
(
fs
,
&
ma
in
,
&
ref
);
ret
=
ff_framesync_dualinput_get
(
fs
,
&
ma
ster
,
&
ref
);
if
(
ret
<
0
)
if
(
ret
<
0
)
return
ret
;
return
ret
;
if
(
!
ref
)
if
(
!
ref
)
return
ff_filter_frame
(
ctx
->
outputs
[
0
],
ma
in
);
return
ff_filter_frame
(
ctx
->
outputs
[
0
],
ma
ster
);
metadata
=
&
ma
in
->
metadata
;
metadata
=
&
ma
ster
->
metadata
;
compute_images_mse
(
s
,
(
const
uint8_t
**
)
ma
in
->
data
,
main
->
linesize
,
compute_images_mse
(
s
,
(
const
uint8_t
**
)
ma
ster
->
data
,
master
->
linesize
,
(
const
uint8_t
**
)
ref
->
data
,
ref
->
linesize
,
(
const
uint8_t
**
)
ref
->
data
,
ref
->
linesize
,
ma
in
->
width
,
main
->
height
,
comp_mse
);
ma
ster
->
width
,
master
->
height
,
comp_mse
);
for
(
j
=
0
;
j
<
s
->
nb_components
;
j
++
)
for
(
j
=
0
;
j
<
s
->
nb_components
;
j
++
)
mse
+=
comp_mse
[
j
]
*
s
->
planeweight
[
j
];
mse
+=
comp_mse
[
j
]
*
s
->
planeweight
[
j
];
...
@@ -222,7 +222,7 @@ static int do_psnr(FFFrameSync *fs)
...
@@ -222,7 +222,7 @@ static int do_psnr(FFFrameSync *fs)
fprintf
(
s
->
stats_file
,
"
\n
"
);
fprintf
(
s
->
stats_file
,
"
\n
"
);
}
}
return
ff_filter_frame
(
ctx
->
outputs
[
0
],
ma
in
);
return
ff_filter_frame
(
ctx
->
outputs
[
0
],
ma
ster
);
}
}
static
av_cold
int
init
(
AVFilterContext
*
ctx
)
static
av_cold
int
init
(
AVFilterContext
*
ctx
)
...
...
libavfilter/vf_ssim.c
View file @
5d3e9357
...
@@ -286,22 +286,22 @@ static int do_ssim(FFFrameSync *fs)
...
@@ -286,22 +286,22 @@ static int do_ssim(FFFrameSync *fs)
{
{
AVFilterContext
*
ctx
=
fs
->
parent
;
AVFilterContext
*
ctx
=
fs
->
parent
;
SSIMContext
*
s
=
ctx
->
priv
;
SSIMContext
*
s
=
ctx
->
priv
;
AVFrame
*
ma
in
,
*
ref
;
AVFrame
*
ma
ster
,
*
ref
;
AVDictionary
**
metadata
;
AVDictionary
**
metadata
;
float
c
[
4
],
ssimv
=
0
.
0
;
float
c
[
4
],
ssimv
=
0
.
0
;
int
ret
,
i
;
int
ret
,
i
;
ret
=
ff_framesync_dualinput_get
(
fs
,
&
ma
in
,
&
ref
);
ret
=
ff_framesync_dualinput_get
(
fs
,
&
ma
ster
,
&
ref
);
if
(
ret
<
0
)
if
(
ret
<
0
)
return
ret
;
return
ret
;
if
(
!
ref
)
if
(
!
ref
)
return
ff_filter_frame
(
ctx
->
outputs
[
0
],
ma
in
);
return
ff_filter_frame
(
ctx
->
outputs
[
0
],
ma
ster
);
metadata
=
&
ma
in
->
metadata
;
metadata
=
&
ma
ster
->
metadata
;
s
->
nb_frames
++
;
s
->
nb_frames
++
;
for
(
i
=
0
;
i
<
s
->
nb_components
;
i
++
)
{
for
(
i
=
0
;
i
<
s
->
nb_components
;
i
++
)
{
c
[
i
]
=
s
->
ssim_plane
(
&
s
->
dsp
,
ma
in
->
data
[
i
],
main
->
linesize
[
i
],
c
[
i
]
=
s
->
ssim_plane
(
&
s
->
dsp
,
ma
ster
->
data
[
i
],
master
->
linesize
[
i
],
ref
->
data
[
i
],
ref
->
linesize
[
i
],
ref
->
data
[
i
],
ref
->
linesize
[
i
],
s
->
planewidth
[
i
],
s
->
planeheight
[
i
],
s
->
temp
,
s
->
planewidth
[
i
],
s
->
planeheight
[
i
],
s
->
temp
,
s
->
max
);
s
->
max
);
...
@@ -328,7 +328,7 @@ static int do_ssim(FFFrameSync *fs)
...
@@ -328,7 +328,7 @@ static int do_ssim(FFFrameSync *fs)
fprintf
(
s
->
stats_file
,
"All:%f (%f)
\n
"
,
ssimv
,
ssim_db
(
ssimv
,
1
.
0
));
fprintf
(
s
->
stats_file
,
"All:%f (%f)
\n
"
,
ssimv
,
ssim_db
(
ssimv
,
1
.
0
));
}
}
return
ff_filter_frame
(
ctx
->
outputs
[
0
],
ma
in
);
return
ff_filter_frame
(
ctx
->
outputs
[
0
],
ma
ster
);
}
}
static
av_cold
int
init
(
AVFilterContext
*
ctx
)
static
av_cold
int
init
(
AVFilterContext
*
ctx
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment