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
3eae531d
Commit
3eae531d
authored
Dec 08, 2012
by
Stefano Sabatini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavfi/swapuv: switch to filter_frame API
parent
e6701d51
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
8 deletions
+12
-8
vf_swapuv.c
libavfilter/vf_swapuv.c
+12
-8
No files found.
libavfilter/vf_swapuv.c
View file @
3eae531d
...
@@ -25,6 +25,7 @@
...
@@ -25,6 +25,7 @@
#include "avfilter.h"
#include "avfilter.h"
#include "formats.h"
#include "formats.h"
#include "internal.h"
#include "video.h"
#include "video.h"
static
AVFilterBufferRef
*
get_video_buffer
(
AVFilterLink
*
link
,
int
perms
,
static
AVFilterBufferRef
*
get_video_buffer
(
AVFilterLink
*
link
,
int
perms
,
...
@@ -46,17 +47,20 @@ static AVFilterBufferRef *get_video_buffer(AVFilterLink *link, int perms,
...
@@ -46,17 +47,20 @@ 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
*
inpicref
)
{
{
AVFilterBufferRef
*
outpicref
=
avfilter_ref_buffer
(
inpicref
,
~
0
);
uint8_t
*
tmp_data
;
int
tmp_linesize
;
outpicref
->
data
[
1
]
=
inpicref
->
data
[
2
];
tmp_data
=
inpicref
->
data
[
1
];
outpicref
->
data
[
2
]
=
inpicref
->
data
[
1
];
inpicref
->
data
[
1
]
=
inpicref
->
data
[
2
];
inpicref
->
data
[
2
]
=
tmp_data
;
outpicref
->
linesize
[
1
]
=
inpicref
->
linesize
[
2
];
tmp_linesize
=
inpicref
->
linesize
[
1
];
outpicref
->
linesize
[
2
]
=
inpicref
->
linesize
[
1
];
inpicref
->
linesize
[
1
]
=
inpicref
->
linesize
[
2
];
inpicref
->
linesize
[
2
]
=
tmp_linesize
;
return
ff_
start_frame
(
link
->
dst
->
outputs
[
0
],
out
picref
);
return
ff_
filter_frame
(
link
->
dst
->
outputs
[
0
],
in
picref
);
}
}
static
int
query_formats
(
AVFilterContext
*
ctx
)
static
int
query_formats
(
AVFilterContext
*
ctx
)
...
@@ -79,7 +83,7 @@ static const AVFilterPad swapuv_inputs[] = {
...
@@ -79,7 +83,7 @@ static const AVFilterPad swapuv_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
,
},
},
{
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