# HG changeset patch # User michael # Date 1216729908 0 # Node ID def19f6f7ce9e48ca767f9ce66db68274d4f53a5 # Parent a36996f6774820e63ffbf66e1ee6597065e73123 Setting chroma_qp to 0 for PCM blocks is really an interesting minor optimization, more interresting would it have been had the author thought about what value chroma_qp would have for the following MB. Or failing that, had actually tested the code. So this reverts this non-functional optimization, and makes the code work. Fixes at least CAPM3_Sony_D.jsv diff -r a36996f67748 -r def19f6f7ce9 h264.c --- a/h264.c Tue Jul 22 11:56:56 2008 +0000 +++ b/h264.c Tue Jul 22 12:31:48 2008 +0000 @@ -2712,6 +2712,8 @@ tprintf(h->s.avctx, "call filter_mb\n"); backup_mb_border(h, dest_y, dest_cb, dest_cr, linesize, uvlinesize, simple); fill_caches(h, mb_type, 1); //FIXME don't fill stuff which isn't used by filter_mb + h->chroma_qp[0] = get_chroma_qp(h, 0, s->current_picture.qscale_table[mb_xy]); + h->chroma_qp[1] = get_chroma_qp(h, 1, s->current_picture.qscale_table[mb_xy]); filter_mb_fast(h, mb_x, mb_y, dest_y, dest_cb, dest_cr, linesize, uvlinesize); } } @@ -4611,8 +4613,6 @@ // In deblocking, the quantizer is 0 s->current_picture.qscale_table[mb_xy]= 0; - h->chroma_qp[0] = get_chroma_qp(h, 0, 0); - h->chroma_qp[1] = get_chroma_qp(h, 1, 0); // All coeffs are present memset(h->non_zero_count[mb_xy], 16, 16); @@ -5756,8 +5756,6 @@ h->chroma_pred_mode_table[mb_xy] = 0; // In deblocking, the quantizer is 0 s->current_picture.qscale_table[mb_xy]= 0; - h->chroma_qp[0] = get_chroma_qp(h, 0, 0); - h->chroma_qp[1] = get_chroma_qp(h, 1, 0); // All coeffs are present memset(h->non_zero_count[mb_xy], 16, 16); s->current_picture.mb_type[mb_xy]= mb_type;