Commit 0e0904d2 authored by Fiona Glaser's avatar Fiona Glaser
Browse files

Fix bug with PCM and adaptive quantization

In rare cases CABAC desync could occur, causing bitstream corruption
parent 1b7446bf
......@@ -1397,7 +1397,7 @@ void x264_macroblock_cache_save( x264_t *h )
h->mb.type[i_mb_xy] = i_mb_type;
if( h->mb.i_type != I_16x16 && h->mb.i_cbp_luma == 0 && h->mb.i_cbp_chroma == 0 )
if( h->mb.i_type == I_PCM || (h->mb.i_type != I_16x16 && h->mb.i_cbp_luma == 0 && h->mb.i_cbp_chroma == 0) )
h->mb.i_qp = h->mb.i_last_qp;
h->mb.qp[i_mb_xy] = i_mb_type != I_PCM ? h->mb.i_qp : 0;
......
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