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
59d33eaf
Commit
59d33eaf
authored
May 10, 2013
by
Clément Bœsch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavfi/lut: use FF_CEIL_RSHIFT for chroma w/h rounding.
parent
91cae60e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
vf_lut.c
libavfilter/vf_lut.c
+3
-2
No files found.
libavfilter/vf_lut.c
View file @
59d33eaf
...
@@ -305,13 +305,14 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
...
@@ -305,13 +305,14 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
for
(
plane
=
0
;
plane
<
4
&&
in
->
data
[
plane
];
plane
++
)
{
for
(
plane
=
0
;
plane
<
4
&&
in
->
data
[
plane
];
plane
++
)
{
int
vsub
=
plane
==
1
||
plane
==
2
?
lut
->
vsub
:
0
;
int
vsub
=
plane
==
1
||
plane
==
2
?
lut
->
vsub
:
0
;
int
hsub
=
plane
==
1
||
plane
==
2
?
lut
->
hsub
:
0
;
int
hsub
=
plane
==
1
||
plane
==
2
?
lut
->
hsub
:
0
;
int
h
=
FF_CEIL_RSHIFT
(
inlink
->
h
,
vsub
);
int
w
=
FF_CEIL_RSHIFT
(
inlink
->
w
,
hsub
);
inrow
=
in
->
data
[
plane
];
inrow
=
in
->
data
[
plane
];
outrow
=
out
->
data
[
plane
];
outrow
=
out
->
data
[
plane
];
for
(
i
=
0
;
i
<
(
in
->
height
+
(
1
<<
vsub
)
-
1
)
>>
vsub
;
i
++
)
{
for
(
i
=
0
;
i
<
h
;
i
++
)
{
const
uint8_t
*
tab
=
lut
->
lut
[
plane
];
const
uint8_t
*
tab
=
lut
->
lut
[
plane
];
int
w
=
(
inlink
->
w
+
(
1
<<
hsub
)
-
1
)
>>
hsub
;
for
(
j
=
0
;
j
<
w
;
j
++
)
for
(
j
=
0
;
j
<
w
;
j
++
)
outrow
[
j
]
=
tab
[
inrow
[
j
]];
outrow
[
j
]
=
tab
[
inrow
[
j
]];
inrow
+=
in
->
linesize
[
plane
];
inrow
+=
in
->
linesize
[
plane
];
...
...
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