summaryrefslogtreecommitdiff
path: root/libavcodec/h264.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2008-07-22 12:31:48 +0000
committerMichael Niedermayer <michaelni@gmx.at>2008-07-22 12:31:48 +0000
commita82688b0031c2bc76636ef4b7fba8326453f7d53 (patch)
tree814b83ba9b27f797860c73ae34fff8070a628b01 /libavcodec/h264.c
parent3a756169401ba57e78a57ec10e1a5b9b688a8e79 (diff)
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 Originally committed as revision 14335 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r--libavcodec/h264.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 1d5d378cf1..ee29f1b81f 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -2712,6 +2712,8 @@ static av_always_inline void hl_decode_mb_internal(H264Context *h, int simple){
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 @@ decode_intra_mb:
// 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 @@ decode_intra_mb:
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;