Commit a822a479 authored by Nick Kurshev's avatar Nick Kurshev

fixed gcc-3.0.x compilation (by Michael Niedermayer)

Originally committed as revision 211 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 6c426cff
......@@ -344,7 +344,7 @@ void print_stats(void);
/* misc math functions */
extern inline int av_log2(unsigned int v)
static inline int av_log2(unsigned int v)
{
int n;
......
This diff is collapsed.
......@@ -30,24 +30,23 @@ static void DEF(put_pixels_x2)(UINT8 *block, const UINT8 *pixels, int line_size,
dh=h&3;
while(hh--) {
__asm __volatile(
"movq %4, %%mm0\n\t"
"movq 1%4, %%mm1\n\t"
"movq %5, %%mm2\n\t"
"movq 1%5, %%mm3\n\t"
"movq %6, %%mm4\n\t"
"movq 1%6, %%mm5\n\t"
"movq %7, %%mm6\n\t"
"movq 1%7, %%mm7\n\t"
"movq (%1), %%mm0\n\t"
"movq 1(%1), %%mm1\n\t"
"movq (%1, %2), %%mm2\n\t"
"movq 1(%1, %2), %%mm3\n\t"
"movq (%1, %2, 2), %%mm4\n\t"
"movq 1(%1, %2, 2), %%mm5\n\t"
"movq (%1, %3), %%mm6\n\t"
"movq 1(%1, %3), %%mm7\n\t"
PAVGB" %%mm1, %%mm0\n\t"
PAVGB" %%mm3, %%mm2\n\t"
PAVGB" %%mm5, %%mm4\n\t"
PAVGB" %%mm7, %%mm6\n\t"
"movq %%mm0, %0\n\t"
"movq %%mm2, %1\n\t"
"movq %%mm4, %2\n\t"
"movq %%mm6, %3\n\t"
:"=m"(*p), "=m"(*(p+line_size)), "=m"(*(p+line_size*2)), "=m"(*(p+line_size*3))
:"m"(*pix), "m"(*(pix+line_size)), "m"(*(pix+line_size*2)), "m"(*(pix+line_size*3))
"movq %%mm0, (%0)\n\t"
"movq %%mm2, (%0, %2)\n\t"
"movq %%mm4, (%0, %2, 2)\n\t"
"movq %%mm6, (%0, %3)\n\t"
::"r"(p), "r"(pix), "r" (line_size), "r" (line_size*3)
:"memory");
pix += line_size*4; p += line_size*4;
}
......@@ -114,24 +113,23 @@ static void DEF(avg_pixels)(UINT8 *block, const UINT8 *pixels, int line_size, in
dh=h&3;
while(hh--) {
__asm __volatile(
"movq %0, %%mm0\n\t"
"movq %4, %%mm1\n\t"
"movq %1, %%mm2\n\t"
"movq %5, %%mm3\n\t"
"movq %2, %%mm4\n\t"
"movq %6, %%mm5\n\t"
"movq %3, %%mm6\n\t"
"movq %7, %%mm7\n\t"
"movq (%0), %%mm0\n\t"
"movq (%1), %%mm1\n\t"
"movq (%0, %2), %%mm2\n\t"
"movq (%1, %2), %%mm3\n\t"
"movq (%0, %2, 2), %%mm4\n\t"
"movq (%1, %2, 2), %%mm5\n\t"
"movq (%0, %3), %%mm6\n\t"
"movq (%1, %3), %%mm7\n\t"
PAVGB" %%mm1, %%mm0\n\t"
PAVGB" %%mm3, %%mm2\n\t"
PAVGB" %%mm5, %%mm4\n\t"
PAVGB" %%mm7, %%mm6\n\t"
"movq %%mm0, %0\n\t"
"movq %%mm2, %1\n\t"
"movq %%mm4, %2\n\t"
"movq %%mm6, %3\n\t"
:"=m"(*p), "=m"(*(p+line_size)), "=m"(*(p+line_size*2)), "=m"(*(p+line_size*3))
:"m"(*pix), "m"(*(pix+line_size)), "m"(*(pix+line_size*2)), "m"(*(pix+line_size*3))
"movq %%mm0, (%0)\n\t"
"movq %%mm2, (%0, %2)\n\t"
"movq %%mm4, (%0, %2, 2)\n\t"
"movq %%mm6, (%0, %3)\n\t"
::"r"(p), "r"(pix), "r" (line_size), "r" (line_size*3)
:"memory");
pix += line_size*4; p += line_size*4;
}
......@@ -141,7 +139,7 @@ static void DEF(avg_pixels)(UINT8 *block, const UINT8 *pixels, int line_size, in
"movq %1, %%mm1\n\t"
PAVGB" %%mm1, %%mm0\n\t"
"movq %%mm0, %0\n\t"
:"=m"(*p)
:"+m"(*p)
:"m"(*pix)
:"memory");
pix += line_size; p += line_size;
......@@ -171,7 +169,7 @@ static void DEF(avg_pixels_x2)( UINT8 *block, const UINT8 *pixels, int line_siz
PAVGB" %%mm4, %%mm1\n\t"
"movq %%mm0, %0\n\t"
"movq %%mm1, %1\n\t"
:"=m"(*p), "=m"(*(p+line_size))
:"+m"(*p), "+m"(*(p+line_size))
:"m"(*pix), "m"(*(pix+line_size))
:"memory");
pix += line_size*2;
......@@ -185,7 +183,7 @@ static void DEF(avg_pixels_x2)( UINT8 *block, const UINT8 *pixels, int line_siz
PAVGB" %%mm2, %%mm1\n\t"
PAVGB" %%mm1, %%mm0\n\t"
"movq %%mm0, %0\n\t"
:"=m"(*p)
:"+m"(*p)
:"m"(*pix)
:"memory");
}
......@@ -214,7 +212,7 @@ static void DEF(avg_pixels_y2)( UINT8 *block, const UINT8 *pixels, int line_si
PAVGB" %%mm4, %%mm1\n\t"
"movq %%mm0, %0\n\t"
"movq %%mm1, %1\n\t"
:"=m"(*p), "=m"(*(p+line_size))
:"+m"(*p), "+m"(*(p+line_size))
:"m"(*pix), "m"(*(pix+line_size)), "m"(*(pix+line_size*2))
:"memory");
pix += line_size*2;
......@@ -228,7 +226,7 @@ static void DEF(avg_pixels_y2)( UINT8 *block, const UINT8 *pixels, int line_si
PAVGB" %%mm2, %%mm1\n\t"
PAVGB" %%mm1, %%mm0\n\t"
"movq %%mm0, %0\n\t"
:"=m"(*p)
:"+m"(*p)
:"m"(*pix), "m"(*(pix+line_size))
:"memory");
}
......@@ -243,7 +241,7 @@ static void DEF(avg_pixels_xy2)( UINT8 *block, const UINT8 *pixels, int line_si
__asm __volatile(
"pxor %%mm7, %%mm7\n\t"
"movq %0, %%mm6\n\t"
::"m"(mm_wtwo):"memory");
::"m"(mm_wtwo));
do {
__asm __volatile(
"movq %1, %%mm0\n\t"
......@@ -275,7 +273,7 @@ static void DEF(avg_pixels_xy2)( UINT8 *block, const UINT8 *pixels, int line_si
"packuswb %%mm2, %%mm0\n\t"
PAVGB" %0, %%mm0\n\t"
"movq %%mm0, %0\n\t"
:"=m"(*p)
:"+m"(*p)
:"m"(*pix),
"m"(*(pix+line_size))
:"memory");
......@@ -291,7 +289,7 @@ static void DEF(sub_pixels_x2)( DCTELEM *block, const UINT8 *pixels, int line_s
p = block;
pix = pixels;
__asm __volatile(
"pxor %%mm7, %%mm7":::"memory");
"pxor %%mm7, %%mm7":);
do {
__asm __volatile(
"movq 1%1, %%mm2\n\t"
......@@ -305,7 +303,7 @@ static void DEF(sub_pixels_x2)( DCTELEM *block, const UINT8 *pixels, int line_s
"psubsw %%mm3, %%mm1\n\t"
"movq %%mm0, %0\n\t"
"movq %%mm1, 8%0\n\t"
:"=m"(*p)
:"+m"(*p)
:"m"(*pix)
:"memory");
pix += line_size;
......@@ -320,7 +318,7 @@ static void DEF(sub_pixels_y2)( DCTELEM *block, const UINT8 *pixels, int line_s
p = block;
pix = pixels;
__asm __volatile(
"pxor %%mm7, %%mm7":::"memory");
"pxor %%mm7, %%mm7":);
do {
__asm __volatile(
"movq %2, %%mm2\n\t"
......@@ -334,7 +332,7 @@ static void DEF(sub_pixels_y2)( DCTELEM *block, const UINT8 *pixels, int line_s
"psubsw %%mm3, %%mm1\n\t"
"movq %%mm0, %0\n\t"
"movq %%mm1, 8%0\n\t"
:"=m"(*p)
:"+m"(*p)
:"m"(*pix), "m"(*(pix+line_size))
:"memory");
pix += line_size;
......
......@@ -232,7 +232,7 @@ typedef struct RLTable {
void init_rl(RLTable *rl);
void init_vlc_rl(RLTable *rl);
extern inline int get_rl_index(const RLTable *rl, int last, int run, int level)
static inline int get_rl_index(const RLTable *rl, int last, int run, int level)
{
int index;
index = rl->index_run[last][run];
......
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