summaryrefslogtreecommitdiff
path: root/libavcodec/ps2
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2003-03-03 14:54:00 +0000
committerMichael Niedermayer <michaelni@gmx.at>2003-03-03 14:54:00 +0000
commitb0368839ac6de47dee3e971c709676d9635865e9 (patch)
treed2f5240d3726509118642a98d11adfdd21d73d07 /libavcodec/ps2
parenta5dbb247af9f02cff4899f16d3a87f49fe16727a (diff)
downloadffmpeg-b0368839ac6de47dee3e971c709676d9635865e9.tar.gz
MpegEncContext.(i)dct_* -> DspContext.(i)dct_*
bitexact cleanup Originally committed as revision 1617 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/ps2')
-rw-r--r--libavcodec/ps2/dsputil_mmi.c13
-rw-r--r--libavcodec/ps2/mpegvideo_mmi.c12
2 files changed, 12 insertions, 13 deletions
diff --git a/libavcodec/ps2/dsputil_mmi.c b/libavcodec/ps2/dsputil_mmi.c
index cb15a79e0f..68a3f3a821 100644
--- a/libavcodec/ps2/dsputil_mmi.c
+++ b/libavcodec/ps2/dsputil_mmi.c
@@ -22,6 +22,9 @@
#include "../dsputil.h"
#include "mmi.h"
+void ff_mmi_idct_put(uint8_t *dest, int line_size, DCTELEM *block);
+void ff_mmi_idct_add(uint8_t *dest, int line_size, DCTELEM *block);
+
static void clear_blocks_mmi(DCTELEM * blocks)
{
@@ -103,8 +106,10 @@ static void put_pixels16_mmi(uint8_t *block, const uint8_t *pixels, int line_siz
}
-void dsputil_init_mmi(DSPContext* c, unsigned mask)
+void dsputil_init_mmi(DSPContext* c, AVCodecContext *avctx)
{
+ const int idct_algo= avctx->idct_algo;
+
c->clear_blocks = clear_blocks_mmi;
c->put_pixels_tab[1][0] = put_pixels8_mmi;
@@ -114,5 +119,11 @@ void dsputil_init_mmi(DSPContext* c, unsigned mask)
c->put_no_rnd_pixels_tab[0][0] = put_pixels16_mmi;
c->get_pixels = get_pixels_mmi;
+
+ if(idct_algo==FF_IDCT_AUTO || idct_algo==FF_IDCT_PS2){
+ c->idct_put= ff_mmi_idct_put;
+ c->idct_add= ff_mmi_idct_add;
+ c->idct_permutation_type= FF_LIBMPEG2_IDCT_PERM;
+ }
}
diff --git a/libavcodec/ps2/mpegvideo_mmi.c b/libavcodec/ps2/mpegvideo_mmi.c
index b8b8964ce7..5b8c9cc568 100644
--- a/libavcodec/ps2/mpegvideo_mmi.c
+++ b/libavcodec/ps2/mpegvideo_mmi.c
@@ -22,10 +22,6 @@
#include "../mpegvideo.h"
#include "../avcodec.h"
-void ff_mmi_idct_put(uint8_t *dest, int line_size, DCTELEM *block);
-void ff_mmi_idct_add(uint8_t *dest, int line_size, DCTELEM *block);
-
-
static void dct_unquantize_h263_mmi(MpegEncContext *s,
DCTELEM *block, int n, int qscale)
{
@@ -84,14 +80,6 @@ static void dct_unquantize_h263_mmi(MpegEncContext *s,
void MPV_common_init_mmi(MpegEncContext *s)
{
- int i;
- const int idct_algo= s->avctx->idct_algo;
-
- if(idct_algo==FF_IDCT_AUTO || idct_algo==FF_IDCT_PS2){
- s->idct_put= ff_mmi_idct_put;
- s->idct_add= ff_mmi_idct_add;
- s->idct_permutation_type= FF_LIBMPEG2_IDCT_PERM;
- }
s->dct_unquantize_h263 = dct_unquantize_h263_mmi;
}