changeset 1324:7d328fd9d8a5 libavcodec

the return of the idct with 16bit output by ("Ivan Kalvachev" <ivan at cacad dot com>)
author michaelni
date Sat, 21 Jun 2003 01:11:31 +0000
parents e9da5a651eab
children 1cbc2380d172
files alpha/dsputil_alpha.c armv4l/dsputil_arm.c dsputil.c dsputil.h i386/dsputil_mmx.c mlib/dsputil_mlib.c ps2/dsputil_mmi.c sh4/dsputil_sh4.c
diffstat 8 files changed, 19 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/alpha/dsputil_alpha.c	Sat Jun 21 00:50:40 2003 +0000
+++ b/alpha/dsputil_alpha.c	Sat Jun 21 01:11:31 2003 +0000
@@ -363,4 +363,5 @@
     
     c->idct_put = simple_idct_put_axp;
     c->idct_add = simple_idct_add_axp;
+    c->idct_idct = simple_idct_axp;
 }
--- a/armv4l/dsputil_arm.c	Sat Jun 21 00:50:40 2003 +0000
+++ b/armv4l/dsputil_arm.c	Sat Jun 21 01:11:31 2003 +0000
@@ -48,6 +48,7 @@
     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 */
     }
 }
--- a/dsputil.c	Sat Jun 21 00:50:40 2003 +0000
+++ b/dsputil.c	Sat Jun 21 01:11:31 2003 +0000
@@ -2860,10 +2860,12 @@
     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;
     }
 
--- a/dsputil.h	Sat Jun 21 00:50:40 2003 +0000
+++ b/dsputil.h	Sat Jun 21 01:11:31 2003 +0000
@@ -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 @@
     /* (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, ...)
--- a/i386/dsputil_mmx.c	Sat Jun 21 00:50:40 2003 +0000
+++ b/i386/dsputil_mmx.c	Sat Jun 21 01:11:31 2003 +0000
@@ -1567,14 +1567,17 @@
         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;
         }
--- a/mlib/dsputil_mlib.c	Sat Jun 21 00:50:40 2003 +0000
+++ b/mlib/dsputil_mlib.c	Sat Jun 21 01:11:31 2003 +0000
@@ -221,6 +221,11 @@
     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 @@
     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;
     }
 }
--- a/ps2/dsputil_mmi.c	Sat Jun 21 00:50:40 2003 +0000
+++ b/ps2/dsputil_mmi.c	Sat Jun 21 01:11:31 2003 +0000
@@ -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 @@
     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;
     }
 }
--- a/sh4/dsputil_sh4.c	Sat Jun 21 00:50:40 2003 +0000
+++ b/sh4/dsputil_sh4.c	Sat Jun 21 01:11:31 2003 +0000
@@ -112,6 +112,7 @@
 	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;
 	}
 }