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
244766e4
Commit
244766e4
authored
Dec 18, 2015
by
Clément Bœsch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavfi/scale: add nb_slices debug option
parent
484cc66f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
vf_scale.c
libavfilter/vf_scale.c
+12
-0
No files found.
libavfilter/vf_scale.c
View file @
244766e4
...
...
@@ -110,6 +110,8 @@ typedef struct ScaleContext {
int
in_v_chr_pos
;
int
force_original_aspect_ratio
;
int
nb_slices
;
}
ScaleContext
;
AVFilter
ff_vf_scale2ref
;
...
...
@@ -575,6 +577,15 @@ static int filter_frame(AVFilterLink *link, AVFrame *in)
if
(
scale
->
interlaced
>
0
||
(
scale
->
interlaced
<
0
&&
in
->
interlaced_frame
)){
scale_slice
(
link
,
out
,
in
,
scale
->
isws
[
0
],
0
,
(
link
->
h
+
1
)
/
2
,
2
,
0
);
scale_slice
(
link
,
out
,
in
,
scale
->
isws
[
1
],
0
,
link
->
h
/
2
,
2
,
1
);
}
else
if
(
scale
->
nb_slices
)
{
int
i
,
slice_h
,
slice_start
,
slice_end
=
0
;
const
int
nb_slices
=
FFMIN
(
scale
->
nb_slices
,
link
->
h
);
for
(
i
=
0
;
i
<
nb_slices
;
i
++
)
{
slice_start
=
slice_end
;
slice_end
=
(
link
->
h
*
(
i
+
1
))
/
nb_slices
;
slice_h
=
slice_end
-
slice_start
;
scale_slice
(
link
,
out
,
in
,
scale
->
sws
,
slice_start
,
slice_h
,
1
,
0
);
}
}
else
{
scale_slice
(
link
,
out
,
in
,
scale
->
sws
,
0
,
link
->
h
,
1
,
0
);
}
...
...
@@ -651,6 +662,7 @@ static const AVOption scale_options[] = {
{
"increase"
,
NULL
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
2
},
0
,
0
,
FLAGS
,
"force_oar"
},
{
"param0"
,
"Scaler param 0"
,
OFFSET
(
param
[
0
]),
AV_OPT_TYPE_DOUBLE
,
{
.
dbl
=
SWS_PARAM_DEFAULT
},
INT_MIN
,
INT_MAX
,
FLAGS
},
{
"param1"
,
"Scaler param 1"
,
OFFSET
(
param
[
1
]),
AV_OPT_TYPE_DOUBLE
,
{
.
dbl
=
SWS_PARAM_DEFAULT
},
INT_MIN
,
INT_MAX
,
FLAGS
},
{
"nb_slices"
,
"set the number of slices (debug purpose only)"
,
OFFSET
(
nb_slices
),
AV_OPT_TYPE_INT
,
{
.
i64
=
0
},
0
,
INT_MAX
,
FLAGS
},
{
NULL
}
};
...
...
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