From 95eb35f30513e335990ad0d5dca6ddc318477291 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Sat, 17 Jan 2015 22:28:46 +0100 Subject: h264: move the ref lists variables into the per-slice context --- libavcodec/h264_cavlc.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'libavcodec/h264_cavlc.c') diff --git a/libavcodec/h264_cavlc.c b/libavcodec/h264_cavlc.c index 98a20e16c1..63faabf2dd 100644 --- a/libavcodec/h264_cavlc.c +++ b/libavcodec/h264_cavlc.c @@ -864,8 +864,8 @@ decode_intra_mb: } } - for(list=0; listlist_count; list++){ - int ref_count = IS_REF0(mb_type) ? 1 : h->ref_count[list] << MB_MBAFF(h); + for (list = 0; list < sl->list_count; list++) { + int ref_count = IS_REF0(mb_type) ? 1 : sl->ref_count[list] << MB_MBAFF(h); 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)){ @@ -892,7 +892,7 @@ decode_intra_mb: if(dct8x8_allowed) dct8x8_allowed = get_dct8x8_allowed(h, sl); - for(list=0; listlist_count; list++){ + for (list = 0; list < sl->list_count; list++) { for(i=0; i<4; i++){ if(IS_DIRECT(sl->sub_mb_type[i])) { sl->ref_cache[list][ scan8[4*i] ] = sl->ref_cache[list][ scan8[4*i]+1 ]; @@ -942,10 +942,10 @@ decode_intra_mb: int list, mx, my, i; //FIXME we should set ref_idx_l? to 0 if we use that later ... if(IS_16X16(mb_type)){ - for(list=0; listlist_count; list++){ + for (list = 0; list < sl->list_count; list++) { unsigned int val; if(IS_DIR(mb_type, 0, list)){ - int rc = h->ref_count[list] << MB_MBAFF(h); + int rc = sl->ref_count[list] << MB_MBAFF(h); if (rc == 1) { val= 0; } else if (rc == 2) { @@ -960,7 +960,7 @@ decode_intra_mb: fill_rectangle(&sl->ref_cache[list][ scan8[0] ], 4, 4, 8, val, 1); } } - for(list=0; listlist_count; list++){ + for (list = 0; list < sl->list_count; list++) { if(IS_DIR(mb_type, 0, list)){ pred_motion(h, sl, 0, 4, list, sl->ref_cache[list][ scan8[0] ], &mx, &my); mx += get_se_golomb(&h->gb); @@ -972,11 +972,11 @@ decode_intra_mb: } } else if(IS_16X8(mb_type)){ - for(list=0; listlist_count; list++){ + for (list = 0; list < sl->list_count; list++) { for(i=0; i<2; i++){ unsigned int val; if(IS_DIR(mb_type, i, list)){ - int rc = h->ref_count[list] << MB_MBAFF(h); + int rc = sl->ref_count[list] << MB_MBAFF(h); if (rc == 1) { val= 0; } else if (rc == 2) { @@ -993,7 +993,7 @@ decode_intra_mb: fill_rectangle(&sl->ref_cache[list][ scan8[0] + 16*i ], 4, 2, 8, val, 1); } } - for(list=0; listlist_count; list++){ + for (list = 0; list < sl->list_count; list++) { for(i=0; i<2; i++){ unsigned int val; if(IS_DIR(mb_type, i, list)){ @@ -1010,11 +1010,11 @@ decode_intra_mb: } }else{ assert(IS_8X16(mb_type)); - for(list=0; listlist_count; list++){ + for (list = 0; list < sl->list_count; list++) { for(i=0; i<2; i++){ unsigned int val; if(IS_DIR(mb_type, i, list)){ //FIXME optimize - int rc = h->ref_count[list] << MB_MBAFF(h); + int rc = sl->ref_count[list] << MB_MBAFF(h); if (rc == 1) { val= 0; } else if (rc == 2) { @@ -1031,7 +1031,7 @@ decode_intra_mb: fill_rectangle(&sl->ref_cache[list][ scan8[0] + 2*i ], 2, 4, 8, val, 1); } } - for(list=0; listlist_count; list++){ + for (list = 0; list < sl->list_count; list++) { for(i=0; i<2; i++){ unsigned int val; if(IS_DIR(mb_type, i, list)){ -- cgit v1.2.3