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
8d27bf1c
Commit
8d27bf1c
authored
Aug 27, 2014
by
Diego Biurrun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x86: xvid: K&R formatting cosmetics
parent
dcb7c868
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
489 additions
and
489 deletions
+489
-489
xvididct_mmx.c
libavcodec/x86/xvididct_mmx.c
+392
-391
xvididct_sse2.c
libavcodec/x86/xvididct_sse2.c
+97
-98
No files found.
libavcodec/x86/xvididct_mmx.c
View file @
8d27bf1c
This diff is collapsed.
Click to expand it.
libavcodec/x86/xvididct_sse2.c
View file @
8d27bf1c
...
...
@@ -52,13 +52,13 @@
* @brief SSE2 IDCT compatible with the Xvid IDCT
*/
#define X8(x)
x,x,x,x,x,x,x,
x
#define X8(x)
x, x, x, x, x, x, x,
x
DECLARE_ASM_CONST
(
16
,
int16_t
,
tan1
)[]
=
{
X8
(
13036
)
};
// tan( pi/16)
DECLARE_ASM_CONST
(
16
,
int16_t
,
tan2
)[]
=
{
X8
(
27146
)
};
// tan(2pi/16) = sqrt(2)-1
DECLARE_ASM_CONST
(
16
,
int16_t
,
tan3
)[]
=
{
X8
(
43790
)
};
// tan(3pi/16)-1
DECLARE_ASM_CONST
(
16
,
int16_t
,
sqrt2
)[]
=
{
X8
(
23170
)
};
// 0.5/sqrt(2)
DECLARE_ASM_CONST
(
8
,
uint8_t
,
m127
)[]
=
{
X8
(
127
)
};
DECLARE_ASM_CONST
(
16
,
int16_t
,
tan1
)[]
=
{
X8
(
13036
)
};
// tan( pi/16)
DECLARE_ASM_CONST
(
16
,
int16_t
,
tan2
)[]
=
{
X8
(
27146
)
};
// tan(2pi/16) = sqrt(2)-1
DECLARE_ASM_CONST
(
16
,
int16_t
,
tan3
)[]
=
{
X8
(
43790
)
};
// tan(3pi/16)-1
DECLARE_ASM_CONST
(
16
,
int16_t
,
sqrt2
)[]
=
{
X8
(
23170
)
};
// 0.5/sqrt(2)
DECLARE_ASM_CONST
(
8
,
uint8_t
,
m127
)[]
=
{
X8
(
127
)
};
DECLARE_ASM_CONST
(
16
,
int16_t
,
iTab1
)[]
=
{
0x4000
,
0x539f
,
0xc000
,
0xac61
,
0x4000
,
0xdd5d
,
0x4000
,
0xdd5d
,
...
...
@@ -175,7 +175,7 @@ DECLARE_ASM_CONST(16, int32_t, walkenIdctRounders)[] = {
"pmovmskb %%mm1, "reg1" \n\t" \
"pmovmskb %%mm2, "reg2" \n\t"
///IDCT pass on rows.
///
IDCT pass on rows.
#define iMTX_MULT(src, table, rounder, put) \
"movdqa "src", %%xmm3 \n\t" \
"movdqa %%xmm3, %%xmm0 \n\t" \
...
...
@@ -203,7 +203,7 @@ DECLARE_ASM_CONST(16, int32_t, walkenIdctRounders)[] = {
"movdqa "MANGLE(tan3)", "TAN3" \n\t" \
"movdqa "MANGLE(tan1)", "TAN1" \n\t" \
///IDCT pass on columns.
///
IDCT pass on columns.
#define iLLM_PASS(dct) \
"movdqa "TAN3", %%xmm1 \n\t" \
"movdqa "TAN1", %%xmm3 \n\t" \
...
...
@@ -281,7 +281,7 @@ DECLARE_ASM_CONST(16, int32_t, walkenIdctRounders)[] = {
"movdqa "REG4", 4*16("dct") \n\t" \
"movdqa %%xmm7, 7*16("dct") \n\t"
///IDCT pass on columns, assuming rows 4-7 are zero.
///
IDCT pass on columns, assuming rows 4-7 are zero.
#define iLLM_PASS_SPARSE(dct) \
"pmulhw %%xmm4, "TAN3" \n\t" \
"paddsw %%xmm4, "TAN3" \n\t" \
...
...
@@ -344,15 +344,15 @@ DECLARE_ASM_CONST(16, int32_t, walkenIdctRounders)[] = {
inline
void
ff_xvid_idct_sse2
(
short
*
block
)
{
__asm__
volatile
(
"movq "
MANGLE
(
m127
)
", %%mm0
\n\t
"
__asm__
volatile
(
"movq "
MANGLE
(
m127
)
", %%mm0
\n\t
"
iMTX_MULT
(
"(%0)"
,
MANGLE
(
iTab1
),
ROUND
(
walkenIdctRounders
),
PUT_EVEN
(
ROW0
))
iMTX_MULT
(
"1*16(%0)"
,
MANGLE
(
iTab2
),
ROUND
(
walkenIdctRounders
+
1
*
16
),
PUT_ODD
(
ROW1
))
iMTX_MULT
(
"2*16(%0)"
,
MANGLE
(
iTab3
),
ROUND
(
walkenIdctRounders
+
2
*
16
),
PUT_EVEN
(
ROW2
))
iMTX_MULT
(
"1*16(%0)"
,
MANGLE
(
iTab2
),
ROUND
(
walkenIdctRounders
+
1
*
16
),
PUT_ODD
(
ROW1
))
iMTX_MULT
(
"2*16(%0)"
,
MANGLE
(
iTab3
),
ROUND
(
walkenIdctRounders
+
2
*
16
),
PUT_EVEN
(
ROW2
))
TEST_TWO_ROWS
(
"3*16(%0)"
,
"4*16(%0)"
,
"%%eax"
,
"%%ecx"
,
CLEAR_ODD
(
ROW3
),
CLEAR_EVEN
(
ROW4
))
JZ
(
"%%eax"
,
"1f"
)
iMTX_MULT
(
"3*16(%0)"
,
MANGLE
(
iTab4
),
ROUND
(
walkenIdctRounders
+
3
*
16
),
PUT_ODD
(
ROW3
))
iMTX_MULT
(
"3*16(%0)"
,
MANGLE
(
iTab4
),
ROUND
(
walkenIdctRounders
+
3
*
16
),
PUT_ODD
(
ROW3
))
TEST_TWO_ROWS
(
"5*16(%0)"
,
"6*16(%0)"
,
"%%eax"
,
"%%edx"
,
CLEAR_ODD
(
ROW5
),
CLEAR_EVEN
(
ROW6
))
TEST_ONE_ROW
(
"7*16(%0)"
,
"%%esi"
,
CLEAR_ODD
(
ROW7
))
...
...
@@ -367,28 +367,27 @@ inline void ff_xvid_idct_sse2(short *block)
"2:
\n\t
"
iMTX_MULT
(
"4*16(%0)"
,
MANGLE
(
iTab1
),
"#"
,
PUT_EVEN
(
ROW4
))
"3:
\n\t
"
iMTX_MULT
(
"5*16(%0)"
,
MANGLE
(
iTab4
),
ROUND
(
walkenIdctRounders
+
4
*
16
),
PUT_ODD
(
ROW5
))
iMTX_MULT
(
"5*16(%0)"
,
MANGLE
(
iTab4
),
ROUND
(
walkenIdctRounders
+
4
*
16
),
PUT_ODD
(
ROW5
))
JZ
(
"%%edx"
,
"1f"
)
"4:
\n\t
"
iMTX_MULT
(
"6*16(%0)"
,
MANGLE
(
iTab3
),
ROUND
(
walkenIdctRounders
+
5
*
16
),
PUT_EVEN
(
ROW6
))
iMTX_MULT
(
"6*16(%0)"
,
MANGLE
(
iTab3
),
ROUND
(
walkenIdctRounders
+
5
*
16
),
PUT_EVEN
(
ROW6
))
JZ
(
"%%esi"
,
"1f"
)
"5:
\n\t
"
iMTX_MULT
(
"7*16(%0)"
,
MANGLE
(
iTab2
),
ROUND
(
walkenIdctRounders
+
5
*
16
),
PUT_ODD
(
ROW7
))
iMTX_MULT
(
"7*16(%0)"
,
MANGLE
(
iTab2
),
ROUND
(
walkenIdctRounders
+
5
*
16
),
PUT_ODD
(
ROW7
))
#if ARCH_X86_32
iLLM_HEAD
#endif
iLLM_PASS
(
"%0"
)
"6:
\n\t
"
:
"+r"
(
block
)
:
"+r"
(
block
)
:
:
XMM_CLOBBERS
(
"%xmm0"
,
"%xmm1"
,
"%xmm2"
,
"%xmm3"
,
"%xmm4"
,
"%xmm5"
,
"%xmm6"
,
"%xmm7"
,
)
:
XMM_CLOBBERS
(
"%xmm0"
,
"%xmm1"
,
"%xmm2"
,
"%xmm3"
,
"%xmm4"
,
"%xmm5"
,
"%xmm6"
,
"%xmm7"
,
)
#if ARCH_X86_64
XMM_CLOBBERS
(
"%xmm8"
,
"%xmm9"
,
"%xmm10"
,
"%xmm11"
,
"%xmm12"
,
"%xmm13"
,
"%xmm14"
,
)
XMM_CLOBBERS
(
"%xmm8"
,
"%xmm9"
,
"%xmm10"
,
"%xmm11"
,
"%xmm12"
,
"%xmm13"
,
"%xmm14"
,
)
#endif
"%eax"
,
"%ecx"
,
"%edx"
,
"%esi"
,
"memory"
);
"%eax"
,
"%ecx"
,
"%edx"
,
"%esi"
,
"memory"
);
}
void
ff_xvid_idct_sse2_put
(
uint8_t
*
dest
,
int
line_size
,
short
*
block
)
...
...
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