Fix the GCC2 build, though I have no idea why this worked on Haiku.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31509 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stephan Aßmus 2009-07-10 16:56:13 +00:00
parent 111d946099
commit c463715d25
2 changed files with 8 additions and 0 deletions

View File

@ -1641,6 +1641,7 @@ static void just_return(void) { return; }
static void gmc_mmx(uint8_t *dst, uint8_t *src, int stride, int h, int ox, int oy, static void gmc_mmx(uint8_t *dst, uint8_t *src, int stride, int h, int ox, int oy,
int dxx, int dxy, int dyx, int dyy, int shift, int r, int width, int height){ int dxx, int dxy, int dyx, int dyy, int shift, int r, int width, int height){
#if __GNUC__ >= 3
const int w = 8; const int w = 8;
const int ix = ox>>(16+shift); const int ix = ox>>(16+shift);
const int iy = oy>>(16+shift); const int iy = oy>>(16+shift);
@ -1755,6 +1756,7 @@ static void gmc_mmx(uint8_t *dst, uint8_t *src, int stride, int h, int ox, int o
} }
src += 4-h*stride; src += 4-h*stride;
} }
#endif // #if __GNUC__ >= 3
} }
#define PREFETCH(name, op) \ #define PREFETCH(name, op) \
@ -2662,7 +2664,9 @@ void dsputil_init_mmx(DSPContext* c, AVCodecContext *avctx)
SET_HPEL_FUNCS(avg, 1, 8, mmx); SET_HPEL_FUNCS(avg, 1, 8, mmx);
SET_HPEL_FUNCS(avg_no_rnd, 1, 8, mmx); SET_HPEL_FUNCS(avg_no_rnd, 1, 8, mmx);
#if __GNUC__ >= 3
c->gmc= gmc_mmx; c->gmc= gmc_mmx;
#endif
c->add_bytes= add_bytes_mmx; c->add_bytes= add_bytes_mmx;
c->add_bytes_l2= add_bytes_l2_mmx; c->add_bytes_l2= add_bytes_l2_mmx;
@ -2782,7 +2786,9 @@ void dsputil_init_mmx(DSPContext* c, AVCodecContext *avctx)
c->h264_h_loop_filter_chroma= h264_h_loop_filter_chroma_mmx2; c->h264_h_loop_filter_chroma= h264_h_loop_filter_chroma_mmx2;
c->h264_v_loop_filter_chroma_intra= h264_v_loop_filter_chroma_intra_mmx2; c->h264_v_loop_filter_chroma_intra= h264_v_loop_filter_chroma_intra_mmx2;
c->h264_h_loop_filter_chroma_intra= h264_h_loop_filter_chroma_intra_mmx2; c->h264_h_loop_filter_chroma_intra= h264_h_loop_filter_chroma_intra_mmx2;
#if __GNUC__ >= 3
c->h264_loop_filter_strength= h264_loop_filter_strength_mmx2; c->h264_loop_filter_strength= h264_loop_filter_strength_mmx2;
#endif
c->weight_h264_pixels_tab[0]= ff_h264_weight_16x16_mmx2; c->weight_h264_pixels_tab[0]= ff_h264_weight_16x16_mmx2;
c->weight_h264_pixels_tab[1]= ff_h264_weight_16x8_mmx2; c->weight_h264_pixels_tab[1]= ff_h264_weight_16x8_mmx2;

View File

@ -794,6 +794,7 @@ static void h264_h_loop_filter_chroma_intra_mmx2(uint8_t *pix, int stride, int a
static void h264_loop_filter_strength_mmx2( int16_t bS[2][4][4], uint8_t nnz[40], int8_t ref[2][40], int16_t mv[2][40][2], static void h264_loop_filter_strength_mmx2( int16_t bS[2][4][4], uint8_t nnz[40], int8_t ref[2][40], int16_t mv[2][40][2],
int bidir, int edges, int step, int mask_mv0, int mask_mv1, int field ) { int bidir, int edges, int step, int mask_mv0, int mask_mv1, int field ) {
#if __GNUC__ >= 3
int dir; int dir;
__asm__ volatile( __asm__ volatile(
"pxor %%mm7, %%mm7 \n\t" "pxor %%mm7, %%mm7 \n\t"
@ -893,6 +894,7 @@ static void h264_loop_filter_strength_mmx2( int16_t bS[2][4][4], uint8_t nnz[40]
::"r"(bS[0]) ::"r"(bS[0])
:"memory" :"memory"
); );
#endif // #if __GNUC__ >= 3
} }