summaryrefslogtreecommitdiff
path: root/libavcodec/dsputil.c
diff options
context:
space:
mode:
authorIvan Kalvachev <ikalvachev@gmail.com>2007-07-11 22:05:43 +0000
committerIvan Kalvachev <ikalvachev@gmail.com>2007-07-11 22:05:43 +0000
commitddeaf723c5e97d1ae81a4827b73f99f3bc3d86f3 (patch)
tree1c6d979feb2a6a02a1f23c11854d8747b1fb2e5a /libavcodec/dsputil.c
parentc3d0c11bfb55668c9dd3938c5a83e22b89a83224 (diff)
Integrate reference mpeg IDCT into dsputil.
Originally committed as revision 9603 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/dsputil.c')
-rw-r--r--libavcodec/dsputil.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/libavcodec/dsputil.c b/libavcodec/dsputil.c
index 41fef24df1..ec0fc1abbd 100644
--- a/libavcodec/dsputil.c
+++ b/libavcodec/dsputil.c
@@ -3753,6 +3753,17 @@ void ff_float_to_int16_c(int16_t *dst, const float *src, int len){
/* XXX: those functions should be suppressed ASAP when all IDCTs are
converted */
+static void ff_mpeg_idct_put_c(uint8_t *dest, int line_size, DCTELEM *block)
+{
+ ff_mpeg_idct_c(block);
+ put_pixels_clamped_c(block, dest, line_size);
+}
+static void ff_mpeg_idct_add_c(uint8_t *dest, int line_size, DCTELEM *block)
+{
+ ff_mpeg_idct_c(block);
+ add_pixels_clamped_c(block, dest, line_size);
+}
+
static void ff_jref_idct_put(uint8_t *dest, int line_size, DCTELEM *block)
{
j_rev_dct (block);
@@ -3891,6 +3902,11 @@ void dsputil_init(DSPContext* c, AVCodecContext *avctx)
c->idct_add= ff_vp3_idct_add_c;
c->idct = ff_vp3_idct_c;
c->idct_permutation_type= FF_NO_IDCT_PERM;
+ }else if(avctx->idct_algo==FF_IDCT_MPEG){
+ c->idct_put= ff_mpeg_idct_put_c;
+ c->idct_add= ff_mpeg_idct_add_c;
+ c->idct = ff_mpeg_idct_c;
+ c->idct_permutation_type= FF_NO_IDCT_PERM;
}else{ //accurate/default
c->idct_put= simple_idct_put;
c->idct_add= simple_idct_add;