Commit 9ded6e37 authored by Yaowu Xu's avatar Yaowu Xu
Browse files

fixed an issue related to 2nd order size due to merge artifacts.

For 8x8 transformed macroblock, the 2nd order transform is a 2x2 haar
transform, here there is only 4 coefficients total. A previous merge
changed these to 64, causing crashes when encoding with 8x8 transform
enabled. (i.e. when input video image size > 640x360 ) This commit
reverts them back to 4 and fixes the crashes.

Change-Id: I3290b81f8c0d32c7efec03093a61ea57736c0550
parent 2615ca5d
...@@ -346,14 +346,14 @@ BLOCK_LOOP_8x8: ...@@ -346,14 +346,14 @@ BLOCK_LOOP_8x8:
seg_eob = get_segdata( x, segment_id, SEG_LVL_EOB ); seg_eob = get_segdata( x, segment_id, SEG_LVL_EOB );
} }
else else
seg_eob = 64; seg_eob = 4;
} }
else else
{ {
VP8_COMBINEENTROPYCONTEXTS_8x8(v, *a, *l, *a1, *l1); VP8_COMBINEENTROPYCONTEXTS_8x8(v, *a, *l, *a1, *l1);
if ( segfeature_active( x, segment_id, SEG_LVL_EOB ) ) if ( segfeature_active( x, segment_id, SEG_LVL_EOB ) )
{ {
seg_eob = get_segdata( x, segment_id, SEG_LVL_EOB ); seg_eob = get_segdata( x, segment_id, SE_LVL_EOB );
} }
else else
seg_eob = 64; seg_eob = 64;
...@@ -363,7 +363,6 @@ BLOCK_LOOP_8x8: ...@@ -363,7 +363,6 @@ BLOCK_LOOP_8x8:
Prob += v * ENTROPY_NODES; Prob += v * ENTROPY_NODES;
DO_WHILE_8x8: DO_WHILE_8x8:
//#if CONFIG_SEGFEATURES
if ( c == seg_eob ) if ( c == seg_eob )
goto BLOCK_FINISHED_8x8; goto BLOCK_FINISHED_8x8;
......
...@@ -1222,7 +1222,7 @@ void vp8cx_mb_init_quantizer(VP8_COMP *cpi, MACROBLOCK *x) ...@@ -1222,7 +1222,7 @@ void vp8cx_mb_init_quantizer(VP8_COMP *cpi, MACROBLOCK *x)
{ {
x->block[24].eob_max_offset = 16; x->block[24].eob_max_offset = 16;
#if CONFIG_T8X8 #if CONFIG_T8X8
x->block[24].eob_max_offset_8x8 = 64; x->block[24].eob_max_offset_8x8 = 4;
#endif #endif
} }
......
...@@ -124,7 +124,7 @@ static void tokenize2nd_order_b_8x8 ...@@ -124,7 +124,7 @@ static void tokenize2nd_order_b_8x8
int x; int x;
const short *qcoeff_ptr = b->qcoeff; const short *qcoeff_ptr = b->qcoeff;
int seg_eob = 64; int seg_eob = 4;
int segment_id = xd->mode_info_context->mbmi.segment_id; int segment_id = xd->mode_info_context->mbmi.segment_id;
if ( segfeature_active( xd, segment_id, SEG_LVL_EOB ) ) if ( segfeature_active( xd, segment_id, SEG_LVL_EOB ) )
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment