Commit a554bd8d authored by hui su's avatar hui su

Avoid a potential assertion fail in optimize_b()

The eob of a block is not perperly set when skip_recode is true,
thus triggering assert(eob <= default_eob) to fail.

Change-Id: Ifecbe33dce2dc4903e0a80bd384dc09bf0dd8a44
parent ef1fb6de
......@@ -913,7 +913,7 @@ void vp9_encode_block_intra(int plane, int block, BLOCK_SIZE plane_bsize,
pd->dequant, eob, scan_order->scan,
scan_order->iscan);
}
if (args->ctx != NULL) {
if (args->ctx != NULL && !x->skip_recode) {
*a = *l = optimize_b(x, plane, block, tx_size, entropy_ctx) > 0;
}
if (!x->skip_encode && *eob)
......@@ -929,7 +929,7 @@ void vp9_encode_block_intra(int plane, int block, BLOCK_SIZE plane_bsize,
pd->dequant, eob, scan_order->scan,
scan_order->iscan);
}
if (args->ctx != NULL) {
if (args->ctx != NULL && !x->skip_recode) {
*a = *l = optimize_b(x, plane, block, tx_size, entropy_ctx) > 0;
}
if (!x->skip_encode && *eob)
......@@ -945,7 +945,7 @@ void vp9_encode_block_intra(int plane, int block, BLOCK_SIZE plane_bsize,
pd->dequant, eob, scan_order->scan,
scan_order->iscan);
}
if (args->ctx != NULL) {
if (args->ctx != NULL && !x->skip_recode) {
*a = *l = optimize_b(x, plane, block, tx_size, entropy_ctx) > 0;
}
if (!x->skip_encode && *eob)
......@@ -964,7 +964,7 @@ void vp9_encode_block_intra(int plane, int block, BLOCK_SIZE plane_bsize,
pd->dequant, eob, scan_order->scan,
scan_order->iscan);
}
if (args->ctx != NULL) {
if (args->ctx != NULL && !x->skip_recode) {
*a = *l = optimize_b(x, plane, block, tx_size, entropy_ctx) > 0;
}
if (!x->skip_encode && *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