diff options
author | David Conrad <lessen42@gmail.com> | 2008-08-31 07:05:55 +0000 |
---|---|---|
committer | David Conrad <lessen42@gmail.com> | 2008-08-31 07:05:55 +0000 |
commit | b4c3d835849bdf266123a5c5e701505efeedc9a8 (patch) | |
tree | ea03148d312a5bae80e6e2dc2e6eb0f2ead16f9a | |
parent | 43410eaf7cea8317388d7a90f39ca9efa84ea28f (diff) | |
download | ffmpeg-b4c3d835849bdf266123a5c5e701505efeedc9a8.tar.gz |
Use ff_vp3_idct_data in vp3dsp_mmx.c rather than duplicating it
Originally committed as revision 15118 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavcodec/i386/dsputil_mmx.c | 1 | ||||
-rw-r--r-- | libavcodec/i386/vp3dsp_mmx.c | 24 | ||||
-rw-r--r-- | libavcodec/i386/vp3dsp_mmx.h | 1 |
3 files changed, 2 insertions, 24 deletions
diff --git a/libavcodec/i386/dsputil_mmx.c b/libavcodec/i386/dsputil_mmx.c index 41aadc6119..7dbb6a3d16 100644 --- a/libavcodec/i386/dsputil_mmx.c +++ b/libavcodec/i386/dsputil_mmx.c @@ -2537,7 +2537,6 @@ void dsputil_init_mmx(DSPContext* c, AVCodecContext *avctx) c->idct = ff_vp3_idct_sse2; c->idct_permutation_type= FF_TRANSPOSE_IDCT_PERM; }else{ - ff_vp3_dsp_init_mmx(); c->idct_put= ff_vp3_idct_put_mmx; c->idct_add= ff_vp3_idct_add_mmx; c->idct = ff_vp3_idct_mmx; diff --git a/libavcodec/i386/vp3dsp_mmx.c b/libavcodec/i386/vp3dsp_mmx.c index e0fb394e71..bdf19bbb36 100644 --- a/libavcodec/i386/vp3dsp_mmx.c +++ b/libavcodec/i386/vp3dsp_mmx.c @@ -27,15 +27,7 @@ #include "dsputil_mmx.h" #include "mmx.h" -/* (12 * 4) 2-byte memory locations ( = 96 bytes total) - * idct_constants[0..15] = Mask table (M(I)) - * idct_constants[16..43] = Cosine table (C(I)) - * idct_constants[44..47] = 8 - */ -static uint16_t idct_constants[(4 + 7) * 4]; -static const uint16_t idct_cosine_table[7] = { - 64277, 60547, 54491, 46341, 36410, 25080, 12785 -}; +extern const uint16_t ff_vp3_idct_data[]; #define r0 mm0 #define r1 mm1 @@ -258,18 +250,6 @@ static const uint16_t idct_cosine_table[7] = { movq_r2m(r2, *I(2)); \ } -void ff_vp3_dsp_init_mmx(void) -{ - int j = 16; - uint16_t *p; - - j = 1; - do { - p = idct_constants + ((j + 3) << 2); - p[0] = p[1] = p[2] = p[3] = idct_cosine_table[j - 1]; - } while (++j <= 7); -} - void ff_vp3_idct_mmx(int16_t *output_data) { /* eax = quantized input @@ -281,7 +261,7 @@ void ff_vp3_idct_mmx(int16_t *output_data) * r0..r7 = mm0..mm7 */ -#define C(x) (idct_constants + 16 + (x - 1) * 4) +#define C(x) (ff_vp3_idct_data + (x - 1) * 8) #define Eight (&ff_pw_8) /* at this point, function has completed dequantization + dezigzag + diff --git a/libavcodec/i386/vp3dsp_mmx.h b/libavcodec/i386/vp3dsp_mmx.h index 7d1c38d1a5..d0e61960ae 100644 --- a/libavcodec/i386/vp3dsp_mmx.h +++ b/libavcodec/i386/vp3dsp_mmx.h @@ -28,6 +28,5 @@ void ff_vp3_idct_mmx(int16_t *data); void ff_vp3_idct_put_mmx(uint8_t *dest, int line_size, DCTELEM *block); void ff_vp3_idct_add_mmx(uint8_t *dest, int line_size, DCTELEM *block); -void ff_vp3_dsp_init_mmx(void); #endif /* FFMPEG_VP3DSP_MMX_H */ |