Commit 8c31484e authored by Yaowu Xu's avatar Yaowu Xu

fix more merge issues

With this fix, the experimental branch now builds and encodes correctly
with the following two configure options respectively:
--enable-experimental --enable-t8x8
--enable-experimental

Change-Id: I3147c33c503fe713a85fd371e4f1a974805778bf
parent 1c24eb2b
...@@ -94,14 +94,14 @@ typedef enum ...@@ -94,14 +94,14 @@ typedef enum
MB_MODE_COUNT MB_MODE_COUNT
} MB_PREDICTION_MODE; } MB_PREDICTION_MODE;
// Macroblock level features /* Macroblock level features */
typedef enum typedef enum
{ {
MB_LVL_ALT_Q = 0, // Use alternate Quantizer .... MB_LVL_ALT_Q = 0, /* Use alternate Quantizer .... */
MB_LVL_ALT_LF = 1, // Use alternate loop filter value... MB_LVL_ALT_LF = 1, /* Use alternate loop filter value... */
MB_LVL_MAX = 2, // Number of MB level features supported MB_LVL_MAX = 2 /* Number of MB level features supported */
} MB_LVL_FEATURES;
} MB_LVL_FEATURES;
/* Segment Feature Masks */ /* Segment Feature Masks */
#define SEGMENT_ALTQ 0x01 #define SEGMENT_ALTQ 0x01
...@@ -163,8 +163,9 @@ typedef struct ...@@ -163,8 +163,9 @@ typedef struct
MB_PREDICTION_MODE mode, uv_mode; MB_PREDICTION_MODE mode, uv_mode;
MV_REFERENCE_FRAME ref_frame; MV_REFERENCE_FRAME ref_frame;
int_mv mv; int_mv mv;
#if CONFIG_SEGMENTATION
unsigned char segment_flag; unsigned char segment_flag;
#endif
unsigned char partitioning; unsigned char partitioning;
unsigned char mb_skip_coeff; /* does this mb has coefficients at all, 1=no coefficients, 0=need decode tokens */ unsigned char mb_skip_coeff; /* does this mb has coefficients at all, 1=no coefficients, 0=need decode tokens */
unsigned char need_to_clamp_mvs; unsigned char need_to_clamp_mvs;
...@@ -237,11 +238,11 @@ typedef struct ...@@ -237,11 +238,11 @@ typedef struct
/* 0 (do not update) 1 (update) the macroblock segmentation feature data. */ /* 0 (do not update) 1 (update) the macroblock segmentation feature data. */
unsigned char mb_segement_abs_delta; unsigned char mb_segement_abs_delta;
unsigned char temporal_update;
/* Per frame flags that define which MB level features (such as quantizer or loop filter level) */ /* Per frame flags that define which MB level features (such as quantizer or loop filter level) */
/* are enabled and when enabled the proabilities used to decode the per MB flags in MB_MODE_INFO */ /* are enabled and when enabled the proabilities used to decode the per MB flags in MB_MODE_INFO */
#if CONFIG_SEGMENTATION #if CONFIG_SEGMENTATION
vp8_prob mb_segment_tree_probs[MB_FEATURE_TREE_PROBS + 3]; // Probability Tree used to code Segment number vp8_prob mb_segment_tree_probs[MB_FEATURE_TREE_PROBS + 3]; // Probability Tree used to code Segment number
unsigned char temporal_update;
#else #else
vp8_prob mb_segment_tree_probs[MB_FEATURE_TREE_PROBS]; vp8_prob mb_segment_tree_probs[MB_FEATURE_TREE_PROBS];
#endif #endif
...@@ -275,7 +276,6 @@ typedef struct ...@@ -275,7 +276,6 @@ typedef struct
void *current_bc; void *current_bc;
int corrupted; int corrupted;
#if CONFIG_RUNTIME_CPU_DETECT #if CONFIG_RUNTIME_CPU_DETECT
......
...@@ -183,8 +183,11 @@ const vp8_prob vp8_coef_update_probs [BLOCK_TYPES] [COEF_BANDS] [PREV_COEF_CONTE ...@@ -183,8 +183,11 @@ const vp8_prob vp8_coef_update_probs [BLOCK_TYPES] [COEF_BANDS] [PREV_COEF_CONTE
}, },
}, },
}; };
#if CONFIG_T8X8
const vp8_prob vp8_coef_update_probs_8x8 [BLOCK_TYPES] [COEF_BANDS] [PREV_COEF_CONTEXTS] [ENTROPY_NODES] = const vp8_prob vp8_coef_update_probs_8x8 [BLOCK_TYPES]
[COEF_BANDS]
[PREV_COEF_CONTEXTS]
[ENTROPY_NODES] =
{ {
{ {
{ {
...@@ -356,3 +359,4 @@ const vp8_prob vp8_coef_update_probs_8x8 [BLOCK_TYPES] [COEF_BANDS] [PREV_COEF_C ...@@ -356,3 +359,4 @@ const vp8_prob vp8_coef_update_probs_8x8 [BLOCK_TYPES] [COEF_BANDS] [PREV_COEF_C
}, },
}; };
#endif
\ No newline at end of file
...@@ -225,6 +225,7 @@ const unsigned int vp8_default_coef_counts[BLOCK_TYPES] ...@@ -225,6 +225,7 @@ const unsigned int vp8_default_coef_counts[BLOCK_TYPES]
}; };
#if CONFIG_T8X8
const unsigned int vp8_default_coef_counts_8x8[BLOCK_TYPES] const unsigned int vp8_default_coef_counts_8x8[BLOCK_TYPES]
[COEF_BANDS] [COEF_BANDS]
[PREV_COEF_CONTEXTS] [PREV_COEF_CONTEXTS]
...@@ -400,3 +401,4 @@ const unsigned int vp8_default_coef_counts_8x8[BLOCK_TYPES] ...@@ -400,3 +401,4 @@ const unsigned int vp8_default_coef_counts_8x8[BLOCK_TYPES]
} }
} }
}; };
#endif
\ No newline at end of file
...@@ -120,14 +120,21 @@ static const Prob Pcat2[] = { 165, 145}; ...@@ -120,14 +120,21 @@ static const Prob Pcat2[] = { 165, 145};
static const Prob Pcat3[] = { 173, 148, 140}; static const Prob Pcat3[] = { 173, 148, 140};
static const Prob Pcat4[] = { 176, 155, 140, 135}; static const Prob Pcat4[] = { 176, 155, 140, 135};
static const Prob Pcat5[] = { 180, 157, 141, 134, 130}; static const Prob Pcat5[] = { 180, 157, 141, 134, 130};
#if CONFIG_EXTEND_QRANGE
static const Prob Pcat6[] = static const Prob Pcat6[] =
{ 254, 254, 252, 249, 243, 230, 196, 177, 153, 140, 133, 130, 129}; { 254, 254, 252, 249, 243, 230, 196, 177, 153, 140, 133, 130, 129};
#else
static const Prob Pcat6[] =
{ 254, 254, 243, 230, 196, 177, 153, 140, 133, 130, 129};
#endif
static vp8_tree_index cat1[2], cat2[4], cat3[6], cat4[8], cat5[10], cat6[22]; static vp8_tree_index cat1[2], cat2[4], cat3[6], cat4[8], cat5[10], cat6[22];
void vp8_init_scan_order_mask() void vp8_init_scan_order_mask()
{ {
int i; int i;
for (i = 0; i < 16; i++) for (i = 0; i < 16; i++)
{ {
vp8_default_zig_zag_mask[vp8_default_zig_zag1d[i]] = 1 << i; vp8_default_zig_zag_mask[vp8_default_zig_zag1d[i]] = 1 << i;
...@@ -160,7 +167,11 @@ static void init_bit_trees() ...@@ -160,7 +167,11 @@ static void init_bit_trees()
init_bit_tree(cat3, 3); init_bit_tree(cat3, 3);
init_bit_tree(cat4, 4); init_bit_tree(cat4, 4);
init_bit_tree(cat5, 5); init_bit_tree(cat5, 5);
#if CONFIG_EXTEND_QRANGE
init_bit_tree(cat6, 13); init_bit_tree(cat6, 13);
#else
init_bit_tree(cat6, 11);
#endif
} }
vp8_extra_bit_struct vp8_extra_bits[12] = vp8_extra_bit_struct vp8_extra_bits[12] =
...@@ -175,7 +186,11 @@ vp8_extra_bit_struct vp8_extra_bits[12] = ...@@ -175,7 +186,11 @@ vp8_extra_bit_struct vp8_extra_bits[12] =
{ cat3, Pcat3, 3, 11}, { cat3, Pcat3, 3, 11},
{ cat4, Pcat4, 4, 19}, { cat4, Pcat4, 4, 19},
{ cat5, Pcat5, 5, 35}, { cat5, Pcat5, 5, 35},
#if CONFIG_EXTEND_QRANGE
{ cat6, Pcat6, 13, 67}, { cat6, Pcat6, 13, 67},
#else
{ cat6, Pcat6, 11, 67},
#endif
{ 0, 0, 0, 0} { 0, 0, 0, 0}
}; };
#include "defaultcoefcounts.h" #include "defaultcoefcounts.h"
...@@ -183,6 +198,7 @@ vp8_extra_bit_struct vp8_extra_bits[12] = ...@@ -183,6 +198,7 @@ vp8_extra_bit_struct vp8_extra_bits[12] =
void vp8_default_coef_probs(VP8_COMMON *pc) void vp8_default_coef_probs(VP8_COMMON *pc)
{ {
int h = 0; int h = 0;
do do
{ {
int i = 0; int i = 0;
...@@ -234,6 +250,7 @@ void vp8_default_coef_probs(VP8_COMMON *pc) ...@@ -234,6 +250,7 @@ void vp8_default_coef_probs(VP8_COMMON *pc)
#endif #endif
} }
void vp8_coef_tree_initialize() void vp8_coef_tree_initialize()
{ {
init_bit_trees(); init_bit_trees();
......
...@@ -50,8 +50,11 @@ extern vp8_extra_bit_struct vp8_extra_bits[12]; /* indexed by token value */ ...@@ -50,8 +50,11 @@ extern vp8_extra_bit_struct vp8_extra_bits[12]; /* indexed by token value */
#define PROB_UPDATE_BASELINE_COST 7 #define PROB_UPDATE_BASELINE_COST 7
#define MAX_PROB 255 #define MAX_PROB 255
#if CONFIG_EXTEND_QRANGE
#define DCT_MAX_VALUE 8192 #define DCT_MAX_VALUE 8192
#else
#define DCT_MAX_VALUE 2048
#endif
/* Coefficients are predicted via a 3-dimensional probability table. */ /* Coefficients are predicted via a 3-dimensional probability table. */
...@@ -104,6 +107,6 @@ extern DECLARE_ALIGNED(64, const int, vp8_default_zig_zag1d_8x8[64]); ...@@ -104,6 +107,6 @@ extern DECLARE_ALIGNED(64, const int, vp8_default_zig_zag1d_8x8[64]);
extern short vp8_default_zig_zag_mask_8x8[64];//int64_t extern short vp8_default_zig_zag_mask_8x8[64];//int64_t
#endif #endif
extern const int vp8_mb_feature_data_bits[MB_LVL_MAX]; extern const int vp8_mb_feature_data_bits[MB_LVL_MAX];
void vp8_coef_tree_initialize(void);
void vp8_coef_tree_initialize(void);
#endif #endif
...@@ -74,6 +74,7 @@ extern prototype_idct(vp8_idct_idct16); ...@@ -74,6 +74,7 @@ extern prototype_idct(vp8_idct_idct16);
#endif #endif
extern prototype_idct_scalar_add(vp8_idct_idct1_scalar_add); extern prototype_idct_scalar_add(vp8_idct_idct1_scalar_add);
#ifndef vp8_idct_iwalsh1 #ifndef vp8_idct_iwalsh1
#define vp8_idct_iwalsh1 vp8_short_inv_walsh4x4_1_c #define vp8_idct_iwalsh1 vp8_short_inv_walsh4x4_1_c
#endif #endif
......
...@@ -203,7 +203,6 @@ void vp8_short_inv_walsh4x4_c(short *input, short *output) ...@@ -203,7 +203,6 @@ void vp8_short_inv_walsh4x4_c(short *input, short *output)
ip += 4; ip += 4;
op += 4; op += 4;
} }
//printf("here2\n");
} }
void vp8_short_inv_walsh4x4_1_c(short *input, short *output) void vp8_short_inv_walsh4x4_1_c(short *input, short *output)
...@@ -213,9 +212,9 @@ void vp8_short_inv_walsh4x4_1_c(short *input, short *output) ...@@ -213,9 +212,9 @@ void vp8_short_inv_walsh4x4_1_c(short *input, short *output)
short *op = output; short *op = output;
#if !CONFIG_EXTEND_QRANGE #if !CONFIG_EXTEND_QRANGE
a1 = ((input[0] + 3) >> 3); a1 = (input[0] + 3 )>> 3;
#else #else
a1 = ((input[0] + 1) >> 2); a1 = (input[0] + 1 )>> 2;
#endif #endif
for (i = 0; i < 4; i++) for (i = 0; i < 4; i++)
......
...@@ -126,7 +126,6 @@ extern "C" ...@@ -126,7 +126,6 @@ extern "C"
//(5)=Two Pass - Second Pass Best. The encoder uses the statistics that were generated in the first //(5)=Two Pass - Second Pass Best. The encoder uses the statistics that were generated in the first
// encoding pass to create the compressed output using the highest possible quality, and taking a // encoding pass to create the compressed output using the highest possible quality, and taking a
// longer amount of time to encode.. ( speed setting ignored ) // longer amount of time to encode.. ( speed setting ignored )
int Mode; // int Mode; //
// Key Framing Operations // Key Framing Operations
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
#include "vpx_ports/config.h" #include "vpx_ports/config.h"
#include "recon.h" #include "recon.h"
#include "blockd.h" #include "blockd.h"
#include <stdio.h>
void vp8_recon_b_c void vp8_recon_b_c
( (
unsigned char *pred_ptr, unsigned char *pred_ptr,
...@@ -133,7 +133,6 @@ void vp8_recon_mby_c(const vp8_recon_rtcd_vtable_t *rtcd, MACROBLOCKD *x) ...@@ -133,7 +133,6 @@ void vp8_recon_mby_c(const vp8_recon_rtcd_vtable_t *rtcd, MACROBLOCKD *x)
RECON_INVOKE(rtcd, recon4)(b->predictor, b->diff, *(b->base_dst) + b->dst, b->dst_stride); RECON_INVOKE(rtcd, recon4)(b->predictor, b->diff, *(b->base_dst) + b->dst, b->dst_stride);
} }
#endif #endif
} }
void vp8_recon_mb_c(const vp8_recon_rtcd_vtable_t *rtcd, MACROBLOCKD *x) void vp8_recon_mb_c(const vp8_recon_rtcd_vtable_t *rtcd, MACROBLOCKD *x)
...@@ -172,7 +171,6 @@ void vp8_recon_mb_c(const vp8_recon_rtcd_vtable_t *rtcd, MACROBLOCKD *x) ...@@ -172,7 +171,6 @@ void vp8_recon_mb_c(const vp8_recon_rtcd_vtable_t *rtcd, MACROBLOCKD *x)
RECON_INVOKE(rtcd, recon4)(b->predictor, b->diff, *(b->base_dst) + b->dst, b->dst_stride); RECON_INVOKE(rtcd, recon4)(b->predictor, b->diff, *(b->base_dst) + b->dst, b->dst_stride);
} }
for (i = 16; i < 24; i += 2) for (i = 16; i < 24; i += 2)
{ {
BLOCKD *b = &x->block[i]; BLOCKD *b = &x->block[i];
...@@ -180,5 +178,4 @@ void vp8_recon_mb_c(const vp8_recon_rtcd_vtable_t *rtcd, MACROBLOCKD *x) ...@@ -180,5 +178,4 @@ void vp8_recon_mb_c(const vp8_recon_rtcd_vtable_t *rtcd, MACROBLOCKD *x)
RECON_INVOKE(rtcd, recon2)(b->predictor, b->diff, *(b->base_dst) + b->dst, b->dst_stride); RECON_INVOKE(rtcd, recon2)(b->predictor, b->diff, *(b->base_dst) + b->dst, b->dst_stride);
} }
#endif #endif
} }
...@@ -464,3 +464,7 @@ void vp8_build_uvmvs(MACROBLOCKD *x, int fullpixel) ...@@ -464,3 +464,7 @@ void vp8_build_uvmvs(MACROBLOCKD *x, int fullpixel)
} }
} }
} }
...@@ -18,8 +18,6 @@ ...@@ -18,8 +18,6 @@
#if CONFIG_DEBUG #if CONFIG_DEBUG
#include <assert.h> #include <assert.h>
#endif #endif
extern int frame_count;
static int vp8_read_bmode(vp8_reader *bc, const vp8_prob *p) static int vp8_read_bmode(vp8_reader *bc, const vp8_prob *p)
{ {
const int i = vp8_treed_read(bc, vp8_bmode_tree, p); const int i = vp8_treed_read(bc, vp8_bmode_tree, p);
...@@ -62,7 +60,6 @@ static void vp8_read_mb_features(vp8_reader *r, MB_MODE_INFO *mi, MACROBLOCKD *x ...@@ -62,7 +60,6 @@ static void vp8_read_mb_features(vp8_reader *r, MB_MODE_INFO *mi, MACROBLOCKD *x
else else
mi->segment_id = (unsigned char)(vp8_read(r, x->mb_segment_tree_probs[1])); mi->segment_id = (unsigned char)(vp8_read(r, x->mb_segment_tree_probs[1]));
} }
//printf("vp8_read_mb_features Segment = %d of frame %d\n", mi->segment_id, frame_count);
} }
static void vp8_kfread_modes(VP8D_COMP *pbi, MODE_INFO *m, int mb_row, int mb_col) static void vp8_kfread_modes(VP8D_COMP *pbi, MODE_INFO *m, int mb_row, int mb_col)
...@@ -80,7 +77,6 @@ static void vp8_kfread_modes(VP8D_COMP *pbi, MODE_INFO *m, int mb_row, int mb_co ...@@ -80,7 +77,6 @@ static void vp8_kfread_modes(VP8D_COMP *pbi, MODE_INFO *m, int mb_row, int mb_co
if (pbi->mb.update_mb_segmentation_map) if (pbi->mb.update_mb_segmentation_map)
vp8_read_mb_features(bc, &m->mbmi, &pbi->mb); vp8_read_mb_features(bc, &m->mbmi, &pbi->mb);
//printf("vp8_kfread_modes segment = %d\n", m->mbmi.segment_id);
/* Read the macroblock coeff skip flag if this feature is in use, else default to 0 */ /* Read the macroblock coeff skip flag if this feature is in use, else default to 0 */
if (pbi->common.mb_no_coeff_skip) if (pbi->common.mb_no_coeff_skip)
...@@ -316,14 +312,12 @@ static void read_mb_modes_mv(VP8D_COMP *pbi, MODE_INFO *mi, MB_MODE_INFO *mbmi, ...@@ -316,14 +312,12 @@ static void read_mb_modes_mv(VP8D_COMP *pbi, MODE_INFO *mi, MB_MODE_INFO *mbmi,
{ {
mbmi->segment_id = pbi->segmentation_map[index]; mbmi->segment_id = pbi->segmentation_map[index];
mbmi->segment_flag = 0; mbmi->segment_flag = 0;
//printf("vp8_read_mb_modes_mv Temporal Update if %d\n", mbmi->segment_id);
} }
else else
{ {
vp8_read_mb_features(bc, &mi->mbmi, &pbi->mb); vp8_read_mb_features(bc, &mi->mbmi, &pbi->mb);
mbmi->segment_flag = 1; mbmi->segment_flag = 1;
pbi->segmentation_map[index] = mbmi->segment_id; pbi->segmentation_map[index] = mbmi->segment_id;
//printf("vp8_read_mb_modes_mv Temporal Update else %d\n", mbmi->segment_id);
} }
} }
...@@ -331,7 +325,6 @@ static void read_mb_modes_mv(VP8D_COMP *pbi, MODE_INFO *mi, MB_MODE_INFO *mbmi, ...@@ -331,7 +325,6 @@ static void read_mb_modes_mv(VP8D_COMP *pbi, MODE_INFO *mi, MB_MODE_INFO *mbmi,
{ {
vp8_read_mb_features(bc, &mi->mbmi, &pbi->mb); vp8_read_mb_features(bc, &mi->mbmi, &pbi->mb);
pbi->segmentation_map[index] = mbmi->segment_id; pbi->segmentation_map[index] = mbmi->segment_id;
//printf("vp8_read_mb_modes_mv Not Temporal Update %d\n", mbmi->segment_id);
} }
index++; index++;
#else #else
......
...@@ -248,6 +248,7 @@ static void decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd, ...@@ -248,6 +248,7 @@ static void decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd,
skip_recon_mb(pbi, xd); skip_recon_mb(pbi, xd);
return; return;
} }
if (xd->segmentation_enabled) if (xd->segmentation_enabled)
mb_init_dequantizer(pbi, xd); mb_init_dequantizer(pbi, xd);
...@@ -306,6 +307,7 @@ static void decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd, ...@@ -306,6 +307,7 @@ static void decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd,
((int *)b->qcoeff)[0] = 0; ((int *)b->qcoeff)[0] = 0;
} }
} }
} }
else if (mode == SPLITMV) else if (mode == SPLITMV)
{ {
...@@ -366,8 +368,6 @@ static void decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd, ...@@ -366,8 +368,6 @@ static void decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd,
else else
#endif #endif
{
DEQUANT_INVOKE(&pbi->dequant, block)(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);
...@@ -391,7 +391,6 @@ static void decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd, ...@@ -391,7 +391,6 @@ static void decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd,
xd->predictor, xd->dst.y_buffer, xd->predictor, xd->dst.y_buffer,
xd->dst.y_stride, xd->eobs, xd->block[24].diff); xd->dst.y_stride, xd->eobs, xd->block[24].diff);
} }
}
#if CONFIG_T8X8 #if CONFIG_T8X8
if(xd->mode_info_context->mbmi.segment_id >= 2) if(xd->mode_info_context->mbmi.segment_id >= 2)
{ {
...@@ -403,15 +402,13 @@ static void decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd, ...@@ -403,15 +402,13 @@ static void decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd,
} }
else else
#endif #endif
{
DEQUANT_INVOKE (&pbi->dequant, idct_add_uv_block) DEQUANT_INVOKE (&pbi->dequant, idct_add_uv_block)
(xd->qcoeff+16*16, xd->block[16].dequant, (xd->qcoeff+16*16, xd->block[16].dequant,
xd->predictor+16*16, xd->dst.u_buffer, xd->dst.v_buffer, xd->predictor+16*16, xd->dst.u_buffer, xd->dst.v_buffer,
xd->dst.uv_stride, xd->eobs+16); xd->dst.uv_stride, xd->eobs+16);
}
} }
static int get_delta_q(vp8_reader *bc, int prev, int *q_update) static int get_delta_q(vp8_reader *bc, int prev, int *q_update)
...@@ -749,6 +746,7 @@ int vp8_decode_frame(VP8D_COMP *pbi) ...@@ -749,6 +746,7 @@ int vp8_decode_frame(VP8D_COMP *pbi)
const unsigned char *data = (const unsigned char *)pbi->Source; const unsigned char *data = (const unsigned char *)pbi->Source;
const unsigned char *data_end = data + pbi->source_sz; const unsigned char *data_end = data + pbi->source_sz;
ptrdiff_t first_partition_length_in_bytes; ptrdiff_t first_partition_length_in_bytes;
int mb_row; int mb_row;
int i, j, k, l; int i, j, k, l;
const int *const mb_feature_data_bits = vp8_mb_feature_data_bits; const int *const mb_feature_data_bits = vp8_mb_feature_data_bits;
......
...@@ -51,11 +51,11 @@ void vp8_dequant_idct_add_c(short *input, short *dq, unsigned char *pred, ...@@ -51,11 +51,11 @@ void vp8_dequant_idct_add_c(short *input, short *dq, unsigned char *pred,
for (i = 0; i < 16; i++) for (i = 0; i < 16; i++)
{ {
input[i] = dq[i] * input[i]; input[i] = dq[i] * input[i];
} }
/* the idct halves ( >> 1) the pitch */ /* the idct halves ( >> 1) the pitch */
vp8_short_idct4x4llm_c(input, output, 4 << 1); vp8_short_idct4x4llm_c(input, output, 4 << 1);
vpx_memset(input, 0, 32); vpx_memset(input, 0, 32);
for (r = 0; r < 4; r++) for (r = 0; r < 4; r++)
...@@ -88,7 +88,6 @@ void vp8_dequant_dc_idct_add_c(short *input, short *dq, unsigned char *pred, ...@@ -88,7 +88,6 @@ void vp8_dequant_dc_idct_add_c(short *input, short *dq, unsigned char *pred,
short *diff_ptr = output; short *diff_ptr = output;
int r, c; int r, c;
input[0] = (short)Dc; input[0] = (short)Dc;
for (i = 1; i < 16; i++) for (i = 1; i < 16; i++)
...@@ -98,7 +97,9 @@ void vp8_dequant_dc_idct_add_c(short *input, short *dq, unsigned char *pred, ...@@ -98,7 +97,9 @@ void vp8_dequant_dc_idct_add_c(short *input, short *dq, unsigned char *pred,
/* the idct halves ( >> 1) the pitch */ /* the idct halves ( >> 1) the pitch */
vp8_short_idct4x4llm_c(input, output, 4 << 1); vp8_short_idct4x4llm_c(input, output, 4 << 1);
vpx_memset(input, 0, 32); vpx_memset(input, 0, 32);
for (r = 0; r < 4; r++) for (r = 0; r < 4; r++)
{ {
for (c = 0; c < 4; c++) for (c = 0; c < 4; c++)
......
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
unsigned char *pre, unsigned char *dst_u, \ unsigned char *pre, unsigned char *dst_u, \
unsigned char *dst_v, int stride, char *eobs) unsigned char *dst_v, int stride, char *eobs)
#if 1//CONFIG_T8X8 #if CONFIG_T8X8
#define prototype_dequant_dc_idct_add_y_block_8x8(sym) \ #define prototype_dequant_dc_idct_add_y_block_8x8(sym) \
void sym(short *q, short *dq, \ void sym(short *q, short *dq, \
unsigned char *pre, unsigned char *dst, \ unsigned char *pre, unsigned char *dst, \
......
...@@ -59,7 +59,7 @@ typedef struct ...@@ -59,7 +59,7 @@ typedef struct
UINT8 Probs[14]; UINT8 Probs[14];
} TOKENEXTRABITS; } TOKENEXTRABITS;
*/ */
#if CONFIG_EXTEND_QRANGE
DECLARE_ALIGNED(16, static const TOKENEXTRABITS, vp8d_token_extra_bits2[MAX_ENTROPY_TOKENS]) = DECLARE_ALIGNED(16, static const TOKENEXTRABITS, vp8d_token_extra_bits2[MAX_ENTROPY_TOKENS]) =
{ {
{ 0, -1, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }, /* ZERO_TOKEN */ { 0, -1, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }, /* ZERO_TOKEN */
...@@ -75,6 +75,23 @@ DECLARE_ALIGNED(16, static const TOKENEXTRABITS, vp8d_token_extra_bits2[MAX_ENTR ...@@ -75,6 +75,23 @@ DECLARE_ALIGNED(16, static const TOKENEXTRABITS, vp8d_token_extra_bits2[MAX_ENTR
{ 67, 12, { 129, 130, 133, 140, 153, 177, 196, 230, 243, 249, 252, 254, 254, 0 } }, /* DCT_VAL_CATEGORY6 */ { 67, 12, { 129, 130, 133, 140, 153, 177, 196, 230, 243, 249, 252, 254, 254, 0 } }, /* DCT_VAL_CATEGORY6 */
{ 0, -1, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }, /* EOB TOKEN */ { 0, -1, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }, /* EOB TOKEN */
}; };
#else
DECLARE_ALIGNED(16, static const TOKENEXTRABITS, vp8d_token_extra_bits2[MAX_ENTROPY_TOKENS]) =
{
{ 0, -1, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }, /* ZERO_TOKEN */
{ 1, 0, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }, /* ONE_TOKEN */
{ 2, 0, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }, /* TWO_TOKEN */
{ 3, 0, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }, /* THREE_TOKEN */
{ 4, 0, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }, /* FOUR_TOKEN */
{ 5, 0, { 159, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }, /* DCT_VAL_CATEGORY1 */
{ 7, 1, { 145, 165, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }, /* DCT_VAL_CATEGORY2 */
{ 11, 2, { 140, 148, 173, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }, /* DCT_VAL_CATEGORY3 */
{ 19, 3, { 135, 140, 155, 176, 0, 0, 0, 0, 0, 0, 0, 0 } }, /* DCT_VAL_CATEGORY4 */
{ 35, 4, { 130, 134, 141, 157, 180, 0, 0, 0, 0, 0, 0, 0 } }, /* DCT_VAL_CATEGORY5 */
{ 67, 10, { 129, 130, 133, 140, 153, 177, 196, 230, 243, 254, 254, 0 } }, /* DCT_VAL_CATEGORY6 */
{ 0, -1, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }, /* EOB TOKEN */
};
#endif
void vp8_reset_mb_tokens_context(MACROBLOCKD *x) void vp8_reset_mb_tokens_context(MACROBLOCKD *x)
......
...@@ -30,13 +30,10 @@ void vp8_dequant_dc_idct_add_y_block_c ...@@ -30,13 +30,10 @@ void vp8_dequant_dc_idct_add_y_block_c
{ {
for (j = 0; j < 4; j++) for (j = 0; j < 4; j++)
{ {
if (*eobs++ <= 1) if (*eobs++ > 1)
{
vp8_dc_only_idct_add_c (dc[0], pre, dst, 16, stride);
}
else
vp8_dequant_dc_idct_add_c (q, dq, pre, dst, 16, stride, dc[0]); vp8_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);
q += 16; q += 16;
pre += 4; pre += 4;
...@@ -59,13 +56,14 @@ void vp8_dequant_idct_add_y_block_c ...@@ -59,13 +56,14 @@ void vp8_dequant_idct_add_y_block_c
{ {
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);
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;
} }
else
vp8_dequant_idct_add_c (q, dq, pre, dst, 16, stride);
q += 16; q += 16;
pre += 4; pre += 4;
dst += 4; dst += 4;
...@@ -86,13 +84,14 @@ void vp8_dequant_idct_add_uv_block_c ...@@ -86,13 +84,14 @@ void vp8_dequant_idct_add_uv_block_c
{ {
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);
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;
} }
else
vp8_dequant_idct_add_c (q, dq, pre, dstu, 8, stride);
q += 16; q += 16;
pre += 4; pre += 4;
dstu += 4; dstu += 4;
...@@ -106,14 +105,14 @@ void vp8_dequant_idct_add_uv_block_c ...@@ -106,14 +105,14 @@ void vp8_dequant_idct_add_uv_block_c
{ {
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);
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;
} }
else