aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2003-06-21 01:11:31 +0000
committerMichael Niedermayer <michaelni@gmx.at>2003-06-21 01:11:31 +0000
commit4fb518c392c0b30b17962e44bf29aa7080ce2b74 (patch)
treeae5c2308848578c27ee96adf9fc3086b4e3bd705 /libavcodec
parentdaab32960343de43172ebf965099dd4c6939fb86 (diff)
downloadffmpeg-4fb518c392c0b30b17962e44bf29aa7080ce2b74.tar.gz
the return of the idct with 16bit output by ("Ivan Kalvachev" <ivan at cacad dot com>)
Originally committed as revision 1983 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/alpha/dsputil_alpha.c1
-rw-r--r--libavcodec/armv4l/dsputil_arm.c1
-rw-r--r--libavcodec/dsputil.c2
-rw-r--r--libavcodec/dsputil.h4
-rw-r--r--libavcodec/i386/dsputil_mmx.c3
-rw-r--r--libavcodec/mlib/dsputil_mlib.c6
-rw-r--r--libavcodec/ps2/dsputil_mmi.c3
-rw-r--r--libavcodec/sh4/dsputil_sh4.c1
8 files changed, 19 insertions, 2 deletions
diff --git a/libavcodec/alpha/dsputil_alpha.c b/libavcodec/alpha/dsputil_alpha.c
index cdc8a6d5a3..108fc34764 100644
--- a/libavcodec/alpha/dsputil_alpha.c
+++ b/libavcodec/alpha/dsputil_alpha.c
@@ -363,4 +363,5 @@ void dsputil_init_alpha(DSPContext* c, AVCodecContext *avctx)
c->idct_put = simple_idct_put_axp;
c->idct_add = simple_idct_add_axp;
+ c->idct_idct = simple_idct_axp;
}
diff --git a/libavcodec/armv4l/dsputil_arm.c b/libavcodec/armv4l/dsputil_arm.c
index e3cc05f638..74eb96961a 100644
--- a/libavcodec/armv4l/dsputil_arm.c
+++ b/libavcodec/armv4l/dsputil_arm.c
@@ -48,6 +48,7 @@ void dsputil_init_armv4l(DSPContext* c, AVCodecContext *avctx)
if(idct_algo==FF_IDCT_AUTO || idct_algo==FF_IDCT_ARM){
c->idct_put= arm_idct_put;
c->idct_add= arm_idct_add;
+ c->idct = j_rev_dct_ARM;
c->idct_permutation_type= FF_LIBMPEG2_IDCT_PERM;/* FF_NO_IDCT_PERM */
}
}
diff --git a/libavcodec/dsputil.c b/libavcodec/dsputil.c
index f6ce967da5..df33e51128 100644
--- a/libavcodec/dsputil.c
+++ b/libavcodec/dsputil.c
@@ -2860,10 +2860,12 @@ void dsputil_init(DSPContext* c, AVCodecContext *avctx)
if(avctx->idct_algo==FF_IDCT_INT){
c->idct_put= ff_jref_idct_put;
c->idct_add= ff_jref_idct_add;
+ c->idct = j_rev_dct;
c->idct_permutation_type= FF_LIBMPEG2_IDCT_PERM;
}else{ //accurate/default
c->idct_put= simple_idct_put;
c->idct_add= simple_idct_add;
+ c->idct = simple_idct;
c->idct_permutation_type= FF_NO_IDCT_PERM;
}
diff --git a/libavcodec/dsputil.h b/libavcodec/dsputil.h
index e6c4030d4e..0a2935bbff 100644
--- a/libavcodec/dsputil.h
+++ b/libavcodec/dsputil.h
@@ -34,7 +34,6 @@
//#define DEBUG
/* dct code */
typedef short DCTELEM;
-//typedef int DCTELEM;
void fdct_ifast (DCTELEM *data);
void ff_jpeg_fdct_islow (DCTELEM *data);
@@ -240,6 +239,9 @@ typedef struct DSPContext {
/* (I)DCT */
void (*fdct)(DCTELEM *block/* align 16*/);
+ /* IDCT really*/
+ void (*idct)(DCTELEM *block/* align 16*/);
+
/**
* block -> idct -> clip to unsigned 8 bit -> dest.
* (-1392, 0, 0, ...) -> idct -> (-174, -174, ...) -> put -> (0, 0, ...)
diff --git a/libavcodec/i386/dsputil_mmx.c b/libavcodec/i386/dsputil_mmx.c
index d58ebcc4ef..adf27d4a11 100644
--- a/libavcodec/i386/dsputil_mmx.c
+++ b/libavcodec/i386/dsputil_mmx.c
@@ -1567,14 +1567,17 @@ void dsputil_init_mmx(DSPContext* c, AVCodecContext *avctx)
if(idct_algo==FF_IDCT_AUTO || idct_algo==FF_IDCT_SIMPLEMMX){
c->idct_put= ff_simple_idct_put_mmx;
c->idct_add= ff_simple_idct_add_mmx;
+ c->idct = ff_simple_idct_mmx;
c->idct_permutation_type= FF_SIMPLE_IDCT_PERM;
}else if(idct_algo==FF_IDCT_LIBMPEG2MMX){
if(mm_flags & MM_MMXEXT){
c->idct_put= ff_libmpeg2mmx2_idct_put;
c->idct_add= ff_libmpeg2mmx2_idct_add;
+ c->idct = ff_mmxext_idct;
}else{
c->idct_put= ff_libmpeg2mmx_idct_put;
c->idct_add= ff_libmpeg2mmx_idct_add;
+ c->idct = ff_mmx_idct;
}
c->idct_permutation_type= FF_LIBMPEG2_IDCT_PERM;
}
diff --git a/libavcodec/mlib/dsputil_mlib.c b/libavcodec/mlib/dsputil_mlib.c
index 30111e2825..46594f5a61 100644
--- a/libavcodec/mlib/dsputil_mlib.c
+++ b/libavcodec/mlib/dsputil_mlib.c
@@ -221,6 +221,11 @@ static void ff_idct_add_mlib(uint8_t *dest, int line_size, DCTELEM *data)
mlib_VideoAddBlock_U8_S16(dest, (mlib_s16 *)data, line_size);
}
+static void ff_idct_mlib(uint8_t *dest, int line_size, DCTELEM *data)
+{
+ mlib_VideoIDCT8x8_S16_S16 (data, data);
+}
+
static void ff_fdct_mlib(DCTELEM *data)
{
mlib_VideoDCT8x8_S16_S16 (data, data);
@@ -264,6 +269,7 @@ void MPV_common_init_mlib(MpegEncContext *s)
if(s->avctx->idct_algo==FF_IDCT_AUTO || s->avctx->idct_algo==FF_IDCT_MLIB){
s->dsp.idct_put= ff_idct_put_mlib;
s->dsp.idct_add= ff_idct_add_mlib;
+ s->dsp.idct = ff_idct_mlib;
s->dsp.idct_permutation_type= FF_NO_IDCT_PERM;
}
}
diff --git a/libavcodec/ps2/dsputil_mmi.c b/libavcodec/ps2/dsputil_mmi.c
index 3932f39e1e..f7bea7e359 100644
--- a/libavcodec/ps2/dsputil_mmi.c
+++ b/libavcodec/ps2/dsputil_mmi.c
@@ -25,7 +25,7 @@
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);
-
+void ff_mmi_idct(DCTELEM *block);
static void clear_blocks_mmi(DCTELEM * blocks)
{
@@ -154,6 +154,7 @@ void dsputil_init_mmi(DSPContext* c, AVCodecContext *avctx)
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 = ff_mmi_idct;
c->idct_permutation_type= FF_LIBMPEG2_IDCT_PERM;
}
}
diff --git a/libavcodec/sh4/dsputil_sh4.c b/libavcodec/sh4/dsputil_sh4.c
index 8ba5c64d27..6cff76c3b5 100644
--- a/libavcodec/sh4/dsputil_sh4.c
+++ b/libavcodec/sh4/dsputil_sh4.c
@@ -112,6 +112,7 @@ void dsputil_init_sh4(DSPContext* c, AVCodecContext *avctx)
if(idct_algo==FF_IDCT_AUTO || idct_algo==FF_IDCT_SH4){
c->idct_put = idct_put;
c->idct_add = idct_add;
+ c->idct = idct_sh4;
c->idct_permutation_type= FF_NO_IDCT_PERM; //FF_SIMPLE_IDCT_PERM; //FF_LIBMPEG2_IDCT_PERM;
}
}