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
55f05ac0
Commit
55f05ac0
authored
Nov 11, 2014
by
Clément Bœsch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/xbr: use different macro names for each dimension
parent
9f9c7417
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
18 deletions
+15
-18
vf_xbr.c
libavfilter/vf_xbr.c
+15
-18
No files found.
libavfilter/vf_xbr.c
View file @
55f05ac0
...
...
@@ -96,7 +96,7 @@ static uint32_t pixel_diff(uint32_t x, uint32_t y, const uint32_t *r2y)
#define eq(A, B)\
(df(A, B) < 155)\
#define FILT
RO
(PE, PI, PH, PF, PG, PC, PD, PB, PA, G5, C4, G0, D0, C1, B1, F4, I4, H5, I5, A0, A1, N0, N1, N2, N3) do { \
#define FILT
2
(PE, PI, PH, PF, PG, PC, PD, PB, PA, G5, C4, G0, D0, C1, B1, F4, I4, H5, I5, A0, A1, N0, N1, N2, N3) do { \
unsigned ex = (PE!=PH && PE!=PF); \
if ( ex )\
{\
...
...
@@ -232,10 +232,10 @@ static void xbr2x(AVFrame * input, AVFrame * output, const uint32_t * r2y)
E
[
0
]
=
E
[
1
]
=
E
[
next_line
]
=
E
[
next_line
+
1
]
=
PE
;
// 0, 1, 2, 3
FILT
RO
(
PE
,
PI
,
PH
,
PF
,
PG
,
PC
,
PD
,
PB
,
PA
,
G5
,
C4
,
G0
,
D0
,
C1
,
B1
,
F4
,
I4
,
H5
,
I5
,
A0
,
A1
,
0
,
1
,
next_line
,
next_line
+
1
);
FILT
RO
(
PE
,
PC
,
PF
,
PB
,
PI
,
PA
,
PH
,
PD
,
PG
,
I4
,
A1
,
I5
,
H5
,
A0
,
D0
,
B1
,
C1
,
F4
,
C4
,
G5
,
G0
,
next_line
,
0
,
next_line
+
1
,
1
);
FILT
RO
(
PE
,
PA
,
PB
,
PD
,
PC
,
PG
,
PF
,
PH
,
PI
,
C1
,
G0
,
C4
,
F4
,
G5
,
H5
,
D0
,
A0
,
B1
,
A1
,
I4
,
I5
,
next_line
+
1
,
next_line
,
1
,
0
);
FILT
RO
(
PE
,
PG
,
PD
,
PH
,
PA
,
PI
,
PB
,
PF
,
PC
,
A0
,
I5
,
A1
,
B1
,
I4
,
F4
,
H5
,
G5
,
D0
,
G0
,
C1
,
C4
,
1
,
next_line
+
1
,
0
,
next_line
);
FILT
2
(
PE
,
PI
,
PH
,
PF
,
PG
,
PC
,
PD
,
PB
,
PA
,
G5
,
C4
,
G0
,
D0
,
C1
,
B1
,
F4
,
I4
,
H5
,
I5
,
A0
,
A1
,
0
,
1
,
next_line
,
next_line
+
1
);
FILT
2
(
PE
,
PC
,
PF
,
PB
,
PI
,
PA
,
PH
,
PD
,
PG
,
I4
,
A1
,
I5
,
H5
,
A0
,
D0
,
B1
,
C1
,
F4
,
C4
,
G5
,
G0
,
next_line
,
0
,
next_line
+
1
,
1
);
FILT
2
(
PE
,
PA
,
PB
,
PD
,
PC
,
PG
,
PF
,
PH
,
PI
,
C1
,
G0
,
C4
,
F4
,
G5
,
H5
,
D0
,
A0
,
B1
,
A1
,
I4
,
I5
,
next_line
+
1
,
next_line
,
1
,
0
);
FILT
2
(
PE
,
PG
,
PD
,
PH
,
PA
,
PI
,
PB
,
PF
,
PC
,
A0
,
I5
,
A1
,
B1
,
I4
,
F4
,
H5
,
G5
,
D0
,
G0
,
C1
,
C4
,
1
,
next_line
+
1
,
0
,
next_line
);
sa0
+=
1
;
sa1
+=
1
;
...
...
@@ -252,9 +252,8 @@ static void xbr2x(AVFrame * input, AVFrame * output, const uint32_t * r2y)
}
}
}
#undef FILTRO
#define FILT
RO
(PE, PI, PH, PF, PG, PC, PD, PB, PA, G5, C4, G0, D0, C1, B1, F4, I4, H5, I5, A0, A1, N0, N1, N2, N3, N4, N5, N6, N7, N8) do { \
#define FILT
3
(PE, PI, PH, PF, PG, PC, PD, PB, PA, G5, C4, G0, D0, C1, B1, F4, I4, H5, I5, A0, A1, N0, N1, N2, N3, N4, N5, N6, N7, N8) do { \
unsigned ex = (PE!=PH && PE!=PF); \
if ( ex )\
{\
...
...
@@ -401,10 +400,10 @@ static void xbr3x(AVFrame *input, AVFrame *output, const uint32_t *r2y)
E
[
nl
]
=
E
[
nl
+
1
]
=
E
[
nl
+
2
]
=
PE
;
// 3, 4, 5
E
[
nl1
]
=
E
[
nl1
+
1
]
=
E
[
nl1
+
2
]
=
PE
;
// 6, 7, 8
FILT
RO
(
PE
,
PI
,
PH
,
PF
,
PG
,
PC
,
PD
,
PB
,
PA
,
G5
,
C4
,
G0
,
D0
,
C1
,
B1
,
F4
,
I4
,
H5
,
I5
,
A0
,
A1
,
0
,
1
,
2
,
nl
,
nl
+
1
,
nl
+
2
,
nl1
,
nl1
+
1
,
nl1
+
2
);
FILT
RO
(
PE
,
PC
,
PF
,
PB
,
PI
,
PA
,
PH
,
PD
,
PG
,
I4
,
A1
,
I5
,
H5
,
A0
,
D0
,
B1
,
C1
,
F4
,
C4
,
G5
,
G0
,
nl1
,
nl
,
0
,
nl1
+
1
,
nl
+
1
,
1
,
nl1
+
2
,
nl
+
2
,
2
);
FILT
RO
(
PE
,
PA
,
PB
,
PD
,
PC
,
PG
,
PF
,
PH
,
PI
,
C1
,
G0
,
C4
,
F4
,
G5
,
H5
,
D0
,
A0
,
B1
,
A1
,
I4
,
I5
,
nl1
+
2
,
nl1
+
1
,
nl1
,
nl
+
2
,
nl
+
1
,
nl
,
2
,
1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1, F4, I4, H5, I5, A0, A1, N15, N14, N11, N3, N7, N10, N13, N12, N9, N6, N2, N1, N5, N8, N4, N0) do { \
#define FILT
4
(PE, PI, PH, PF, PG, PC, PD, PB, PA, G5, C4, G0, D0, C1, B1, F4, I4, H5, I5, A0, A1, N15, N14, N11, N3, N7, N10, N13, N12, N9, N6, N2, N1, N5, N8, N4, N0) do { \
unsigned ex = (PE!=PH && PE!=PF); \
if ( ex )\
{\
...
...
@@ -577,10 +575,10 @@ static void xbr4x(AVFrame *input, AVFrame *output, const uint32_t *r2y)
E
[
nl1
]
=
E
[
nl1
+
1
]
=
E
[
nl1
+
2
]
=
E
[
nl1
+
3
]
=
PE
;
// 8, 9, 10, 11
E
[
nl2
]
=
E
[
nl2
+
1
]
=
E
[
nl2
+
2
]
=
E
[
nl2
+
3
]
=
PE
;
// 12, 13, 14, 15
FILT
RO
(
PE
,
PI
,
PH
,
PF
,
PG
,
PC
,
PD
,
PB
,
PA
,
G5
,
C4
,
G0
,
D0
,
C1
,
B1
,
F4
,
I4
,
H5
,
I5
,
A0
,
A1
,
nl2
+
3
,
nl2
+
2
,
nl1
+
3
,
3
,
nl
+
3
,
nl1
+
2
,
nl2
+
1
,
nl2
,
nl1
+
1
,
nl
+
2
,
2
,
1
,
nl
+
1
,
nl1
,
nl
,
0
);
FILT
RO
(
PE
,
PC
,
PF
,
PB
,
PI
,
PA
,
PH
,
PD
,
PG
,
I4
,
A1
,
I5
,
H5
,
A0
,
D0
,
B1
,
C1
,
F4
,
C4
,
G5
,
G0
,
3
,
nl
+
3
,
2
,
0
,
1
,
nl
+
2
,
nl1
+
3
,
nl2
+
3
,
nl1
+
2
,
nl
+
1
,
nl
,
nl1
,
nl1
+
1
,
nl2
+
2
,
nl2
+
1
,
nl2
);
FILT
RO
(
PE
,
PA
,
PB
,
PD
,
PC
,
PG
,
PF
,
PH
,
PI
,
C1
,
G0
,
C4
,
F4
,
G5
,
H5
,
D0
,
A0
,
B1
,
A1
,
I4
,
I5
,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
nl
+
3
,
nl1
+
3
,
nl2
+
3
);
FILT
4
(
PE
,
PG
,
PD
,
PH
,
PA
,
PI
,
PB
,
PF
,
PC
,
A0
,
I5
,
A1
,
B1
,
I4
,
F4
,
H5
,
G5
,
D0
,
G0
,
C1
,
C4
,
nl2
,
nl1
,
nl2
+
1
,
nl2
+
3
,
nl2
+
2
,
nl1
+
1
,
nl
,
0
,
nl
+
1
,
nl1
+
2
,
nl1
+
3
,
nl
+
3
,
nl
+
2
,
1
,
2
,
3
);
sa0
+=
1
;
sa1
+=
1
;
...
...
@@ -597,7 +595,6 @@ static void xbr4x(AVFrame *input, AVFrame *output, const uint32_t *r2y)
}
}
}
#undef FILTRO
static
int
config_output
(
AVFilterLink
*
outlink
)
{
...
...
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