Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
a0a57072
Commit
a0a57072
authored
Aug 27, 2016
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter: make use of ff_filter_get_nb_threads
parent
5b190714
Show whitespace changes
Inline
Side-by-side
Showing
28 changed files
with
37 additions
and
36 deletions
+37
-36
Changelog
Changelog
+1
-0
vf_atadenoise.c
libavfilter/vf_atadenoise.c
+1
-1
vf_blend.c
libavfilter/vf_blend.c
+1
-1
vf_bwdif.c
libavfilter/vf_bwdif.c
+1
-1
vf_chromakey.c
libavfilter/vf_chromakey.c
+1
-1
vf_colorkey.c
libavfilter/vf_colorkey.c
+1
-1
vf_colormatrix.c
libavfilter/vf_colormatrix.c
+4
-4
vf_colorspace.c
libavfilter/vf_colorspace.c
+1
-1
vf_curves.c
libavfilter/vf_curves.c
+1
-1
vf_datascope.c
libavfilter/vf_datascope.c
+1
-1
vf_dctdnoiz.c
libavfilter/vf_dctdnoiz.c
+2
-2
vf_deband.c
libavfilter/vf_deband.c
+1
-1
vf_fade.c
libavfilter/vf_fade.c
+4
-4
vf_hflip.c
libavfilter/vf_hflip.c
+1
-1
vf_hqx.c
libavfilter/vf_hqx.c
+1
-1
vf_lenscorrection.c
libavfilter/vf_lenscorrection.c
+1
-1
vf_lut3d.c
libavfilter/vf_lut3d.c
+1
-1
vf_noise.c
libavfilter/vf_noise.c
+1
-1
vf_perspective.c
libavfilter/vf_perspective.c
+1
-1
vf_removegrain.c
libavfilter/vf_removegrain.c
+1
-1
vf_rotate.c
libavfilter/vf_rotate.c
+1
-1
vf_selectivecolor.c
libavfilter/vf_selectivecolor.c
+1
-1
vf_signalstats.c
libavfilter/vf_signalstats.c
+3
-3
vf_stereo3d.c
libavfilter/vf_stereo3d.c
+1
-1
vf_transpose.c
libavfilter/vf_transpose.c
+1
-1
vf_w3fdif.c
libavfilter/vf_w3fdif.c
+1
-1
vf_xbr.c
libavfilter/vf_xbr.c
+1
-1
vf_yadif.c
libavfilter/vf_yadif.c
+1
-1
No files found.
Changelog
View file @
a0a57072
...
@@ -23,6 +23,7 @@ version <next>:
...
@@ -23,6 +23,7 @@ version <next>:
- lut2 filter
- lut2 filter
- yuvtestsrc filter
- yuvtestsrc filter
- vaguedenoiser filter
- vaguedenoiser filter
- added threads option per filter instance
version 3.1:
version 3.1:
...
...
libavfilter/vf_atadenoise.c
View file @
a0a57072
...
@@ -357,7 +357,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *buf)
...
@@ -357,7 +357,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *buf)
ctx
->
internal
->
execute
(
ctx
,
s
->
filter_slice
,
&
td
,
NULL
,
ctx
->
internal
->
execute
(
ctx
,
s
->
filter_slice
,
&
td
,
NULL
,
FFMIN3
(
s
->
planeheight
[
1
],
FFMIN3
(
s
->
planeheight
[
1
],
s
->
planeheight
[
2
],
s
->
planeheight
[
2
],
ctx
->
graph
->
nb_threads
));
ff_filter_get_nb_threads
(
ctx
)
));
av_frame_copy_props
(
out
,
in
);
av_frame_copy_props
(
out
,
in
);
}
else
{
}
else
{
out
=
av_frame_clone
(
in
);
out
=
av_frame_clone
(
in
);
...
...
libavfilter/vf_blend.c
View file @
a0a57072
...
@@ -393,7 +393,7 @@ static AVFrame *blend_frame(AVFilterContext *ctx, AVFrame *top_buf,
...
@@ -393,7 +393,7 @@ static AVFrame *blend_frame(AVFilterContext *ctx, AVFrame *top_buf,
.
w
=
outw
,
.
h
=
outh
,
.
param
=
param
,
.
plane
=
plane
,
.
w
=
outw
,
.
h
=
outh
,
.
param
=
param
,
.
plane
=
plane
,
.
inlink
=
inlink
};
.
inlink
=
inlink
};
ctx
->
internal
->
execute
(
ctx
,
filter_slice
,
&
td
,
NULL
,
FFMIN
(
outh
,
ctx
->
graph
->
nb_threads
));
ctx
->
internal
->
execute
(
ctx
,
filter_slice
,
&
td
,
NULL
,
FFMIN
(
outh
,
ff_filter_get_nb_threads
(
ctx
)
));
}
}
if
(
!
s
->
tblend
)
if
(
!
s
->
tblend
)
...
...
libavfilter/vf_bwdif.c
View file @
a0a57072
...
@@ -278,7 +278,7 @@ static void filter(AVFilterContext *ctx, AVFrame *dstpic,
...
@@ -278,7 +278,7 @@ static void filter(AVFilterContext *ctx, AVFrame *dstpic,
td
.
h
=
h
;
td
.
h
=
h
;
td
.
plane
=
i
;
td
.
plane
=
i
;
ctx
->
internal
->
execute
(
ctx
,
filter_slice
,
&
td
,
NULL
,
FFMIN
(
h
,
ctx
->
graph
->
nb_threads
));
ctx
->
internal
->
execute
(
ctx
,
filter_slice
,
&
td
,
NULL
,
FFMIN
(
h
,
ff_filter_get_nb_threads
(
ctx
)
));
}
}
if
(
!
bwdif
->
inter_field
)
{
if
(
!
bwdif
->
inter_field
)
{
bwdif
->
inter_field
=
1
;
bwdif
->
inter_field
=
1
;
...
...
libavfilter/vf_chromakey.c
View file @
a0a57072
...
@@ -108,7 +108,7 @@ static int filter_frame(AVFilterLink *link, AVFrame *frame)
...
@@ -108,7 +108,7 @@ static int filter_frame(AVFilterLink *link, AVFrame *frame)
AVFilterContext
*
avctx
=
link
->
dst
;
AVFilterContext
*
avctx
=
link
->
dst
;
int
res
;
int
res
;
if
(
res
=
avctx
->
internal
->
execute
(
avctx
,
do_chromakey_slice
,
frame
,
NULL
,
FFMIN
(
frame
->
height
,
avctx
->
graph
->
nb_threads
)))
if
(
res
=
avctx
->
internal
->
execute
(
avctx
,
do_chromakey_slice
,
frame
,
NULL
,
FFMIN
(
frame
->
height
,
ff_filter_get_nb_threads
(
avctx
)
)))
return
res
;
return
res
;
return
ff_filter_frame
(
avctx
->
outputs
[
0
],
frame
);
return
ff_filter_frame
(
avctx
->
outputs
[
0
],
frame
);
...
...
libavfilter/vf_colorkey.c
View file @
a0a57072
...
@@ -85,7 +85,7 @@ static int filter_frame(AVFilterLink *link, AVFrame *frame)
...
@@ -85,7 +85,7 @@ static int filter_frame(AVFilterLink *link, AVFrame *frame)
if
(
res
=
av_frame_make_writable
(
frame
))
if
(
res
=
av_frame_make_writable
(
frame
))
return
res
;
return
res
;
if
(
res
=
avctx
->
internal
->
execute
(
avctx
,
do_colorkey_slice
,
frame
,
NULL
,
FFMIN
(
frame
->
height
,
avctx
->
graph
->
nb_threads
)))
if
(
res
=
avctx
->
internal
->
execute
(
avctx
,
do_colorkey_slice
,
frame
,
NULL
,
FFMIN
(
frame
->
height
,
ff_filter_get_nb_threads
(
avctx
)
)))
return
res
;
return
res
;
return
ff_filter_frame
(
avctx
->
outputs
[
0
],
frame
);
return
ff_filter_frame
(
avctx
->
outputs
[
0
],
frame
);
...
...
libavfilter/vf_colormatrix.c
View file @
a0a57072
...
@@ -474,16 +474,16 @@ static int filter_frame(AVFilterLink *link, AVFrame *in)
...
@@ -474,16 +474,16 @@ static int filter_frame(AVFilterLink *link, AVFrame *in)
if
(
in
->
format
==
AV_PIX_FMT_YUV444P
)
if
(
in
->
format
==
AV_PIX_FMT_YUV444P
)
ctx
->
internal
->
execute
(
ctx
,
process_slice_yuv444p
,
&
td
,
NULL
,
ctx
->
internal
->
execute
(
ctx
,
process_slice_yuv444p
,
&
td
,
NULL
,
FFMIN
(
in
->
height
,
ctx
->
graph
->
nb_threads
));
FFMIN
(
in
->
height
,
ff_filter_get_nb_threads
(
ctx
)
));
else
if
(
in
->
format
==
AV_PIX_FMT_YUV422P
)
else
if
(
in
->
format
==
AV_PIX_FMT_YUV422P
)
ctx
->
internal
->
execute
(
ctx
,
process_slice_yuv422p
,
&
td
,
NULL
,
ctx
->
internal
->
execute
(
ctx
,
process_slice_yuv422p
,
&
td
,
NULL
,
FFMIN
(
in
->
height
,
ctx
->
graph
->
nb_threads
));
FFMIN
(
in
->
height
,
ff_filter_get_nb_threads
(
ctx
)
));
else
if
(
in
->
format
==
AV_PIX_FMT_YUV420P
)
else
if
(
in
->
format
==
AV_PIX_FMT_YUV420P
)
ctx
->
internal
->
execute
(
ctx
,
process_slice_yuv420p
,
&
td
,
NULL
,
ctx
->
internal
->
execute
(
ctx
,
process_slice_yuv420p
,
&
td
,
NULL
,
FFMIN
(
in
->
height
/
2
,
ctx
->
graph
->
nb_threads
));
FFMIN
(
in
->
height
/
2
,
ff_filter_get_nb_threads
(
ctx
)
));
else
else
ctx
->
internal
->
execute
(
ctx
,
process_slice_uyvy422
,
&
td
,
NULL
,
ctx
->
internal
->
execute
(
ctx
,
process_slice_uyvy422
,
&
td
,
NULL
,
FFMIN
(
in
->
height
,
ctx
->
graph
->
nb_threads
));
FFMIN
(
in
->
height
,
ff_filter_get_nb_threads
(
ctx
)
));
av_frame_free
(
&
in
);
av_frame_free
(
&
in
);
return
ff_filter_frame
(
outlink
,
out
);
return
ff_filter_frame
(
outlink
,
out
);
...
...
libavfilter/vf_colorspace.c
View file @
a0a57072
...
@@ -947,7 +947,7 @@ static int filter_frame(AVFilterLink *link, AVFrame *in)
...
@@ -947,7 +947,7 @@ static int filter_frame(AVFilterLink *link, AVFrame *in)
return
res
;
return
res
;
}
else
{
}
else
{
ctx
->
internal
->
execute
(
ctx
,
convert
,
&
td
,
NULL
,
ctx
->
internal
->
execute
(
ctx
,
convert
,
&
td
,
NULL
,
FFMIN
((
in
->
height
+
1
)
>>
1
,
ctx
->
graph
->
nb_threads
));
FFMIN
((
in
->
height
+
1
)
>>
1
,
ff_filter_get_nb_threads
(
ctx
)
));
}
}
av_frame_free
(
&
in
);
av_frame_free
(
&
in
);
...
...
libavfilter/vf_curves.c
View file @
a0a57072
...
@@ -647,7 +647,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
...
@@ -647,7 +647,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
td
.
in
=
in
;
td
.
in
=
in
;
td
.
out
=
out
;
td
.
out
=
out
;
ctx
->
internal
->
execute
(
ctx
,
filter_slice
,
&
td
,
NULL
,
FFMIN
(
outlink
->
h
,
ctx
->
graph
->
nb_threads
));
ctx
->
internal
->
execute
(
ctx
,
filter_slice
,
&
td
,
NULL
,
FFMIN
(
outlink
->
h
,
ff_filter_get_nb_threads
(
ctx
)
));
if
(
out
!=
in
)
if
(
out
!=
in
)
av_frame_free
(
&
in
);
av_frame_free
(
&
in
);
...
...
libavfilter/vf_datascope.c
View file @
a0a57072
...
@@ -328,7 +328,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
...
@@ -328,7 +328,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
}
}
td
.
in
=
in
;
td
.
out
=
out
,
td
.
yoff
=
xmaxlen
,
td
.
xoff
=
ymaxlen
;
td
.
in
=
in
;
td
.
out
=
out
,
td
.
yoff
=
xmaxlen
,
td
.
xoff
=
ymaxlen
;
ctx
->
internal
->
execute
(
ctx
,
s
->
filter
,
&
td
,
NULL
,
FFMIN
(
ctx
->
graph
->
nb_threads
,
FFMAX
(
outlink
->
w
/
20
,
1
)));
ctx
->
internal
->
execute
(
ctx
,
s
->
filter
,
&
td
,
NULL
,
FFMIN
(
ff_filter_get_nb_threads
(
ctx
)
,
FFMAX
(
outlink
->
w
/
20
,
1
)));
av_frame_free
(
&
in
);
av_frame_free
(
&
in
);
return
ff_filter_frame
(
outlink
,
out
);
return
ff_filter_frame
(
outlink
,
out
);
...
...
libavfilter/vf_dctdnoiz.c
View file @
a0a57072
...
@@ -507,9 +507,9 @@ static int config_input(AVFilterLink *inlink)
...
@@ -507,9 +507,9 @@ static int config_input(AVFilterLink *inlink)
inlink
->
h
-
s
->
pr_height
);
inlink
->
h
-
s
->
pr_height
);
max_slice_h
=
s
->
pr_height
/
((
s
->
bsize
-
1
)
*
2
);
max_slice_h
=
s
->
pr_height
/
((
s
->
bsize
-
1
)
*
2
);
s
->
nb_threads
=
FFMIN3
(
MAX_THREADS
,
ctx
->
graph
->
nb_threads
,
max_slice_h
);
s
->
nb_threads
=
FFMIN3
(
MAX_THREADS
,
ff_filter_get_nb_threads
(
ctx
)
,
max_slice_h
);
av_log
(
ctx
,
AV_LOG_DEBUG
,
"threads: [max=%d hmax=%d user=%d] => %d
\n
"
,
av_log
(
ctx
,
AV_LOG_DEBUG
,
"threads: [max=%d hmax=%d user=%d] => %d
\n
"
,
MAX_THREADS
,
max_slice_h
,
ctx
->
graph
->
nb_threads
,
s
->
nb_threads
);
MAX_THREADS
,
max_slice_h
,
ff_filter_get_nb_threads
(
ctx
)
,
s
->
nb_threads
);
s
->
p_linesize
=
linesize
=
FFALIGN
(
s
->
pr_width
,
32
);
s
->
p_linesize
=
linesize
=
FFALIGN
(
s
->
pr_width
,
32
);
for
(
i
=
0
;
i
<
2
;
i
++
)
{
for
(
i
=
0
;
i
<
2
;
i
++
)
{
...
...
libavfilter/vf_deband.c
View file @
a0a57072
...
@@ -267,7 +267,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
...
@@ -267,7 +267,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
td
.
in
=
in
;
td
.
out
=
out
;
td
.
in
=
in
;
td
.
out
=
out
;
ctx
->
internal
->
execute
(
ctx
,
s
->
deband
,
&
td
,
NULL
,
FFMIN3
(
s
->
planeheight
[
1
],
ctx
->
internal
->
execute
(
ctx
,
s
->
deband
,
&
td
,
NULL
,
FFMIN3
(
s
->
planeheight
[
1
],
s
->
planeheight
[
2
],
s
->
planeheight
[
2
],
ctx
->
graph
->
nb_threads
));
ff_filter_get_nb_threads
(
ctx
)
));
av_frame_free
(
&
in
);
av_frame_free
(
&
in
);
return
ff_filter_frame
(
outlink
,
out
);
return
ff_filter_frame
(
outlink
,
out
);
...
...
libavfilter/vf_fade.c
View file @
a0a57072
...
@@ -347,19 +347,19 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
...
@@ -347,19 +347,19 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
if
(
s
->
factor
<
UINT16_MAX
)
{
if
(
s
->
factor
<
UINT16_MAX
)
{
if
(
s
->
alpha
)
{
if
(
s
->
alpha
)
{
ctx
->
internal
->
execute
(
ctx
,
filter_slice_alpha
,
frame
,
NULL
,
ctx
->
internal
->
execute
(
ctx
,
filter_slice_alpha
,
frame
,
NULL
,
FFMIN
(
frame
->
height
,
ctx
->
graph
->
nb_threads
));
FFMIN
(
frame
->
height
,
ff_filter_get_nb_threads
(
ctx
)
));
}
else
if
(
s
->
is_packed_rgb
&&
!
s
->
black_fade
)
{
}
else
if
(
s
->
is_packed_rgb
&&
!
s
->
black_fade
)
{
ctx
->
internal
->
execute
(
ctx
,
filter_slice_rgb
,
frame
,
NULL
,
ctx
->
internal
->
execute
(
ctx
,
filter_slice_rgb
,
frame
,
NULL
,
FFMIN
(
frame
->
height
,
ctx
->
graph
->
nb_threads
));
FFMIN
(
frame
->
height
,
ff_filter_get_nb_threads
(
ctx
)
));
}
else
{
}
else
{
/* luma, or rgb plane in case of black */
/* luma, or rgb plane in case of black */
ctx
->
internal
->
execute
(
ctx
,
filter_slice_luma
,
frame
,
NULL
,
ctx
->
internal
->
execute
(
ctx
,
filter_slice_luma
,
frame
,
NULL
,
FFMIN
(
frame
->
height
,
ctx
->
graph
->
nb_threads
));
FFMIN
(
frame
->
height
,
ff_filter_get_nb_threads
(
ctx
)
));
if
(
frame
->
data
[
1
]
&&
frame
->
data
[
2
])
{
if
(
frame
->
data
[
1
]
&&
frame
->
data
[
2
])
{
/* chroma planes */
/* chroma planes */
ctx
->
internal
->
execute
(
ctx
,
filter_slice_chroma
,
frame
,
NULL
,
ctx
->
internal
->
execute
(
ctx
,
filter_slice_chroma
,
frame
,
NULL
,
FFMIN
(
frame
->
height
,
ctx
->
graph
->
nb_threads
));
FFMIN
(
frame
->
height
,
ff_filter_get_nb_threads
(
ctx
)
));
}
}
}
}
}
}
...
...
libavfilter/vf_hflip.c
View file @
a0a57072
...
@@ -174,7 +174,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
...
@@ -174,7 +174,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
memcpy
(
out
->
data
[
1
],
in
->
data
[
1
],
AVPALETTE_SIZE
);
memcpy
(
out
->
data
[
1
],
in
->
data
[
1
],
AVPALETTE_SIZE
);
td
.
in
=
in
,
td
.
out
=
out
;
td
.
in
=
in
,
td
.
out
=
out
;
ctx
->
internal
->
execute
(
ctx
,
filter_slice
,
&
td
,
NULL
,
FFMIN
(
outlink
->
h
,
ctx
->
graph
->
nb_threads
));
ctx
->
internal
->
execute
(
ctx
,
filter_slice
,
&
td
,
NULL
,
FFMIN
(
outlink
->
h
,
ff_filter_get_nb_threads
(
ctx
)
));
av_frame_free
(
&
in
);
av_frame_free
(
&
in
);
return
ff_filter_frame
(
outlink
,
out
);
return
ff_filter_frame
(
outlink
,
out
);
...
...
libavfilter/vf_hqx.c
View file @
a0a57072
...
@@ -502,7 +502,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
...
@@ -502,7 +502,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
td
.
in
=
in
;
td
.
in
=
in
;
td
.
out
=
out
;
td
.
out
=
out
;
td
.
rgbtoyuv
=
hqx
->
rgbtoyuv
;
td
.
rgbtoyuv
=
hqx
->
rgbtoyuv
;
ctx
->
internal
->
execute
(
ctx
,
hqx
->
func
,
&
td
,
NULL
,
FFMIN
(
inlink
->
h
,
ctx
->
graph
->
nb_threads
));
ctx
->
internal
->
execute
(
ctx
,
hqx
->
func
,
&
td
,
NULL
,
FFMIN
(
inlink
->
h
,
ff_filter_get_nb_threads
(
ctx
)
));
av_frame_free
(
&
in
);
av_frame_free
(
&
in
);
return
ff_filter_frame
(
outlink
,
out
);
return
ff_filter_frame
(
outlink
,
out
);
...
...
libavfilter/vf_lenscorrection.c
View file @
a0a57072
...
@@ -193,7 +193,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
...
@@ -193,7 +193,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
}
}
td
.
correction
=
rect
->
correction
[
plane
];
td
.
correction
=
rect
->
correction
[
plane
];
ctx
->
internal
->
execute
(
ctx
,
filter_slice
,
&
td
,
NULL
,
FFMIN
(
h
,
ctx
->
graph
->
nb_threads
));
ctx
->
internal
->
execute
(
ctx
,
filter_slice
,
&
td
,
NULL
,
FFMIN
(
h
,
ff_filter_get_nb_threads
(
ctx
)
));
}
}
av_frame_free
(
&
in
);
av_frame_free
(
&
in
);
...
...
libavfilter/vf_lut3d.c
View file @
a0a57072
...
@@ -531,7 +531,7 @@ static AVFrame *apply_lut(AVFilterLink *inlink, AVFrame *in)
...
@@ -531,7 +531,7 @@ static AVFrame *apply_lut(AVFilterLink *inlink, AVFrame *in)
td
.
in
=
in
;
td
.
in
=
in
;
td
.
out
=
out
;
td
.
out
=
out
;
ctx
->
internal
->
execute
(
ctx
,
lut3d
->
interp
,
&
td
,
NULL
,
FFMIN
(
outlink
->
h
,
ctx
->
graph
->
nb_threads
));
ctx
->
internal
->
execute
(
ctx
,
lut3d
->
interp
,
&
td
,
NULL
,
FFMIN
(
outlink
->
h
,
ff_filter_get_nb_threads
(
ctx
)
));
if
(
out
!=
in
)
if
(
out
!=
in
)
av_frame_free
(
&
in
);
av_frame_free
(
&
in
);
...
...
libavfilter/vf_noise.c
View file @
a0a57072
...
@@ -272,7 +272,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *inpicref)
...
@@ -272,7 +272,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *inpicref)
}
}
td
.
in
=
inpicref
;
td
.
out
=
out
;
td
.
in
=
inpicref
;
td
.
out
=
out
;
ctx
->
internal
->
execute
(
ctx
,
filter_slice
,
&
td
,
NULL
,
FFMIN
(
n
->
height
[
0
],
ctx
->
graph
->
nb_threads
));
ctx
->
internal
->
execute
(
ctx
,
filter_slice
,
&
td
,
NULL
,
FFMIN
(
n
->
height
[
0
],
ff_filter_get_nb_threads
(
ctx
)
));
emms_c
();
emms_c
();
if
(
inpicref
!=
out
)
if
(
inpicref
!=
out
)
...
...
libavfilter/vf_perspective.c
View file @
a0a57072
...
@@ -478,7 +478,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
...
@@ -478,7 +478,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
.
h
=
s
->
height
[
plane
],
.
h
=
s
->
height
[
plane
],
.
hsub
=
hsub
,
.
hsub
=
hsub
,
.
vsub
=
vsub
};
.
vsub
=
vsub
};
ctx
->
internal
->
execute
(
ctx
,
s
->
perspective
,
&
td
,
NULL
,
FFMIN
(
td
.
h
,
ctx
->
graph
->
nb_threads
));
ctx
->
internal
->
execute
(
ctx
,
s
->
perspective
,
&
td
,
NULL
,
FFMIN
(
td
.
h
,
ff_filter_get_nb_threads
(
ctx
)
));
}
}
av_frame_free
(
&
frame
);
av_frame_free
(
&
frame
);
...
...
libavfilter/vf_removegrain.c
View file @
a0a57072
...
@@ -619,7 +619,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
...
@@ -619,7 +619,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
td
.
in
=
in
;
td
.
out
=
out
;
td
.
plane
=
i
;
td
.
in
=
in
;
td
.
out
=
out
;
td
.
plane
=
i
;
ctx
->
internal
->
execute
(
ctx
,
filter_slice
,
&
td
,
NULL
,
ctx
->
internal
->
execute
(
ctx
,
filter_slice
,
&
td
,
NULL
,
FFMIN
(
s
->
planeheight
[
i
],
ctx
->
graph
->
nb_threads
));
FFMIN
(
s
->
planeheight
[
i
],
ff_filter_get_nb_threads
(
ctx
)
));
src
=
in
->
data
[
i
]
+
(
s
->
planeheight
[
i
]
-
1
)
*
in
->
linesize
[
i
];
src
=
in
->
data
[
i
]
+
(
s
->
planeheight
[
i
]
-
1
)
*
in
->
linesize
[
i
];
dst
=
out
->
data
[
i
]
+
(
s
->
planeheight
[
i
]
-
1
)
*
out
->
linesize
[
i
];
dst
=
out
->
data
[
i
]
+
(
s
->
planeheight
[
i
]
-
1
)
*
out
->
linesize
[
i
];
...
...
libavfilter/vf_rotate.c
View file @
a0a57072
...
@@ -553,7 +553,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
...
@@ -553,7 +553,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
.
plane
=
plane
,
.
c
=
c
,
.
s
=
s
};
.
plane
=
plane
,
.
c
=
c
,
.
s
=
s
};
ctx
->
internal
->
execute
(
ctx
,
filter_slice
,
&
td
,
NULL
,
FFMIN
(
outh
,
ctx
->
graph
->
nb_threads
));
ctx
->
internal
->
execute
(
ctx
,
filter_slice
,
&
td
,
NULL
,
FFMIN
(
outh
,
ff_filter_get_nb_threads
(
ctx
)
));
}
}
av_frame_free
(
&
in
);
av_frame_free
(
&
in
);
...
...
libavfilter/vf_selectivecolor.c
View file @
a0a57072
...
@@ -471,7 +471,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
...
@@ -471,7 +471,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
td
.
in
=
in
;
td
.
in
=
in
;
td
.
out
=
out
;
td
.
out
=
out
;
ctx
->
internal
->
execute
(
ctx
,
funcs
[
s
->
is_16bit
][
direct
][
s
->
correction_method
],
ctx
->
internal
->
execute
(
ctx
,
funcs
[
s
->
is_16bit
][
direct
][
s
->
correction_method
],
&
td
,
NULL
,
FFMIN
(
inlink
->
h
,
ctx
->
graph
->
nb_threads
));
&
td
,
NULL
,
FFMIN
(
inlink
->
h
,
ff_filter_get_nb_threads
(
ctx
)
));
if
(
!
direct
)
if
(
!
direct
)
av_frame_free
(
&
in
);
av_frame_free
(
&
in
);
...
...
libavfilter/vf_signalstats.c
View file @
a0a57072
...
@@ -185,7 +185,7 @@ static int config_props(AVFilterLink *outlink)
...
@@ -185,7 +185,7 @@ static int config_props(AVFilterLink *outlink)
s
->
fs
=
inlink
->
w
*
inlink
->
h
;
s
->
fs
=
inlink
->
w
*
inlink
->
h
;
s
->
cfs
=
s
->
chromaw
*
s
->
chromah
;
s
->
cfs
=
s
->
chromaw
*
s
->
chromah
;
s
->
nb_jobs
=
FFMAX
(
1
,
FFMIN
(
inlink
->
h
,
ctx
->
graph
->
nb_threads
));
s
->
nb_jobs
=
FFMAX
(
1
,
FFMIN
(
inlink
->
h
,
ff_filter_get_nb_threads
(
ctx
)
));
s
->
jobs_rets
=
av_malloc_array
(
s
->
nb_jobs
,
sizeof
(
*
s
->
jobs_rets
));
s
->
jobs_rets
=
av_malloc_array
(
s
->
nb_jobs
,
sizeof
(
*
s
->
jobs_rets
));
if
(
!
s
->
jobs_rets
)
if
(
!
s
->
jobs_rets
)
return
AVERROR
(
ENOMEM
);
return
AVERROR
(
ENOMEM
);
...
@@ -602,7 +602,7 @@ static int filter_frame8(AVFilterLink *link, AVFrame *in)
...
@@ -602,7 +602,7 @@ static int filter_frame8(AVFilterLink *link, AVFrame *in)
}
}
ctx
->
internal
->
execute
(
ctx
,
compute_sat_hue_metrics8
,
&
td_huesat
,
ctx
->
internal
->
execute
(
ctx
,
compute_sat_hue_metrics8
,
&
td_huesat
,
NULL
,
FFMIN
(
s
->
chromah
,
ctx
->
graph
->
nb_threads
));
NULL
,
FFMIN
(
s
->
chromah
,
ff_filter_get_nb_threads
(
ctx
)
));
// Calculate luma histogram and difference with previous frame or field.
// Calculate luma histogram and difference with previous frame or field.
for
(
j
=
0
;
j
<
link
->
h
;
j
++
)
{
for
(
j
=
0
;
j
<
link
->
h
;
j
++
)
{
...
@@ -820,7 +820,7 @@ static int filter_frame16(AVFilterLink *link, AVFrame *in)
...
@@ -820,7 +820,7 @@ static int filter_frame16(AVFilterLink *link, AVFrame *in)
}
}
ctx
->
internal
->
execute
(
ctx
,
compute_sat_hue_metrics16
,
&
td_huesat
,
ctx
->
internal
->
execute
(
ctx
,
compute_sat_hue_metrics16
,
&
td_huesat
,
NULL
,
FFMIN
(
s
->
chromah
,
ctx
->
graph
->
nb_threads
));
NULL
,
FFMIN
(
s
->
chromah
,
ff_filter_get_nb_threads
(
ctx
)
));
// Calculate luma histogram and difference with previous frame or field.
// Calculate luma histogram and difference with previous frame or field.
memset
(
s
->
histy
,
0
,
(
1
<<
s
->
depth
)
*
sizeof
(
*
s
->
histy
));
memset
(
s
->
histy
,
0
,
(
1
<<
s
->
depth
)
*
sizeof
(
*
s
->
histy
));
...
...
libavfilter/vf_stereo3d.c
View file @
a0a57072
...
@@ -935,7 +935,7 @@ copy:
...
@@ -935,7 +935,7 @@ copy:
td
.
ileft
=
ileft
;
td
.
iright
=
iright
;
td
.
out
=
out
;
td
.
ileft
=
ileft
;
td
.
iright
=
iright
;
td
.
out
=
out
;
ctx
->
internal
->
execute
(
ctx
,
filter_slice
,
&
td
,
NULL
,
ctx
->
internal
->
execute
(
ctx
,
filter_slice
,
&
td
,
NULL
,
FFMIN
(
s
->
out
.
height
,
ctx
->
graph
->
nb_threads
));
FFMIN
(
s
->
out
.
height
,
ff_filter_get_nb_threads
(
ctx
)
));
}
}
break
;
break
;
}
}
...
...
libavfilter/vf_transpose.c
View file @
a0a57072
...
@@ -250,7 +250,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
...
@@ -250,7 +250,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
}
}
td
.
in
=
in
,
td
.
out
=
out
;
td
.
in
=
in
,
td
.
out
=
out
;
ctx
->
internal
->
execute
(
ctx
,
filter_slice
,
&
td
,
NULL
,
FFMIN
(
outlink
->
h
,
ctx
->
graph
->
nb_threads
));
ctx
->
internal
->
execute
(
ctx
,
filter_slice
,
&
td
,
NULL
,
FFMIN
(
outlink
->
h
,
ff_filter_get_nb_threads
(
ctx
)
));
av_frame_free
(
&
in
);
av_frame_free
(
&
in
);
return
ff_filter_frame
(
outlink
,
out
);
return
ff_filter_frame
(
outlink
,
out
);
}
}
...
...
libavfilter/vf_w3fdif.c
View file @
a0a57072
...
@@ -170,7 +170,7 @@ static int config_input(AVFilterLink *inlink)
...
@@ -170,7 +170,7 @@ static int config_input(AVFilterLink *inlink)
s
->
planeheight
[
0
]
=
s
->
planeheight
[
3
]
=
inlink
->
h
;
s
->
planeheight
[
0
]
=
s
->
planeheight
[
3
]
=
inlink
->
h
;
s
->
nb_planes
=
av_pix_fmt_count_planes
(
inlink
->
format
);
s
->
nb_planes
=
av_pix_fmt_count_planes
(
inlink
->
format
);
s
->
nb_threads
=
ctx
->
graph
->
nb_threads
;
s
->
nb_threads
=
ff_filter_get_nb_threads
(
ctx
)
;
s
->
work_line
=
av_calloc
(
s
->
nb_threads
,
sizeof
(
*
s
->
work_line
));
s
->
work_line
=
av_calloc
(
s
->
nb_threads
,
sizeof
(
*
s
->
work_line
));
if
(
!
s
->
work_line
)
if
(
!
s
->
work_line
)
return
AVERROR
(
ENOMEM
);
return
AVERROR
(
ENOMEM
);
...
...
libavfilter/vf_xbr.c
View file @
a0a57072
...
@@ -367,7 +367,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
...
@@ -367,7 +367,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
td
.
in
=
in
;
td
.
in
=
in
;
td
.
out
=
out
;
td
.
out
=
out
;
td
.
rgbtoyuv
=
s
->
rgbtoyuv
;
td
.
rgbtoyuv
=
s
->
rgbtoyuv
;
ctx
->
internal
->
execute
(
ctx
,
s
->
func
,
&
td
,
NULL
,
FFMIN
(
inlink
->
h
,
ctx
->
graph
->
nb_threads
));
ctx
->
internal
->
execute
(
ctx
,
s
->
func
,
&
td
,
NULL
,
FFMIN
(
inlink
->
h
,
ff_filter_get_nb_threads
(
ctx
)
));
out
->
width
=
outlink
->
w
;
out
->
width
=
outlink
->
w
;
out
->
height
=
outlink
->
h
;
out
->
height
=
outlink
->
h
;
...
...
libavfilter/vf_yadif.c
View file @
a0a57072
...
@@ -242,7 +242,7 @@ static void filter(AVFilterContext *ctx, AVFrame *dstpic,
...
@@ -242,7 +242,7 @@ static void filter(AVFilterContext *ctx, AVFrame *dstpic,
td
.
h
=
h
;
td
.
h
=
h
;
td
.
plane
=
i
;
td
.
plane
=
i
;
ctx
->
internal
->
execute
(
ctx
,
filter_slice
,
&
td
,
NULL
,
FFMIN
(
h
,
ctx
->
graph
->
nb_threads
));
ctx
->
internal
->
execute
(
ctx
,
filter_slice
,
&
td
,
NULL
,
FFMIN
(
h
,
ff_filter_get_nb_threads
(
ctx
)
));
}
}
emms_c
();
emms_c
();
...
...
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