Mercurial > libavcodec.hg
comparison h264.c @ 7346:def19f6f7ce9 libavcodec
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
author | michael |
---|---|
date | Tue, 22 Jul 2008 12:31:48 +0000 |
parents | a36996f67748 |
children | 612a78c3b128 |
comparison
equal
deleted
inserted
replaced
7345:a36996f67748 | 7346:def19f6f7ce9 |
---|---|
2710 filter_mb(h, mb_x, mb_y+1, dest_y, dest_cb, dest_cr, linesize, uvlinesize); | 2710 filter_mb(h, mb_x, mb_y+1, dest_y, dest_cb, dest_cr, linesize, uvlinesize); |
2711 } else { | 2711 } else { |
2712 tprintf(h->s.avctx, "call filter_mb\n"); | 2712 tprintf(h->s.avctx, "call filter_mb\n"); |
2713 backup_mb_border(h, dest_y, dest_cb, dest_cr, linesize, uvlinesize, simple); | 2713 backup_mb_border(h, dest_y, dest_cb, dest_cr, linesize, uvlinesize, simple); |
2714 fill_caches(h, mb_type, 1); //FIXME don't fill stuff which isn't used by filter_mb | 2714 fill_caches(h, mb_type, 1); //FIXME don't fill stuff which isn't used by filter_mb |
2715 h->chroma_qp[0] = get_chroma_qp(h, 0, s->current_picture.qscale_table[mb_xy]); | |
2716 h->chroma_qp[1] = get_chroma_qp(h, 1, s->current_picture.qscale_table[mb_xy]); | |
2715 filter_mb_fast(h, mb_x, mb_y, dest_y, dest_cb, dest_cr, linesize, uvlinesize); | 2717 filter_mb_fast(h, mb_x, mb_y, dest_y, dest_cb, dest_cr, linesize, uvlinesize); |
2716 } | 2718 } |
2717 } | 2719 } |
2718 } | 2720 } |
2719 | 2721 |
4609 } | 4611 } |
4610 } | 4612 } |
4611 | 4613 |
4612 // In deblocking, the quantizer is 0 | 4614 // In deblocking, the quantizer is 0 |
4613 s->current_picture.qscale_table[mb_xy]= 0; | 4615 s->current_picture.qscale_table[mb_xy]= 0; |
4614 h->chroma_qp[0] = get_chroma_qp(h, 0, 0); | |
4615 h->chroma_qp[1] = get_chroma_qp(h, 1, 0); | |
4616 // All coeffs are present | 4616 // All coeffs are present |
4617 memset(h->non_zero_count[mb_xy], 16, 16); | 4617 memset(h->non_zero_count[mb_xy], 16, 16); |
4618 | 4618 |
4619 s->current_picture.mb_type[mb_xy]= mb_type; | 4619 s->current_picture.mb_type[mb_xy]= mb_type; |
4620 return 0; | 4620 return 0; |
5754 // All blocks are present | 5754 // All blocks are present |
5755 h->cbp_table[mb_xy] = 0x1ef; | 5755 h->cbp_table[mb_xy] = 0x1ef; |
5756 h->chroma_pred_mode_table[mb_xy] = 0; | 5756 h->chroma_pred_mode_table[mb_xy] = 0; |
5757 // In deblocking, the quantizer is 0 | 5757 // In deblocking, the quantizer is 0 |
5758 s->current_picture.qscale_table[mb_xy]= 0; | 5758 s->current_picture.qscale_table[mb_xy]= 0; |
5759 h->chroma_qp[0] = get_chroma_qp(h, 0, 0); | |
5760 h->chroma_qp[1] = get_chroma_qp(h, 1, 0); | |
5761 // All coeffs are present | 5759 // All coeffs are present |
5762 memset(h->non_zero_count[mb_xy], 16, 16); | 5760 memset(h->non_zero_count[mb_xy], 16, 16); |
5763 s->current_picture.mb_type[mb_xy]= mb_type; | 5761 s->current_picture.mb_type[mb_xy]= mb_type; |
5764 h->last_qscale_diff = 0; | 5762 h->last_qscale_diff = 0; |
5765 return 0; | 5763 return 0; |