Commit bb270c08 authored by Diego Biurrun's avatar Diego Biurrun

COSMETICS: tabs --> spaces, some prettyprinting

Originally committed as revision 4764 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 50827fcf
......@@ -205,10 +205,10 @@ static void get_pixels_mmx(DCTELEM *block, const uint8_t *pixels, int line_size)
"punpckhbw %%mm7, %%mm1 \n\t"
"punpcklbw %%mm7, %%mm2 \n\t"
"punpckhbw %%mm7, %%mm3 \n\t"
"movq %%mm0, (%1, %%"REG_a")\n\t"
"movq %%mm1, 8(%1, %%"REG_a")\n\t"
"movq %%mm2, 16(%1, %%"REG_a")\n\t"
"movq %%mm3, 24(%1, %%"REG_a")\n\t"
"movq %%mm0, (%1, %%"REG_a") \n\t"
"movq %%mm1, 8(%1, %%"REG_a") \n\t"
"movq %%mm2, 16(%1, %%"REG_a") \n\t"
"movq %%mm3, 24(%1, %%"REG_a") \n\t"
"add %3, %0 \n\t"
"add $32, %%"REG_a" \n\t"
"js 1b \n\t"
......@@ -235,8 +235,8 @@ static inline void diff_pixels_mmx(DCTELEM *block, const uint8_t *s1, const uint
"punpckhbw %%mm7, %%mm3 \n\t"
"psubw %%mm2, %%mm0 \n\t"
"psubw %%mm3, %%mm1 \n\t"
"movq %%mm0, (%2, %%"REG_a")\n\t"
"movq %%mm1, 8(%2, %%"REG_a")\n\t"
"movq %%mm0, (%2, %%"REG_a") \n\t"
"movq %%mm1, 8(%2, %%"REG_a") \n\t"
"add %3, %0 \n\t"
"add %3, %1 \n\t"
"add $16, %%"REG_a" \n\t"
......@@ -258,22 +258,22 @@ void put_pixels_clamped_mmx(const DCTELEM *block, uint8_t *pixels, int line_size
pix = pixels;
/* unrolled loop */
__asm __volatile(
"movq %3, %%mm0\n\t"
"movq 8%3, %%mm1\n\t"
"movq 16%3, %%mm2\n\t"
"movq 24%3, %%mm3\n\t"
"movq 32%3, %%mm4\n\t"
"movq 40%3, %%mm5\n\t"
"movq 48%3, %%mm6\n\t"
"movq 56%3, %%mm7\n\t"
"packuswb %%mm1, %%mm0\n\t"
"packuswb %%mm3, %%mm2\n\t"
"packuswb %%mm5, %%mm4\n\t"
"packuswb %%mm7, %%mm6\n\t"
"movq %%mm0, (%0)\n\t"
"movq %%mm2, (%0, %1)\n\t"
"movq %%mm4, (%0, %1, 2)\n\t"
"movq %%mm6, (%0, %2)\n\t"
"movq %3, %%mm0 \n\t"
"movq 8%3, %%mm1 \n\t"
"movq 16%3, %%mm2 \n\t"
"movq 24%3, %%mm3 \n\t"
"movq 32%3, %%mm4 \n\t"
"movq 40%3, %%mm5 \n\t"
"movq 48%3, %%mm6 \n\t"
"movq 56%3, %%mm7 \n\t"
"packuswb %%mm1, %%mm0 \n\t"
"packuswb %%mm3, %%mm2 \n\t"
"packuswb %%mm5, %%mm4 \n\t"
"packuswb %%mm7, %%mm6 \n\t"
"movq %%mm0, (%0) \n\t"
"movq %%mm2, (%0, %1) \n\t"
"movq %%mm4, (%0, %1, 2) \n\t"
"movq %%mm6, (%0, %2) \n\t"
::"r" (pix), "r" ((long)line_size), "r" ((long)line_size*3), "m"(*p)
:"memory");
pix += line_size*4;
......@@ -283,22 +283,22 @@ void put_pixels_clamped_mmx(const DCTELEM *block, uint8_t *pixels, int line_size
// compiler would generate some very strange code
// thus using "r"
__asm __volatile(
"movq (%3), %%mm0\n\t"
"movq 8(%3), %%mm1\n\t"
"movq 16(%3), %%mm2\n\t"
"movq 24(%3), %%mm3\n\t"
"movq 32(%3), %%mm4\n\t"
"movq 40(%3), %%mm5\n\t"
"movq 48(%3), %%mm6\n\t"
"movq 56(%3), %%mm7\n\t"
"packuswb %%mm1, %%mm0\n\t"
"packuswb %%mm3, %%mm2\n\t"
"packuswb %%mm5, %%mm4\n\t"
"packuswb %%mm7, %%mm6\n\t"
"movq %%mm0, (%0)\n\t"
"movq %%mm2, (%0, %1)\n\t"
"movq %%mm4, (%0, %1, 2)\n\t"
"movq %%mm6, (%0, %2)\n\t"
"movq (%3), %%mm0 \n\t"
"movq 8(%3), %%mm1 \n\t"
"movq 16(%3), %%mm2 \n\t"
"movq 24(%3), %%mm3 \n\t"
"movq 32(%3), %%mm4 \n\t"
"movq 40(%3), %%mm5 \n\t"
"movq 48(%3), %%mm6 \n\t"
"movq 56(%3), %%mm7 \n\t"
"packuswb %%mm1, %%mm0 \n\t"
"packuswb %%mm3, %%mm2 \n\t"
"packuswb %%mm5, %%mm4 \n\t"
"packuswb %%mm7, %%mm6 \n\t"
"movq %%mm0, (%0) \n\t"
"movq %%mm2, (%0, %1) \n\t"
"movq %%mm4, (%0, %1, 2) \n\t"
"movq %%mm6, (%0, %2) \n\t"
::"r" (pix), "r" ((long)line_size), "r" ((long)line_size*3), "r"(p)
:"memory");
}
......@@ -334,26 +334,26 @@ void add_pixels_clamped_mmx(const DCTELEM *block, uint8_t *pixels, int line_size
i = 4;
do {
__asm __volatile(
"movq (%2), %%mm0\n\t"
"movq 8(%2), %%mm1\n\t"
"movq 16(%2), %%mm2\n\t"
"movq 24(%2), %%mm3\n\t"
"movq %0, %%mm4\n\t"
"movq %1, %%mm6\n\t"
"movq %%mm4, %%mm5\n\t"
"punpcklbw %%mm7, %%mm4\n\t"
"punpckhbw %%mm7, %%mm5\n\t"
"paddsw %%mm4, %%mm0\n\t"
"paddsw %%mm5, %%mm1\n\t"
"movq %%mm6, %%mm5\n\t"
"punpcklbw %%mm7, %%mm6\n\t"
"punpckhbw %%mm7, %%mm5\n\t"
"paddsw %%mm6, %%mm2\n\t"
"paddsw %%mm5, %%mm3\n\t"
"packuswb %%mm1, %%mm0\n\t"
"packuswb %%mm3, %%mm2\n\t"
"movq %%mm0, %0\n\t"
"movq %%mm2, %1\n\t"
"movq (%2), %%mm0 \n\t"
"movq 8(%2), %%mm1 \n\t"
"movq 16(%2), %%mm2 \n\t"
"movq 24(%2), %%mm3 \n\t"
"movq %0, %%mm4 \n\t"
"movq %1, %%mm6 \n\t"
"movq %%mm4, %%mm5 \n\t"
"punpcklbw %%mm7, %%mm4 \n\t"
"punpckhbw %%mm7, %%mm5 \n\t"
"paddsw %%mm4, %%mm0 \n\t"
"paddsw %%mm5, %%mm1 \n\t"
"movq %%mm6, %%mm5 \n\t"
"punpcklbw %%mm7, %%mm6 \n\t"
"punpckhbw %%mm7, %%mm5 \n\t"
"paddsw %%mm6, %%mm2 \n\t"
"paddsw %%mm5, %%mm3 \n\t"
"packuswb %%mm1, %%mm0 \n\t"
"packuswb %%mm3, %%mm2 \n\t"
"movq %%mm0, %0 \n\t"
"movq %%mm2, %1 \n\t"
:"+m"(*pix), "+m"(*(pix+line_size))
:"r"(p)
:"memory");
......
......@@ -476,7 +476,7 @@ static void DEF(avg_pixels16_l2)(uint8_t *dst, uint8_t *src1, uint8_t *src2, int
static void DEF(put_no_rnd_pixels16_l2)(uint8_t *dst, uint8_t *src1, uint8_t *src2, int dstStride, int src1Stride, int h)
{
__asm __volatile(
"pcmpeqb %%mm6, %%mm6\n\t"
"pcmpeqb %%mm6, %%mm6 \n\t"
"testl $1, %0 \n\t"
" jz 1f \n\t"
"movq (%1), %%mm0 \n\t"
......
......@@ -66,7 +66,7 @@ asm volatile(
"packssdw %%mm5, %%mm5 \n\t"
"psubw %%mm5, %%mm7 \n\t"
"pxor %%mm4, %%mm4 \n\t"
".balign 16\n\t"
".balign 16 \n\t"
"1: \n\t"
"movq (%0, %3), %%mm0 \n\t"
"movq 8(%0, %3), %%mm1 \n\t"
......@@ -129,7 +129,7 @@ asm volatile(
"packssdw %%mm5, %%mm5 \n\t"
"psubw %%mm5, %%mm7 \n\t"
"pxor %%mm4, %%mm4 \n\t"
".balign 16\n\t"
".balign 16 \n\t"
"1: \n\t"
"movq (%0, %3), %%mm0 \n\t"
"movq 8(%0, %3), %%mm1 \n\t"
......@@ -222,7 +222,7 @@ asm volatile(
"packssdw %%mm6, %%mm6 \n\t"
"packssdw %%mm6, %%mm6 \n\t"
"mov %3, %%"REG_a" \n\t"
".balign 16\n\t"
".balign 16 \n\t"
"1: \n\t"
"movq (%0, %%"REG_a"), %%mm0 \n\t"
"movq 8(%0, %%"REG_a"), %%mm1 \n\t"
......@@ -285,7 +285,7 @@ asm volatile(
"packssdw %%mm6, %%mm6 \n\t"
"packssdw %%mm6, %%mm6 \n\t"
"mov %3, %%"REG_a" \n\t"
".balign 16\n\t"
".balign 16 \n\t"
"1: \n\t"
"movq (%0, %%"REG_a"), %%mm0 \n\t"
"movq 8(%0, %%"REG_a"), %%mm1 \n\t"
......@@ -357,7 +357,7 @@ asm volatile(
"packssdw %%mm6, %%mm6 \n\t"
"packssdw %%mm6, %%mm6 \n\t"
"mov %3, %%"REG_a" \n\t"
".balign 16\n\t"
".balign 16 \n\t"
"1: \n\t"
"movq (%0, %%"REG_a"), %%mm0 \n\t"
"movq 8(%0, %%"REG_a"), %%mm1 \n\t"
......@@ -418,7 +418,7 @@ asm volatile(
"packssdw %%mm6, %%mm6 \n\t"
"packssdw %%mm6, %%mm6 \n\t"
"mov %3, %%"REG_a" \n\t"
".balign 16\n\t"
".balign 16 \n\t"
"1: \n\t"
"movq (%0, %%"REG_a"), %%mm0 \n\t"
"movq 8(%0, %%"REG_a"), %%mm1 \n\t"
......
......@@ -736,8 +736,8 @@ static inline void dering_altivec(uint8_t src[], int stride, PPContext *c) {
(vector signed int)vec_perm(src##j, \
(vector unsigned char)zero, \
extractPermM##i); \
const vector signed int sum_##j##_##l = vec_add( p_##j##_##l, vQP2); \
const vector signed int diff_##j##_##l = vec_sub( p_##j##_##l, vQP2); \
const vector signed int sum_##j##_##l = vec_add( p_##j##_##l, vQP2);\
const vector signed int diff_##j##_##l = vec_sub( p_##j##_##l, vQP2);\
vector signed int newpm_##j##_##l; \
if (vec_all_lt(sum_##j##_##l, F_##j##_##l)) \
newpm_##j##_##l = sum_##j##_##l; \
......
......@@ -1392,15 +1392,15 @@ FIND_MIN_MAX((%0, %1, 8))
1110111
*/
//DERING_CORE(dst,src ,ppsx ,psx ,sx ,pplx ,plx ,lx ,t0 ,t1)
DERING_CORE((%%REGa),(%%REGa, %1) ,%%mm0,%%mm2,%%mm4,%%mm1,%%mm3,%%mm5,%%mm6,%%mm7)
DERING_CORE((%%REGa, %1),(%%REGa, %1, 2) ,%%mm2,%%mm4,%%mm0,%%mm3,%%mm5,%%mm1,%%mm6,%%mm7)
//DERING_CORE(dst ,src ,ppsx ,psx ,sx ,pplx ,plx ,lx ,t0 ,t1)
DERING_CORE((%%REGa) ,(%%REGa, %1) ,%%mm0,%%mm2,%%mm4,%%mm1,%%mm3,%%mm5,%%mm6,%%mm7)
DERING_CORE((%%REGa, %1) ,(%%REGa, %1, 2),%%mm2,%%mm4,%%mm0,%%mm3,%%mm5,%%mm1,%%mm6,%%mm7)
DERING_CORE((%%REGa, %1, 2),(%0, %1, 4) ,%%mm4,%%mm0,%%mm2,%%mm5,%%mm1,%%mm3,%%mm6,%%mm7)
DERING_CORE((%0, %1, 4),(%%REGd) ,%%mm0,%%mm2,%%mm4,%%mm1,%%mm3,%%mm5,%%mm6,%%mm7)
DERING_CORE((%%REGd),(%%REGd, %1) ,%%mm2,%%mm4,%%mm0,%%mm3,%%mm5,%%mm1,%%mm6,%%mm7)
DERING_CORE((%%REGd, %1), (%%REGd, %1, 2),%%mm4,%%mm0,%%mm2,%%mm5,%%mm1,%%mm3,%%mm6,%%mm7)
DERING_CORE((%0, %1, 4) ,(%%REGd) ,%%mm0,%%mm2,%%mm4,%%mm1,%%mm3,%%mm5,%%mm6,%%mm7)
DERING_CORE((%%REGd) ,(%%REGd, %1) ,%%mm2,%%mm4,%%mm0,%%mm3,%%mm5,%%mm1,%%mm6,%%mm7)
DERING_CORE((%%REGd, %1) ,(%%REGd, %1, 2),%%mm4,%%mm0,%%mm2,%%mm5,%%mm1,%%mm3,%%mm6,%%mm7)
DERING_CORE((%%REGd, %1, 2),(%0, %1, 8) ,%%mm0,%%mm2,%%mm4,%%mm1,%%mm3,%%mm5,%%mm6,%%mm7)
DERING_CORE((%0, %1, 8),(%%REGd, %1, 4) ,%%mm2,%%mm4,%%mm0,%%mm3,%%mm5,%%mm1,%%mm6,%%mm7)
DERING_CORE((%0, %1, 8) ,(%%REGd, %1, 4),%%mm2,%%mm4,%%mm0,%%mm3,%%mm5,%%mm1,%%mm6,%%mm7)
"1: \n\t"
: : "r" (src), "r" ((long)stride), "m" (c->pQPb), "m"(c->pQPb2)
......@@ -1635,10 +1635,10 @@ static inline void RENAME(deInterlaceInterpolateCubic)(uint8_t src[], int stride
"movq %%mm1, " #c " \n\t"
#define DEINT_CUBIC(a,b,c,d,e) REAL_DEINT_CUBIC(a,b,c,d,e)
DEINT_CUBIC((%0), (%%REGa, %1), (%%REGa, %1, 2), (%0, %1, 4), (%%REGd, %1))
DEINT_CUBIC((%%REGa, %1), (%0, %1, 4), (%%REGd), (%%REGd, %1), (%0, %1, 8))
DEINT_CUBIC((%0, %1, 4), (%%REGd, %1), (%%REGd, %1, 2), (%0, %1, 8), (%%REGc))
DEINT_CUBIC((%%REGd, %1), (%0, %1, 8), (%%REGd, %1, 4), (%%REGc), (%%REGc, %1, 2))
DEINT_CUBIC((%0) , (%%REGa, %1), (%%REGa, %1, 2), (%0, %1, 4) , (%%REGd, %1))
DEINT_CUBIC((%%REGa, %1), (%0, %1, 4) , (%%REGd) , (%%REGd, %1), (%0, %1, 8))
DEINT_CUBIC((%0, %1, 4) , (%%REGd, %1), (%%REGd, %1, 2), (%0, %1, 8) , (%%REGc))
DEINT_CUBIC((%%REGd, %1), (%0, %1, 8) , (%%REGd, %1, 4), (%%REGc) , (%%REGc, %1, 2))
: : "r" (src), "r" ((long)stride)
: "%"REG_a, "%"REG_d, "%"REG_c
......@@ -1707,9 +1707,9 @@ static inline void RENAME(deInterlaceFF)(uint8_t src[], int stride, uint8_t *tmp
#define DEINT_FF(a,b,c,d) REAL_DEINT_FF(a,b,c,d)
DEINT_FF((%0) , (%%REGa) , (%%REGa, %1), (%%REGa, %1, 2))
DEINT_FF((%%REGa, %1), (%%REGa, %1, 2), (%0, %1, 4), (%%REGd) )
DEINT_FF((%0, %1, 4), (%%REGd) , (%%REGd, %1), (%%REGd, %1, 2))
DEINT_FF((%%REGd, %1), (%%REGd, %1, 2), (%0, %1, 8), (%%REGd, %1, 4))
DEINT_FF((%%REGa, %1), (%%REGa, %1, 2), (%0, %1, 4) , (%%REGd) )
DEINT_FF((%0, %1, 4) , (%%REGd) , (%%REGd, %1), (%%REGd, %1, 2))
DEINT_FF((%%REGd, %1), (%%REGd, %1, 2), (%0, %1, 8) , (%%REGd, %1, 4))
"movq %%mm0, (%2) \n\t"
: : "r" (src), "r" ((long)stride), "r"(tmp)
......@@ -2033,9 +2033,9 @@ static inline void RENAME(deInterlaceMedian)(uint8_t src[], int stride)
"movq %%mm0, " #b " \n\t"
#define MEDIAN(a,b,c) REAL_MEDIAN(a,b,c)
MEDIAN((%0), (%%REGa), (%%REGa, %1))
MEDIAN((%0) , (%%REGa) , (%%REGa, %1))
MEDIAN((%%REGa, %1), (%%REGa, %1, 2), (%0, %1, 4))
MEDIAN((%0, %1, 4), (%%REGd), (%%REGd, %1))
MEDIAN((%0, %1, 4) , (%%REGd) , (%%REGd, %1))
MEDIAN((%%REGd, %1), (%%REGd, %1, 2), (%0, %1, 8))
: : "r" (src), "r" ((long)stride)
......@@ -2159,7 +2159,7 @@ static inline void RENAME(transpose2)(uint8_t *dst, int dstStride, uint8_t *src)
{
asm(
"lea (%0, %1), %%"REG_a" \n\t"
"lea (%%"REG_a",%1,4), %%"REG_d"\n\t"
"lea (%%"REG_a",%1,4), %%"REG_d" \n\t"
// 0 1 2 3 4 5 6 7 8 9
// %0 eax eax+%1 eax+2%1 %0+4%1 edx edx+%1 edx+2%1 %0+8%1 edx+4%1
"movq (%2), %%mm0 \n\t" // 12345678
......@@ -2320,14 +2320,14 @@ static inline void RENAME(tempNoiseReducer)(uint8_t *src, int stride,
#define L2_DIFF_CORE(a, b) REAL_L2_DIFF_CORE(a, b)
L2_DIFF_CORE((%0), (%1))
L2_DIFF_CORE((%0, %2), (%1, %2))
L2_DIFF_CORE((%0, %2, 2), (%1, %2, 2))
L2_DIFF_CORE((%0, %%REGa), (%1, %%REGa))
L2_DIFF_CORE((%0, %2, 4), (%1, %2, 4))
L2_DIFF_CORE((%0, %%REGd), (%1, %%REGd))
L2_DIFF_CORE((%0) , (%1))
L2_DIFF_CORE((%0, %2) , (%1, %2))
L2_DIFF_CORE((%0, %2, 2) , (%1, %2, 2))
L2_DIFF_CORE((%0, %%REGa) , (%1, %%REGa))
L2_DIFF_CORE((%0, %2, 4) , (%1, %2, 4))
L2_DIFF_CORE((%0, %%REGd) , (%1, %%REGd))
L2_DIFF_CORE((%0, %%REGa,2), (%1, %%REGa,2))
L2_DIFF_CORE((%0, %%REGc), (%1, %%REGc))
L2_DIFF_CORE((%0, %%REGc) , (%1, %%REGc))
#endif //L1_DIFF
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment