]> granicus.if.org Git - libvpx/commitdiff
dequant invoke macro removal
authorScott LaVarnway <slavarnway@google.com>
Tue, 30 Oct 2012 19:09:49 +0000 (12:09 -0700)
committerScott LaVarnway <slavarnway@google.com>
Tue, 30 Oct 2012 19:09:49 +0000 (12:09 -0700)
Change-Id: Ifa17e698149adc063476e7d16eb727f01e88b447

13 files changed:
vp8/common/rtcd_defs.sh
vp8/decoder/arm/arm_dsystemdependent.c [deleted file]
vp8/decoder/arm/dequantize_arm.h [deleted file]
vp8/decoder/decodframe.c
vp8/decoder/dequantize.h
vp8/decoder/generic/dsystemdependent.c [deleted file]
vp8/decoder/onyxd_if.c
vp8/decoder/onyxd_int.h
vp8/decoder/x86/dequantize_x86.h [deleted file]
vp8/decoder/x86/x86_dsystemdependent.c
vp8/encoder/onyx_if.c
vp8/vp8dx.mk
vp8/vp8dx_arm.mk

index 5d388ac57438441625f53fae5f927542b092e8a6..9a9073697a5b7d6786ce9d492d3d1a19c63ecbcb 100644 (file)
@@ -34,6 +34,41 @@ fi
     specialize vp8_filter_block2d_8x8_8 ssse3 #sse4_1 sse2
     specialize vp8_filter_block2d_16x16_8 ssse3 #sse4_1 sse2
 
+#
+# Dequant
+#
+prototype void vp8_dequantize_b "struct blockd *x"
+specialize vp8_dequantize_b mmx
+
+prototype void vp8_dequantize_b_2x2 "struct blockd *x"
+specialize vp8_dequantize_b_2x2
+
+prototype void vp8_dequant_dc_idct_add_y_block_8x8 "short *q, short *dq, unsigned char *pre, unsigned char *dst, int stride, char *eobs, short *dc, struct macroblockd *xd"
+specialize vp8_dequant_dc_idct_add_y_block_8x8
+
+prototype void vp8_dequant_idct_add_y_block_8x8 "short *q, short *dq, unsigned char *pre, unsigned char *dst, int stride, char *eobs, struct macroblockd *xd"
+specialize vp8_dequant_idct_add_y_block_8x8
+
+prototype void vp8_dequant_idct_add_uv_block_8x8 "short *q, short *dq, unsigned char *pre, unsigned char *dstu, unsigned char *dstv, int stride, char *eobs, struct macroblockd *xd"
+specialize vp8_dequant_idct_add_uv_block_8x8
+
+prototype void vp8_dequant_idct_add_16x16 "short *input, short *dq, unsigned char *pred, unsigned char *dest, int pitch, int stride"
+specialize vp8_dequant_idct_add_16x16
+
+prototype void vp8_dequant_idct_add "short *input, short *dq, unsigned char *pred, unsigned char *dest, int pitch, int stride"
+specialize vp8_dequant_idct_add
+
+prototype void vp8_dequant_dc_idct_add "short *input, short *dq, unsigned char *pred, unsigned char *dest, int pitch, int stride, int Dc"
+specialize vp8_dequant_dc_idct_add
+
+prototype void vp8_dequant_dc_idct_add_y_block "short *q, short *dq, unsigned char *pre, unsigned char *dst, int stride, char *eobs, short *dc"
+specialize vp8_dequant_dc_idct_add_y_block mmx
+
+prototype void vp8_dequant_idct_add_y_block "short *q, short *dq, unsigned char *pre, unsigned char *dst, int stride, char *eobs"
+specialize vp8_dequant_idct_add_y_block mmx
+
+prototype void vp8_dequant_idct_add_uv_block "short *q, short *dq, unsigned char *pre, unsigned char *dstu, unsigned char *dstv, int stride, char *eobs"
+specialize vp8_dequant_idct_add_uv_block mmx
 
 #
 # RECON
diff --git a/vp8/decoder/arm/arm_dsystemdependent.c b/vp8/decoder/arm/arm_dsystemdependent.c
deleted file mode 100644 (file)
index 31e8b1a..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- *  Copyright (c) 2010 The WebM project authors. All Rights Reserved.
- *
- *  Use of this source code is governed by a BSD-style license
- *  that can be found in the LICENSE file in the root of the source
- *  tree. An additional intellectual property rights grant can be found
- *  in the file PATENTS.  All contributing project authors may
- *  be found in the AUTHORS file in the root of the source tree.
- */
-
-
-#include "vpx_ports/config.h"
-#include "vpx_ports/arm.h"
-#include "vp8/common/blockd.h"
-#include "vp8/common/pragmas.h"
-#include "vp8/decoder/dequantize.h"
-#include "vp8/decoder/onyxd_int.h"
-
-void vp8_arch_arm_decode_init(VP8D_COMP *pbi) {
-#if CONFIG_RUNTIME_CPU_DETECT
-  int flags = pbi->common.rtcd.flags;
-
-#if HAVE_ARMV5TE
-  if (flags & HAS_EDSP) {
-  }
-#endif
-
-// The commented functions need to be re-written for vpx.
-#if HAVE_ARMV6
-  if (flags & HAS_MEDIA) {
-    pbi->dequant.block               = vp8_dequantize_b_v6;
-    /*pbi->dequant.idct_add            = vp8_dequant_idct_add_v6;
-    pbi->dequant.dc_idct_add         = vp8_dequant_dc_idct_add_v6;
-    pbi->dequant.dc_idct_add_y_block = vp8_dequant_dc_idct_add_y_block_v6;
-    pbi->dequant.idct_add_y_block    = vp8_dequant_idct_add_y_block_v6;
-    pbi->dequant.idct_add_uv_block   = vp8_dequant_idct_add_uv_block_v6;*/
-  }
-#endif
-
-#if HAVE_ARMV7
-  if (flags & HAS_NEON) {
-    pbi->dequant.block               = vp8_dequantize_b_neon;
-    // pbi->dequant.idct_add            = vp8_dequant_idct_add_neon;
-    /*This is not used: NEON always dequants two blocks at once.
-    pbi->dequant.dc_idct_add         = vp8_dequant_dc_idct_add_neon;*/
-    /*pbi->dequant.dc_idct_add_y_block = vp8_dequant_dc_idct_add_y_block_neon;
-    pbi->dequant.idct_add_y_block    = vp8_dequant_idct_add_y_block_neon;
-    pbi->dequant.idct_add_uv_block   = vp8_dequant_idct_add_uv_block_neon;*/
-  }
-#endif
-#endif
-}
diff --git a/vp8/decoder/arm/dequantize_arm.h b/vp8/decoder/arm/dequantize_arm.h
deleted file mode 100644 (file)
index b7d800d..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- *  Copyright (c) 2010 The WebM project authors. All Rights Reserved.
- *
- *  Use of this source code is governed by a BSD-style license
- *  that can be found in the LICENSE file in the root of the source
- *  tree. An additional intellectual property rights grant can be found
- *  in the file PATENTS.  All contributing project authors may
- *  be found in the AUTHORS file in the root of the source tree.
- */
-
-
-#ifndef DEQUANTIZE_ARM_H
-#define DEQUANTIZE_ARM_H
-
-#if HAVE_ARMV6
-extern prototype_dequant_block(vp8_dequantize_b_v6);
-extern prototype_dequant_idct_add(vp8_dequant_idct_add_v6);
-extern prototype_dequant_dc_idct_add(vp8_dequant_dc_idct_add_v6);
-extern prototype_dequant_dc_idct_add_y_block(vp8_dequant_dc_idct_add_y_block_v6);
-extern prototype_dequant_idct_add_y_block(vp8_dequant_idct_add_y_block_v6);
-extern prototype_dequant_idct_add_uv_block(vp8_dequant_idct_add_uv_block_v6);
-
-#if !CONFIG_RUNTIME_CPU_DETECT
-#undef  vp8_dequant_block
-#define vp8_dequant_block vp8_dequantize_b_v6
-
-#undef vp8_dequant_idct_add
-#define vp8_dequant_idct_add vp8_dequant_idct_add_v6
-
-#undef vp8_dequant_dc_idct_add
-#define vp8_dequant_dc_idct_add vp8_dequant_dc_idct_add_v6
-
-#undef vp8_dequant_dc_idct_add_y_block
-#define vp8_dequant_dc_idct_add_y_block vp8_dequant_dc_idct_add_y_block_v6
-
-#undef vp8_dequant_idct_add_y_block
-#define vp8_dequant_idct_add_y_block vp8_dequant_idct_add_y_block_v6
-
-#undef vp8_dequant_idct_add_uv_block
-#define vp8_dequant_idct_add_uv_block vp8_dequant_idct_add_uv_block_v6
-#endif
-#endif
-
-#if HAVE_ARMV7
-extern prototype_dequant_block(vp8_dequantize_b_neon);
-extern prototype_dequant_idct_add(vp8_dequant_idct_add_neon);
-extern prototype_dequant_dc_idct_add(vp8_dequant_dc_idct_add_neon);
-extern prototype_dequant_dc_idct_add_y_block(vp8_dequant_dc_idct_add_y_block_neon);
-extern prototype_dequant_idct_add_y_block(vp8_dequant_idct_add_y_block_neon);
-extern prototype_dequant_idct_add_uv_block(vp8_dequant_idct_add_uv_block_neon);
-
-#if !CONFIG_RUNTIME_CPU_DETECT
-#undef  vp8_dequant_block
-#define vp8_dequant_block vp8_dequantize_b_neon
-
-#undef vp8_dequant_idct_add
-#define vp8_dequant_idct_add vp8_dequant_idct_add_neon
-
-#undef vp8_dequant_dc_idct_add
-#define vp8_dequant_dc_idct_add vp8_dequant_dc_idct_add_neon
-
-#undef vp8_dequant_dc_idct_add_y_block
-#define vp8_dequant_dc_idct_add_y_block vp8_dequant_dc_idct_add_y_block_neon
-
-#undef vp8_dequant_idct_add_y_block
-#define vp8_dequant_idct_add_y_block vp8_dequant_idct_add_y_block_neon
-
-#undef vp8_dequant_idct_add_uv_block
-#define vp8_dequant_idct_add_uv_block vp8_dequant_idct_add_uv_block_neon
-#endif
-#endif
-
-#endif
index 2f7621d3a189157dab36894e334bbb648d88d5cb..c9d9855ed04dc4971a13d1707244d5c44f5eb36a 100644 (file)
@@ -14,7 +14,6 @@
 #include "vp8/common/reconintra.h"
 #include "vp8/common/reconintra4x4.h"
 #include "vp8/common/reconinter.h"
-#include "dequantize.h"
 #include "detokenize.h"
 #include "vp8/common/invtrans.h"
 #include "vp8/common/alloccommon.h"
@@ -29,7 +28,6 @@
 #include "vp8/common/modecont.h"
 #include "vpx_mem/vpx_mem.h"
 #include "vp8/common/idct.h"
-#include "dequantize.h"
 #include "dboolhuff.h"
 
 #include "vp8/common/seg_common.h"
@@ -129,23 +127,29 @@ static void mb_init_dequantizer(VP8D_COMP *pbi, MACROBLOCKD *xd) {
     pbi->common.rtcd.idct.idct1_scalar_add  = vp8_dc_only_inv_walsh_add_c;
     pbi->common.rtcd.idct.iwalsh1      = vp8_short_inv_walsh4x4_1_lossless_c;
     pbi->common.rtcd.idct.iwalsh16     = vp8_short_inv_walsh4x4_lossless_c;
-    pbi->dequant.idct_add            = vp8_dequant_idct_add_lossless_c;
-    pbi->dequant.dc_idct_add         = vp8_dequant_dc_idct_add_lossless_c;
-    pbi->dequant.dc_idct_add_y_block = vp8_dequant_dc_idct_add_y_block_lossless_c;
-    pbi->dequant.idct_add_y_block    = vp8_dequant_idct_add_y_block_lossless_c;
-    pbi->dequant.idct_add_uv_block   = vp8_dequant_idct_add_uv_block_lossless_c;
+    pbi->idct_add            = vp8_dequant_idct_add_lossless_c;
+    pbi->dc_idct_add         = vp8_dequant_dc_idct_add_lossless_c;
+    pbi->dc_idct_add_y_block = vp8_dequant_dc_idct_add_y_block_lossless_c;
+    pbi->idct_add_y_block    = vp8_dequant_idct_add_y_block_lossless_c;
+    pbi->idct_add_uv_block   = vp8_dequant_idct_add_uv_block_lossless_c;
   } else {
     pbi->common.rtcd.idct.idct1        = vp8_short_idct4x4llm_1_c;
     pbi->common.rtcd.idct.idct16       = vp8_short_idct4x4llm_c;
     pbi->common.rtcd.idct.idct1_scalar_add  = vp8_dc_only_idct_add_c;
     pbi->common.rtcd.idct.iwalsh1      = vp8_short_inv_walsh4x4_1_c;
     pbi->common.rtcd.idct.iwalsh16     = vp8_short_inv_walsh4x4_c;
-    pbi->dequant.idct_add            = vp8_dequant_idct_add_c;
-    pbi->dequant.dc_idct_add         = vp8_dequant_dc_idct_add_c;
-    pbi->dequant.dc_idct_add_y_block = vp8_dequant_dc_idct_add_y_block_c;
-    pbi->dequant.idct_add_y_block    = vp8_dequant_idct_add_y_block_c;
-    pbi->dequant.idct_add_uv_block   = vp8_dequant_idct_add_uv_block_c;
+    pbi->idct_add            = vp8_dequant_idct_add;
+    pbi->dc_idct_add         = vp8_dequant_dc_idct_add;
+    pbi->dc_idct_add_y_block = vp8_dequant_dc_idct_add_y_block;
+    pbi->idct_add_y_block    = vp8_dequant_idct_add_y_block;
+    pbi->idct_add_uv_block   = vp8_dequant_idct_add_uv_block;
   }
+#else
+  pbi->idct_add            = vp8_dequant_idct_add;
+  pbi->dc_idct_add         = vp8_dequant_dc_idct_add;
+  pbi->dc_idct_add_y_block = vp8_dequant_dc_idct_add_y_block;
+  pbi->idct_add_y_block    = vp8_dequant_idct_add_y_block;
+  pbi->idct_add_uv_block   = vp8_dequant_idct_add_uv_block;
 #endif
 
   for (i = 16; i < 24; i++) {
@@ -335,23 +339,18 @@ static void decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd,
       } else {
         for (j = 0; j < 4; j++) {
           b = &xd->block[ib + iblock[j]];
-          vp8_dequant_idct_add_c(b->qcoeff, b->dequant, b->predictor,
+          vp8_dequant_idct_add(b->qcoeff, b->dequant, b->predictor,
                                  *(b->base_dst) + b->dst, 16, b->dst_stride);
         }
       }
-
       b = &xd->block[16 + i];
       vp8_intra_uv4x4_predict(b, i8x8mode, b->predictor);
-      DEQUANT_INVOKE(&pbi->dequant, idct_add)(b->qcoeff, b->dequant,
-                                              b->predictor,
-                                              *(b->base_dst) + b->dst, 8,
-                                              b->dst_stride);
+      pbi->idct_add(b->qcoeff, b->dequant, b->predictor,
+                    *(b->base_dst) + b->dst, 8, b->dst_stride);
       b = &xd->block[20 + i];
       vp8_intra_uv4x4_predict(b, i8x8mode, b->predictor);
-      DEQUANT_INVOKE(&pbi->dequant, idct_add)(b->qcoeff, b->dequant,
-                                              b->predictor,
-                                              *(b->base_dst) + b->dst, 8,
-                                              b->dst_stride);
+      pbi->idct_add(b->qcoeff, b->dequant, b->predictor,
+                    *(b->base_dst) + b->dst, 8, b->dst_stride);
     }
   } else if (mode == B_PRED) {
     for (i = 0; i < 16; i++) {
@@ -375,18 +374,17 @@ static void decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd,
                                   b->dequant, b->predictor,
                                   *(b->base_dst) + b->dst, 16, b->dst_stride);
       } else {
-        vp8_dequant_idct_add_c(b->qcoeff, b->dequant, b->predictor,
+        vp8_dequant_idct_add(b->qcoeff, b->dequant, b->predictor,
                                *(b->base_dst) + b->dst, 16, b->dst_stride);
       }
     }
   } else if (mode == SPLITMV) {
     if (tx_size == TX_8X8) {
-      vp8_dequant_idct_add_y_block_8x8_c(xd->qcoeff, xd->block[0].dequant,
+      vp8_dequant_idct_add_y_block_8x8(xd->qcoeff, xd->block[0].dequant,
                                          xd->predictor, xd->dst.y_buffer,
                                          xd->dst.y_stride, xd->eobs, xd);
     } else {
-      DEQUANT_INVOKE(&pbi->dequant,
-                     idct_add_y_block)(xd->qcoeff, xd->block[0].dequant,
+      pbi->idct_add_y_block(xd->qcoeff, xd->block[0].dequant,
                                        xd->predictor, xd->dst.y_buffer,
                                        xd->dst.y_stride, xd->eobs);
     }
@@ -401,7 +399,7 @@ static void decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd,
                                         xd->block[0].dequant, xd->predictor,
                                         xd->dst.y_buffer, 16, xd->dst.y_stride);
       } else {
-        vp8_dequant_idct_add_16x16_c(xd->qcoeff, xd->block[0].dequant,
+        vp8_dequant_idct_add_16x16(xd->qcoeff, xd->block[0].dequant,
                                      xd->predictor, xd->dst.y_buffer,
                                      16, xd->dst.y_stride);
       }
@@ -437,7 +435,7 @@ static void decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd,
         if (xd->mode_info_context->mbmi.mb_skip_coeff)
           continue; // only happens for SBs, which are already in dest buffer
 #endif
-      DEQUANT_INVOKE(&pbi->dequant, block_2x2)(b);
+      vp8_dequantize_b_2x2(b);
       IDCT_INVOKE(RTCD_VTABLE(idct), ihaar2)(&b->dqcoeff[0], b->diff, 8);
       ((int *)b->qcoeff)[0] = 0;// 2nd order block are set to 0 after inverse transform
       ((int *)b->qcoeff)[1] = 0;
@@ -461,7 +459,7 @@ static void decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd,
           xd->dst.uv_stride, xd->eobs + 16, xd);
       } else
 #endif
-        DEQUANT_INVOKE(&pbi->dequant, dc_idct_add_y_block_8x8)(xd->qcoeff,
+        vp8_dequant_dc_idct_add_y_block_8x8(xd->qcoeff,
           xd->block[0].dequant, xd->predictor, xd->dst.y_buffer,
           xd->dst.y_stride, xd->eobs, xd->block[24].diff, xd);
 #if CONFIG_SUPERBLOCKS
@@ -469,7 +467,7 @@ static void decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd,
       xd->mode_info_context = orig;
 #endif
     } else {
-      DEQUANT_INVOKE(&pbi->dequant, block)(b);
+      vp8_dequantize_b(b);
       if (xd->eobs[24] > 1) {
         IDCT_INVOKE(RTCD_VTABLE(idct), iwalsh16)(&b->dqcoeff[0], b->diff);
         ((int *)b->qcoeff)[0] = 0;
@@ -485,10 +483,9 @@ static void decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd,
         ((int *)b->qcoeff)[0] = 0;
       }
 
-      DEQUANT_INVOKE(&pbi->dequant, dc_idct_add_y_block)
-      (xd->qcoeff, xd->block[0].dequant,
-       xd->predictor, xd->dst.y_buffer,
-       xd->dst.y_stride, xd->eobs, xd->block[24].diff);
+      pbi->dc_idct_add_y_block(xd->qcoeff, xd->block[0].dequant, xd->predictor,
+                               xd->dst.y_buffer, xd->dst.y_stride, xd->eobs,
+                               xd->block[24].diff);
     }
   }
 
@@ -500,13 +497,12 @@ static void decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd,
          xd->mode_info_context->mbmi.mode != SPLITMV)
         || tx_size == TX_16X16
        )
-      DEQUANT_INVOKE(&pbi->dequant, idct_add_uv_block_8x8) //
+      vp8_dequant_idct_add_uv_block_8x8
           (xd->qcoeff + 16 * 16, xd->block[16].dequant,
            xd->predictor + 16 * 16, xd->dst.u_buffer, xd->dst.v_buffer,
            xd->dst.uv_stride, xd->eobs + 16, xd); //
     else if (xd->mode_info_context->mbmi.mode != I8X8_PRED)
-      DEQUANT_INVOKE(&pbi->dequant, idct_add_uv_block)
-          (xd->qcoeff + 16 * 16, xd->block[16].dequant,
+      pbi->idct_add_uv_block(xd->qcoeff + 16 * 16, xd->block[16].dequant,
            xd->predictor + 16 * 16, xd->dst.u_buffer, xd->dst.v_buffer,
            xd->dst.uv_stride, xd->eobs + 16);
 #if CONFIG_SUPERBLOCKS
index 4ac710431b5179461709985889c33b7fbf13529d..2d9314c80a37642feff4228403c984350f1786c4 100644 (file)
 #define DEQUANTIZE_H
 #include "vp8/common/blockd.h"
 
-#define prototype_dequant_block(sym) \
-  void sym(BLOCKD *x)
-
-#define prototype_dequant_idct_add(sym) \
-  void sym(short *input, short *dq, \
-           unsigned char *pred, unsigned char *output, \
-           int pitch, int stride)
-
-#define prototype_dequant_dc_idct_add(sym) \
-  void sym(short *input, short *dq, \
-           unsigned char *pred, unsigned char *output, \
-           int pitch, int stride, \
-           int dc)
-
-#define prototype_dequant_dc_idct_add_y_block(sym) \
-  void sym(short *q, short *dq, \
-           unsigned char *pre, unsigned char *dst, \
-           int stride, char *eobs, short *dc)
-
-#define prototype_dequant_idct_add_y_block(sym) \
-  void sym(short *q, short *dq, \
-           unsigned char *pre, unsigned char *dst, \
-           int stride, char *eobs)
-
-#define prototype_dequant_idct_add_uv_block(sym) \
-  void sym(short *q, short *dq, \
-           unsigned char *pre, unsigned char *dst_u, \
-           unsigned char *dst_v, int stride, char *eobs)
-
-#define prototype_dequant_dc_idct_add_y_block_8x8(sym) \
-  void sym(short *q, short *dq, \
-           unsigned char *pre, unsigned char *dst, \
-           int stride, char *eobs, short *dc, MACROBLOCKD *xd)
-
-#define prototype_dequant_idct_add_y_block_8x8(sym) \
-  void sym(short *q, short *dq, \
-           unsigned char *pre, unsigned char *dst, \
-           int stride, char *eobs, MACROBLOCKD *xd)
-
-#define prototype_dequant_idct_add_uv_block_8x8(sym) \
-  void sym(short *q, short *dq, \
-           unsigned char *pre, unsigned char *dst_u, \
-           unsigned char *dst_v, int stride, char *eobs, \
-           MACROBLOCKD *xd)
-
-#if ARCH_X86 || ARCH_X86_64
-#include "x86/dequantize_x86.h"
-#endif
-
-#if ARCH_ARM
-#include "arm/dequantize_arm.h"
-#endif
-
-#ifndef vp8_dequant_block
-#define vp8_dequant_block vp8_dequantize_b_c
-#endif
-extern prototype_dequant_block(vp8_dequant_block);
-
-#ifndef vp8_dequant_idct_add
-#define vp8_dequant_idct_add vp8_dequant_idct_add_c
-#endif
-extern prototype_dequant_idct_add(vp8_dequant_idct_add);
-
-// declare dequantization and inverse transform module of hybrid transform decoder
-#ifndef vp8_ht_dequant_idct_add
-#define vp8_ht_dequant_idct_add vp8_ht_dequant_idct_add_c
-#endif
-extern void vp8_ht_dequant_idct_add(TX_TYPE tx_type, short *input, short *dq,
+#if CONFIG_LOSSLESS
+extern void vp8_dequant_idct_add_lossless_c(short *input, short *dq,
+                                            unsigned char *pred,
+                                            unsigned char *output,
+                                            int pitch, int stride);
+extern void vp8_dequant_dc_idct_add_lossless_c(short *input, short *dq,
+                                               unsigned char *pred,
+                                               unsigned char *output,
+                                               int pitch, int stride, int dc);
+extern void vp8_dequant_dc_idct_add_y_block_lossless_c(short *q, short *dq,
+                                                       unsigned char *pre,
+                                                       unsigned char *dst,
+                                                       int stride, char *eobs,
+                                                       short *dc);
+extern void vp8_dequant_idct_add_y_block_lossless_c(short *q, short *dq,
+                                                    unsigned char *pre,
+                                                    unsigned char *dst,
+                                                    int stride, char *eobs);
+extern void vp8_dequant_idct_add_uv_block_lossless_c(short *q, short *dq,
+                                                     unsigned char *pre,
+                                                     unsigned char *dst_u,
+                                                     unsigned char *dst_v,
+                                                     int stride, char *eobs);
+#endif
+
+typedef void (*vp8_dequant_idct_add_fn_t)(short *input, short *dq,
+    unsigned char *pred, unsigned char *output, int pitch, int stride);
+typedef void(*vp8_dequant_dc_idct_add_fn_t)(short *input, short *dq,
+    unsigned char *pred, unsigned char *output, int pitch, int stride, int dc);
+
+typedef void(*vp8_dequant_dc_idct_add_y_block_fn_t)(short *q, short *dq,
+    unsigned char *pre, unsigned char *dst, int stride, char *eobs, short *dc);
+typedef void(*vp8_dequant_idct_add_y_block_fn_t)(short *q, short *dq,
+    unsigned char *pre, unsigned char *dst, int stride, char *eobs);
+typedef void(*vp8_dequant_idct_add_uv_block_fn_t)(short *q, short *dq,
+    unsigned char *pre, unsigned char *dst_u, unsigned char *dst_v, int stride,
+    char *eobs);
+
+void vp8_ht_dequant_idct_add_c(TX_TYPE tx_type, short *input, short *dq,
                                     unsigned char *pred, unsigned char *dest,
                                     int pitch, int stride);
 
-
-#ifndef vp8_dequant_dc_idct_add
-#define vp8_dequant_dc_idct_add vp8_dequant_dc_idct_add_c
-#endif
-extern prototype_dequant_dc_idct_add(vp8_dequant_dc_idct_add);
-
-#ifndef vp8_dequant_dc_idct_add_y_block
-#define vp8_dequant_dc_idct_add_y_block vp8_dequant_dc_idct_add_y_block_c
-#endif
-extern prototype_dequant_dc_idct_add_y_block(vp8_dequant_dc_idct_add_y_block);
-
-#ifndef vp8_dequant_idct_add_y_block
-#define vp8_dequant_idct_add_y_block vp8_dequant_idct_add_y_block_c
-#endif
-extern prototype_dequant_idct_add_y_block(vp8_dequant_idct_add_y_block);
-
-#ifndef vp8_dequant_idct_add_uv_block
-#define vp8_dequant_idct_add_uv_block vp8_dequant_idct_add_uv_block_c
-#endif
-extern prototype_dequant_idct_add_uv_block(vp8_dequant_idct_add_uv_block);
-
-#if CONFIG_LOSSLESS
-extern prototype_dequant_idct_add(vp8_dequant_idct_add_lossless_c);
-extern prototype_dequant_dc_idct_add(vp8_dequant_dc_idct_add_lossless_c);
-extern prototype_dequant_dc_idct_add_y_block(vp8_dequant_dc_idct_add_y_block_lossless_c);
-extern prototype_dequant_idct_add_y_block(vp8_dequant_idct_add_y_block_lossless_c);
-extern prototype_dequant_idct_add_uv_block(vp8_dequant_idct_add_uv_block_lossless_c);
-#endif
-
-#ifndef vp8_dequant_block_2x2
-#define vp8_dequant_block_2x2 vp8_dequantize_b_2x2_c
-#endif
-extern prototype_dequant_block(vp8_dequant_block_2x2);
-
-#ifndef vp8_dequant_idct_add_8x8
-#define vp8_dequant_idct_add_8x8 vp8_dequant_idct_add_8x8_c
-#endif
-extern prototype_dequant_idct_add(vp8_dequant_idct_add_8x8);
-
-#ifndef vp8_dequant_dc_idct_add_8x8
-#define vp8_dequant_dc_idct_add_8x8 vp8_dequant_dc_idct_add_8x8_c
-#endif
-extern prototype_dequant_dc_idct_add(vp8_dequant_dc_idct_add_8x8);
-
-#ifndef vp8_dequant_dc_idct_add_y_block_8x8
-#define vp8_dequant_dc_idct_add_y_block_8x8 vp8_dequant_dc_idct_add_y_block_8x8_c
-#endif
-extern prototype_dequant_dc_idct_add_y_block_8x8(vp8_dequant_dc_idct_add_y_block_8x8);
-
-#ifndef vp8_dequant_idct_add_y_block_8x8
-#define vp8_dequant_idct_add_y_block_8x8 vp8_dequant_idct_add_y_block_8x8_c
-#endif
-extern prototype_dequant_idct_add_y_block_8x8(vp8_dequant_idct_add_y_block_8x8);
-
-#ifndef vp8_dequant_idct_add_uv_block_8x8
-#define vp8_dequant_idct_add_uv_block_8x8 vp8_dequant_idct_add_uv_block_8x8_c
-#endif
-extern prototype_dequant_idct_add_uv_block_8x8(vp8_dequant_idct_add_uv_block_8x8);
-
-#ifndef vp8_dequant_idct_add_16x16
-#define vp8_dequant_idct_add_16x16 vp8_dequant_idct_add_16x16_c
-#endif
-extern prototype_dequant_idct_add(vp8_dequant_idct_add_16x16);
-
-
-typedef prototype_dequant_block((*vp8_dequant_block_fn_t));
-
-typedef prototype_dequant_idct_add((*vp8_dequant_idct_add_fn_t));
-
-typedef prototype_dequant_dc_idct_add((*vp8_dequant_dc_idct_add_fn_t));
-
-typedef prototype_dequant_dc_idct_add_y_block((*vp8_dequant_dc_idct_add_y_block_fn_t));
-
-typedef prototype_dequant_idct_add_y_block((*vp8_dequant_idct_add_y_block_fn_t));
-
-typedef prototype_dequant_idct_add_uv_block((*vp8_dequant_idct_add_uv_block_fn_t));
-
-typedef prototype_dequant_dc_idct_add_y_block_8x8((*vp8_dequant_dc_idct_add_y_block_fn_t_8x8));
-
-typedef prototype_dequant_idct_add_y_block_8x8((*vp8_dequant_idct_add_y_block_fn_t_8x8));
-
-typedef prototype_dequant_idct_add_uv_block_8x8((*vp8_dequant_idct_add_uv_block_fn_t_8x8));
-
-typedef struct {
-  vp8_dequant_block_fn_t               block;
-  vp8_dequant_idct_add_fn_t            idct_add;
-  vp8_dequant_dc_idct_add_fn_t         dc_idct_add;
-  vp8_dequant_dc_idct_add_y_block_fn_t dc_idct_add_y_block;
-  vp8_dequant_idct_add_y_block_fn_t    idct_add_y_block;
-  vp8_dequant_idct_add_uv_block_fn_t   idct_add_uv_block;
-  vp8_dequant_block_fn_t               block_2x2;
-  vp8_dequant_idct_add_fn_t            idct_add_8x8;
-  vp8_dequant_dc_idct_add_fn_t         dc_idct_add_8x8;
-  vp8_dequant_dc_idct_add_y_block_fn_t_8x8 dc_idct_add_y_block_8x8;
-  vp8_dequant_idct_add_y_block_fn_t_8x8    idct_add_y_block_8x8;
-  vp8_dequant_idct_add_uv_block_fn_t_8x8   idct_add_uv_block_8x8;
-  vp8_dequant_idct_add_fn_t            idct_add_16x16;
-} vp8_dequant_rtcd_vtable_t;
-
-#if CONFIG_RUNTIME_CPU_DETECT
-#define DEQUANT_INVOKE(ctx,fn) (ctx)->fn
-#else
-#define DEQUANT_INVOKE(ctx,fn) vp8_dequant_##fn
-#endif
-
 void vp8_ht_dequant_idct_add_8x8_c(TX_TYPE tx_type, short *input, short *dq,
                                    unsigned char *pred, unsigned char *dest,
                                    int pitch, int stride);
diff --git a/vp8/decoder/generic/dsystemdependent.c b/vp8/decoder/generic/dsystemdependent.c
deleted file mode 100644 (file)
index b7b65d9..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- *  Copyright (c) 2010 The WebM project authors. All Rights Reserved.
- *
- *  Use of this source code is governed by a BSD-style license
- *  that can be found in the LICENSE file in the root of the source
- *  tree. An additional intellectual property rights grant can be found
- *  in the file PATENTS.  All contributing project authors may
- *  be found in the AUTHORS file in the root of the source tree.
- */
-
-
-#include "vpx_ports/config.h"
-#include "vp8/decoder/dequantize.h"
-#include "vp8/decoder/onyxd_int.h"
-
-extern void vp8_arch_x86_decode_init(VP8D_COMP *pbi);
-extern void vp8_arch_arm_decode_init(VP8D_COMP *pbi);
-
-void vp8_dmachine_specific_config(VP8D_COMP *pbi) {
-  /* Pure C: */
-#if CONFIG_RUNTIME_CPU_DETECT
-  pbi->mb.rtcd                     = &pbi->common.rtcd;
-  pbi->dequant.block_2x2           = vp8_dequantize_b_2x2_c;
-  pbi->dequant.idct_add_8x8        = vp8_dequant_idct_add_8x8_c;
-  pbi->dequant.idct_add_16x16      = vp8_dequant_idct_add_16x16_c;
-  pbi->dequant.dc_idct_add_8x8     = vp8_dequant_dc_idct_add_8x8_c;
-  pbi->dequant.dc_idct_add_y_block_8x8 = vp8_dequant_dc_idct_add_y_block_8x8_c;
-  pbi->dequant.idct_add_y_block_8x8 = vp8_dequant_idct_add_y_block_8x8_c;
-  pbi->dequant.idct_add_uv_block_8x8 = vp8_dequant_idct_add_uv_block_8x8_c;
-  pbi->dequant.block               = vp8_dequantize_b_c;
-  pbi->dequant.idct_add            = vp8_dequant_idct_add_c;
-  pbi->dequant.dc_idct_add         = vp8_dequant_dc_idct_add_c;
-  pbi->dequant.dc_idct_add_y_block = vp8_dequant_dc_idct_add_y_block_c;
-  pbi->dequant.idct_add_y_block    = vp8_dequant_idct_add_y_block_c;
-  pbi->dequant.idct_add_uv_block   = vp8_dequant_idct_add_uv_block_c;
-#endif
-
-#if ARCH_X86 || ARCH_X86_64
-  vp8_arch_x86_decode_init(pbi);
-#endif
-
-
-#if ARCH_ARM
-  vp8_arch_arm_decode_init(pbi);
-#endif
-}
index 2e7751325d3bcf945138dd683ba0c277d5cf5088..20fad9f46da0e80daa2f3b773ca7f17e32ffebb7 100644 (file)
@@ -133,7 +133,6 @@ VP8D_PTR vp8dx_create_decompressor(VP8D_CONFIG *oxcf) {
   vp8dx_initialize();
 
   vp8_create_common(&pbi->common);
-  vp8_dmachine_specific_config(pbi);
 
   pbi->common.current_video_frame = 0;
   pbi->ready_for_new_data = 1;
index 0a84256e297059fbe4e0c942e025aa3725639c3d..7d70a0dd8f4e0eafefa7c05de6b5608632404b50 100644 (file)
@@ -71,9 +71,11 @@ typedef struct VP8Decompressor {
 
   DETOK detoken;
 
-#if CONFIG_RUNTIME_CPU_DETECT
-  vp8_dequant_rtcd_vtable_t        dequant;
-#endif
+  vp8_dequant_idct_add_fn_t            idct_add;
+  vp8_dequant_dc_idct_add_fn_t         dc_idct_add;
+  vp8_dequant_dc_idct_add_y_block_fn_t dc_idct_add_y_block;
+  vp8_dequant_idct_add_y_block_fn_t    idct_add_y_block;
+  vp8_dequant_idct_add_uv_block_fn_t   idct_add_uv_block;
 
   vp8_prob prob_skip_false;
 
@@ -82,7 +84,6 @@ typedef struct VP8Decompressor {
 } VP8D_COMP;
 
 int vp8_decode_frame(VP8D_COMP *cpi);
-void vp8_dmachine_specific_config(VP8D_COMP *pbi);
 
 
 #if CONFIG_DEBUG
diff --git a/vp8/decoder/x86/dequantize_x86.h b/vp8/decoder/x86/dequantize_x86.h
deleted file mode 100644 (file)
index 32f25cc..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- *  Copyright (c) 2010 The WebM project authors. All Rights Reserved.
- *
- *  Use of this source code is governed by a BSD-style license
- *  that can be found in the LICENSE file in the root of the source
- *  tree. An additional intellectual property rights grant can be found
- *  in the file PATENTS.  All contributing project authors may
- *  be found in the AUTHORS file in the root of the source tree.
- */
-
-
-#ifndef DEQUANTIZE_X86_H
-#define DEQUANTIZE_X86_H
-
-
-/* Note:
- *
- * This platform is commonly built for runtime CPU detection. If you modify
- * any of the function mappings present in this file, be sure to also update
- * them in the function pointer initialization code
- */
-#if HAVE_MMX
-extern prototype_dequant_block(vp8_dequantize_b_mmx);
-extern prototype_dequant_idct_add(vpx_dequant_idct_add_mmx);
-extern prototype_dequant_dc_idct_add(vpx_dequant_dc_idct_add_mmx);
-extern prototype_dequant_dc_idct_add_y_block(vp8_dequant_dc_idct_add_y_block_mmx);
-extern prototype_dequant_idct_add_y_block(vp8_dequant_idct_add_y_block_mmx);
-extern prototype_dequant_idct_add_uv_block(vp8_dequant_idct_add_uv_block_mmx);
-
-#if !CONFIG_RUNTIME_CPU_DETECT
-#undef  vp8_dequant_block
-#define vp8_dequant_block vp8_dequantize_b_mmx
-
-#undef  vp8_dequant_idct_add
-#define vp8_dequant_idct_add vpx_dequant_idct_add_mmx
-
-#undef  vp8_dequant_dc_idct_add
-#define vp8_dequant_dc_idct_add vp8_dequant_dc_idct_add_mmx
-
-#undef vp8_dequant_dc_idct_add_y_block
-#define vp8_dequant_dc_idct_add_y_block vp8_dequant_dc_idct_add_y_block_mmx
-
-#undef vp8_dequant_idct_add_y_block
-#define vp8_dequant_idct_add_y_block vp8_dequant_idct_add_y_block_mmx
-
-#undef vp8_dequant_idct_add_uv_block
-#define vp8_dequant_idct_add_uv_block vp8_dequant_idct_add_uv_block_mmx
-
-#endif
-#endif
-
-#if HAVE_SSE2
-extern prototype_dequant_dc_idct_add_y_block(vp8_dequant_dc_idct_add_y_block_sse2);
-extern prototype_dequant_idct_add_y_block(vp8_dequant_idct_add_y_block_sse2);
-extern prototype_dequant_idct_add_uv_block(vp8_dequant_idct_add_uv_block_sse2);
-
-#if !CONFIG_RUNTIME_CPU_DETECT
-#undef vp8_dequant_dc_idct_add_y_block
-#define vp8_dequant_dc_idct_add_y_block vp8_dequant_dc_idct_add_y_block_sse2
-
-#undef vp8_dequant_idct_add_y_block
-#define vp8_dequant_idct_add_y_block vp8_dequant_idct_add_y_block_sse2
-
-#undef vp8_dequant_idct_add_uv_block
-#define vp8_dequant_idct_add_uv_block vp8_dequant_idct_add_uv_block_sse2
-
-#endif
-#endif
-
-#endif
index ec70897526b29af7d25641265071cc95ddfa23cd..430fc946ce810d98a8457547918454bc475881a3 100644 (file)
@@ -25,34 +25,4 @@ void vp8_dequantize_b_mmx(BLOCKD *d) {
 }
 #endif
 
-void vp8_arch_x86_decode_init(VP8D_COMP *pbi) {
-#if CONFIG_RUNTIME_CPU_DETECT
-  int flags = x86_simd_caps();
 
-  /* Note:
-   *
-   * This platform can be built without runtime CPU detection as well. If
-   * you modify any of the function mappings present in this file, be sure
-   * to also update them in static mapings (<arch>/filename_<arch>.h)
-   */
-  /* Override default functions with fastest ones for this CPU. */
-#if HAVE_MMX
-  if (flags & HAS_MMX) {
-    pbi->dequant.block               = vp8_dequantize_b_mmx;
-    pbi->dequant.idct_add            = vpx_dequant_idct_add_mmx;
-    pbi->dequant.dc_idct_add         = vpx_dequant_dc_idct_add_mmx;
-    pbi->dequant.dc_idct_add_y_block = vp8_dequant_dc_idct_add_y_block_mmx;
-    pbi->dequant.idct_add_y_block    = vp8_dequant_idct_add_y_block_mmx;
-    pbi->dequant.idct_add_uv_block   = vp8_dequant_idct_add_uv_block_mmx;
-  }
-#endif
-#if HAVE_SSE2
-  if (flags & HAS_SSE2) {
-    // pbi->dequant.dc_idct_add_y_block = vp8_dequant_dc_idct_add_y_block_sse2;
-    // pbi->dequant.idct_add_y_block    = vp8_dequant_idct_add_y_block_sse2;
-    // pbi->dequant.idct_add_uv_block   = vp8_dequant_idct_add_uv_block_sse2;
-  }
-#endif
-
-#endif
-}
index 3ff033719eec006dbc18de9613b47c501c9e5a44..4e7123cd33908515d7bb3ce7f96c6b4b814de2e1 100644 (file)
@@ -64,7 +64,6 @@ extern void vp8cx_pick_filter_level_fast(YV12_BUFFER_CONFIG *sd, VP8_COMP *cpi);
 extern void vp8cx_set_alt_lf_level(VP8_COMP *cpi, int filt_val);
 extern void vp8cx_pick_filter_level(YV12_BUFFER_CONFIG *sd, VP8_COMP *cpi);
 
-extern void vp8_dmachine_specific_config(VP8_COMP *cpi);
 extern void vp8_cmachine_specific_config(VP8_COMP *cpi);
 extern void vp8_deblock_frame(YV12_BUFFER_CONFIG *source, YV12_BUFFER_CONFIG *post, int filt_lvl, int low_var_thresh, int flag);
 extern void print_parms(VP8_CONFIG *ocf, char *filenam);
@@ -313,7 +312,6 @@ void vp8_initialize() {
   if (!init_done) {
     vp8_scale_machine_specific_config();
     vp8_initialize_common();
-    // vp8_dmachine_specific_config();
     vp8_tokenize_initialize();
     vp8_init_quant_tables();
     vp8_init_me_luts();
index 5de493ddc02981714332a8a7f8687746260f99be..15895c5293ece89bd9f3990ac9c354c91f794ca2 100644 (file)
@@ -54,7 +54,6 @@ VP8_DX_SRCS-yes += decoder/decodemv.c
 VP8_DX_SRCS-yes += decoder/decodframe.c
 VP8_DX_SRCS-yes += decoder/dequantize.c
 VP8_DX_SRCS-yes += decoder/detokenize.c
-VP8_DX_SRCS-yes += decoder/generic/dsystemdependent.c
 VP8_DX_SRCS-yes += decoder/dboolhuff.h
 VP8_DX_SRCS-yes += decoder/decodemv.h
 VP8_DX_SRCS-yes += decoder/dequantize.h
@@ -66,7 +65,6 @@ VP8_DX_SRCS-yes += decoder/idct_blk.c
 
 VP8_DX_SRCS-yes := $(filter-out $(VP8_DX_SRCS_REMOVE-yes),$(VP8_DX_SRCS-yes))
 
-VP8_DX_SRCS-$(ARCH_X86)$(ARCH_X86_64) += decoder/x86/dequantize_x86.h
 VP8_DX_SRCS-$(ARCH_X86)$(ARCH_X86_64) += decoder/x86/x86_dsystemdependent.c
 VP8_DX_SRCS-$(HAVE_MMX) += decoder/x86/dequantize_mmx.asm
 VP8_DX_SRCS-$(HAVE_MMX) += decoder/x86/idct_blk_mmx.c
index 6bde42f4c351f894eb8d7e8c21ef3c840253aeef..8020c3d61096f6fa6f96500b12713a39478e2c3e 100644 (file)
@@ -11,9 +11,7 @@
 
 #VP8_DX_SRCS list is modified according to different platforms.
 
-VP8_DX_SRCS-$(ARCH_ARM)  += decoder/arm/arm_dsystemdependent.c
 VP8_DX_SRCS-$(ARCH_ARM)  += decoder/arm/dequantize_arm.c
-VP8_DX_SRCS-$(ARCH_ARM)  += decoder/arm/dequantize_arm.h
 
 #File list for armv6
 VP8_DX_SRCS-$(HAVE_ARMV6)  += decoder/arm/armv6/dequant_dc_idct_v6$(ASM)