From 357800e7cd5b6b71a2960c4f685e2c2bfff10212 Mon Sep 17 00:00:00 2001 From: Attila Nagy Date: Fri, 4 May 2012 13:32:43 +0300 Subject: [PATCH] Fix multi-resolution threaded encoding mb_row and mb_col was not passed to vp8cx_encode_inter_macroblock in threaded encoding. Change-Id: If4321cc59bf91e991aa31e772f882ed5f2bbb201 --- vp8/encoder/encodeframe.c | 12 +++++++----- vp8/encoder/ethreading.c | 13 +++++++------ 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/vp8/encoder/encodeframe.c b/vp8/encoder/encodeframe.c index 1f40197..5c607d9 100644 --- a/vp8/encoder/encodeframe.c +++ b/vp8/encoder/encodeframe.c @@ -48,8 +48,11 @@ extern void vp8cx_init_mbrthread_data(VP8_COMP *cpi, int count); void vp8_build_block_offsets(MACROBLOCK *x); void vp8_setup_block_ptrs(MACROBLOCK *x); -int vp8cx_encode_inter_macroblock(VP8_COMP *cpi, MACROBLOCK *x, TOKENEXTRA **t, int recon_yoffset, int recon_uvoffset, int mb_row, int mb_col); -int vp8cx_encode_intra_macro_block(VP8_COMP *cpi, MACROBLOCK *x, TOKENEXTRA **t, int mb_row, int mb_col); +int vp8cx_encode_inter_macroblock(VP8_COMP *cpi, MACROBLOCK *x, TOKENEXTRA **t, + int recon_yoffset, int recon_uvoffset, + int mb_row, int mb_col); +int vp8cx_encode_intra_macroblock(VP8_COMP *cpi, MACROBLOCK *x, + TOKENEXTRA **t); static void adjust_act_zbin( VP8_COMP *cpi, MACROBLOCK *x ); #ifdef MODE_STATS @@ -493,7 +496,7 @@ void encode_mb_row(VP8_COMP *cpi, if (cm->frame_type == KEY_FRAME) { - *totalrate += vp8cx_encode_intra_macro_block(cpi, x, tp, mb_row, mb_col); + *totalrate += vp8cx_encode_intra_macroblock(cpi, x, tp); #ifdef MODE_STATS y_modes[xd->mbmi.mode] ++; #endif @@ -1117,8 +1120,7 @@ static void adjust_act_zbin( VP8_COMP *cpi, MACROBLOCK *x ) #endif } -int vp8cx_encode_intra_macro_block(VP8_COMP *cpi, MACROBLOCK *x, TOKENEXTRA **t, - int mb_row, int mb_col) +int vp8cx_encode_intra_macroblock(VP8_COMP *cpi, MACROBLOCK *x, TOKENEXTRA **t) { MACROBLOCKD *xd = &x->e_mbd; int rate; diff --git a/vp8/encoder/ethreading.c b/vp8/encoder/ethreading.c index 555a699..8bfbcc6 100644 --- a/vp8/encoder/ethreading.c +++ b/vp8/encoder/ethreading.c @@ -18,10 +18,11 @@ #if CONFIG_MULTITHREAD extern int vp8cx_encode_inter_macroblock(VP8_COMP *cpi, MACROBLOCK *x, - TOKENEXTRA **t, int recon_yoffset, - int recon_uvoffset); -extern int vp8cx_encode_intra_macro_block(VP8_COMP *cpi, MACROBLOCK *x, - TOKENEXTRA **t); + TOKENEXTRA **t, + int recon_yoffset, int recon_uvoffset, + int mb_row, int mb_col); +extern int vp8cx_encode_intra_macroblock(VP8_COMP *cpi, MACROBLOCK *x, + TOKENEXTRA **t); extern void vp8cx_mb_init_quantizer(VP8_COMP *cpi, MACROBLOCK *x, int ok_to_skip); extern void vp8_build_block_offsets(MACROBLOCK *x); extern void vp8_setup_block_ptrs(MACROBLOCK *x); @@ -186,14 +187,14 @@ THREAD_FUNCTION thread_encoding_proc(void *p_data) if (cm->frame_type == KEY_FRAME) { - *totalrate += vp8cx_encode_intra_macro_block(cpi, x, &tp); + *totalrate += vp8cx_encode_intra_macroblock(cpi, x, &tp); #ifdef MODE_STATS y_modes[xd->mbmi.mode] ++; #endif } else { - *totalrate += vp8cx_encode_inter_macroblock(cpi, x, &tp, recon_yoffset, recon_uvoffset); + *totalrate += vp8cx_encode_inter_macroblock(cpi, x, &tp, recon_yoffset, recon_uvoffset, mb_row, mb_col); #ifdef MODE_STATS inter_y_modes[xd->mbmi.mode] ++; -- 2.7.4