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
267290ce
Commit
267290ce
authored
Nov 28, 2012
by
Anton Khirnov
Committed by
Michael Niedermayer
Nov 28, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vflip: switch to filter_frame
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
8c1f98d9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
19 deletions
+6
-19
vf_vflip.c
libavfilter/vf_vflip.c
+6
-19
No files found.
libavfilter/vf_vflip.c
View file @
267290ce
...
@@ -69,41 +69,28 @@ static AVFilterBufferRef *get_video_buffer(AVFilterLink *link, int perms,
...
@@ -69,41 +69,28 @@ static AVFilterBufferRef *get_video_buffer(AVFilterLink *link, int perms,
return
picref
;
return
picref
;
}
}
static
int
start_frame
(
AVFilterLink
*
link
,
AVFilterBufferRef
*
inpicref
)
static
int
filter_frame
(
AVFilterLink
*
link
,
AVFilterBufferRef
*
frame
)
{
{
FlipContext
*
flip
=
link
->
dst
->
priv
;
FlipContext
*
flip
=
link
->
dst
->
priv
;
AVFilterBufferRef
*
outpicref
=
avfilter_ref_buffer
(
inpicref
,
~
0
);
int
i
;
int
i
;
if
(
!
outpicref
)
return
AVERROR
(
ENOMEM
);
for
(
i
=
0
;
i
<
4
;
i
++
)
{
for
(
i
=
0
;
i
<
4
;
i
++
)
{
int
vsub
=
i
==
1
||
i
==
2
?
flip
->
vsub
:
0
;
int
vsub
=
i
==
1
||
i
==
2
?
flip
->
vsub
:
0
;
if
(
outpicref
->
data
[
i
])
{
if
(
frame
->
data
[
i
])
{
outpicref
->
data
[
i
]
+=
(((
link
->
h
+
(
1
<<
vsub
)
-
1
)
>>
vsub
)
-
1
)
*
outpicref
->
linesize
[
i
];
frame
->
data
[
i
]
+=
(((
link
->
h
+
(
1
<<
vsub
)
-
1
)
>>
vsub
)
-
1
)
*
frame
->
linesize
[
i
];
outpicref
->
linesize
[
i
]
=
-
outpicref
->
linesize
[
i
];
frame
->
linesize
[
i
]
=
-
frame
->
linesize
[
i
];
}
}
}
}
return
ff_start_frame
(
link
->
dst
->
outputs
[
0
],
outpicref
);
return
ff_filter_frame
(
link
->
dst
->
outputs
[
0
],
frame
);
}
static
int
draw_slice
(
AVFilterLink
*
link
,
int
y
,
int
h
,
int
slice_dir
)
{
AVFilterContext
*
ctx
=
link
->
dst
;
return
ff_draw_slice
(
ctx
->
outputs
[
0
],
link
->
h
-
(
y
+
h
),
h
,
-
1
*
slice_dir
);
}
}
static
const
AVFilterPad
avfilter_vf_vflip_inputs
[]
=
{
static
const
AVFilterPad
avfilter_vf_vflip_inputs
[]
=
{
{
{
.
name
=
"default"
,
.
name
=
"default"
,
.
type
=
AVMEDIA_TYPE_VIDEO
,
.
type
=
AVMEDIA_TYPE_VIDEO
,
.
get_video_buffer
=
get_video_buffer
,
.
get_video_buffer
=
get_video_buffer
,
.
start_frame
=
start_frame
,
.
filter_frame
=
filter_frame
,
.
draw_slice
=
draw_slice
,
.
config_props
=
config_input
,
.
config_props
=
config_input
,
},
},
{
NULL
}
{
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