Commit 5fa64bde authored by Deb Mukherjee's avatar Deb Mukherjee

Bugfix from reordering frame probs patch

This fixes an intermittent mismatch issue cause by moving
the lossless mode decoding bit to after the loop filter
setup information. We need to ensure that the lossless bit
is decoded prior to loop filter setup.

Change-Id: I3faa3fff8e1013b7405dac91268350e059ed121e
parent 6ce718eb
......@@ -1613,6 +1613,8 @@ int vp9_decode_frame(VP9D_COMP *pbi, const uint8_t **p_data_end) {
pc->clamp_type = (CLAMP_TYPE)vp9_read_bit(&header_bc);
pc->error_resilient_mode = vp9_read_bit(&header_bc);
xd->lossless = vp9_read_bit(&header_bc);
setup_loopfilter(pc, xd, &header_bc);
// Dummy read for now
......@@ -1681,7 +1683,6 @@ int vp9_decode_frame(VP9D_COMP *pbi, const uint8_t **p_data_end) {
setup_pred_probs(pc, &header_bc);
xd->lossless = vp9_read_bit(&header_bc);
pc->txfm_mode = xd->lossless ? ONLY_4X4 : read_txfm_mode(&header_bc);
if (pc->txfm_mode == TX_MODE_SELECT) {
pc->prob_tx[0] = vp9_read_prob(&header_bc);
......
......@@ -2614,6 +2614,9 @@ void vp9_pack_bitstream(VP9_COMP *cpi, unsigned char *dest,
// error resilient mode
vp9_write_bit(&header_bc, pc->error_resilient_mode);
// lossless mode: note this needs to be before loopfilter
vp9_write_bit(&header_bc, cpi->mb.e_mbd.lossless);
// Encode the loop filter level and type
vp9_write_bit(&header_bc, pc->filter_type);
vp9_write_literal(&header_bc, pc->filter_level, 6);
......@@ -2883,7 +2886,6 @@ void vp9_pack_bitstream(VP9_COMP *cpi, unsigned char *dest,
}
}
vp9_write_bit(&header_bc, cpi->mb.e_mbd.lossless);
if (cpi->mb.e_mbd.lossless) {
pc->txfm_mode = ONLY_4X4;
} else {
......
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