diff options
author | Anton Khirnov <anton@khirnov.net> | 2015-01-17 22:28:46 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2015-03-21 11:27:13 +0100 |
commit | 95eb35f30513e335990ad0d5dca6ddc318477291 (patch) | |
tree | 468c7a537fd11445da96dcaddac3736ab5ef28c9 /libavcodec/h264_cabac.c | |
parent | 7747726667c86877feed30c9e18460cb8e63f551 (diff) | |
download | ffmpeg-95eb35f30513e335990ad0d5dca6ddc318477291.tar.gz |
h264: move the ref lists variables into the per-slice context
Diffstat (limited to 'libavcodec/h264_cabac.c')
-rw-r--r-- | libavcodec/h264_cabac.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/libavcodec/h264_cabac.c b/libavcodec/h264_cabac.c index 711b3de0dc..1c236095c0 100644 --- a/libavcodec/h264_cabac.c +++ b/libavcodec/h264_cabac.c @@ -2112,11 +2112,11 @@ decode_intra_mb: } } - for( list = 0; list < h->list_count; list++ ) { + for( list = 0; list < sl->list_count; list++ ) { for( i = 0; i < 4; i++ ) { if(IS_DIRECT(sl->sub_mb_type[i])) continue; if(IS_DIR(sl->sub_mb_type[i], 0, list)){ - int rc = h->ref_count[list] << MB_MBAFF(h); + int rc = sl->ref_count[list] << MB_MBAFF(h); if (rc > 1) { ref[list][i] = decode_cabac_mb_ref(h, sl, list, 4 * i); if (ref[list][i] >= (unsigned) rc) { @@ -2136,7 +2136,7 @@ decode_intra_mb: if(dct8x8_allowed) dct8x8_allowed = get_dct8x8_allowed(h, sl); - for(list=0; list<h->list_count; list++){ + for (list = 0; list < sl->list_count; list++) { for(i=0; i<4; i++){ sl->ref_cache[list][scan8[4 * i]] = sl->ref_cache[list][scan8[4 * i] + 1]; if(IS_DIRECT(sl->sub_mb_type[i])){ @@ -2200,9 +2200,9 @@ decode_intra_mb: } else { int list, i; if(IS_16X16(mb_type)){ - for(list=0; list<h->list_count; list++){ + for (list = 0; list < sl->list_count; list++) { if(IS_DIR(mb_type, 0, list)){ - int ref, rc = h->ref_count[list] << MB_MBAFF(h); + int ref, rc = sl->ref_count[list] << MB_MBAFF(h); if (rc > 1) { ref= decode_cabac_mb_ref(h, sl, list, 0); if (ref >= (unsigned) rc) { @@ -2214,7 +2214,7 @@ decode_intra_mb: fill_rectangle(&sl->ref_cache[list][ scan8[0] ], 4, 4, 8, ref, 1); } } - for(list=0; list<h->list_count; list++){ + for (list = 0; list < sl->list_count; list++) { if(IS_DIR(mb_type, 0, list)){ int mx,my,mpx,mpy; pred_motion(h, sl, 0, 4, list, sl->ref_cache[list][ scan8[0] ], &mx, &my); @@ -2227,10 +2227,10 @@ decode_intra_mb: } } else if(IS_16X8(mb_type)){ - for(list=0; list<h->list_count; list++){ + for (list = 0; list < sl->list_count; list++) { for(i=0; i<2; i++){ if(IS_DIR(mb_type, i, list)){ - int ref, rc = h->ref_count[list] << MB_MBAFF(h); + int ref, rc = sl->ref_count[list] << MB_MBAFF(h); if (rc > 1) { ref= decode_cabac_mb_ref(h, sl, list, 8 * i); if (ref >= (unsigned) rc) { @@ -2244,7 +2244,7 @@ decode_intra_mb: fill_rectangle(&sl->ref_cache[list][ scan8[0] + 16*i ], 4, 2, 8, (LIST_NOT_USED&0xFF), 1); } } - for(list=0; list<h->list_count; list++){ + for (list = 0; list < sl->list_count; list++) { for(i=0; i<2; i++){ if(IS_DIR(mb_type, i, list)){ int mx,my,mpx,mpy; @@ -2262,10 +2262,10 @@ decode_intra_mb: } }else{ assert(IS_8X16(mb_type)); - for(list=0; list<h->list_count; list++){ + for (list = 0; list < sl->list_count; list++) { for(i=0; i<2; i++){ if(IS_DIR(mb_type, i, list)){ //FIXME optimize - int ref, rc = h->ref_count[list] << MB_MBAFF(h); + int ref, rc = sl->ref_count[list] << MB_MBAFF(h); if (rc > 1) { ref= decode_cabac_mb_ref(h, sl, list, 4 * i); if (ref >= (unsigned) rc) { @@ -2279,7 +2279,7 @@ decode_intra_mb: fill_rectangle(&sl->ref_cache[list][ scan8[0] + 2*i ], 2, 4, 8, (LIST_NOT_USED&0xFF), 1); } } - for(list=0; list<h->list_count; list++){ + for (list = 0; list < sl->list_count; list++) { for(i=0; i<2; i++){ if(IS_DIR(mb_type, i, list)){ int mx,my,mpx,mpy; |