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
be96201e
Commit
be96201e
authored
Nov 15, 2014
by
Clément Bœsch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/xbr: use function pointers for xbr[234]x
parent
c4fb79a3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
vf_xbr.c
libavfilter/vf_xbr.c
+7
-6
No files found.
libavfilter/vf_xbr.c
View file @
be96201e
...
...
@@ -40,9 +40,12 @@
#define RED_BLUE_MASK 0x00FF00FF
#define GREEN_MASK 0x0000FF00
typedef
void
(
*
xbrfunc_t
)(
AVFrame
*
input
,
AVFrame
*
output
,
const
uint32_t
*
r2y
);
typedef
struct
{
const
AVClass
*
class
;
int
n
;
xbrfunc_t
func
;
uint32_t
rgbtoyuv
[
1
<<
24
];
}
XBRContext
;
...
...
@@ -392,12 +395,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
}
av_frame_copy_props
(
out
,
in
);
if
(
xbr
->
n
==
4
)
xbr4x
(
in
,
out
,
r2y
);
else
if
(
xbr
->
n
==
3
)
xbr3x
(
in
,
out
,
r2y
);
else
xbr2x
(
in
,
out
,
r2y
);
xbr
->
func
(
in
,
out
,
r2y
);
out
->
width
=
outlink
->
w
;
out
->
height
=
outlink
->
h
;
...
...
@@ -409,6 +407,8 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
static
int
init
(
AVFilterContext
*
ctx
)
{
XBRContext
*
xbr
=
ctx
->
priv
;
static
const
xbrfunc_t
xbrfuncs
[]
=
{
xbr2x
,
xbr3x
,
xbr4x
};
uint32_t
c
;
int
bg
,
rg
,
g
;
...
...
@@ -427,6 +427,7 @@ static int init(AVFilterContext *ctx)
}
}
xbr
->
func
=
xbrfuncs
[
xbr
->
n
-
2
];
return
0
;
}
...
...
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