Mercurial > libavcodec.hg
diff i386/dsputil_mmx.c @ 1530:3b31998fe22f libavcodec
disable encoders where appropriate (patch courtesy of BERO
<bero -at- geocities.co.jp>)
author | melanson |
---|---|
date | Tue, 14 Oct 2003 04:15:53 +0000 |
parents | 8ffd0c00e6df |
children | 1a9a63f59849 |
line wrap: on
line diff
--- a/i386/dsputil_mmx.c Mon Oct 13 19:38:34 2003 +0000 +++ b/i386/dsputil_mmx.c Tue Oct 14 04:15:53 2003 +0000 @@ -171,6 +171,7 @@ /***********************************/ /* standard MMX */ +#ifdef CONFIG_ENCODERS static void get_pixels_mmx(DCTELEM *block, const uint8_t *pixels, int line_size) { asm volatile( @@ -227,6 +228,7 @@ : "%eax" ); } +#endif //CONFIG_ENCODERS void put_pixels_clamped_mmx(const DCTELEM *block, uint8_t *pixels, int line_size) { @@ -401,6 +403,7 @@ ); } +#ifdef CONFIG_ENCODERS static int pix_sum16_mmx(uint8_t * pix, int line_size){ const int h=16; int sum; @@ -438,6 +441,7 @@ return sum; } +#endif //CONFIG_ENCODERS static void add_bytes_mmx(uint8_t *dst, uint8_t *src, int w){ int i=0; @@ -461,6 +465,7 @@ dst[i+0] += src[i+0]; } +#ifdef CONFIG_ENCODERS static int pix_norm1_mmx(uint8_t *pix, int line_size) { int tmp; asm volatile ( @@ -856,6 +861,7 @@ WARPER88_1616(hadamard8_diff_mmx, hadamard8_diff16_mmx) WARPER88_1616(hadamard8_diff_mmx2, hadamard8_diff16_mmx2) +#endif //CONFIG_ENCODERS #define put_no_rnd_pixels8_mmx(a,b,c,d) put_pixels8_mmx(a,b,c,d) #define put_no_rnd_pixels16_mmx(a,b,c,d) put_pixels16_mmx(a,b,c,d) @@ -1619,12 +1625,16 @@ c->idct_permutation_type= FF_LIBMPEG2_IDCT_PERM; } +#ifdef CONFIG_ENCODERS c->get_pixels = get_pixels_mmx; c->diff_pixels = diff_pixels_mmx; +#endif //CONFIG_ENCODERS c->put_pixels_clamped = put_pixels_clamped_mmx; c->add_pixels_clamped = add_pixels_clamped_mmx; c->clear_blocks = clear_blocks_mmx; +#ifdef CONFIG_ENCODERS c->pix_sum = pix_sum16_mmx; +#endif //CONFIG_ENCODERS c->put_pixels_tab[0][0] = put_pixels16_mmx; c->put_pixels_tab[0][1] = put_pixels16_x2_mmx; @@ -1667,6 +1677,7 @@ c->avg_no_rnd_pixels_tab[1][3] = avg_no_rnd_pixels8_xy2_mmx; c->add_bytes= add_bytes_mmx; +#ifdef CONFIG_ENCODERS c->diff_bytes= diff_bytes_mmx; c->hadamard8_diff[0]= hadamard8_diff16_mmx; @@ -1674,6 +1685,7 @@ c->pix_norm1 = pix_norm1_mmx; c->sse[0] = sse16_mmx; +#endif //CONFIG_ENCODERS if (mm_flags & MM_MMXEXT) { c->put_pixels_tab[0][1] = put_pixels16_x2_mmx2; @@ -1690,8 +1702,10 @@ c->avg_pixels_tab[1][1] = avg_pixels8_x2_mmx2; c->avg_pixels_tab[1][2] = avg_pixels8_y2_mmx2; +#ifdef CONFIG_ENCODERS c->hadamard8_diff[0]= hadamard8_diff16_mmx2; c->hadamard8_diff[1]= hadamard8_diff_mmx2; +#endif //CONFIG_ENCODERS if(!(avctx->flags & CODEC_FLAG_BITEXACT)){ c->put_no_rnd_pixels_tab[0][1] = put_no_rnd_pixels16_x2_mmx2; @@ -1797,7 +1811,9 @@ } } +#ifdef CONFIG_ENCODERS dsputil_init_pix_mmx(c, avctx); +#endif //CONFIG_ENCODERS #if 0 // for speed testing get_pixels = just_return;