Commit 0d53fc26 authored by Ronald S. Bultje's avatar Ronald S. Bultje

Change decoder vp8_ and vp8dx_ public symbol prefixes to vp9_.

Change-Id: Iedb4c3b4171d8640cc525727b4c3658e2bb400db
parent d115dbc2
......@@ -36,7 +36,7 @@
%include "vpx_config.asm"
%define program_name vpx
%define program_name vp9
%define UNIX64 0
......
......@@ -43,21 +43,21 @@ extern "C"
VP8D_OK = 0
} VP8D_SETTING;
void vp8dx_initialize(void);
void vp9dx_initialize(void);
void vp8dx_set_setting(VP8D_PTR comp, VP8D_SETTING oxst, int x);
int vp8dx_get_setting(VP8D_PTR comp, VP8D_SETTING oxst);
int vp8dx_receive_compressed_data(VP8D_PTR comp, unsigned long size, const unsigned char *dest, int64_t time_stamp);
int vp8dx_get_raw_frame(VP8D_PTR comp, YV12_BUFFER_CONFIG *sd, int64_t *time_stamp, int64_t *time_end_stamp, vp8_ppflags_t *flags);
int vp9dx_receive_compressed_data(VP8D_PTR comp, unsigned long size, const unsigned char *dest, int64_t time_stamp);
int vp9dx_get_raw_frame(VP8D_PTR comp, YV12_BUFFER_CONFIG *sd, int64_t *time_stamp, int64_t *time_end_stamp, vp8_ppflags_t *flags);
vpx_codec_err_t vp8dx_get_reference(VP8D_PTR comp, VP8_REFFRAME ref_frame_flag, YV12_BUFFER_CONFIG *sd);
vpx_codec_err_t vp8dx_set_reference(VP8D_PTR comp, VP8_REFFRAME ref_frame_flag, YV12_BUFFER_CONFIG *sd);
vpx_codec_err_t vp9dx_get_reference(VP8D_PTR comp, VP8_REFFRAME ref_frame_flag, YV12_BUFFER_CONFIG *sd);
vpx_codec_err_t vp9dx_set_reference(VP8D_PTR comp, VP8_REFFRAME ref_frame_flag, YV12_BUFFER_CONFIG *sd);
VP8D_PTR vp8dx_create_decompressor(VP8D_CONFIG *oxcf);
VP8D_PTR vp9dx_create_decompressor(VP8D_CONFIG *oxcf);
void vp8dx_remove_decompressor(VP8D_PTR comp);
void vp9dx_remove_decompressor(VP8D_PTR comp);
#ifdef __cplusplus
}
......
......@@ -37,38 +37,38 @@ fi
#
# Dequant
#
prototype void vp8_dequantize_b "struct blockd *x"
specialize vp8_dequantize_b mmx
prototype void vp9_dequantize_b "struct blockd *x"
specialize vp9_dequantize_b mmx
prototype void vp8_dequantize_b_2x2 "struct blockd *x"
specialize vp8_dequantize_b_2x2
prototype void vp9_dequantize_b_2x2 "struct blockd *x"
specialize vp9_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 vp9_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 vp9_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 vp9_dequant_idct_add_y_block_8x8 "short *q, short *dq, unsigned char *pre, unsigned char *dst, int stride, char *eobs, struct macroblockd *xd"
specialize vp9_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 vp9_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 vp9_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 vp9_dequant_idct_add_16x16 "short *input, short *dq, unsigned char *pred, unsigned char *dest, int pitch, int stride"
specialize vp9_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 vp9_dequant_idct_add "short *input, short *dq, unsigned char *pred, unsigned char *dest, int pitch, int stride"
specialize vp9_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 vp9_dequant_dc_idct_add "short *input, short *dq, unsigned char *pred, unsigned char *dest, int pitch, int stride, int Dc"
specialize vp9_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 vp9_dequant_dc_idct_add_y_block "short *q, short *dq, unsigned char *pre, unsigned char *dst, int stride, char *eobs, short *dc"
specialize vp9_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 vp9_dequant_idct_add_y_block "short *q, short *dq, unsigned char *pre, unsigned char *dst, int stride, char *eobs"
specialize vp9_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
prototype void vp9_dequant_idct_add_uv_block "short *q, short *dq, unsigned char *pre, unsigned char *dstu, unsigned char *dstv, int stride, char *eobs"
specialize vp9_dequant_idct_add_uv_block mmx
#
# RECON
......
......@@ -20,22 +20,22 @@
*/
#if HAVE_MMX
extern prototype_idct(vpx_short_idct4x4llm_1_mmx);
extern prototype_idct(vpx_short_idct4x4llm_mmx);
extern prototype_idct_scalar_add(vpx_dc_only_idct_add_mmx);
extern prototype_idct(vp9_short_idct4x4llm_1_mmx);
extern prototype_idct(vp9_short_idct4x4llm_mmx);
extern prototype_idct_scalar_add(vp9_dc_only_idct_add_mmx);
extern prototype_second_order(vp8_short_inv_walsh4x4_mmx);
extern prototype_second_order(vp8_short_inv_walsh4x4_1_mmx);
#if !CONFIG_RUNTIME_CPU_DETECT
#undef vp8_idct_idct1
#define vp8_idct_idct1 vpx_short_idct4x4llm_1_mmx
#define vp8_idct_idct1 vp9_short_idct4x4llm_1_mmx
#undef vp8_idct_idct16
#define vp8_idct_idct16 vpx_short_idct4x4llm_mmx
#define vp8_idct_idct16 vp9_short_idct4x4llm_mmx
#undef vp8_idct_idct1_scalar_add
#define vp8_idct_idct1_scalar_add vpx_dc_only_idct_add_mmx
#define vp8_idct_idct1_scalar_add vp9_dc_only_idct_add_mmx
#undef vp8_idct_iwalsh16
#define vp8_idct_iwalsh16 vp8_short_inv_walsh4x4_mmx
......
......@@ -34,9 +34,9 @@ void vp8_arch_x86_common_init(VP8_COMMON *ctx) {
#if HAVE_MMX
// The commented functions need to be re-written for vpx.
if (flags & HAS_MMX) {
rtcd->idct.idct1 = vpx_short_idct4x4llm_1_mmx;
rtcd->idct.idct16 = vpx_short_idct4x4llm_mmx;
rtcd->idct.idct1_scalar_add = vpx_dc_only_idct_add_mmx;
rtcd->idct.idct1 = vp9_short_idct4x4llm_1_mmx;
rtcd->idct.idct16 = vp9_short_idct4x4llm_mmx;
rtcd->idct.idct1_scalar_add = vp9_dc_only_idct_add_mmx;
// rtcd->idct.iwalsh16 = vp8_short_inv_walsh4x4_mmx;
// rtcd->idct.iwalsh1 = vp8_short_inv_walsh4x4_1_mmx;
......
......@@ -15,30 +15,30 @@
#include "vpx_mem/vpx_mem.h"
#if HAVE_ARMV7
extern void vp8_dequantize_b_loop_neon(short *Q, short *DQC, short *DQ);
extern void vp9_dequantize_b_loop_neon(short *Q, short *DQC, short *DQ);
#endif
#if HAVE_ARMV6
extern void vp8_dequantize_b_loop_v6(short *Q, short *DQC, short *DQ);
extern void vp9_dequantize_b_loop_v6(short *Q, short *DQC, short *DQ);
#endif
#if HAVE_ARMV7
void vp8_dequantize_b_neon(BLOCKD *d) {
void vp9_dequantize_b_neon(BLOCKD *d) {
short *DQ = d->dqcoeff;
short *Q = d->qcoeff;
short *DQC = d->dequant;
vp8_dequantize_b_loop_neon(Q, DQC, DQ);
vp9_dequantize_b_loop_neon(Q, DQC, DQ);
}
#endif
#if HAVE_ARMV6
void vp8_dequantize_b_v6(BLOCKD *d) {
void vp9_dequantize_b_v6(BLOCKD *d) {
short *DQ = d->dqcoeff;
short *Q = d->qcoeff;
short *DQC = d->dequant;
vp8_dequantize_b_loop_v6(Q, DQC, DQ);
vp9_dequantize_b_loop_v6(Q, DQC, DQ);
}
#endif
......@@ -13,7 +13,7 @@
#include "vpx_ports/mem.h"
#include "vpx_mem/vpx_mem.h"
int vp8dx_start_decode(BOOL_DECODER *br,
int vp9dx_start_decode(BOOL_DECODER *br,
const unsigned char *source,
unsigned int source_sz) {
br->user_buffer_end = source + source_sz;
......@@ -26,13 +26,13 @@ int vp8dx_start_decode(BOOL_DECODER *br,
return 1;
/* Populate the buffer */
vp8dx_bool_decoder_fill(br);
vp9dx_bool_decoder_fill(br);
return 0;
}
void vp8dx_bool_decoder_fill(BOOL_DECODER *br) {
void vp9dx_bool_decoder_fill(BOOL_DECODER *br) {
const unsigned char *bufptr;
const unsigned char *bufend;
VP8_BD_VALUE value;
......@@ -66,7 +66,7 @@ int vp9_inv_recenter_nonneg(int v, int m) {
else return m - ((v + 1) >> 1);
}
int vp8_decode_uniform(BOOL_DECODER *br, int n) {
int vp9_decode_uniform(BOOL_DECODER *br, int n) {
int v;
int l = get_unsigned_bits(n);
int m = (1 << l) - n;
......@@ -78,13 +78,13 @@ int vp8_decode_uniform(BOOL_DECODER *br, int n) {
return (v << 1) - m + vp8_decode_value(br, 1);
}
int vp8_decode_term_subexp(BOOL_DECODER *br, int k, int num_syms) {
int vp9_decode_term_subexp(BOOL_DECODER *br, int k, int num_syms) {
int i = 0, mk = 0, word;
while (1) {
int b = (i ? k + i - 1 : k);
int a = (1 << b);
if (num_syms <= mk + 3 * a) {
word = vp8_decode_uniform(br, num_syms - mk) + mk;
word = vp9_decode_uniform(br, num_syms - mk) + mk;
break;
} else {
if (vp8_decode_value(br, 1)) {
......
......@@ -35,14 +35,14 @@ typedef struct {
DECLARE_ALIGNED(16, extern const unsigned char, vp8_norm[256]);
int vp8dx_start_decode(BOOL_DECODER *br,
int vp9dx_start_decode(BOOL_DECODER *br,
const unsigned char *source,
unsigned int source_sz);
void vp8dx_bool_decoder_fill(BOOL_DECODER *br);
void vp9dx_bool_decoder_fill(BOOL_DECODER *br);
int vp8_decode_uniform(BOOL_DECODER *br, int n);
int vp8_decode_term_subexp(BOOL_DECODER *br, int k, int num_syms);
int vp9_decode_uniform(BOOL_DECODER *br, int n);
int vp9_decode_term_subexp(BOOL_DECODER *br, int k, int num_syms);
int vp9_inv_recenter_nonneg(int v, int m);
/*The refill loop is used in several places, so define it in a macro to make
......@@ -87,7 +87,7 @@ static int vp8dx_decode_bool(BOOL_DECODER *br, int probability) {
split = 1 + (((br->range - 1) * probability) >> 8);
if (br->count < 0)
vp8dx_bool_decoder_fill(br);
vp9dx_bool_decoder_fill(br);
value = br->value;
count = br->count;
......
......@@ -1174,7 +1174,7 @@ static void read_mb_modes_mv(VP8D_COMP *pbi, MODE_INFO *mi, MB_MODE_INFO *mbmi,
}
}
void vpx_decode_mode_mvs_init(VP8D_COMP *pbi, BOOL_DECODER* const bc) {
void vp9_decode_mode_mvs_init(VP8D_COMP *pbi, BOOL_DECODER* const bc) {
VP8_COMMON *cm = &pbi->common;
vpx_memset(cm->mbskip_pred_probs, 0, sizeof(cm->mbskip_pred_probs));
......@@ -1186,7 +1186,7 @@ void vpx_decode_mode_mvs_init(VP8D_COMP *pbi, BOOL_DECODER* const bc) {
mb_mode_mv_init(pbi, bc);
}
void vpx_decode_mb_mode_mv(VP8D_COMP *pbi,
void vp9_decode_mb_mode_mv(VP8D_COMP *pbi,
MACROBLOCKD *xd,
int mb_row,
int mb_col,
......
......@@ -11,9 +11,9 @@
#include "onyxd_int.h"
void vpx_decode_mb_mode_mv(VP8D_COMP* const pbi,
void vp9_decode_mb_mode_mv(VP8D_COMP* const pbi,
MACROBLOCKD* const xd,
int mb_row,
int mb_col,
BOOL_DECODER* const bc);
void vpx_decode_mode_mvs_init(VP8D_COMP* const pbi, BOOL_DECODER* const bc);
void vp9_decode_mode_mvs_init(VP8D_COMP* const pbi, BOOL_DECODER* const bc);
This diff is collapsed.
......@@ -29,7 +29,7 @@ extern void vp8_short_inv_walsh4x4_1_x8_c(short *input, short *output, int pitch
extern int dec_debug;
#endif
void vp8_dequantize_b_c(BLOCKD *d) {
void vp9_dequantize_b_c(BLOCKD *d) {
int i;
short *DQ = d->dqcoeff;
......@@ -42,7 +42,7 @@ void vp8_dequantize_b_c(BLOCKD *d) {
}
void vp8_ht_dequant_idct_add_c(TX_TYPE tx_type, short *input, short *dq,
void vp9_ht_dequant_idct_add_c(TX_TYPE tx_type, short *input, short *dq,
unsigned char *pred, unsigned char *dest,
int pitch, int stride) {
short output[16];
......@@ -77,7 +77,7 @@ void vp8_ht_dequant_idct_add_c(TX_TYPE tx_type, short *input, short *dq,
}
}
void vp8_ht_dequant_idct_add_8x8_c(TX_TYPE tx_type, short *input, short *dq,
void vp9_ht_dequant_idct_add_8x8_c(TX_TYPE tx_type, short *input, short *dq,
unsigned char *pred, unsigned char *dest,
int pitch, int stride) {
short output[64];
......@@ -121,7 +121,7 @@ void vp8_ht_dequant_idct_add_8x8_c(TX_TYPE tx_type, short *input, short *dq,
}
}
void vp8_dequant_idct_add_c(short *input, short *dq, unsigned char *pred,
void vp9_dequant_idct_add_c(short *input, short *dq, unsigned char *pred,
unsigned char *dest, int pitch, int stride) {
short output[16];
short *diff_ptr = output;
......@@ -156,7 +156,7 @@ void vp8_dequant_idct_add_c(short *input, short *dq, unsigned char *pred,
}
}
void vp8_dequant_dc_idct_add_c(short *input, short *dq, unsigned char *pred,
void vp9_dequant_dc_idct_add_c(short *input, short *dq, unsigned char *pred,
unsigned char *dest, int pitch, int stride,
int Dc) {
int i;
......@@ -195,7 +195,7 @@ void vp8_dequant_dc_idct_add_c(short *input, short *dq, unsigned char *pred,
}
#if CONFIG_LOSSLESS
void vp8_dequant_idct_add_lossless_c(short *input, short *dq, unsigned char *pred,
void vp9_dequant_idct_add_lossless_c(short *input, short *dq, unsigned char *pred,
unsigned char *dest, int pitch, int stride) {
short output[16];
short *diff_ptr = output;
......@@ -229,7 +229,7 @@ void vp8_dequant_idct_add_lossless_c(short *input, short *dq, unsigned char *pre
}
}
void vp8_dequant_dc_idct_add_lossless_c(short *input, short *dq, unsigned char *pred,
void vp9_dequant_dc_idct_add_lossless_c(short *input, short *dq, unsigned char *pred,
unsigned char *dest, int pitch, int stride,
int Dc) {
int i;
......@@ -266,7 +266,7 @@ void vp8_dequant_dc_idct_add_lossless_c(short *input, short *dq, unsigned char *
}
#endif
void vp8_dequantize_b_2x2_c(BLOCKD *d) {
void vp9_dequantize_b_2x2_c(BLOCKD *d) {
int i;
short *DQ = d->dqcoeff;
short *Q = d->qcoeff;
......@@ -287,7 +287,7 @@ void vp8_dequantize_b_2x2_c(BLOCKD *d) {
#endif
}
void vp8_dequant_idct_add_8x8_c(short *input, short *dq, unsigned char *pred,
void vp9_dequant_idct_add_8x8_c(short *input, short *dq, unsigned char *pred,
unsigned char *dest, int pitch, int stride) { // , MACROBLOCKD *xd, short blk_idx
short output[64];
short *diff_ptr = output;
......@@ -376,7 +376,7 @@ void vp8_dequant_idct_add_8x8_c(short *input, short *dq, unsigned char *pred,
#endif
}
void vp8_dequant_dc_idct_add_8x8_c(short *input, short *dq, unsigned char *pred,
void vp9_dequant_dc_idct_add_8x8_c(short *input, short *dq, unsigned char *pred,
unsigned char *dest, int pitch, int stride,
int Dc) { // Dc for 1st order T in some rear case
short output[64];
......@@ -464,7 +464,7 @@ void vp8_dequant_dc_idct_add_8x8_c(short *input, short *dq, unsigned char *pred,
#endif
}
void vp8_ht_dequant_idct_add_16x16_c(TX_TYPE tx_type, short *input, short *dq,
void vp9_ht_dequant_idct_add_16x16_c(TX_TYPE tx_type, short *input, short *dq,
unsigned char *pred, unsigned char *dest,
int pitch, int stride) {
short output[256];
......@@ -503,7 +503,7 @@ void vp8_ht_dequant_idct_add_16x16_c(TX_TYPE tx_type, short *input, short *dq,
}
}
void vp8_dequant_idct_add_16x16_c(short *input, short *dq, unsigned char *pred,
void vp9_dequant_idct_add_16x16_c(short *input, short *dq, unsigned char *pred,
unsigned char *dest, int pitch, int stride) {
short output[256];
short *diff_ptr = output;
......
......@@ -14,61 +14,61 @@
#include "vp8/common/blockd.h"
#if CONFIG_LOSSLESS
extern void vp8_dequant_idct_add_lossless_c(short *input, short *dq,
extern void vp9_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,
extern void vp9_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,
extern void vp9_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,
extern void vp9_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,
extern void vp9_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,
typedef void (*vp9_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,
typedef void(*vp9_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,
typedef void(*vp9_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,
typedef void(*vp9_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,
typedef void(*vp9_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,
void vp9_ht_dequant_idct_add_c(TX_TYPE tx_type, short *input, short *dq,
unsigned char *pred, unsigned char *dest,
int pitch, int stride);
void vp8_ht_dequant_idct_add_8x8_c(TX_TYPE tx_type, short *input, short *dq,
void vp9_ht_dequant_idct_add_8x8_c(TX_TYPE tx_type, short *input, short *dq,
unsigned char *pred, unsigned char *dest,
int pitch, int stride);
void vp8_ht_dequant_idct_add_16x16_c(TX_TYPE tx_type, short *input, short *dq,
void vp9_ht_dequant_idct_add_16x16_c(TX_TYPE tx_type, short *input, short *dq,
unsigned char *pred, unsigned char *dest,
int pitch, int stride);
#if CONFIG_SUPERBLOCKS
void vp8_dequant_dc_idct_add_y_block_8x8_inplace_c(short *q, short *dq,
void vp9_dequant_dc_idct_add_y_block_8x8_inplace_c(short *q, short *dq,
unsigned char *dst,
int stride, char *eobs,
short *dc, MACROBLOCKD *xd);
void vp8_dequant_idct_add_uv_block_8x8_inplace_c(short *q, short *dq,
void vp9_dequant_idct_add_uv_block_8x8_inplace_c(short *q, short *dq,
unsigned char *dstu,
unsigned char *dstv,
int stride, char *eobs,
......
......@@ -98,7 +98,7 @@ DECLARE_ALIGNED(16, const int, coef_bands_x_16x16[256]) = {
static const unsigned char cat6_prob[14] =
{ 254, 254, 252, 249, 243, 230, 196, 177, 153, 140, 133, 130, 129, 0 };
void vp8_reset_mb_tokens_context(MACROBLOCKD *xd) {
void vp9_reset_mb_tokens_context(MACROBLOCKD *xd) {
/* Clear entropy contexts for Y2 blocks */
if ((xd->mode_info_context->mbmi.mode != B_PRED &&
xd->mode_info_context->mbmi.mode != I8X8_PRED &&
......@@ -256,7 +256,7 @@ static int vp8_get_signed(BOOL_DECODER *br, int value_to_sign) {
int v;
if (br->count < 0)
vp8dx_bool_decoder_fill(br);
vp9dx_bool_decoder_fill(br);
if (br->value < bigsplit) {
br->range = split;
......@@ -414,7 +414,7 @@ SKIP_START:
return c;
}
int vp8_decode_mb_tokens_16x16(VP8D_COMP *pbi, MACROBLOCKD *xd,
int vp9_decode_mb_tokens_16x16(VP8D_COMP *pbi, MACROBLOCKD *xd,
BOOL_DECODER* const bc) {
ENTROPY_CONTEXT* const A = (ENTROPY_CONTEXT *)xd->above_context;
ENTROPY_CONTEXT* const L = (ENTROPY_CONTEXT *)xd->left_context;
......@@ -477,7 +477,7 @@ int vp8_decode_mb_tokens_16x16(VP8D_COMP *pbi, MACROBLOCKD *xd,
return eobtotal;
}
int vp8_decode_mb_tokens_8x8(VP8D_COMP *pbi, MACROBLOCKD *xd,
int vp9_decode_mb_tokens_8x8(VP8D_COMP *pbi, MACROBLOCKD *xd,
BOOL_DECODER* const bc) {
ENTROPY_CONTEXT *const A = (ENTROPY_CONTEXT *)xd->above_context;
ENTROPY_CONTEXT *const L = (ENTROPY_CONTEXT *)xd->left_context;
......@@ -571,7 +571,7 @@ int vp8_decode_mb_tokens_8x8(VP8D_COMP *pbi, MACROBLOCKD *xd,
}
int vp8_decode_mb_tokens(VP8D_COMP *dx, MACROBLOCKD *xd,
int vp9_decode_mb_tokens(VP8D_COMP *dx, MACROBLOCKD *xd,
BOOL_DECODER* const bc) {
ENTROPY_CONTEXT *const A = (ENTROPY_CONTEXT *)xd->above_context;
ENTROPY_CONTEXT *const L = (ENTROPY_CONTEXT *)xd->left_context;
......
......@@ -14,12 +14,12 @@
#include "onyxd_int.h"
void vp8_reset_mb_tokens_context(MACROBLOCKD* const);
int vp8_decode_mb_tokens(VP8D_COMP* const, MACROBLOCKD* const,
void vp9_reset_mb_tokens_context(MACROBLOCKD* const);
int vp9_decode_mb_tokens(VP8D_COMP* const, MACROBLOCKD* const,
BOOL_DECODER* const);
int vp8_decode_mb_tokens_8x8(VP8D_COMP* const, MACROBLOCKD* const,
int vp9_decode_mb_tokens_8x8(VP8D_COMP* const, MACROBLOCKD* const,
BOOL_DECODER* const);
int vp8_decode_mb_tokens_16x16(VP8D_COMP* const, MACROBLOCKD* const,
int vp9_decode_mb_tokens_16x16(VP8D_COMP* const, MACROBLOCKD* const,
BOOL_DECODER* const);
#endif /* DETOKENIZE_H */
......@@ -12,21 +12,21 @@
#include "vp8/common/idct.h"
#include "dequantize.h"
void vp8_dequant_dc_idct_add_c(short *input, short *dq, unsigned char *pred,
void vp9_dequant_dc_idct_add_c(short *input, short *dq, unsigned char *pred,
unsigned char *dest, int pitch, int stride,
int Dc);
void vp8_dequant_idct_add_c(short *input, short *dq, unsigned char *pred,
void vp9_dequant_idct_add_c(short *input, short *dq, unsigned char *pred,
unsigned char *dest, int pitch, int stride);
void vp8_dc_only_idct_add_c(short input_dc, unsigned char *pred_ptr,
unsigned char *dst_ptr, int pitch, int stride);
#if CONFIG_LOSSLESS
void vp8_dequant_idct_add_lossless_c(short *input, short *dq, unsigned char *pred,
void vp9_dequant_idct_add_lossless_c(short *input, short *dq, unsigned char *pred,
unsigned char *dest, int pitch, int stride);
void vp8_dc_only_idct_add_lossless_c(short input_dc, unsigned char *pred_ptr,
unsigned char *dst_ptr, int pitch, int stride);
#endif
void vp8_dequant_dc_idct_add_y_block_c
void vp9_dequant_dc_idct_add_y_block_c
(short *q, short *dq, unsigned char *pre,
unsigned char *dst, int stride, char *eobs, short *dc) {
int i, j;
......@@ -34,7 +34,7 @@ void vp8_dequant_dc_idct_add_y_block_c
for (i = 0; i < 4; i++) {
for (j = 0; j < 4; j++) {
if (*eobs++ > 1)
vp8_dequant_dc_idct_add_c(q, dq, pre, dst, 16, stride, dc[0]);
vp9_dequant_dc_idct_add_c(q, dq, pre, dst, 16, stride, dc[0]);
else
vp8_dc_only_idct_add_c(dc[0], pre, dst, 16, stride);
......@@ -49,7 +49,7 @@ void vp8_dequant_dc_idct_add_y_block_c
}
}
void vp8_dequant_idct_add_y_block_c
void vp9_dequant_idct_add_y_block_c
(short *q, short *dq, unsigned char *pre,
unsigned char *dst, int stride, char *eobs) {
int i, j;
......@@ -57,7 +57,7 @@ void vp8_dequant_idct_add_y_block_c
for (i = 0; i < 4; i++) {
for (j = 0; j < 4; j++) {
if (*eobs++ > 1)
vp8_dequant_idct_add_c(q, dq, pre, dst, 16, stride);
vp9_dequant_idct_add_c(q, dq, pre, dst, 16, stride);
else {
vp8_dc_only_idct_add_c(q[0]*dq[0], pre, dst, 16, stride);
((int *)q)[0] = 0;
......@@ -73,7 +73,7 @@ void vp8_dequant_idct_add_y_block_c
}
}
void vp8_dequant_idct_add_uv_block_c
void vp9_dequant_idct_add_uv_block_c
(short *q, short *dq, unsigned char *pre,
unsigned char *dstu, unsigned char *dstv, int stride, char *eobs) {
int i, j;
......@@ -81,7 +81,7 @@ void vp8_dequant_idct_add_uv_block_c
for (i = 0; i < 2; i++) {
for (j = 0; j < 2; j++) {
if (*eobs++ > 1)
vp8_dequant_idct_add_c(q, dq, pre, dstu, 8, stride);
vp9_dequant_idct_add_c(q, dq, pre, dstu, 8, stride);
else {
vp8_dc_only_idct_add_c(q[0]*dq[0], pre, dstu, 8, stride);
((int *)q)[0] = 0;
......@@ -99,7 +99,7 @@ void vp8_dequant_idct_add_uv_block_c
for (i = 0; i < 2; i++) {
for (j = 0; j < 2; j++) {
if (*eobs++ > 1)
vp8_dequant_idct_add_c(q, dq, pre, dstv, 8, stride);
vp9_dequant_idct_add_c(q, dq, pre, dstv, 8, stride);
else {
vp8_dc_only_idct_add_c(q[0]*dq[0], pre, dstv, 8, stride);
((int *)q)[0] = 0;
......@@ -116,31 +116,31 @@ void vp8_dequant_idct_add_uv_block_c
}
void vp8_dequant_dc_idct_add_y_block_8x8_c
void vp9_dequant_dc_idct_add_y_block_8x8_c
(short *q, short *dq, unsigned char *pre,
unsigned char *dst, int stride, char *eobs, short *dc, MACROBLOCKD *xd) {
vp8_dequant_dc_idct_add_8x8_c(q, dq, pre, dst, 16, stride, dc[0]);
vp8_dequant_dc_idct_add_8x8_c(&q[64], dq, pre + 8, dst + 8, 16, stride, dc[1]);
vp8_dequant_dc_idct_add_8x8_c(&q[128], dq, pre + 8 * 16, dst + 8 * stride, 16, stride, dc[4]);
vp8_dequant_dc_idct_add_8x8_c(&q[192], dq, pre + 8 * 16 + 8, dst + 8 * stride + 8, 16, stride, dc[8]);
vp9_dequant_dc_idct_add_8x8_c(q, dq, pre, dst, 16, stride, dc[0]);
vp9_dequant_dc_idct_add_8x8_c(&q[64], dq, pre + 8, dst + 8, 16, stride, dc[1]);
vp9_dequant_dc_idct_add_8x8_c(&q[128], dq, pre + 8 * 16, dst + 8 * stride, 16, stride, dc[4]);
vp9_dequant_dc_idct_add_8x8_c(&q[192], dq, pre + 8 * 16 + 8, dst + 8 * stride + 8, 16, stride, dc[8]);
}
#if CONFIG_SUPERBLOCKS
void vp8_dequant_dc_idct_add_y_block_8x8_inplace_c
void vp9_dequant_dc_idct_add_y_block_8x8_inplace_c
(short *q, short *dq,
unsigned char *dst, int stride, char *eobs, short *dc, MACROBLOCKD *xd) {
vp8_dequant_dc_idct_add_8x8_c(q, dq, dst, dst, stride, stride, dc[0]);
vp8_dequant_dc_idct_add_8x8_c(&q[64], dq, dst + 8, dst + 8, stride, stride, dc[1]);
vp8_dequant_dc_idct_add_8x8_c(&q[128], dq, dst + 8 * stride, dst + 8 * stride, stride, stride, dc[4]);
vp8_dequant_dc_idct_add_8x8_c(&q[192], dq, dst + 8 * stride + 8, dst + 8 * stride + 8, stride, stride, dc[8]);
vp9_dequant_dc_idct_add_8x8_c(q, dq, dst, dst, stride, stride, dc[0]);
vp9_dequant_dc_idct_add_8x8_c(&q[64], dq, dst + 8, dst + 8, stride, stride, dc[1]);
vp9_dequant_dc_idct_add_8x8_c(&q[128], dq, dst + 8 * stride, dst + 8 * stride, stride, stride, dc[4]);
vp9_dequant_dc_idct_add_8x8_c(&q[192], dq, dst + 8 * stride + 8, dst + 8 * stride + 8, stride, stride, dc[8]);
}
#endif
void vp8_dequant_idct_add_y_block_8x8_c
void vp9_dequant_idct_add_y_block_8x8_c
(short *q, short *dq, unsigned char *pre,
unsigned char *dst, int stride, char *eobs, MACROBLOCKD *xd) {
......@@ -148,38 +148,38 @@ void vp8_dequant_idct_add_y_block_8x8_c
unsigned char *origdest = dst;
unsigned char *origpred = pre;
vp8_dequant_idct_add_8x8_c(q, dq, pre, dst, 16, stride);
vp8_dequant_idct_add_8x8_c(&q[64], dq, origpred + 8, origdest + 8, 16, stride);
vp8_dequant_idct_add_8x8_c(&q[128], dq, origpred + 8 * 16, origdest + 8 * stride, 16, stride);
vp8_dequant_idct_add_8x8_c(&q[192], dq, origpred + 8 * 16 + 8, origdest + 8 * stride + 8, 16, stride);
vp9_dequant_idct_add_8x8_c(q, dq, pre, dst, 16, stride);
vp9_dequant_idct_add_8x8_c(&q[64], dq, origpred + 8, origdest + 8, 16, stride);
vp9_dequant_idct_add_8x8_c(&q[128], dq, origpred + 8 * 16, origdest + 8 * stride, 16, stride);
vp9_dequant_idct_add_8x8_c(&q[192], dq, origpred + 8 * 16 + 8, origdest + 8 * stride + 8, 16, stride);
}
void vp8_dequant_idct_add_uv_block_8x8_c
void vp9_dequant_idct_add_uv_block_8x8_c
(short *q, short *dq, unsigned char *pre,
unsigned char *dstu, unsigned char *dstv, int stride, char *eobs, MACROBLOCKD *xd) {
vp8_dequant_idct_add_8x8_c(q, dq, pre, dstu, 8, stride);
vp9_dequant_idct_add_8x8_c(q, dq, pre, dstu, 8, stride);
q += 64;
pre += 64;
vp8_dequant_idct_add_8x8_c(q, dq, pre, dstv, 8, stride);
vp9_dequant_idct_add_8x8_c(q, dq, pre, dstv, 8, stride);
}
#if CONFIG_SUPERBLOCKS
void vp8_dequant_idct_add_uv_block_8x8_inplace_c
void vp9_dequant_idct_add_uv_block_8x8_inplace_c
(short *q, short *dq,
unsigned char *dstu, unsigned char *dstv, int stride, char *eobs, MACROBLOCKD *xd) {
vp8_dequant_idct_add_8x8_c(q, dq, dstu, dstu, stride, stride);
vp9_dequant_idct_add_8x8_c(q, dq, dstu, dstu, stride, stride);
q += 64;
vp8_dequant_idct_add_8x8_c(q, dq, dstv, dstv, stride, stride);
vp9_dequant_idct_add_8x8_c(q, dq, dstv, dstv, stride, stride);
}
#endif
#if CONFIG_LOSSLESS
void vp8_dequant_dc_idct_add_y_block_lossless_c
void vp9_dequant_dc_idct_add_y_block_lossless_c
(short *q, short *dq, unsigned char *pre,
unsigned char *dst, int stride, char *eobs, short *dc) {
int i, j;
......@@ -187,7 +187,7 @@ void vp8_dequant_dc_idct_add_y_block_lossless_c
for (i