Merge "Fix data type for eobs[] array in SB 4x4 IDCT code." into experimental

This commit is contained in:
Ronald S. Bultje 2012-11-12 07:40:54 -08:00 коммит произвёл Gerrit Code Review
Родитель 11fec1863d dd9d4f9e1a
Коммит 3a08b033b0
3 изменённых файлов: 18 добавлений и 17 удалений

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

@ -76,7 +76,8 @@ void vp9_dequant_dc_idct_add_y_block_8x8_inplace_c(short *q, short *dq,
void vp9_dequant_dc_idct_add_y_block_4x4_inplace_c(short *q, short *dq,
unsigned char *dst,
int stride, char *eobs,
int stride,
unsigned short *eobs,
short *dc, MACROBLOCKD *xd);
void vp9_dequant_idct_add_uv_block_8x8_inplace_c(short *q, short *dq,
@ -89,7 +90,8 @@ void vp9_dequant_idct_add_uv_block_8x8_inplace_c(short *q, short *dq,
void vp9_dequant_idct_add_uv_block_4x4_inplace_c(short *q, short *dq,
unsigned char *dstu,
unsigned char *dstv,
int stride, char *eobs,
int stride,
unsigned short *eobs,
MACROBLOCKD *xd);
#endif

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

@ -39,7 +39,8 @@ void vp9_dequant_dc_idct_add_y_block_c(short *q, short *dq,
#if CONFIG_SUPERBLOCKS
void vp9_dequant_dc_idct_add_y_block_4x4_inplace_c(short *q, short *dq,
unsigned char *dst,
int stride, char *eobs,
int stride,
unsigned short *eobs,
short *dc, MACROBLOCKD *xd) {
int i, j;
@ -131,7 +132,8 @@ void vp9_dequant_idct_add_uv_block_c(short *q, short *dq, unsigned char *pre,
void vp9_dequant_idct_add_uv_block_4x4_inplace_c(short *q, short *dq,
unsigned char *dstu,
unsigned char *dstv,
int stride, char *eobs,
int stride,
unsigned short *eobs,
MACROBLOCKD *xd) {
int i, j;

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

@ -2318,6 +2318,13 @@ static void encode_inter_superblock(VP9_COMP *cpi, MACROBLOCK *x,
for (n = 0; n < 4; n++) {
int x_idx = n & 1, y_idx = n >> 1;
xd->left_context = cm->left_context + y_idx;
xd->above_context = cm->above_context + mb_col + x_idx;
memcpy(&ta[n], xd->above_context, sizeof(ta[n]));
memcpy(&tl[n], xd->left_context, sizeof(tl[n]));
tp[n] = *t;
xd->mode_info_context = mi + x_idx + y_idx * cm->mode_info_stride;
vp9_subtract_mby_s_c(x->src_diff,
src + x_idx * 16 + y_idx * 16 * src_y_stride,
src_y_stride,
@ -2339,12 +2346,6 @@ static void encode_inter_superblock(VP9_COMP *cpi, MACROBLOCK *x,
if (!x->skip) {
if (output_enabled) {
xd->left_context = cm->left_context + (n >> 1);
xd->above_context = cm->above_context + mb_col + (n & 1);
memcpy(&ta[n], xd->above_context, sizeof(ta[n]));
memcpy(&tl[n], xd->left_context, sizeof(tl[n]));
tp[n] = *t;
xd->mode_info_context = mi + x_idx + y_idx * cm->mode_info_stride;
vp9_tokenize_mb(cpi, &x->e_mbd, t, 0);
skip[n] = xd->mode_info_context->mbmi.mb_skip_coeff;
}
@ -2354,18 +2355,14 @@ static void encode_inter_superblock(VP9_COMP *cpi, MACROBLOCK *x,
(x->e_mbd.mode_info_context - 1)->mbmi.mb_skip_coeff +
(x->e_mbd.mode_info_context - cpi->common.mode_info_stride)->mbmi.mb_skip_coeff :
0;
xd->mode_info_context->mbmi.mb_skip_coeff = skip[n] = 1;
if (cpi->common.mb_no_coeff_skip) {
skip[n] = xd->mode_info_context->mbmi.mb_skip_coeff = 1;
xd->left_context = cm->left_context + (n >> 1);
xd->above_context = cm->above_context + mb_col + (n & 1);
memcpy(&ta[n], xd->above_context, sizeof(ta[n]));
memcpy(&tl[n], xd->left_context, sizeof(tl[n]));
tp[n] = *t;
// TODO(rbultje) this should be done per-sb instead of per-mb?
cpi->skip_true_count[mb_skip_context]++;
vp9_fix_contexts(xd);
} else {
vp9_stuff_mb(cpi, xd, t, 0);
xd->mode_info_context->mbmi.mb_skip_coeff = 0;
// TODO(rbultje) this should be done per-sb instead of per-mb?
cpi->skip_false_count[mb_skip_context]++;
}
}