Change-Id: Ifa17e698149adc063476e7d16eb727f01e88b447
This commit is contained in:
Scott LaVarnway 2012-10-30 12:09:49 -07:00
Родитель 747fbd1b7b
Коммит df1b8f2f23
13 изменённых файлов: 108 добавлений и 488 удалений

Просмотреть файл

@ -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

Просмотреть файл

@ -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
}

Просмотреть файл

@ -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

Просмотреть файл

@ -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

Просмотреть файл

@ -13,182 +13,48 @@
#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"
#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
#if ARCH_ARM
#include "arm/dequantize_arm.h"
#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);
#ifndef vp8_dequant_block
#define vp8_dequant_block vp8_dequantize_b_c
#endif
extern prototype_dequant_block(vp8_dequant_block);
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);
#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,
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);

Просмотреть файл

@ -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
}

Просмотреть файл

@ -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;

Просмотреть файл

@ -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

Просмотреть файл

@ -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

Просмотреть файл

@ -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
}

Просмотреть файл

@ -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();

Просмотреть файл

@ -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

Просмотреть файл

@ -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)