Change decoder vp8_ and vp8dx_ public symbol prefixes to vp9_.
Change-Id: Iedb4c3b4171d8640cc525727b4c3658e2bb400db
This commit is contained in:
2
third_party/x86inc/x86inc.asm
vendored
2
third_party/x86inc/x86inc.asm
vendored
@@ -36,7 +36,7 @@
|
|||||||
|
|
||||||
%include "vpx_config.asm"
|
%include "vpx_config.asm"
|
||||||
|
|
||||||
%define program_name vpx
|
%define program_name vp9
|
||||||
|
|
||||||
|
|
||||||
%define UNIX64 0
|
%define UNIX64 0
|
||||||
|
@@ -43,21 +43,21 @@ extern "C"
|
|||||||
VP8D_OK = 0
|
VP8D_OK = 0
|
||||||
} VP8D_SETTING;
|
} VP8D_SETTING;
|
||||||
|
|
||||||
void vp8dx_initialize(void);
|
void vp9dx_initialize(void);
|
||||||
|
|
||||||
void vp8dx_set_setting(VP8D_PTR comp, VP8D_SETTING oxst, int x);
|
void vp8dx_set_setting(VP8D_PTR comp, VP8D_SETTING oxst, int x);
|
||||||
|
|
||||||
int vp8dx_get_setting(VP8D_PTR comp, VP8D_SETTING oxst);
|
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 vp9dx_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_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 vp9dx_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_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
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
@@ -37,38 +37,38 @@ fi
|
|||||||
#
|
#
|
||||||
# Dequant
|
# Dequant
|
||||||
#
|
#
|
||||||
prototype void vp8_dequantize_b "struct blockd *x"
|
prototype void vp9_dequantize_b "struct blockd *x"
|
||||||
specialize vp8_dequantize_b mmx
|
specialize vp9_dequantize_b mmx
|
||||||
|
|
||||||
prototype void vp8_dequantize_b_2x2 "struct blockd *x"
|
prototype void vp9_dequantize_b_2x2 "struct blockd *x"
|
||||||
specialize vp8_dequantize_b_2x2
|
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"
|
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 vp8_dequant_dc_idct_add_y_block_8x8
|
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"
|
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 vp8_dequant_idct_add_y_block_8x8
|
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"
|
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 vp8_dequant_idct_add_uv_block_8x8
|
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"
|
prototype void vp9_dequant_idct_add_16x16 "short *input, short *dq, unsigned char *pred, unsigned char *dest, int pitch, int stride"
|
||||||
specialize vp8_dequant_idct_add_16x16
|
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"
|
prototype void vp9_dequant_idct_add "short *input, short *dq, unsigned char *pred, unsigned char *dest, int pitch, int stride"
|
||||||
specialize vp8_dequant_idct_add
|
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"
|
prototype void vp9_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
|
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"
|
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 vp8_dequant_dc_idct_add_y_block mmx
|
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"
|
prototype void vp9_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
|
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"
|
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 vp8_dequant_idct_add_uv_block mmx
|
specialize vp9_dequant_idct_add_uv_block mmx
|
||||||
|
|
||||||
#
|
#
|
||||||
# RECON
|
# RECON
|
||||||
|
@@ -20,22 +20,22 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#if HAVE_MMX
|
#if HAVE_MMX
|
||||||
extern prototype_idct(vpx_short_idct4x4llm_1_mmx);
|
extern prototype_idct(vp9_short_idct4x4llm_1_mmx);
|
||||||
extern prototype_idct(vpx_short_idct4x4llm_mmx);
|
extern prototype_idct(vp9_short_idct4x4llm_mmx);
|
||||||
extern prototype_idct_scalar_add(vpx_dc_only_idct_add_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_mmx);
|
||||||
extern prototype_second_order(vp8_short_inv_walsh4x4_1_mmx);
|
extern prototype_second_order(vp8_short_inv_walsh4x4_1_mmx);
|
||||||
|
|
||||||
#if !CONFIG_RUNTIME_CPU_DETECT
|
#if !CONFIG_RUNTIME_CPU_DETECT
|
||||||
#undef vp8_idct_idct1
|
#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
|
#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
|
#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
|
#undef vp8_idct_iwalsh16
|
||||||
#define vp8_idct_iwalsh16 vp8_short_inv_walsh4x4_mmx
|
#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
|
#if HAVE_MMX
|
||||||
// The commented functions need to be re-written for vpx.
|
// The commented functions need to be re-written for vpx.
|
||||||
if (flags & HAS_MMX) {
|
if (flags & HAS_MMX) {
|
||||||
rtcd->idct.idct1 = vpx_short_idct4x4llm_1_mmx;
|
rtcd->idct.idct1 = vp9_short_idct4x4llm_1_mmx;
|
||||||
rtcd->idct.idct16 = vpx_short_idct4x4llm_mmx;
|
rtcd->idct.idct16 = vp9_short_idct4x4llm_mmx;
|
||||||
rtcd->idct.idct1_scalar_add = vpx_dc_only_idct_add_mmx;
|
rtcd->idct.idct1_scalar_add = vp9_dc_only_idct_add_mmx;
|
||||||
// rtcd->idct.iwalsh16 = vp8_short_inv_walsh4x4_mmx;
|
// rtcd->idct.iwalsh16 = vp8_short_inv_walsh4x4_mmx;
|
||||||
// rtcd->idct.iwalsh1 = vp8_short_inv_walsh4x4_1_mmx;
|
// rtcd->idct.iwalsh1 = vp8_short_inv_walsh4x4_1_mmx;
|
||||||
|
|
||||||
|
@@ -15,30 +15,30 @@
|
|||||||
#include "vpx_mem/vpx_mem.h"
|
#include "vpx_mem/vpx_mem.h"
|
||||||
|
|
||||||
#if HAVE_ARMV7
|
#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
|
#endif
|
||||||
|
|
||||||
#if HAVE_ARMV6
|
#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
|
#endif
|
||||||
|
|
||||||
#if HAVE_ARMV7
|
#if HAVE_ARMV7
|
||||||
|
|
||||||
void vp8_dequantize_b_neon(BLOCKD *d) {
|
void vp9_dequantize_b_neon(BLOCKD *d) {
|
||||||
short *DQ = d->dqcoeff;
|
short *DQ = d->dqcoeff;
|
||||||
short *Q = d->qcoeff;
|
short *Q = d->qcoeff;
|
||||||
short *DQC = d->dequant;
|
short *DQC = d->dequant;
|
||||||
|
|
||||||
vp8_dequantize_b_loop_neon(Q, DQC, DQ);
|
vp9_dequantize_b_loop_neon(Q, DQC, DQ);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HAVE_ARMV6
|
#if HAVE_ARMV6
|
||||||
void vp8_dequantize_b_v6(BLOCKD *d) {
|
void vp9_dequantize_b_v6(BLOCKD *d) {
|
||||||
short *DQ = d->dqcoeff;
|
short *DQ = d->dqcoeff;
|
||||||
short *Q = d->qcoeff;
|
short *Q = d->qcoeff;
|
||||||
short *DQC = d->dequant;
|
short *DQC = d->dequant;
|
||||||
|
|
||||||
vp8_dequantize_b_loop_v6(Q, DQC, DQ);
|
vp9_dequantize_b_loop_v6(Q, DQC, DQ);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@@ -13,7 +13,7 @@
|
|||||||
#include "vpx_ports/mem.h"
|
#include "vpx_ports/mem.h"
|
||||||
#include "vpx_mem/vpx_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,
|
const unsigned char *source,
|
||||||
unsigned int source_sz) {
|
unsigned int source_sz) {
|
||||||
br->user_buffer_end = source + source_sz;
|
br->user_buffer_end = source + source_sz;
|
||||||
@@ -26,13 +26,13 @@ int vp8dx_start_decode(BOOL_DECODER *br,
|
|||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
/* Populate the buffer */
|
/* Populate the buffer */
|
||||||
vp8dx_bool_decoder_fill(br);
|
vp9dx_bool_decoder_fill(br);
|
||||||
|
|
||||||
return 0;
|
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 *bufptr;
|
||||||
const unsigned char *bufend;
|
const unsigned char *bufend;
|
||||||
VP8_BD_VALUE value;
|
VP8_BD_VALUE value;
|
||||||
@@ -66,7 +66,7 @@ int vp9_inv_recenter_nonneg(int v, int m) {
|
|||||||
else return m - ((v + 1) >> 1);
|
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 v;
|
||||||
int l = get_unsigned_bits(n);
|
int l = get_unsigned_bits(n);
|
||||||
int m = (1 << l) - 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);
|
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;
|
int i = 0, mk = 0, word;
|
||||||
while (1) {
|
while (1) {
|
||||||
int b = (i ? k + i - 1 : k);
|
int b = (i ? k + i - 1 : k);
|
||||||
int a = (1 << b);
|
int a = (1 << b);
|
||||||
if (num_syms <= mk + 3 * a) {
|
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;
|
break;
|
||||||
} else {
|
} else {
|
||||||
if (vp8_decode_value(br, 1)) {
|
if (vp8_decode_value(br, 1)) {
|
||||||
|
@@ -35,14 +35,14 @@ typedef struct {
|
|||||||
|
|
||||||
DECLARE_ALIGNED(16, extern const unsigned char, vp8_norm[256]);
|
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,
|
const unsigned char *source,
|
||||||
unsigned int source_sz);
|
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 vp9_decode_uniform(BOOL_DECODER *br, int n);
|
||||||
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 vp9_inv_recenter_nonneg(int v, int m);
|
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
|
/*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);
|
split = 1 + (((br->range - 1) * probability) >> 8);
|
||||||
|
|
||||||
if (br->count < 0)
|
if (br->count < 0)
|
||||||
vp8dx_bool_decoder_fill(br);
|
vp9dx_bool_decoder_fill(br);
|
||||||
|
|
||||||
value = br->value;
|
value = br->value;
|
||||||
count = br->count;
|
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;
|
VP8_COMMON *cm = &pbi->common;
|
||||||
|
|
||||||
vpx_memset(cm->mbskip_pred_probs, 0, sizeof(cm->mbskip_pred_probs));
|
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);
|
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,
|
MACROBLOCKD *xd,
|
||||||
int mb_row,
|
int mb_row,
|
||||||
int mb_col,
|
int mb_col,
|
||||||
|
@@ -11,9 +11,9 @@
|
|||||||
|
|
||||||
#include "onyxd_int.h"
|
#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,
|
MACROBLOCKD* const xd,
|
||||||
int mb_row,
|
int mb_row,
|
||||||
int mb_col,
|
int mb_col,
|
||||||
BOOL_DECODER* const bc);
|
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);
|
||||||
|
@@ -68,11 +68,11 @@ static int inv_remap_prob(int v, int m) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static vp8_prob read_prob_diff_update(vp8_reader *const bc, int oldp) {
|
static vp8_prob read_prob_diff_update(vp8_reader *const bc, int oldp) {
|
||||||
int delp = vp8_decode_term_subexp(bc, SUBEXP_PARAM, 255);
|
int delp = vp9_decode_term_subexp(bc, SUBEXP_PARAM, 255);
|
||||||
return (vp8_prob)inv_remap_prob(delp, oldp);
|
return (vp8_prob)inv_remap_prob(delp, oldp);
|
||||||
}
|
}
|
||||||
|
|
||||||
void vp8cx_init_de_quantizer(VP8D_COMP *pbi) {
|
void vp9cx_init_de_quantizer(VP8D_COMP *pbi) {
|
||||||
int i;
|
int i;
|
||||||
int Q;
|
int Q;
|
||||||
VP8_COMMON *const pc = &pbi->common;
|
VP8_COMMON *const pc = &pbi->common;
|
||||||
@@ -127,29 +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->idct_add = vp8_dequant_idct_add_lossless_c;
|
pbi->idct_add = vp9_dequant_idct_add_lossless_c;
|
||||||
pbi->dc_idct_add = vp8_dequant_dc_idct_add_lossless_c;
|
pbi->dc_idct_add = vp9_dequant_dc_idct_add_lossless_c;
|
||||||
pbi->dc_idct_add_y_block = vp8_dequant_dc_idct_add_y_block_lossless_c;
|
pbi->dc_idct_add_y_block = vp9_dequant_dc_idct_add_y_block_lossless_c;
|
||||||
pbi->idct_add_y_block = vp8_dequant_idct_add_y_block_lossless_c;
|
pbi->idct_add_y_block = vp9_dequant_idct_add_y_block_lossless_c;
|
||||||
pbi->idct_add_uv_block = vp8_dequant_idct_add_uv_block_lossless_c;
|
pbi->idct_add_uv_block = vp9_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->idct_add = vp8_dequant_idct_add;
|
pbi->idct_add = vp9_dequant_idct_add;
|
||||||
pbi->dc_idct_add = vp8_dequant_dc_idct_add;
|
pbi->dc_idct_add = vp9_dequant_dc_idct_add;
|
||||||
pbi->dc_idct_add_y_block = vp8_dequant_dc_idct_add_y_block;
|
pbi->dc_idct_add_y_block = vp9_dequant_dc_idct_add_y_block;
|
||||||
pbi->idct_add_y_block = vp8_dequant_idct_add_y_block;
|
pbi->idct_add_y_block = vp9_dequant_idct_add_y_block;
|
||||||
pbi->idct_add_uv_block = vp8_dequant_idct_add_uv_block;
|
pbi->idct_add_uv_block = vp9_dequant_idct_add_uv_block;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
pbi->idct_add = vp8_dequant_idct_add;
|
pbi->idct_add = vp9_dequant_idct_add;
|
||||||
pbi->dc_idct_add = vp8_dequant_dc_idct_add;
|
pbi->dc_idct_add = vp9_dequant_dc_idct_add;
|
||||||
pbi->dc_idct_add_y_block = vp8_dequant_dc_idct_add_y_block;
|
pbi->dc_idct_add_y_block = vp9_dequant_dc_idct_add_y_block;
|
||||||
pbi->idct_add_y_block = vp8_dequant_idct_add_y_block;
|
pbi->idct_add_y_block = vp9_dequant_idct_add_y_block;
|
||||||
pbi->idct_add_uv_block = vp8_dequant_idct_add_uv_block;
|
pbi->idct_add_uv_block = vp9_dequant_idct_add_uv_block;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
for (i = 16; i < 24; i++) {
|
for (i = 16; i < 24; i++) {
|
||||||
@@ -226,7 +226,7 @@ static void decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd,
|
|||||||
mode = xd->mode_info_context->mbmi.mode;
|
mode = xd->mode_info_context->mbmi.mode;
|
||||||
|
|
||||||
if (xd->mode_info_context->mbmi.mb_skip_coeff) {
|
if (xd->mode_info_context->mbmi.mb_skip_coeff) {
|
||||||
vp8_reset_mb_tokens_context(xd);
|
vp9_reset_mb_tokens_context(xd);
|
||||||
#if CONFIG_SUPERBLOCKS
|
#if CONFIG_SUPERBLOCKS
|
||||||
if (xd->mode_info_context->mbmi.encoded_as_sb &&
|
if (xd->mode_info_context->mbmi.encoded_as_sb &&
|
||||||
(mb_col < pc->mb_cols - 1 || mb_row < pc->mb_rows - 1)) {
|
(mb_col < pc->mb_cols - 1 || mb_row < pc->mb_rows - 1)) {
|
||||||
@@ -234,7 +234,7 @@ static void decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd,
|
|||||||
xd->above_context++;
|
xd->above_context++;
|
||||||
if (mb_row < pc->mb_rows - 1)
|
if (mb_row < pc->mb_rows - 1)
|
||||||
xd->left_context++;
|
xd->left_context++;
|
||||||
vp8_reset_mb_tokens_context(xd);
|
vp9_reset_mb_tokens_context(xd);
|
||||||
if (mb_col < pc->mb_cols - 1)
|
if (mb_col < pc->mb_cols - 1)
|
||||||
xd->above_context--;
|
xd->above_context--;
|
||||||
if (mb_row < pc->mb_rows - 1)
|
if (mb_row < pc->mb_rows - 1)
|
||||||
@@ -247,11 +247,11 @@ static void decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd,
|
|||||||
xd->eobs[i] = 0;
|
xd->eobs[i] = 0;
|
||||||
}
|
}
|
||||||
if (tx_size == TX_16X16) {
|
if (tx_size == TX_16X16) {
|
||||||
eobtotal = vp8_decode_mb_tokens_16x16(pbi, xd, bc);
|
eobtotal = vp9_decode_mb_tokens_16x16(pbi, xd, bc);
|
||||||
} else if (tx_size == TX_8X8) {
|
} else if (tx_size == TX_8X8) {
|
||||||
eobtotal = vp8_decode_mb_tokens_8x8(pbi, xd, bc);
|
eobtotal = vp9_decode_mb_tokens_8x8(pbi, xd, bc);
|
||||||
} else {
|
} else {
|
||||||
eobtotal = vp8_decode_mb_tokens(pbi, xd, bc);
|
eobtotal = vp9_decode_mb_tokens(pbi, xd, bc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -330,16 +330,16 @@ static void decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd,
|
|||||||
if (xd->mode_info_context->mbmi.txfm_size == TX_8X8) {
|
if (xd->mode_info_context->mbmi.txfm_size == TX_8X8) {
|
||||||
tx_type = get_tx_type(xd, &xd->block[idx]);
|
tx_type = get_tx_type(xd, &xd->block[idx]);
|
||||||
if (tx_type != DCT_DCT) {
|
if (tx_type != DCT_DCT) {
|
||||||
vp8_ht_dequant_idct_add_8x8_c(tx_type,
|
vp9_ht_dequant_idct_add_8x8_c(tx_type,
|
||||||
q, dq, pre, dst, 16, stride);
|
q, dq, pre, dst, 16, stride);
|
||||||
} else {
|
} else {
|
||||||
vp8_dequant_idct_add_8x8_c(q, dq, pre, dst, 16, stride);
|
vp9_dequant_idct_add_8x8_c(q, dq, pre, dst, 16, stride);
|
||||||
}
|
}
|
||||||
q += 64;
|
q += 64;
|
||||||
} 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(b->qcoeff, b->dequant, b->predictor,
|
vp9_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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -370,17 +370,17 @@ static void decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd,
|
|||||||
|
|
||||||
tx_type = get_tx_type(xd, b);
|
tx_type = get_tx_type(xd, b);
|
||||||
if (tx_type != DCT_DCT) {
|
if (tx_type != DCT_DCT) {
|
||||||
vp8_ht_dequant_idct_add_c(tx_type, b->qcoeff,
|
vp9_ht_dequant_idct_add_c(tx_type, b->qcoeff,
|
||||||
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(b->qcoeff, b->dequant, b->predictor,
|
vp9_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(xd->qcoeff, xd->block[0].dequant,
|
vp9_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 {
|
||||||
@@ -395,11 +395,11 @@ static void decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd,
|
|||||||
BLOCKD *bd = &xd->block[0];
|
BLOCKD *bd = &xd->block[0];
|
||||||
tx_type = get_tx_type(xd, bd);
|
tx_type = get_tx_type(xd, bd);
|
||||||
if (tx_type != DCT_DCT) {
|
if (tx_type != DCT_DCT) {
|
||||||
vp8_ht_dequant_idct_add_16x16_c(tx_type, xd->qcoeff,
|
vp9_ht_dequant_idct_add_16x16_c(tx_type, xd->qcoeff,
|
||||||
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(xd->qcoeff, xd->block[0].dequant,
|
vp9_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);
|
||||||
}
|
}
|
||||||
@@ -424,18 +424,18 @@ static void decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd,
|
|||||||
xd->mode_info_context += (n & 1);
|
xd->mode_info_context += (n & 1);
|
||||||
xd->mode_info_context += (n >> 1) * pc->mode_info_stride;
|
xd->mode_info_context += (n >> 1) * pc->mode_info_stride;
|
||||||
if (!orig_skip_flag) {
|
if (!orig_skip_flag) {
|
||||||
eobtotal = vp8_decode_mb_tokens_8x8(pbi, xd, bc);
|
eobtotal = vp9_decode_mb_tokens_8x8(pbi, xd, bc);
|
||||||
if (eobtotal == 0) // skip loopfilter
|
if (eobtotal == 0) // skip loopfilter
|
||||||
xd->mode_info_context->mbmi.mb_skip_coeff = 1;
|
xd->mode_info_context->mbmi.mb_skip_coeff = 1;
|
||||||
} else {
|
} else {
|
||||||
vp8_reset_mb_tokens_context(xd);
|
vp9_reset_mb_tokens_context(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
|
||||||
vp8_dequantize_b_2x2(b);
|
vp9_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;
|
||||||
@@ -447,19 +447,19 @@ static void decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd,
|
|||||||
((int *)b->qcoeff)[7] = 0;
|
((int *)b->qcoeff)[7] = 0;
|
||||||
#if CONFIG_SUPERBLOCKS
|
#if CONFIG_SUPERBLOCKS
|
||||||
if (xd->mode_info_context->mbmi.encoded_as_sb) {
|
if (xd->mode_info_context->mbmi.encoded_as_sb) {
|
||||||
vp8_dequant_dc_idct_add_y_block_8x8_inplace_c(xd->qcoeff,
|
vp9_dequant_dc_idct_add_y_block_8x8_inplace_c(xd->qcoeff,
|
||||||
xd->block[0].dequant,
|
xd->block[0].dequant,
|
||||||
xd->dst.y_buffer + (n >> 1) * 16 * xd->dst.y_stride + (n & 1) * 16,
|
xd->dst.y_buffer + (n >> 1) * 16 * xd->dst.y_stride + (n & 1) * 16,
|
||||||
xd->dst.y_stride, xd->eobs, xd->block[24].diff, xd);
|
xd->dst.y_stride, xd->eobs, xd->block[24].diff, xd);
|
||||||
// do UV inline also
|
// do UV inline also
|
||||||
vp8_dequant_idct_add_uv_block_8x8_inplace_c(xd->qcoeff + 16 * 16,
|
vp9_dequant_idct_add_uv_block_8x8_inplace_c(xd->qcoeff + 16 * 16,
|
||||||
xd->block[16].dequant,
|
xd->block[16].dequant,
|
||||||
xd->dst.u_buffer + (n >> 1) * 8 * xd->dst.uv_stride + (n & 1) * 8,
|
xd->dst.u_buffer + (n >> 1) * 8 * xd->dst.uv_stride + (n & 1) * 8,
|
||||||
xd->dst.v_buffer + (n >> 1) * 8 * xd->dst.uv_stride + (n & 1) * 8,
|
xd->dst.v_buffer + (n >> 1) * 8 * xd->dst.uv_stride + (n & 1) * 8,
|
||||||
xd->dst.uv_stride, xd->eobs + 16, xd);
|
xd->dst.uv_stride, xd->eobs + 16, xd);
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
vp8_dequant_dc_idct_add_y_block_8x8(xd->qcoeff,
|
vp9_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
|
||||||
@@ -467,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 {
|
||||||
vp8_dequantize_b(b);
|
vp9_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;
|
||||||
@@ -497,7 +497,7 @@ 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
|
||||||
)
|
)
|
||||||
vp8_dequant_idct_add_uv_block_8x8
|
vp9_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); //
|
||||||
@@ -610,7 +610,7 @@ decode_sb_row(VP8D_COMP *pbi, VP8_COMMON *pc, int mbrow, MACROBLOCKD *xd,
|
|||||||
if (i)
|
if (i)
|
||||||
mi->mbmi.encoded_as_sb = 0;
|
mi->mbmi.encoded_as_sb = 0;
|
||||||
#endif
|
#endif
|
||||||
vpx_decode_mb_mode_mv(pbi, xd, mb_row, mb_col, bc);
|
vp9_decode_mb_mode_mv(pbi, xd, mb_row, mb_col, bc);
|
||||||
|
|
||||||
update_blockd_bmi(xd);
|
update_blockd_bmi(xd);
|
||||||
|
|
||||||
@@ -729,7 +729,7 @@ static void setup_token_decoder(VP8D_COMP *pbi,
|
|||||||
"%d length", 1);
|
"%d length", 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (vp8dx_start_decode(bool_decoder, partition, partition_size))
|
if (vp9dx_start_decode(bool_decoder, partition, partition_size))
|
||||||
vpx_internal_error(&pc->error, VPX_CODEC_MEM_ERROR,
|
vpx_internal_error(&pc->error, VPX_CODEC_MEM_ERROR,
|
||||||
"Failed to allocate bool decoder %d", 1);
|
"Failed to allocate bool decoder %d", 1);
|
||||||
}
|
}
|
||||||
@@ -897,7 +897,7 @@ static void read_coef_probs(VP8D_COMP *pbi, BOOL_DECODER* const bc) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int vp8_decode_frame(VP8D_COMP *pbi) {
|
int vp9_decode_frame(VP8D_COMP *pbi) {
|
||||||
BOOL_DECODER header_bc, residual_bc;
|
BOOL_DECODER header_bc, residual_bc;
|
||||||
VP8_COMMON *const pc = &pbi->common;
|
VP8_COMMON *const pc = &pbi->common;
|
||||||
MACROBLOCKD *const xd = &pbi->mb;
|
MACROBLOCKD *const xd = &pbi->mb;
|
||||||
@@ -986,7 +986,7 @@ int vp8_decode_frame(VP8D_COMP *pbi) {
|
|||||||
|
|
||||||
init_frame(pbi);
|
init_frame(pbi);
|
||||||
|
|
||||||
if (vp8dx_start_decode(&header_bc, data, first_partition_length_in_bytes))
|
if (vp9dx_start_decode(&header_bc, data, first_partition_length_in_bytes))
|
||||||
vpx_internal_error(&pc->error, VPX_CODEC_MEM_ERROR,
|
vpx_internal_error(&pc->error, VPX_CODEC_MEM_ERROR,
|
||||||
"Failed to allocate bool decoder 0");
|
"Failed to allocate bool decoder 0");
|
||||||
if (pc->frame_type == KEY_FRAME) {
|
if (pc->frame_type == KEY_FRAME) {
|
||||||
@@ -1143,7 +1143,7 @@ int vp8_decode_frame(VP8D_COMP *pbi) {
|
|||||||
pc->uvac_delta_q = get_delta_q(&header_bc, pc->uvac_delta_q, &q_update);
|
pc->uvac_delta_q = get_delta_q(&header_bc, pc->uvac_delta_q, &q_update);
|
||||||
|
|
||||||
if (q_update)
|
if (q_update)
|
||||||
vp8cx_init_de_quantizer(pbi);
|
vp9cx_init_de_quantizer(pbi);
|
||||||
|
|
||||||
/* MB level dequantizer setup */
|
/* MB level dequantizer setup */
|
||||||
mb_init_dequantizer(pbi, &pbi->mb);
|
mb_init_dequantizer(pbi, &pbi->mb);
|
||||||
@@ -1274,7 +1274,7 @@ int vp8_decode_frame(VP8D_COMP *pbi) {
|
|||||||
/* Read the mb_no_coeff_skip flag */
|
/* Read the mb_no_coeff_skip flag */
|
||||||
pc->mb_no_coeff_skip = (int)vp8_read_bit(&header_bc);
|
pc->mb_no_coeff_skip = (int)vp8_read_bit(&header_bc);
|
||||||
|
|
||||||
vpx_decode_mode_mvs_init(pbi, &header_bc);
|
vp9_decode_mode_mvs_init(pbi, &header_bc);
|
||||||
|
|
||||||
vpx_memset(pc->above_context, 0, sizeof(ENTROPY_CONTEXT_PLANES) * pc->mb_cols);
|
vpx_memset(pc->above_context, 0, sizeof(ENTROPY_CONTEXT_PLANES) * pc->mb_cols);
|
||||||
|
|
||||||
|
@@ -29,7 +29,7 @@ extern void vp8_short_inv_walsh4x4_1_x8_c(short *input, short *output, int pitch
|
|||||||
extern int dec_debug;
|
extern int dec_debug;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void vp8_dequantize_b_c(BLOCKD *d) {
|
void vp9_dequantize_b_c(BLOCKD *d) {
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
short *DQ = d->dqcoeff;
|
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,
|
unsigned char *pred, unsigned char *dest,
|
||||||
int pitch, int stride) {
|
int pitch, int stride) {
|
||||||
short output[16];
|
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,
|
unsigned char *pred, unsigned char *dest,
|
||||||
int pitch, int stride) {
|
int pitch, int stride) {
|
||||||
short output[64];
|
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) {
|
unsigned char *dest, int pitch, int stride) {
|
||||||
short output[16];
|
short output[16];
|
||||||
short *diff_ptr = output;
|
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,
|
unsigned char *dest, int pitch, int stride,
|
||||||
int Dc) {
|
int Dc) {
|
||||||
int i;
|
int i;
|
||||||
@@ -195,7 +195,7 @@ void vp8_dequant_dc_idct_add_c(short *input, short *dq, unsigned char *pred,
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if CONFIG_LOSSLESS
|
#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) {
|
unsigned char *dest, int pitch, int stride) {
|
||||||
short output[16];
|
short output[16];
|
||||||
short *diff_ptr = output;
|
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,
|
unsigned char *dest, int pitch, int stride,
|
||||||
int Dc) {
|
int Dc) {
|
||||||
int i;
|
int i;
|
||||||
@@ -266,7 +266,7 @@ void vp8_dequant_dc_idct_add_lossless_c(short *input, short *dq, unsigned char *
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void vp8_dequantize_b_2x2_c(BLOCKD *d) {
|
void vp9_dequantize_b_2x2_c(BLOCKD *d) {
|
||||||
int i;
|
int i;
|
||||||
short *DQ = d->dqcoeff;
|
short *DQ = d->dqcoeff;
|
||||||
short *Q = d->qcoeff;
|
short *Q = d->qcoeff;
|
||||||
@@ -287,7 +287,7 @@ void vp8_dequantize_b_2x2_c(BLOCKD *d) {
|
|||||||
#endif
|
#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
|
unsigned char *dest, int pitch, int stride) { // , MACROBLOCKD *xd, short blk_idx
|
||||||
short output[64];
|
short output[64];
|
||||||
short *diff_ptr = output;
|
short *diff_ptr = output;
|
||||||
@@ -376,7 +376,7 @@ void vp8_dequant_idct_add_8x8_c(short *input, short *dq, unsigned char *pred,
|
|||||||
#endif
|
#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,
|
unsigned char *dest, int pitch, int stride,
|
||||||
int Dc) { // Dc for 1st order T in some rear case
|
int Dc) { // Dc for 1st order T in some rear case
|
||||||
short output[64];
|
short output[64];
|
||||||
@@ -464,7 +464,7 @@ void vp8_dequant_dc_idct_add_8x8_c(short *input, short *dq, unsigned char *pred,
|
|||||||
#endif
|
#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,
|
unsigned char *pred, unsigned char *dest,
|
||||||
int pitch, int stride) {
|
int pitch, int stride) {
|
||||||
short output[256];
|
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) {
|
unsigned char *dest, int pitch, int stride) {
|
||||||
short output[256];
|
short output[256];
|
||||||
short *diff_ptr = output;
|
short *diff_ptr = output;
|
||||||
|
@@ -14,61 +14,61 @@
|
|||||||
#include "vp8/common/blockd.h"
|
#include "vp8/common/blockd.h"
|
||||||
|
|
||||||
#if CONFIG_LOSSLESS
|
#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 *pred,
|
||||||
unsigned char *output,
|
unsigned char *output,
|
||||||
int pitch, int stride);
|
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 *pred,
|
||||||
unsigned char *output,
|
unsigned char *output,
|
||||||
int pitch, int stride, int dc);
|
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 *pre,
|
||||||
unsigned char *dst,
|
unsigned char *dst,
|
||||||
int stride, char *eobs,
|
int stride, char *eobs,
|
||||||
short *dc);
|
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 *pre,
|
||||||
unsigned char *dst,
|
unsigned char *dst,
|
||||||
int stride, char *eobs);
|
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 *pre,
|
||||||
unsigned char *dst_u,
|
unsigned char *dst_u,
|
||||||
unsigned char *dst_v,
|
unsigned char *dst_v,
|
||||||
int stride, char *eobs);
|
int stride, char *eobs);
|
||||||
#endif
|
#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);
|
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);
|
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);
|
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);
|
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,
|
unsigned char *pre, unsigned char *dst_u, unsigned char *dst_v, int stride,
|
||||||
char *eobs);
|
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,
|
unsigned char *pred, unsigned char *dest,
|
||||||
int pitch, int stride);
|
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,
|
unsigned char *pred, unsigned char *dest,
|
||||||
int pitch, int stride);
|
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,
|
unsigned char *pred, unsigned char *dest,
|
||||||
int pitch, int stride);
|
int pitch, int stride);
|
||||||
|
|
||||||
#if CONFIG_SUPERBLOCKS
|
#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,
|
unsigned char *dst,
|
||||||
int stride, char *eobs,
|
int stride, char *eobs,
|
||||||
short *dc, MACROBLOCKD *xd);
|
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 *dstu,
|
||||||
unsigned char *dstv,
|
unsigned char *dstv,
|
||||||
int stride, char *eobs,
|
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] =
|
static const unsigned char cat6_prob[14] =
|
||||||
{ 254, 254, 252, 249, 243, 230, 196, 177, 153, 140, 133, 130, 129, 0 };
|
{ 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 */
|
/* Clear entropy contexts for Y2 blocks */
|
||||||
if ((xd->mode_info_context->mbmi.mode != B_PRED &&
|
if ((xd->mode_info_context->mbmi.mode != B_PRED &&
|
||||||
xd->mode_info_context->mbmi.mode != I8X8_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;
|
int v;
|
||||||
|
|
||||||
if (br->count < 0)
|
if (br->count < 0)
|
||||||
vp8dx_bool_decoder_fill(br);
|
vp9dx_bool_decoder_fill(br);
|
||||||
|
|
||||||
if (br->value < bigsplit) {
|
if (br->value < bigsplit) {
|
||||||
br->range = split;
|
br->range = split;
|
||||||
@@ -414,7 +414,7 @@ SKIP_START:
|
|||||||
return c;
|
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) {
|
BOOL_DECODER* const bc) {
|
||||||
ENTROPY_CONTEXT* const A = (ENTROPY_CONTEXT *)xd->above_context;
|
ENTROPY_CONTEXT* const A = (ENTROPY_CONTEXT *)xd->above_context;
|
||||||
ENTROPY_CONTEXT* const L = (ENTROPY_CONTEXT *)xd->left_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;
|
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) {
|
BOOL_DECODER* const bc) {
|
||||||
ENTROPY_CONTEXT *const A = (ENTROPY_CONTEXT *)xd->above_context;
|
ENTROPY_CONTEXT *const A = (ENTROPY_CONTEXT *)xd->above_context;
|
||||||
ENTROPY_CONTEXT *const L = (ENTROPY_CONTEXT *)xd->left_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) {
|
BOOL_DECODER* const bc) {
|
||||||
ENTROPY_CONTEXT *const A = (ENTROPY_CONTEXT *)xd->above_context;
|
ENTROPY_CONTEXT *const A = (ENTROPY_CONTEXT *)xd->above_context;
|
||||||
ENTROPY_CONTEXT *const L = (ENTROPY_CONTEXT *)xd->left_context;
|
ENTROPY_CONTEXT *const L = (ENTROPY_CONTEXT *)xd->left_context;
|
||||||
|
@@ -14,12 +14,12 @@
|
|||||||
|
|
||||||
#include "onyxd_int.h"
|
#include "onyxd_int.h"
|
||||||
|
|
||||||
void vp8_reset_mb_tokens_context(MACROBLOCKD* const);
|
void vp9_reset_mb_tokens_context(MACROBLOCKD* const);
|
||||||
int vp8_decode_mb_tokens(VP8D_COMP* const, MACROBLOCKD* const,
|
int vp9_decode_mb_tokens(VP8D_COMP* const, MACROBLOCKD* const,
|
||||||
BOOL_DECODER* 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);
|
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);
|
BOOL_DECODER* const);
|
||||||
|
|
||||||
#endif /* DETOKENIZE_H */
|
#endif /* DETOKENIZE_H */
|
||||||
|
@@ -12,21 +12,21 @@
|
|||||||
#include "vp8/common/idct.h"
|
#include "vp8/common/idct.h"
|
||||||
#include "dequantize.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,
|
unsigned char *dest, int pitch, int stride,
|
||||||
int Dc);
|
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);
|
unsigned char *dest, int pitch, int stride);
|
||||||
void vp8_dc_only_idct_add_c(short input_dc, unsigned char *pred_ptr,
|
void vp8_dc_only_idct_add_c(short input_dc, unsigned char *pred_ptr,
|
||||||
unsigned char *dst_ptr, int pitch, int stride);
|
unsigned char *dst_ptr, int pitch, int stride);
|
||||||
#if CONFIG_LOSSLESS
|
#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);
|
unsigned char *dest, int pitch, int stride);
|
||||||
void vp8_dc_only_idct_add_lossless_c(short input_dc, unsigned char *pred_ptr,
|
void vp8_dc_only_idct_add_lossless_c(short input_dc, unsigned char *pred_ptr,
|
||||||
unsigned char *dst_ptr, int pitch, int stride);
|
unsigned char *dst_ptr, int pitch, int stride);
|
||||||
#endif
|
#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,
|
(short *q, short *dq, unsigned char *pre,
|
||||||
unsigned char *dst, int stride, char *eobs, short *dc) {
|
unsigned char *dst, int stride, char *eobs, short *dc) {
|
||||||
int i, j;
|
int i, j;
|
||||||
@@ -34,7 +34,7 @@ void vp8_dequant_dc_idct_add_y_block_c
|
|||||||
for (i = 0; i < 4; i++) {
|
for (i = 0; i < 4; i++) {
|
||||||
for (j = 0; j < 4; j++) {
|
for (j = 0; j < 4; j++) {
|
||||||
if (*eobs++ > 1)
|
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
|
else
|
||||||
vp8_dc_only_idct_add_c(dc[0], pre, dst, 16, stride);
|
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,
|
(short *q, short *dq, unsigned char *pre,
|
||||||
unsigned char *dst, int stride, char *eobs) {
|
unsigned char *dst, int stride, char *eobs) {
|
||||||
int i, j;
|
int i, j;
|
||||||
@@ -57,7 +57,7 @@ void vp8_dequant_idct_add_y_block_c
|
|||||||
for (i = 0; i < 4; i++) {
|
for (i = 0; i < 4; i++) {
|
||||||
for (j = 0; j < 4; j++) {
|
for (j = 0; j < 4; j++) {
|
||||||
if (*eobs++ > 1)
|
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 {
|
else {
|
||||||
vp8_dc_only_idct_add_c(q[0]*dq[0], pre, dst, 16, stride);
|
vp8_dc_only_idct_add_c(q[0]*dq[0], pre, dst, 16, stride);
|
||||||
((int *)q)[0] = 0;
|
((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,
|
(short *q, short *dq, unsigned char *pre,
|
||||||
unsigned char *dstu, unsigned char *dstv, int stride, char *eobs) {
|
unsigned char *dstu, unsigned char *dstv, int stride, char *eobs) {
|
||||||
int i, j;
|
int i, j;
|
||||||
@@ -81,7 +81,7 @@ void vp8_dequant_idct_add_uv_block_c
|
|||||||
for (i = 0; i < 2; i++) {
|
for (i = 0; i < 2; i++) {
|
||||||
for (j = 0; j < 2; j++) {
|
for (j = 0; j < 2; j++) {
|
||||||
if (*eobs++ > 1)
|
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 {
|
else {
|
||||||
vp8_dc_only_idct_add_c(q[0]*dq[0], pre, dstu, 8, stride);
|
vp8_dc_only_idct_add_c(q[0]*dq[0], pre, dstu, 8, stride);
|
||||||
((int *)q)[0] = 0;
|
((int *)q)[0] = 0;
|
||||||
@@ -99,7 +99,7 @@ void vp8_dequant_idct_add_uv_block_c
|
|||||||
for (i = 0; i < 2; i++) {
|
for (i = 0; i < 2; i++) {
|
||||||
for (j = 0; j < 2; j++) {
|
for (j = 0; j < 2; j++) {
|
||||||
if (*eobs++ > 1)
|
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 {
|
else {
|
||||||
vp8_dc_only_idct_add_c(q[0]*dq[0], pre, dstv, 8, stride);
|
vp8_dc_only_idct_add_c(q[0]*dq[0], pre, dstv, 8, stride);
|
||||||
((int *)q)[0] = 0;
|
((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,
|
(short *q, short *dq, unsigned char *pre,
|
||||||
unsigned char *dst, int stride, char *eobs, short *dc, MACROBLOCKD *xd) {
|
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]);
|
vp9_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]);
|
vp9_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]);
|
vp9_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[192], dq, pre + 8 * 16 + 8, dst + 8 * stride + 8, 16, stride, dc[8]);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#if CONFIG_SUPERBLOCKS
|
#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,
|
(short *q, short *dq,
|
||||||
unsigned char *dst, int stride, char *eobs, short *dc, MACROBLOCKD *xd) {
|
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]);
|
vp9_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]);
|
vp9_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]);
|
vp9_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[192], dq, dst + 8 * stride + 8, dst + 8 * stride + 8, stride, stride, dc[8]);
|
||||||
|
|
||||||
}
|
}
|
||||||
#endif
|
#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,
|
(short *q, short *dq, unsigned char *pre,
|
||||||
unsigned char *dst, int stride, char *eobs, MACROBLOCKD *xd) {
|
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 *origdest = dst;
|
||||||
unsigned char *origpred = pre;
|
unsigned char *origpred = pre;
|
||||||
|
|
||||||
vp8_dequant_idct_add_8x8_c(q, dq, pre, dst, 16, stride);
|
vp9_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);
|
vp9_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);
|
vp9_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[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,
|
(short *q, short *dq, unsigned char *pre,
|
||||||
unsigned char *dstu, unsigned char *dstv, int stride, char *eobs, MACROBLOCKD *xd) {
|
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;
|
q += 64;
|
||||||
pre += 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
|
#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,
|
(short *q, short *dq,
|
||||||
unsigned char *dstu, unsigned char *dstv, int stride, char *eobs, MACROBLOCKD *xd) {
|
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;
|
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
|
#endif
|
||||||
|
|
||||||
#if CONFIG_LOSSLESS
|
#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,
|
(short *q, short *dq, unsigned char *pre,
|
||||||
unsigned char *dst, int stride, char *eobs, short *dc) {
|
unsigned char *dst, int stride, char *eobs, short *dc) {
|
||||||
int i, j;
|
int i, j;
|
||||||
@@ -187,7 +187,7 @@ void vp8_dequant_dc_idct_add_y_block_lossless_c
|
|||||||
for (i = 0; i < 4; i++) {
|
for (i = 0; i < 4; i++) {
|
||||||
for (j = 0; j < 4; j++) {
|
for (j = 0; j < 4; j++) {
|
||||||
if (*eobs++ > 1)
|
if (*eobs++ > 1)
|
||||||
vp8_dequant_dc_idct_add_lossless_c(q, dq, pre, dst, 16, stride, dc[0]);
|
vp9_dequant_dc_idct_add_lossless_c(q, dq, pre, dst, 16, stride, dc[0]);
|
||||||
else
|
else
|
||||||
vp8_dc_only_inv_walsh_add_c(dc[0], pre, dst, 16, stride);
|
vp8_dc_only_inv_walsh_add_c(dc[0], pre, dst, 16, stride);
|
||||||
|
|
||||||
@@ -202,7 +202,7 @@ void vp8_dequant_dc_idct_add_y_block_lossless_c
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void vp8_dequant_idct_add_y_block_lossless_c
|
void vp9_dequant_idct_add_y_block_lossless_c
|
||||||
(short *q, short *dq, unsigned char *pre,
|
(short *q, short *dq, unsigned char *pre,
|
||||||
unsigned char *dst, int stride, char *eobs) {
|
unsigned char *dst, int stride, char *eobs) {
|
||||||
int i, j;
|
int i, j;
|
||||||
@@ -210,7 +210,7 @@ void vp8_dequant_idct_add_y_block_lossless_c
|
|||||||
for (i = 0; i < 4; i++) {
|
for (i = 0; i < 4; i++) {
|
||||||
for (j = 0; j < 4; j++) {
|
for (j = 0; j < 4; j++) {
|
||||||
if (*eobs++ > 1)
|
if (*eobs++ > 1)
|
||||||
vp8_dequant_idct_add_lossless_c(q, dq, pre, dst, 16, stride);
|
vp9_dequant_idct_add_lossless_c(q, dq, pre, dst, 16, stride);
|
||||||
else {
|
else {
|
||||||
vp8_dc_only_inv_walsh_add_c(q[0]*dq[0], pre, dst, 16, stride);
|
vp8_dc_only_inv_walsh_add_c(q[0]*dq[0], pre, dst, 16, stride);
|
||||||
((int *)q)[0] = 0;
|
((int *)q)[0] = 0;
|
||||||
@@ -226,7 +226,7 @@ void vp8_dequant_idct_add_y_block_lossless_c
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void vp8_dequant_idct_add_uv_block_lossless_c
|
void vp9_dequant_idct_add_uv_block_lossless_c
|
||||||
(short *q, short *dq, unsigned char *pre,
|
(short *q, short *dq, unsigned char *pre,
|
||||||
unsigned char *dstu, unsigned char *dstv, int stride, char *eobs) {
|
unsigned char *dstu, unsigned char *dstv, int stride, char *eobs) {
|
||||||
int i, j;
|
int i, j;
|
||||||
@@ -234,7 +234,7 @@ void vp8_dequant_idct_add_uv_block_lossless_c
|
|||||||
for (i = 0; i < 2; i++) {
|
for (i = 0; i < 2; i++) {
|
||||||
for (j = 0; j < 2; j++) {
|
for (j = 0; j < 2; j++) {
|
||||||
if (*eobs++ > 1)
|
if (*eobs++ > 1)
|
||||||
vp8_dequant_idct_add_lossless_c(q, dq, pre, dstu, 8, stride);
|
vp9_dequant_idct_add_lossless_c(q, dq, pre, dstu, 8, stride);
|
||||||
else {
|
else {
|
||||||
vp8_dc_only_inv_walsh_add_c(q[0]*dq[0], pre, dstu, 8, stride);
|
vp8_dc_only_inv_walsh_add_c(q[0]*dq[0], pre, dstu, 8, stride);
|
||||||
((int *)q)[0] = 0;
|
((int *)q)[0] = 0;
|
||||||
@@ -252,7 +252,7 @@ void vp8_dequant_idct_add_uv_block_lossless_c
|
|||||||
for (i = 0; i < 2; i++) {
|
for (i = 0; i < 2; i++) {
|
||||||
for (j = 0; j < 2; j++) {
|
for (j = 0; j < 2; j++) {
|
||||||
if (*eobs++ > 1)
|
if (*eobs++ > 1)
|
||||||
vp8_dequant_idct_add_lossless_c(q, dq, pre, dstv, 8, stride);
|
vp9_dequant_idct_add_lossless_c(q, dq, pre, dstv, 8, stride);
|
||||||
else {
|
else {
|
||||||
vp8_dc_only_inv_walsh_add_c(q[0]*dq[0], pre, dstv, 8, stride);
|
vp8_dc_only_inv_walsh_add_c(q[0]*dq[0], pre, dstv, 8, stride);
|
||||||
((int *)q)[0] = 0;
|
((int *)q)[0] = 0;
|
||||||
|
@@ -34,7 +34,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern void vp8_init_loop_filter(VP8_COMMON *cm);
|
extern void vp8_init_loop_filter(VP8_COMMON *cm);
|
||||||
extern void vp8cx_init_de_quantizer(VP8D_COMP *pbi);
|
extern void vp9cx_init_de_quantizer(VP8D_COMP *pbi);
|
||||||
static int get_free_fb(VP8_COMMON *cm);
|
static int get_free_fb(VP8_COMMON *cm);
|
||||||
static void ref_cnt_fb(int *buf, int *idx, int new_idx);
|
static void ref_cnt_fb(int *buf, int *idx, int new_idx);
|
||||||
|
|
||||||
@@ -104,7 +104,7 @@ void write_dx_frame_to_file(YV12_BUFFER_CONFIG *frame, int this_frame) {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void vp8dx_initialize() {
|
void vp9dx_initialize() {
|
||||||
static int init_done = 0;
|
static int init_done = 0;
|
||||||
|
|
||||||
if (!init_done) {
|
if (!init_done) {
|
||||||
@@ -115,7 +115,7 @@ void vp8dx_initialize() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
VP8D_PTR vp8dx_create_decompressor(VP8D_CONFIG *oxcf) {
|
VP8D_PTR vp9dx_create_decompressor(VP8D_CONFIG *oxcf) {
|
||||||
VP8D_COMP *pbi = vpx_memalign(32, sizeof(VP8D_COMP));
|
VP8D_COMP *pbi = vpx_memalign(32, sizeof(VP8D_COMP));
|
||||||
|
|
||||||
if (!pbi)
|
if (!pbi)
|
||||||
@@ -125,22 +125,22 @@ VP8D_PTR vp8dx_create_decompressor(VP8D_CONFIG *oxcf) {
|
|||||||
|
|
||||||
if (setjmp(pbi->common.error.jmp)) {
|
if (setjmp(pbi->common.error.jmp)) {
|
||||||
pbi->common.error.setjmp = 0;
|
pbi->common.error.setjmp = 0;
|
||||||
vp8dx_remove_decompressor(pbi);
|
vp9dx_remove_decompressor(pbi);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
pbi->common.error.setjmp = 1;
|
pbi->common.error.setjmp = 1;
|
||||||
vp8dx_initialize();
|
vp9dx_initialize();
|
||||||
|
|
||||||
vp8_create_common(&pbi->common);
|
vp8_create_common(&pbi->common);
|
||||||
|
|
||||||
pbi->common.current_video_frame = 0;
|
pbi->common.current_video_frame = 0;
|
||||||
pbi->ready_for_new_data = 1;
|
pbi->ready_for_new_data = 1;
|
||||||
|
|
||||||
/* vp8cx_init_de_quantizer() is first called here. Add check in frame_init_dequantizer() to avoid
|
/* vp9cx_init_de_quantizer() is first called here. Add check in frame_init_dequantizer() to avoid
|
||||||
* unnecessary calling of vp8cx_init_de_quantizer() for every frame.
|
* unnecessary calling of vp8cx_init_de_quantizer() for every frame.
|
||||||
*/
|
*/
|
||||||
vp8cx_init_de_quantizer(pbi);
|
vp9cx_init_de_quantizer(pbi);
|
||||||
|
|
||||||
vp8_loop_filter_init(&pbi->common);
|
vp8_loop_filter_init(&pbi->common);
|
||||||
|
|
||||||
@@ -151,7 +151,7 @@ VP8D_PTR vp8dx_create_decompressor(VP8D_CONFIG *oxcf) {
|
|||||||
return (VP8D_PTR) pbi;
|
return (VP8D_PTR) pbi;
|
||||||
}
|
}
|
||||||
|
|
||||||
void vp8dx_remove_decompressor(VP8D_PTR ptr) {
|
void vp9dx_remove_decompressor(VP8D_PTR ptr) {
|
||||||
VP8D_COMP *pbi = (VP8D_COMP *) ptr;
|
VP8D_COMP *pbi = (VP8D_COMP *) ptr;
|
||||||
|
|
||||||
if (!pbi)
|
if (!pbi)
|
||||||
@@ -167,7 +167,7 @@ void vp8dx_remove_decompressor(VP8D_PTR ptr) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
vpx_codec_err_t vp8dx_get_reference(VP8D_PTR ptr, VP8_REFFRAME ref_frame_flag, YV12_BUFFER_CONFIG *sd) {
|
vpx_codec_err_t vp9dx_get_reference(VP8D_PTR ptr, VP8_REFFRAME ref_frame_flag, YV12_BUFFER_CONFIG *sd) {
|
||||||
VP8D_COMP *pbi = (VP8D_COMP *) ptr;
|
VP8D_COMP *pbi = (VP8D_COMP *) ptr;
|
||||||
VP8_COMMON *cm = &pbi->common;
|
VP8_COMMON *cm = &pbi->common;
|
||||||
int ref_fb_idx;
|
int ref_fb_idx;
|
||||||
@@ -197,7 +197,7 @@ vpx_codec_err_t vp8dx_get_reference(VP8D_PTR ptr, VP8_REFFRAME ref_frame_flag, Y
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
vpx_codec_err_t vp8dx_set_reference(VP8D_PTR ptr, VP8_REFFRAME ref_frame_flag, YV12_BUFFER_CONFIG *sd) {
|
vpx_codec_err_t vp9dx_set_reference(VP8D_PTR ptr, VP8_REFFRAME ref_frame_flag, YV12_BUFFER_CONFIG *sd) {
|
||||||
VP8D_COMP *pbi = (VP8D_COMP *) ptr;
|
VP8D_COMP *pbi = (VP8D_COMP *) ptr;
|
||||||
VP8_COMMON *cm = &pbi->common;
|
VP8_COMMON *cm = &pbi->common;
|
||||||
int *ref_fb_ptr = NULL;
|
int *ref_fb_ptr = NULL;
|
||||||
@@ -331,7 +331,7 @@ static void vp8_print_yuv_rec_mb(VP8_COMMON *cm, int mb_row, int mb_col)
|
|||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
int vp8dx_receive_compressed_data(VP8D_PTR ptr, unsigned long size, const unsigned char *source, int64_t time_stamp) {
|
int vp9dx_receive_compressed_data(VP8D_PTR ptr, unsigned long size, const unsigned char *source, int64_t time_stamp) {
|
||||||
#if HAVE_ARMV7
|
#if HAVE_ARMV7
|
||||||
int64_t dx_store_reg[8];
|
int64_t dx_store_reg[8];
|
||||||
#endif
|
#endif
|
||||||
@@ -395,7 +395,7 @@ int vp8dx_receive_compressed_data(VP8D_PTR ptr, unsigned long size, const unsign
|
|||||||
|
|
||||||
pbi->common.error.setjmp = 1;
|
pbi->common.error.setjmp = 1;
|
||||||
|
|
||||||
retcode = vp8_decode_frame(pbi);
|
retcode = vp9_decode_frame(pbi);
|
||||||
|
|
||||||
if (retcode < 0) {
|
if (retcode < 0) {
|
||||||
#if HAVE_ARMV7
|
#if HAVE_ARMV7
|
||||||
@@ -479,7 +479,7 @@ int vp8dx_receive_compressed_data(VP8D_PTR ptr, unsigned long size, const unsign
|
|||||||
pbi->common.error.setjmp = 0;
|
pbi->common.error.setjmp = 0;
|
||||||
return retcode;
|
return retcode;
|
||||||
}
|
}
|
||||||
int vp8dx_get_raw_frame(VP8D_PTR ptr, YV12_BUFFER_CONFIG *sd, int64_t *time_stamp, int64_t *time_end_stamp, vp8_ppflags_t *flags) {
|
int vp9dx_get_raw_frame(VP8D_PTR ptr, YV12_BUFFER_CONFIG *sd, int64_t *time_stamp, int64_t *time_end_stamp, vp8_ppflags_t *flags) {
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
VP8D_COMP *pbi = (VP8D_COMP *) ptr;
|
VP8D_COMP *pbi = (VP8D_COMP *) ptr;
|
||||||
|
|
||||||
|
@@ -71,11 +71,11 @@ typedef struct VP8Decompressor {
|
|||||||
|
|
||||||
DETOK detoken;
|
DETOK detoken;
|
||||||
|
|
||||||
vp8_dequant_idct_add_fn_t idct_add;
|
vp9_dequant_idct_add_fn_t idct_add;
|
||||||
vp8_dequant_dc_idct_add_fn_t dc_idct_add;
|
vp9_dequant_dc_idct_add_fn_t dc_idct_add;
|
||||||
vp8_dequant_dc_idct_add_y_block_fn_t dc_idct_add_y_block;
|
vp9_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;
|
vp9_dequant_idct_add_y_block_fn_t idct_add_y_block;
|
||||||
vp8_dequant_idct_add_uv_block_fn_t idct_add_uv_block;
|
vp9_dequant_idct_add_uv_block_fn_t idct_add_uv_block;
|
||||||
|
|
||||||
vp8_prob prob_skip_false;
|
vp8_prob prob_skip_false;
|
||||||
|
|
||||||
@@ -83,7 +83,7 @@ typedef struct VP8Decompressor {
|
|||||||
|
|
||||||
} VP8D_COMP;
|
} VP8D_COMP;
|
||||||
|
|
||||||
int vp8_decode_frame(VP8D_COMP *cpi);
|
int vp9_decode_frame(VP8D_COMP *cpi);
|
||||||
|
|
||||||
|
|
||||||
#if CONFIG_DEBUG
|
#if CONFIG_DEBUG
|
||||||
|
@@ -12,31 +12,31 @@
|
|||||||
#include "vp8/common/idct.h"
|
#include "vp8/common/idct.h"
|
||||||
#include "vp8/decoder/dequantize.h"
|
#include "vp8/decoder/dequantize.h"
|
||||||
|
|
||||||
void vp8_dequant_dc_idct_add_y_block_mmx
|
void vp9_dequant_dc_idct_add_y_block_mmx
|
||||||
(short *q, short *dq, unsigned char *pre,
|
(short *q, short *dq, unsigned char *pre,
|
||||||
unsigned char *dst, int stride, char *eobs, short *dc) {
|
unsigned char *dst, int stride, char *eobs, short *dc) {
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < 4; i++) {
|
for (i = 0; i < 4; i++) {
|
||||||
if (eobs[0] > 1)
|
if (eobs[0] > 1)
|
||||||
vpx_dequant_dc_idct_add_mmx(q, dq, pre, dst, 16, stride, dc[0]);
|
vp9_dequant_dc_idct_add_mmx(q, dq, pre, dst, 16, stride, dc[0]);
|
||||||
else
|
else
|
||||||
vpx_dc_only_idct_add_mmx(dc[0], pre, dst, 16, stride);
|
vp9_dc_only_idct_add_mmx(dc[0], pre, dst, 16, stride);
|
||||||
|
|
||||||
if (eobs[1] > 1)
|
if (eobs[1] > 1)
|
||||||
vpx_dequant_dc_idct_add_mmx(q + 16, dq, pre + 4, dst + 4, 16, stride, dc[1]);
|
vp9_dequant_dc_idct_add_mmx(q + 16, dq, pre + 4, dst + 4, 16, stride, dc[1]);
|
||||||
else
|
else
|
||||||
vpx_dc_only_idct_add_mmx(dc[1], pre + 4, dst + 4, 16, stride);
|
vp9_dc_only_idct_add_mmx(dc[1], pre + 4, dst + 4, 16, stride);
|
||||||
|
|
||||||
if (eobs[2] > 1)
|
if (eobs[2] > 1)
|
||||||
vpx_dequant_dc_idct_add_mmx(q + 32, dq, pre + 8, dst + 8, 16, stride, dc[2]);
|
vp9_dequant_dc_idct_add_mmx(q + 32, dq, pre + 8, dst + 8, 16, stride, dc[2]);
|
||||||
else
|
else
|
||||||
vpx_dc_only_idct_add_mmx(dc[2], pre + 8, dst + 8, 16, stride);
|
vp9_dc_only_idct_add_mmx(dc[2], pre + 8, dst + 8, 16, stride);
|
||||||
|
|
||||||
if (eobs[3] > 1)
|
if (eobs[3] > 1)
|
||||||
vpx_dequant_dc_idct_add_mmx(q + 48, dq, pre + 12, dst + 12, 16, stride, dc[3]);
|
vp9_dequant_dc_idct_add_mmx(q + 48, dq, pre + 12, dst + 12, 16, stride, dc[3]);
|
||||||
else
|
else
|
||||||
vpx_dc_only_idct_add_mmx(dc[3], pre + 12, dst + 12, 16, stride);
|
vp9_dc_only_idct_add_mmx(dc[3], pre + 12, dst + 12, 16, stride);
|
||||||
|
|
||||||
q += 64;
|
q += 64;
|
||||||
dc += 4;
|
dc += 4;
|
||||||
@@ -46,37 +46,37 @@ void vp8_dequant_dc_idct_add_y_block_mmx
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void vp8_dequant_idct_add_y_block_mmx
|
void vp9_dequant_idct_add_y_block_mmx
|
||||||
(short *q, short *dq, unsigned char *pre,
|
(short *q, short *dq, unsigned char *pre,
|
||||||
unsigned char *dst, int stride, char *eobs) {
|
unsigned char *dst, int stride, char *eobs) {
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < 4; i++) {
|
for (i = 0; i < 4; i++) {
|
||||||
if (eobs[0] > 1)
|
if (eobs[0] > 1)
|
||||||
vpx_dequant_idct_add_mmx(q, dq, pre, dst, 16, stride);
|
vp9_dequant_idct_add_mmx(q, dq, pre, dst, 16, stride);
|
||||||
else {
|
else {
|
||||||
vpx_dc_only_idct_add_mmx(q[0]*dq[0], pre, dst, 16, stride);
|
vp9_dc_only_idct_add_mmx(q[0]*dq[0], pre, dst, 16, stride);
|
||||||
((int *)q)[0] = 0;
|
((int *)q)[0] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (eobs[1] > 1)
|
if (eobs[1] > 1)
|
||||||
vpx_dequant_idct_add_mmx(q + 16, dq, pre + 4, dst + 4, 16, stride);
|
vp9_dequant_idct_add_mmx(q + 16, dq, pre + 4, dst + 4, 16, stride);
|
||||||
else {
|
else {
|
||||||
vpx_dc_only_idct_add_mmx(q[16]*dq[0], pre + 4, dst + 4, 16, stride);
|
vp9_dc_only_idct_add_mmx(q[16]*dq[0], pre + 4, dst + 4, 16, stride);
|
||||||
((int *)(q + 16))[0] = 0;
|
((int *)(q + 16))[0] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (eobs[2] > 1)
|
if (eobs[2] > 1)
|
||||||
vpx_dequant_idct_add_mmx(q + 32, dq, pre + 8, dst + 8, 16, stride);
|
vp9_dequant_idct_add_mmx(q + 32, dq, pre + 8, dst + 8, 16, stride);
|
||||||
else {
|
else {
|
||||||
vpx_dc_only_idct_add_mmx(q[32]*dq[0], pre + 8, dst + 8, 16, stride);
|
vp9_dc_only_idct_add_mmx(q[32]*dq[0], pre + 8, dst + 8, 16, stride);
|
||||||
((int *)(q + 32))[0] = 0;
|
((int *)(q + 32))[0] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (eobs[3] > 1)
|
if (eobs[3] > 1)
|
||||||
vpx_dequant_idct_add_mmx(q + 48, dq, pre + 12, dst + 12, 16, stride);
|
vp9_dequant_idct_add_mmx(q + 48, dq, pre + 12, dst + 12, 16, stride);
|
||||||
else {
|
else {
|
||||||
vpx_dc_only_idct_add_mmx(q[48]*dq[0], pre + 12, dst + 12, 16, stride);
|
vp9_dc_only_idct_add_mmx(q[48]*dq[0], pre + 12, dst + 12, 16, stride);
|
||||||
((int *)(q + 48))[0] = 0;
|
((int *)(q + 48))[0] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -87,23 +87,23 @@ void vp8_dequant_idct_add_y_block_mmx
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void vp8_dequant_idct_add_uv_block_mmx
|
void vp9_dequant_idct_add_uv_block_mmx
|
||||||
(short *q, short *dq, unsigned char *pre,
|
(short *q, short *dq, unsigned char *pre,
|
||||||
unsigned char *dstu, unsigned char *dstv, int stride, char *eobs) {
|
unsigned char *dstu, unsigned char *dstv, int stride, char *eobs) {
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < 2; i++) {
|
for (i = 0; i < 2; i++) {
|
||||||
if (eobs[0] > 1)
|
if (eobs[0] > 1)
|
||||||
vpx_dequant_idct_add_mmx(q, dq, pre, dstu, 8, stride);
|
vp9_dequant_idct_add_mmx(q, dq, pre, dstu, 8, stride);
|
||||||
else {
|
else {
|
||||||
vpx_dc_only_idct_add_mmx(q[0]*dq[0], pre, dstu, 8, stride);
|
vp9_dc_only_idct_add_mmx(q[0]*dq[0], pre, dstu, 8, stride);
|
||||||
((int *)q)[0] = 0;
|
((int *)q)[0] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (eobs[1] > 1)
|
if (eobs[1] > 1)
|
||||||
vpx_dequant_idct_add_mmx(q + 16, dq, pre + 4, dstu + 4, 8, stride);
|
vp9_dequant_idct_add_mmx(q + 16, dq, pre + 4, dstu + 4, 8, stride);
|
||||||
else {
|
else {
|
||||||
vpx_dc_only_idct_add_mmx(q[16]*dq[0], pre + 4, dstu + 4, 8, stride);
|
vp9_dc_only_idct_add_mmx(q[16]*dq[0], pre + 4, dstu + 4, 8, stride);
|
||||||
((int *)(q + 16))[0] = 0;
|
((int *)(q + 16))[0] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -115,16 +115,16 @@ void vp8_dequant_idct_add_uv_block_mmx
|
|||||||
|
|
||||||
for (i = 0; i < 2; i++) {
|
for (i = 0; i < 2; i++) {
|
||||||
if (eobs[0] > 1)
|
if (eobs[0] > 1)
|
||||||
vpx_dequant_idct_add_mmx(q, dq, pre, dstv, 8, stride);
|
vp9_dequant_idct_add_mmx(q, dq, pre, dstv, 8, stride);
|
||||||
else {
|
else {
|
||||||
vpx_dc_only_idct_add_mmx(q[0]*dq[0], pre, dstv, 8, stride);
|
vp9_dc_only_idct_add_mmx(q[0]*dq[0], pre, dstv, 8, stride);
|
||||||
((int *)q)[0] = 0;
|
((int *)q)[0] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (eobs[1] > 1)
|
if (eobs[1] > 1)
|
||||||
vpx_dequant_idct_add_mmx(q + 16, dq, pre + 4, dstv + 4, 8, stride);
|
vp9_dequant_idct_add_mmx(q + 16, dq, pre + 4, dstv + 4, 8, stride);
|
||||||
else {
|
else {
|
||||||
vpx_dc_only_idct_add_mmx(q[16]*dq[0], pre + 4, dstv + 4, 8, stride);
|
vp9_dc_only_idct_add_mmx(q[16]*dq[0], pre + 4, dstv + 4, 8, stride);
|
||||||
((int *)(q + 16))[0] = 0;
|
((int *)(q + 16))[0] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -26,7 +26,7 @@ void vp8_idct_dequant_full_2x_sse2
|
|||||||
(short *q, short *dq, unsigned char *pre,
|
(short *q, short *dq, unsigned char *pre,
|
||||||
unsigned char *dst, int dst_stride, int blk_stride);
|
unsigned char *dst, int dst_stride, int blk_stride);
|
||||||
|
|
||||||
void vp8_dequant_dc_idct_add_y_block_sse2
|
void vp9_dequant_dc_idct_add_y_block_sse2
|
||||||
(short *q, short *dq, unsigned char *pre,
|
(short *q, short *dq, unsigned char *pre,
|
||||||
unsigned char *dst, int stride, char *eobs, short *dc) {
|
unsigned char *dst, int stride, char *eobs, short *dc) {
|
||||||
int i;
|
int i;
|
||||||
@@ -50,7 +50,7 @@ void vp8_dequant_dc_idct_add_y_block_sse2
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void vp8_dequant_idct_add_y_block_sse2
|
void vp9_dequant_idct_add_y_block_sse2
|
||||||
(short *q, short *dq, unsigned char *pre,
|
(short *q, short *dq, unsigned char *pre,
|
||||||
unsigned char *dst, int stride, char *eobs) {
|
unsigned char *dst, int stride, char *eobs) {
|
||||||
int i;
|
int i;
|
||||||
@@ -73,7 +73,7 @@ void vp8_dequant_idct_add_y_block_sse2
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void vp8_dequant_idct_add_uv_block_sse2
|
void vp9_dequant_idct_add_uv_block_sse2
|
||||||
(short *q, short *dq, unsigned char *pre,
|
(short *q, short *dq, unsigned char *pre,
|
||||||
unsigned char *dstu, unsigned char *dstv, int stride, char *eobs) {
|
unsigned char *dstu, unsigned char *dstv, int stride, char *eobs) {
|
||||||
if (((short *)(eobs))[0] & 0xfefe)
|
if (((short *)(eobs))[0] & 0xfefe)
|
||||||
|
@@ -15,13 +15,13 @@
|
|||||||
|
|
||||||
|
|
||||||
#if HAVE_MMX
|
#if HAVE_MMX
|
||||||
void vpx_dequantize_b_impl_mmx(short *sq, short *dq, short *q);
|
void vp9_dequantize_b_impl_mmx(short *sq, short *dq, short *q);
|
||||||
|
|
||||||
void vp8_dequantize_b_mmx(BLOCKD *d) {
|
void vp9_dequantize_b_mmx(BLOCKD *d) {
|
||||||
short *sq = (short *) d->qcoeff;
|
short *sq = (short *) d->qcoeff;
|
||||||
short *dq = (short *) d->dqcoeff;
|
short *dq = (short *) d->dqcoeff;
|
||||||
short *q = (short *) d->dequant;
|
short *q = (short *) d->dequant;
|
||||||
vpx_dequantize_b_impl_mmx(sq, dq, q);
|
vp9_dequantize_b_impl_mmx(sq, dq, q);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -193,7 +193,7 @@ static vpx_codec_err_t vp8_init(vpx_codec_ctx_t *ctx) {
|
|||||||
static vpx_codec_err_t vp8_destroy(vpx_codec_alg_priv_t *ctx) {
|
static vpx_codec_err_t vp8_destroy(vpx_codec_alg_priv_t *ctx) {
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
vp8dx_remove_decompressor(ctx->pbi);
|
vp9dx_remove_decompressor(ctx->pbi);
|
||||||
|
|
||||||
for (i = NELEMENTS(ctx->mmaps) - 1; i >= 0; i--) {
|
for (i = NELEMENTS(ctx->mmaps) - 1; i >= 0; i--) {
|
||||||
if (ctx->mmaps[i].dtor)
|
if (ctx->mmaps[i].dtor)
|
||||||
@@ -353,14 +353,14 @@ static vpx_codec_err_t vp8_decode(vpx_codec_alg_priv_t *ctx,
|
|||||||
VP8D_CONFIG oxcf;
|
VP8D_CONFIG oxcf;
|
||||||
VP8D_PTR optr;
|
VP8D_PTR optr;
|
||||||
|
|
||||||
vp8dx_initialize();
|
vp9dx_initialize();
|
||||||
|
|
||||||
oxcf.Width = ctx->si.w;
|
oxcf.Width = ctx->si.w;
|
||||||
oxcf.Height = ctx->si.h;
|
oxcf.Height = ctx->si.h;
|
||||||
oxcf.Version = 9;
|
oxcf.Version = 9;
|
||||||
oxcf.postprocess = 0;
|
oxcf.postprocess = 0;
|
||||||
oxcf.max_threads = ctx->cfg.threads;
|
oxcf.max_threads = ctx->cfg.threads;
|
||||||
optr = vp8dx_create_decompressor(&oxcf);
|
optr = vp9dx_create_decompressor(&oxcf);
|
||||||
|
|
||||||
/* If postprocessing was enabled by the application and a
|
/* If postprocessing was enabled by the application and a
|
||||||
* configuration has not been provided, default it.
|
* configuration has not been provided, default it.
|
||||||
@@ -407,12 +407,12 @@ static vpx_codec_err_t vp8_decode(vpx_codec_alg_priv_t *ctx,
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
if (vp8dx_receive_compressed_data(ctx->pbi, data_sz, data, deadline)) {
|
if (vp9dx_receive_compressed_data(ctx->pbi, data_sz, data, deadline)) {
|
||||||
VP8D_COMP *pbi = (VP8D_COMP *)ctx->pbi;
|
VP8D_COMP *pbi = (VP8D_COMP *)ctx->pbi;
|
||||||
res = update_error_state(ctx, &pbi->common.error);
|
res = update_error_state(ctx, &pbi->common.error);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!res && 0 == vp8dx_get_raw_frame(ctx->pbi, &sd, &time_stamp, &time_end_stamp, &flags)) {
|
if (!res && 0 == vp9dx_get_raw_frame(ctx->pbi, &sd, &time_stamp, &time_end_stamp, &flags)) {
|
||||||
yuvconfig2image(&ctx->img, &sd, user_priv);
|
yuvconfig2image(&ctx->img, &sd, user_priv);
|
||||||
ctx->img_avail = 1;
|
ctx->img_avail = 1;
|
||||||
}
|
}
|
||||||
@@ -542,7 +542,7 @@ static vpx_codec_err_t vp9_set_reference(vpx_codec_alg_priv_t *ctx,
|
|||||||
|
|
||||||
image2yuvconfig(&frame->img, &sd);
|
image2yuvconfig(&frame->img, &sd);
|
||||||
|
|
||||||
return vp8dx_set_reference(ctx->pbi, frame->frame_type, &sd);
|
return vp9dx_set_reference(ctx->pbi, frame->frame_type, &sd);
|
||||||
} else
|
} else
|
||||||
return VPX_CODEC_INVALID_PARAM;
|
return VPX_CODEC_INVALID_PARAM;
|
||||||
|
|
||||||
@@ -560,7 +560,7 @@ static vpx_codec_err_t vp9_get_reference(vpx_codec_alg_priv_t *ctx,
|
|||||||
|
|
||||||
image2yuvconfig(&frame->img, &sd);
|
image2yuvconfig(&frame->img, &sd);
|
||||||
|
|
||||||
return vp8dx_get_reference(ctx->pbi, frame->frame_type, &sd);
|
return vp9dx_get_reference(ctx->pbi, frame->frame_type, &sd);
|
||||||
} else
|
} else
|
||||||
return VPX_CODEC_INVALID_PARAM;
|
return VPX_CODEC_INVALID_PARAM;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user