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
f3d8a4ea
Commit
f3d8a4ea
authored
Nov 18, 2018
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/vf_limiter: always limit min/max to format depth
parent
40b74abf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
vf_limiter.c
libavfilter/vf_limiter.c
+6
-4
No files found.
libavfilter/vf_limiter.c
View file @
f3d8a4ea
...
...
@@ -138,13 +138,14 @@ static int config_props(AVFilterLink *inlink)
AVFilterContext
*
ctx
=
inlink
->
dst
;
LimiterContext
*
s
=
ctx
->
priv
;
const
AVPixFmtDescriptor
*
desc
=
av_pix_fmt_desc_get
(
inlink
->
format
);
int
vsub
,
hsub
,
ret
;
int
depth
,
vsub
,
hsub
,
ret
;
s
->
nb_planes
=
av_pix_fmt_count_planes
(
inlink
->
format
);
if
((
ret
=
av_image_fill_linesizes
(
s
->
linesize
,
inlink
->
format
,
inlink
->
w
))
<
0
)
return
ret
;
depth
=
desc
->
comp
[
0
].
depth
;
hsub
=
desc
->
log2_chroma_w
;
vsub
=
desc
->
log2_chroma_h
;
s
->
height
[
1
]
=
s
->
height
[
2
]
=
AV_CEIL_RSHIFT
(
inlink
->
h
,
vsub
);
...
...
@@ -152,10 +153,11 @@ static int config_props(AVFilterLink *inlink)
s
->
width
[
1
]
=
s
->
width
[
2
]
=
AV_CEIL_RSHIFT
(
inlink
->
w
,
hsub
);
s
->
width
[
0
]
=
s
->
width
[
3
]
=
inlink
->
w
;
if
(
desc
->
comp
[
0
].
depth
==
8
)
{
s
->
max
=
FFMIN
(
s
->
max
,
(
1
<<
depth
)
-
1
);
s
->
min
=
FFMIN
(
s
->
min
,
(
1
<<
depth
)
-
1
);
if
(
depth
==
8
)
{
s
->
dsp
.
limiter
=
limiter8
;
s
->
max
=
FFMIN
(
s
->
max
,
255
);
s
->
min
=
FFMIN
(
s
->
min
,
255
);
}
else
{
s
->
dsp
.
limiter
=
limiter16
;
}
...
...
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