diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-03-21 16:25:04 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-03-21 16:46:15 +0100 |
commit | d76559fb5f529db5f14d304936cadebce902b68c (patch) | |
tree | cc7c6a35be33afc181a7a03749fdab72b693cd0c /libavcodec/h264_cabac.c | |
parent | 668c65e7e73a21c86f43ffa1f79bf023fa44cbcd (diff) | |
parent | d4d9068cdf8f4b2b87ae87a2ef880d243f77b977 (diff) | |
download | ffmpeg-d76559fb5f529db5f14d304936cadebce902b68c.tar.gz |
Merge commit 'd4d9068cdf8f4b2b87ae87a2ef880d243f77b977'
* commit 'd4d9068cdf8f4b2b87ae87a2ef880d243f77b977':
h264: move mb_{x,y} into the per-slice context
Conflicts:
libavcodec/h264.c
libavcodec/h264_cavlc.c
libavcodec/h264_mb.c
libavcodec/h264_slice.c
libavcodec/svq3.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/h264_cabac.c')
-rw-r--r-- | libavcodec/h264_cabac.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/libavcodec/h264_cabac.c b/libavcodec/h264_cabac.c index c9318facec..85fcf7f2a8 100644 --- a/libavcodec/h264_cabac.c +++ b/libavcodec/h264_cabac.c @@ -1288,7 +1288,7 @@ static int decode_cabac_field_decoding_flag(H264Context *h, H264SliceContext *sl unsigned long ctx = 0; - ctx += h->mb_field_decoding_flag & !!h->mb_x; //for FMO:(s->current_picture.mb_type[mba_xy] >> 7) & (h->slice_table[mba_xy] == h->slice_num); + ctx += h->mb_field_decoding_flag & !!sl->mb_x; //for FMO:(s->current_picture.mb_type[mba_xy] >> 7) & (h->slice_table[mba_xy] == h->slice_num); ctx += (h->cur_pic.mb_type[mbb_xy] >> 7) & (h->slice_table[mbb_xy] == sl->slice_num); return get_cabac_noinline( &sl->cabac, &(sl->cabac_state+70)[ctx] ); @@ -1917,21 +1917,21 @@ int ff_h264_decode_mb_cabac(H264Context *h, H264SliceContext *sl) const int pixel_shift = h->pixel_shift; unsigned local_ref_count[2]; - mb_xy = sl->mb_xy = h->mb_x + h->mb_y*h->mb_stride; + mb_xy = sl->mb_xy = sl->mb_x + sl->mb_y*h->mb_stride; - tprintf(h->avctx, "pic:%d mb:%d/%d\n", h->frame_num, h->mb_x, h->mb_y); + tprintf(h->avctx, "pic:%d mb:%d/%d\n", h->frame_num, sl->mb_x, sl->mb_y); if (sl->slice_type_nos != AV_PICTURE_TYPE_I) { int skip; /* a skipped mb needs the aff flag from the following mb */ - if (FRAME_MBAFF(h) && (h->mb_y & 1) == 1 && sl->prev_mb_skipped) + if (FRAME_MBAFF(h) && (sl->mb_y & 1) == 1 && sl->prev_mb_skipped) skip = sl->next_mb_skipped; else - skip = decode_cabac_mb_skip(h, sl, h->mb_x, h->mb_y ); + skip = decode_cabac_mb_skip(h, sl, sl->mb_x, sl->mb_y ); /* read skip flags */ if( skip ) { - if (FRAME_MBAFF(h) && (h->mb_y & 1) == 0) { + if (FRAME_MBAFF(h) && (sl->mb_y & 1) == 0) { h->cur_pic.mb_type[mb_xy] = MB_TYPE_SKIP; - sl->next_mb_skipped = decode_cabac_mb_skip(h, sl, h->mb_x, h->mb_y+1 ); + sl->next_mb_skipped = decode_cabac_mb_skip(h, sl, sl->mb_x, sl->mb_y+1 ); if(!sl->next_mb_skipped) h->mb_mbaff = h->mb_field_decoding_flag = decode_cabac_field_decoding_flag(h, sl); } @@ -1947,7 +1947,7 @@ int ff_h264_decode_mb_cabac(H264Context *h, H264SliceContext *sl) } } if (FRAME_MBAFF(h)) { - if( (h->mb_y&1) == 0 ) + if ((sl->mb_y & 1) == 0) h->mb_mbaff = h->mb_field_decoding_flag = decode_cabac_field_decoding_flag(h, sl); } @@ -2377,7 +2377,7 @@ decode_intra_mb: ctx= 3; val++; if(val > 2*max_qp){ //prevent infinite loop - av_log(h->avctx, AV_LOG_ERROR, "cabac decode of qscale diff failed at %d %d\n", h->mb_x, h->mb_y); + av_log(h->avctx, AV_LOG_ERROR, "cabac decode of qscale diff failed at %d %d\n", sl->mb_x, sl->mb_y); return -1; } } |