Commit df1b8f2f authored by Scott LaVarnway's avatar Scott LaVarnway

dequant invoke macro removal

Change-Id: Ifa17e698149adc063476e7d16eb727f01e88b447
parent 747fbd1b
...@@ -34,6 +34,41 @@ fi ...@@ -34,6 +34,41 @@ fi
specialize vp8_filter_block2d_8x8_8 ssse3 #sse4_1 sse2 specialize vp8_filter_block2d_8x8_8 ssse3 #sse4_1 sse2
specialize vp8_filter_block2d_16x16_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 # RECON
......
/*
* 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
}
/*
* 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
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
#include "vp8/common/reconintra.h" #include "vp8/common/reconintra.h"
#include "vp8/common/reconintra4x4.h" #include "vp8/common/reconintra4x4.h"
#include "vp8/common/reconinter.h" #include "vp8/common/reconinter.h"
#include "dequantize.h"
#include "detokenize.h" #include "detokenize.h"
#include "vp8/common/invtrans.h" #include "vp8/common/invtrans.h"
#include "vp8/common/alloccommon.h" #include "vp8/common/alloccommon.h"
...@@ -29,7 +28,6 @@ ...@@ -29,7 +28,6 @@
#include "vp8/common/modecont.h" #include "vp8/common/modecont.h"
#include "vpx_mem/vpx_mem.h" #include "vpx_mem/vpx_mem.h"
#include "vp8/common/idct.h" #include "vp8/common/idct.h"
#include "dequantize.h"
#include "dboolhuff.h" #include "dboolhuff.h"
#include "vp8/common/seg_common.h" #include "vp8/common/seg_common.h"
...@@ -129,23 +127,29 @@ static void mb_init_dequantizer(VP8D_COMP *pbi, MACROBLOCKD *xd) { ...@@ -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.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.iwalsh1 = vp8_short_inv_walsh4x4_1_lossless_c;
pbi->common.rtcd.idct.iwalsh16 = vp8_short_inv_walsh4x4_lossless_c; pbi->common.rtcd.idct.iwalsh16 = vp8_short_inv_walsh4x4_lossless_c;
pbi->dequant.idct_add = vp8_dequant_idct_add_lossless_c; pbi->idct_add = vp8_dequant_idct_add_lossless_c;
pbi->dequant.dc_idct_add = vp8_dequant_dc_idct_add_lossless_c; pbi->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->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->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_uv_block = vp8_dequant_idct_add_uv_block_lossless_c;
} else { } else {
pbi->common.rtcd.idct.idct1 = vp8_short_idct4x4llm_1_c; pbi->common.rtcd.idct.idct1 = vp8_short_idct4x4llm_1_c;
pbi->common.rtcd.idct.idct16 = vp8_short_idct4x4llm_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.idct1_scalar_add = vp8_dc_only_idct_add_c;
pbi->common.rtcd.idct.iwalsh1 = vp8_short_inv_walsh4x4_1_c; pbi->common.rtcd.idct.iwalsh1 = vp8_short_inv_walsh4x4_1_c;
pbi->common.rtcd.idct.iwalsh16 = vp8_short_inv_walsh4x4_c; pbi->common.rtcd.idct.iwalsh16 = vp8_short_inv_walsh4x4_c;
pbi->dequant.idct_add = vp8_dequant_idct_add_c; pbi->idct_add = vp8_dequant_idct_add;
pbi->dequant.dc_idct_add = vp8_dequant_dc_idct_add_c; pbi->dc_idct_add = vp8_dequant_dc_idct_add;
pbi->dequant.dc_idct_add_y_block = vp8_dequant_dc_idct_add_y_block_c; pbi->dc_idct_add_y_block = vp8_dequant_dc_idct_add_y_block;
pbi->dequant.idct_add_y_block = vp8_dequant_idct_add_y_block_c; pbi->idct_add_y_block = vp8_dequant_idct_add_y_block;
pbi->dequant.idct_add_uv_block = vp8_dequant_idct_add_uv_block_c; 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 #endif
for (i = 16; i < 24; i++) { for (i = 16; i < 24; i++) {
...@@ -335,23 +339,18 @@ static void decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd, ...@@ -335,23 +339,18 @@ static void decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd,
} else { } else {
for (j = 0; j < 4; j++) { for (j = 0; j < 4; j++) {
b = &xd->block[ib + iblock[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->base_dst) + b->dst, 16, b->dst_stride);
} }
} }
b = &xd->block[16 + i]; b = &xd->block[16 + i];
vp8_intra_uv4x4_predict(b, i8x8mode, b->predictor); vp8_intra_uv4x4_predict(b, i8x8mode, b->predictor);
DEQUANT_INVOKE(&pbi->dequant, idct_add)(b->qcoeff, b->dequant, pbi->idct_add(b->qcoeff, b->dequant, b->predictor,
b->predictor, *(b->base_dst) + b->dst, 8, b->dst_stride);
*(b->base_dst) + b->dst, 8,
b->dst_stride);
b = &xd->block[20 + i]; b = &xd->block[20 + i];
vp8_intra_uv4x4_predict(b, i8x8mode, b->predictor); vp8_intra_uv4x4_predict(b, i8x8mode, b->predictor);
DEQUANT_INVOKE(&pbi->dequant, idct_add)(b->qcoeff, b->dequant, pbi->idct_add(b->qcoeff, b->dequant, b->predictor,
b->predictor, *(b->base_dst) + b->dst, 8, b->dst_stride);
*(b->base_dst) + b->dst, 8,
b->dst_stride);
} }
} else if (mode == B_PRED) { } else if (mode == B_PRED) {
for (i = 0; i < 16; i++) { for (i = 0; i < 16; i++) {
...@@ -375,18 +374,17 @@ static void decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd, ...@@ -375,18 +374,17 @@ static void decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd,
b->dequant, b->predictor, b->dequant, b->predictor,
*(b->base_dst) + b->dst, 16, b->dst_stride); *(b->base_dst) + b->dst, 16, b->dst_stride);
} else { } 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); *(b->base_dst) + b->dst, 16, b->dst_stride);
} }
} }
} else if (mode == SPLITMV) { } else if (mode == SPLITMV) {
if (tx_size == TX_8X8) { 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->predictor, xd->dst.y_buffer,
xd->dst.y_stride, xd->eobs, xd); xd->dst.y_stride, xd->eobs, xd);
} else { } else {
DEQUANT_INVOKE(&pbi->dequant, pbi->idct_add_y_block(xd->qcoeff, xd->block[0].dequant,
idct_add_y_block)(xd->qcoeff, xd->block[0].dequant,
xd->predictor, xd->dst.y_buffer, xd->predictor, xd->dst.y_buffer,
xd->dst.y_stride, xd->eobs); xd->dst.y_stride, xd->eobs);
} }
...@@ -401,7 +399,7 @@ static void decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd, ...@@ -401,7 +399,7 @@ static void decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd,
xd->block[0].dequant, xd->predictor, xd->block[0].dequant, xd->predictor,
xd->dst.y_buffer, 16, xd->dst.y_stride); xd->dst.y_buffer, 16, xd->dst.y_stride);
} else { } 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, xd->predictor, xd->dst.y_buffer,
16, xd->dst.y_stride); 16, xd->dst.y_stride);
} }
...@@ -437,7 +435,7 @@ static void decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd, ...@@ -437,7 +435,7 @@ static void decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd,
if (xd->mode_info_context->mbmi.mb_skip_coeff) if (xd->mode_info_context->mbmi.mb_skip_coeff)
continue; // only happens for SBs, which are already in dest buffer continue; // only happens for SBs, which are already in dest buffer
#endif #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); 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)[0] = 0;// 2nd order block are set to 0 after inverse transform
((int *)b->qcoeff)[1] = 0; ((int *)b->qcoeff)[1] = 0;
...@@ -461,7 +459,7 @@ static void decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd, ...@@ -461,7 +459,7 @@ static void decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd,
xd->dst.uv_stride, xd->eobs + 16, xd); xd->dst.uv_stride, xd->eobs + 16, xd);
} else } else
#endif #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->block[0].dequant, xd->predictor, xd->dst.y_buffer,
xd->dst.y_stride, xd->eobs, xd->block[24].diff, xd); xd->dst.y_stride, xd->eobs, xd->block[24].diff, xd);
#if CONFIG_SUPERBLOCKS #if CONFIG_SUPERBLOCKS
...@@ -469,7 +467,7 @@ static void decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd, ...@@ -469,7 +467,7 @@ static void decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd,
xd->mode_info_context = orig; xd->mode_info_context = orig;
#endif #endif
} else { } else {
DEQUANT_INVOKE(&pbi->dequant, block)(b); vp8_dequantize_b(b);
if (xd->eobs[24] > 1) { if (xd->eobs[24] > 1) {
IDCT_INVOKE(RTCD_VTABLE(idct), iwalsh16)(&b->dqcoeff[0], b->diff); IDCT_INVOKE(RTCD_VTABLE(idct), iwalsh16)(&b->dqcoeff[0], b->diff);
((int *)b->qcoeff)[0] = 0; ((int *)b->qcoeff)[0] = 0;
...@@ -485,10 +483,9 @@ static void decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd, ...@@ -485,10 +483,9 @@ static void decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd,
((int *)b->qcoeff)[0] = 0; ((int *)b->qcoeff)[0] = 0;
} }
DEQUANT_INVOKE(&pbi->dequant, dc_idct_add_y_block) pbi->dc_idct_add_y_block(xd->qcoeff, xd->block[0].dequant, xd->predictor,
(xd->qcoeff, xd->block[0].dequant, xd->dst.y_buffer, xd->dst.y_stride, xd->eobs,
xd->predictor, xd->dst.y_buffer, xd->block[24].diff);
xd->dst.y_stride, xd->eobs, xd->block[24].diff);
} }
} }
...@@ -500,13 +497,12 @@ static void decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd, ...@@ -500,13 +497,12 @@ static void decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd,
xd->mode_info_context->mbmi.mode != SPLITMV) xd->mode_info_context->mbmi.mode != SPLITMV)
|| tx_size == TX_16X16 || 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->qcoeff + 16 * 16, xd->block[16].dequant,
xd->predictor + 16 * 16, xd->dst.u_buffer, xd->dst.v_buffer, xd->predictor + 16 * 16, xd->dst.u_buffer, xd->dst.v_buffer,
xd->dst.uv_stride, xd->eobs + 16, xd); // xd->dst.uv_stride, xd->eobs + 16, xd); //
else if (xd->mode_info_context->mbmi.mode != I8X8_PRED) else if (xd->mode_info_context->mbmi.mode != I8X8_PRED)
DEQUANT_INVOKE(&pbi->dequant, idct_add_uv_block) pbi->idct_add_uv_block(xd->qcoeff + 16 * 16, xd->block[16].dequant,
(xd->qcoeff + 16 * 16, xd->block[16].dequant,
xd->predictor + 16 * 16, xd->dst.u_buffer, xd->dst.v_buffer, xd->predictor + 16 * 16, xd->dst.u_buffer, xd->dst.v_buffer,
xd->dst.uv_stride, xd->eobs + 16); xd->dst.uv_stride, xd->eobs + 16);
#if CONFIG_SUPERBLOCKS #if CONFIG_SUPERBLOCKS
......
...@@ -13,182 +13,48 @@ ...@@ -13,182 +13,48 @@
#define DEQUANTIZE_H #define DEQUANTIZE_H
#include "vp8/common/blockd.h" #include "vp8/common/blockd.h"
#define prototype_dequant_block(sym) \ #if CONFIG_LOSSLESS
void sym(BLOCKD *x) extern void vp8_dequant_idct_add_lossless_c(short *input, short *dq,
unsigned char *pred,
#define prototype_dequant_idct_add(sym) \ unsigned char *output,
void sym(short *input, short *dq, \ int pitch, int stride);
unsigned char *pred, unsigned char *output, \ extern void vp8_dequant_dc_idct_add_lossless_c(short *input, short *dq,
int pitch, int stride) unsigned char *pred,
unsigned char *output,
#define prototype_dequant_dc_idct_add(sym) \ int pitch, int stride, int dc);
void sym(short *input, short *dq, \ extern void vp8_dequant_dc_idct_add_y_block_lossless_c(short *q, short *dq,
unsigned char *pred, unsigned char *output, \ unsigned char *pre,
int pitch, int stride, \ unsigned char *dst,
int dc) int stride, char *eobs,
short *dc);
#define prototype_dequant_dc_idct_add_y_block(sym) \ extern void vp8_dequant_idct_add_y_block_lossless_c(short *q, short *dq,
void sym(short *q, short *dq, \ unsigned char *pre,
unsigned char *pre, unsigned char *dst, \ unsigned char *dst,
int stride, char *eobs, short *dc) int stride, char *eobs);
extern void vp8_dequant_idct_add_uv_block_lossless_c(short *q, short *dq,
#define prototype_dequant_idct_add_y_block(sym) \ unsigned char *pre,
void sym(short *q, short *dq, \ unsigned char *dst_u,
unsigned char *pre, unsigned char *dst, \ unsigned char *dst_v,
int stride, char *eobs) int stride, char *eobs);
#endif
#define prototype_dequant_idct_add_uv_block(sym) \
void sym(short *q, short *dq, \ typedef void (*vp8_dequant_idct_add_fn_t)(short *input, short *dq,
unsigned char *pre, unsigned char *dst_u, \ unsigned char *pred, unsigned char *output, int pitch, int stride);
unsigned char *dst_v, int stride, char *eobs) 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);
#define prototype_dequant_dc_idct_add_y_block_8x8(sym) \
void sym(short *q, short *dq, \ typedef void(*vp8_dequant_dc_idct_add_y_block_fn_t)(short *q, short *dq,
unsigned char *pre, unsigned char *dst, \ unsigned char *pre, unsigned char *dst, int stride, char *eobs, short *dc);
int stride, char *eobs, short *dc, MACROBLOCKD *xd) typedef void(*vp8_dequant_idct_add_y_block_fn_t)(short *q, short *dq,
unsigned char *pre, unsigned char *dst, int stride, char *eobs);
#define prototype_dequant_idct_add_y_block_8x8(sym) \ typedef void(*vp8_dequant_idct_add_uv_block_fn_t)(short *q, short *dq,
void sym(short *q, short *dq, \ unsigned char *pre, unsigned char *dst_u, unsigned char *dst_v, int stride,
unsigned char *pre, unsigned char *dst, \ char *eobs);
int stride, char *eobs, MACROBLOCKD *xd)
void vp8_ht_dequant_idct_add_c(TX_TYPE tx_type, short *input, short *dq,
#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,
unsigned char *pred, unsigned char *dest, unsigned char *pred, unsigned char *dest,
int pitch, int stride); 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 {