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
f276bf30
Commit
f276bf30
authored
May 25, 2014
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/ivi_dsp: add some missing () to macros
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
70f671c3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
19 deletions
+19
-19
ivi_dsp.c
libavcodec/ivi_dsp.c
+19
-19
No files found.
libavcodec/ivi_dsp.c
View file @
f276bf30
...
...
@@ -235,15 +235,15 @@ void ff_ivi_recompose_haar(const IVIPlaneDesc *plane, uint8_t *dst,
/** butterfly operation for the inverse Haar transform */
#define IVI_HAAR_BFLY(s1, s2, o1, o2, t) \
t = (
s1 - s2
) >> 1;\
o1 = (
s1 + s2
) >> 1;\
o2 =
t
;\
t = (
(s1) - (s2)
) >> 1;\
o1 = (
(s1) + (s2)
) >> 1;\
o2 =
(t)
;\
/** inverse 8-point Haar transform */
#define INV_HAAR8(s1, s5, s3, s7, s2, s4, s6, s8,\
d1, d2, d3, d4, d5, d6, d7, d8,\
t0, t1, t2, t3, t4, t5, t6, t7, t8) {\
t1 =
s1 << 1; t5 = s5
<< 1;\
t1 =
(s1) << 1; t5 = (s5)
<< 1;\
IVI_HAAR_BFLY(t1, t5, t1, t5, t0); IVI_HAAR_BFLY(t1, s3, t1, t3, t0);\
IVI_HAAR_BFLY(t5, s7, t5, t7, t0); IVI_HAAR_BFLY(t1, s2, t1, t2, t0);\
IVI_HAAR_BFLY(t3, s4, t3, t4, t0); IVI_HAAR_BFLY(t5, s6, t5, t6, t0);\
...
...
@@ -485,21 +485,21 @@ void ff_ivi_dc_haar_2d(const int32_t *in, int16_t *out, uint32_t pitch,
/** butterfly operation for the inverse slant transform */
#define IVI_SLANT_BFLY(s1, s2, o1, o2, t) \
t =
s1 - s2
;\
o1 =
s1 + s2
;\
o2 =
t
;\
t =
(s1) - (s2)
;\
o1 =
(s1) + (s2)
;\
o2 =
(t)
;\
/** This is a reflection a,b = 1/2, 5/4 for the inverse slant transform */
#define IVI_IREFLECT(s1, s2, o1, o2, t) \
t = ((
s1 + s2*2 + 2) >> 2) + s1
;\
o2 = ((
s1*2 - s2 + 2) >> 2) - s2
;\
o1 =
t
;\
t = ((
(s1) + (s2)*2 + 2) >> 2) + (s1)
;\
o2 = ((
(s1)*2 - (s2) + 2) >> 2) - (s2)
;\
o1 =
(t)
;\
/** This is a reflection a,b = 1/2, 7/8 for the inverse slant transform */
#define IVI_SLANT_PART4(s1, s2, o1, o2, t) \
t =
s2 + ((s1*4 - s2
+ 4) >> 3);\
o2 =
s1 + ((-s1 - s2
*4 + 4) >> 3);\
o1 =
t
;\
t =
(s2) + (((s1)*4 - (s2)
+ 4) >> 3);\
o2 =
(s1) + ((-(s1) - (s2)
*4 + 4) >> 3);\
o1 =
(t)
;\
/** inverse slant8 transform */
#define IVI_INV_SLANT8(s1, s4, s8, s5, s2, s6, s3, s7,\
...
...
@@ -557,7 +557,7 @@ void ff_ivi_inverse_slant_8x8(const int32_t *in, int16_t *out, uint32_t pitch, c
}
#undef COMPENSATE
#define COMPENSATE(x) ((
x
+ 1)>>1)
#define COMPENSATE(x) ((
(x)
+ 1)>>1)
src
=
tmp
;
for
(
i
=
0
;
i
<
8
;
i
++
)
{
if
(
!
src
[
0
]
&&
!
src
[
1
]
&&
!
src
[
2
]
&&
!
src
[
3
]
&&
!
src
[
4
]
&&
!
src
[
5
]
&&
!
src
[
6
]
&&
!
src
[
7
])
{
...
...
@@ -597,7 +597,7 @@ void ff_ivi_inverse_slant_4x4(const int32_t *in, int16_t *out, uint32_t pitch, c
}
#undef COMPENSATE
#define COMPENSATE(x) ((
x
+ 1)>>1)
#define COMPENSATE(x) ((
(x)
+ 1)>>1)
src
=
tmp
;
for
(
i
=
0
;
i
<
4
;
i
++
)
{
if
(
!
src
[
0
]
&&
!
src
[
1
]
&&
!
src
[
2
]
&&
!
src
[
3
])
{
...
...
@@ -631,7 +631,7 @@ void ff_ivi_row_slant8(const int32_t *in, int16_t *out, uint32_t pitch, const ui
int
i
;
int
t0
,
t1
,
t2
,
t3
,
t4
,
t5
,
t6
,
t7
,
t8
;
#define COMPENSATE(x) ((
x
+ 1)>>1)
#define COMPENSATE(x) ((
(x)
+ 1)>>1)
for
(
i
=
0
;
i
<
8
;
i
++
)
{
if
(
!
in
[
0
]
&&
!
in
[
1
]
&&
!
in
[
2
]
&&
!
in
[
3
]
&&
!
in
[
4
]
&&
!
in
[
5
]
&&
!
in
[
6
]
&&
!
in
[
7
])
{
memset
(
out
,
0
,
8
*
sizeof
(
out
[
0
]));
...
...
@@ -673,7 +673,7 @@ void ff_ivi_col_slant8(const int32_t *in, int16_t *out, uint32_t pitch, const ui
row4
=
pitch
<<
2
;
row8
=
pitch
<<
3
;
#define COMPENSATE(x) ((
x
+ 1)>>1)
#define COMPENSATE(x) ((
(x)
+ 1)>>1)
for
(
i
=
0
;
i
<
8
;
i
++
)
{
if
(
flags
[
i
])
{
IVI_INV_SLANT8
(
in
[
0
],
in
[
8
],
in
[
16
],
in
[
24
],
in
[
32
],
in
[
40
],
in
[
48
],
in
[
56
],
...
...
@@ -710,7 +710,7 @@ void ff_ivi_row_slant4(const int32_t *in, int16_t *out, uint32_t pitch, const ui
int
i
;
int
t0
,
t1
,
t2
,
t3
,
t4
;
#define COMPENSATE(x) ((
x
+ 1)>>1)
#define COMPENSATE(x) ((
(x)
+ 1)>>1)
for
(
i
=
0
;
i
<
4
;
i
++
)
{
if
(
!
in
[
0
]
&&
!
in
[
1
]
&&
!
in
[
2
]
&&
!
in
[
3
])
{
memset
(
out
,
0
,
4
*
sizeof
(
out
[
0
]));
...
...
@@ -732,7 +732,7 @@ void ff_ivi_col_slant4(const int32_t *in, int16_t *out, uint32_t pitch, const ui
row2
=
pitch
<<
1
;
#define COMPENSATE(x) ((
x
+ 1)>>1)
#define COMPENSATE(x) ((
(x)
+ 1)>>1)
for
(
i
=
0
;
i
<
4
;
i
++
)
{
if
(
flags
[
i
])
{
IVI_INV_SLANT4
(
in
[
0
],
in
[
4
],
in
[
8
],
in
[
12
],
...
...
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