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
60f0e304
Commit
60f0e304
authored
May 10, 2013
by
Clément Bœsch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavfi/vflip: use FF_CEIL_RSHIFT for chroma w/h rounding.
parent
59d33eaf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
vf_vflip.c
libavfilter/vf_vflip.c
+4
-2
No files found.
libavfilter/vf_vflip.c
View file @
60f0e304
...
...
@@ -55,9 +55,10 @@ static AVFrame *get_video_buffer(AVFilterLink *link, int w, int h)
for
(
i
=
0
;
i
<
4
;
i
++
)
{
int
vsub
=
i
==
1
||
i
==
2
?
flip
->
vsub
:
0
;
int
height
=
FF_CEIL_RSHIFT
(
h
,
vsub
);
if
(
frame
->
data
[
i
])
{
frame
->
data
[
i
]
+=
(
((
h
+
(
1
<<
vsub
)
-
1
)
>>
vsub
)
-
1
)
*
frame
->
linesize
[
i
];
frame
->
data
[
i
]
+=
(
height
-
1
)
*
frame
->
linesize
[
i
];
frame
->
linesize
[
i
]
=
-
frame
->
linesize
[
i
];
}
}
...
...
@@ -72,9 +73,10 @@ static int filter_frame(AVFilterLink *link, AVFrame *frame)
for
(
i
=
0
;
i
<
4
;
i
++
)
{
int
vsub
=
i
==
1
||
i
==
2
?
flip
->
vsub
:
0
;
int
height
=
FF_CEIL_RSHIFT
(
link
->
h
,
vsub
);
if
(
frame
->
data
[
i
])
{
frame
->
data
[
i
]
+=
(
((
link
->
h
+
(
1
<<
vsub
)
-
1
)
>>
vsub
)
-
1
)
*
frame
->
linesize
[
i
];
frame
->
data
[
i
]
+=
(
height
-
1
)
*
frame
->
linesize
[
i
];
frame
->
linesize
[
i
]
=
-
frame
->
linesize
[
i
];
}
}
...
...
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