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
d7dcd96a
Commit
d7dcd96a
authored
Oct 27, 2011
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vf_pad: Fix alignment of get_video_buffer()
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
d18fd13f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
vf_pad.c
libavfilter/vf_pad.c
+3
-2
No files found.
libavfilter/vf_pad.c
View file @
d7dcd96a
...
...
@@ -251,9 +251,10 @@ static int config_output(AVFilterLink *outlink)
static
AVFilterBufferRef
*
get_video_buffer
(
AVFilterLink
*
inlink
,
int
perms
,
int
w
,
int
h
)
{
PadContext
*
pad
=
inlink
->
dst
->
priv
;
int
align
=
(
perms
&
AV_PERM_ALIGN
)
?
AVFILTER_ALIGN
:
1
;
AVFilterBufferRef
*
picref
=
avfilter_get_video_buffer
(
inlink
->
dst
->
outputs
[
0
],
perms
,
w
+
(
pad
->
w
-
pad
->
in_w
),
w
+
(
pad
->
w
-
pad
->
in_w
)
+
4
*
align
,
h
+
(
pad
->
h
-
pad
->
in_h
));
int
plane
;
...
...
@@ -264,7 +265,7 @@ static AVFilterBufferRef *get_video_buffer(AVFilterLink *inlink, int perms, int
int
hsub
=
(
plane
==
1
||
plane
==
2
)
?
pad
->
hsub
:
0
;
int
vsub
=
(
plane
==
1
||
plane
==
2
)
?
pad
->
vsub
:
0
;
picref
->
data
[
plane
]
+=
(
pad
->
x
>>
hsub
)
*
pad
->
line_step
[
plane
]
+
picref
->
data
[
plane
]
+=
FFALIGN
(
pad
->
x
>>
hsub
,
align
)
*
pad
->
line_step
[
plane
]
+
(
pad
->
y
>>
vsub
)
*
picref
->
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