Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-03-21 17:58:01 +0300
committerMichael Niedermayer <michaelni@gmx.at>2015-03-21 17:58:05 +0300
commit6a2e1ff02a784ea69fb1a6f71d3357d705506506 (patch)
treea4f03cfc00291522a295c400b5c5e1b443dc8cd4 /libavcodec/h264_cabac.c
parentc9841c05be67908e0980dafe0f7585ba47cbfe28 (diff)
parent6479c79f5517e2881bc881e737b2dbce69553878 (diff)
Merge commit '6479c79f5517e2881bc881e737b2dbce69553878'
* commit '6479c79f5517e2881bc881e737b2dbce69553878': h264: move mvd_cache into the per-slice context Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/h264_cabac.c')
-rw-r--r--libavcodec/h264_cabac.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/libavcodec/h264_cabac.c b/libavcodec/h264_cabac.c
index 1013e55285..8422f946d5 100644
--- a/libavcodec/h264_cabac.c
+++ b/libavcodec/h264_cabac.c
@@ -1535,10 +1535,10 @@ static int decode_cabac_mb_mvd(H264Context *h, H264SliceContext *sl, int ctxbase
#define DECODE_CABAC_MB_MVD( h, list, n )\
{\
- int amvd0 = h->mvd_cache[list][scan8[n] - 1][0] +\
- h->mvd_cache[list][scan8[n] - 8][0];\
- int amvd1 = h->mvd_cache[list][scan8[n] - 1][1] +\
- h->mvd_cache[list][scan8[n] - 8][1];\
+ int amvd0 = sl->mvd_cache[list][scan8[n] - 1][0] +\
+ sl->mvd_cache[list][scan8[n] - 8][0];\
+ int amvd1 = sl->mvd_cache[list][scan8[n] - 1][1] +\
+ sl->mvd_cache[list][scan8[n] - 8][1];\
\
mx += decode_cabac_mb_mvd(h, sl, 40, amvd0, &mpx);\
my += decode_cabac_mb_mvd(h, sl, 47, amvd1, &mpy);\
@@ -2151,7 +2151,7 @@ decode_intra_mb:
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])){
- fill_rectangle(h->mvd_cache[list][scan8[4*i]], 2, 2, 8, 0, 2);
+ fill_rectangle(sl->mvd_cache[list][scan8[4*i]], 2, 2, 8, 0, 2);
continue;
}
@@ -2163,7 +2163,7 @@ decode_intra_mb:
int mx, my;
const int index= 4*i + block_width*j;
int16_t (* mv_cache)[2] = &sl->mv_cache[list][ scan8[index] ];
- uint8_t (* mvd_cache)[2]= &h->mvd_cache[list][ scan8[index] ];
+ uint8_t (* mvd_cache)[2]= &sl->mvd_cache[list][ scan8[index] ];
pred_motion(h, sl, index, block_width, list, sl->ref_cache[list][ scan8[index] ], &mx, &my);
DECODE_CABAC_MB_MVD( h, list, index)
tprintf(h->avctx, "final mv:%d %d\n", mx, my);
@@ -2199,14 +2199,14 @@ decode_intra_mb:
}
}else{
fill_rectangle(sl->mv_cache [list][ scan8[4*i] ], 2, 2, 8, 0, 4);
- fill_rectangle(h->mvd_cache[list][ scan8[4*i] ], 2, 2, 8, 0, 2);
+ fill_rectangle(sl->mvd_cache[list][ scan8[4*i] ], 2, 2, 8, 0, 2);
}
}
}
} else if( IS_DIRECT(mb_type) ) {
ff_h264_pred_direct_motion(h, sl, &mb_type);
- fill_rectangle(h->mvd_cache[0][scan8[0]], 4, 4, 8, 0, 2);
- fill_rectangle(h->mvd_cache[1][scan8[0]], 4, 4, 8, 0, 2);
+ fill_rectangle(sl->mvd_cache[0][scan8[0]], 4, 4, 8, 0, 2);
+ fill_rectangle(sl->mvd_cache[1][scan8[0]], 4, 4, 8, 0, 2);
dct8x8_allowed &= h->sps.direct_8x8_inference_flag;
} else {
int list, i;
@@ -2232,7 +2232,7 @@ decode_intra_mb:
DECODE_CABAC_MB_MVD( h, list, 0)
tprintf(h->avctx, "final mv:%d %d\n", mx, my);
- fill_rectangle(h->mvd_cache[list][ scan8[0] ], 4, 4, 8, pack8to16(mpx,mpy), 2);
+ fill_rectangle(sl->mvd_cache[list][ scan8[0] ], 4, 4, 8, pack8to16(mpx,mpy), 2);
fill_rectangle(sl->mv_cache[list][ scan8[0] ], 4, 4, 8, pack16to32(mx,my), 4);
}
}
@@ -2263,10 +2263,10 @@ decode_intra_mb:
DECODE_CABAC_MB_MVD( h, list, 8*i)
tprintf(h->avctx, "final mv:%d %d\n", mx, my);
- fill_rectangle(h->mvd_cache[list][ scan8[0] + 16*i ], 4, 2, 8, pack8to16(mpx,mpy), 2);
+ fill_rectangle(sl->mvd_cache[list][ scan8[0] + 16*i ], 4, 2, 8, pack8to16(mpx,mpy), 2);
fill_rectangle(sl->mv_cache[list][ scan8[0] + 16*i ], 4, 2, 8, pack16to32(mx,my), 4);
}else{
- fill_rectangle(h->mvd_cache[list][ scan8[0] + 16*i ], 4, 2, 8, 0, 2);
+ fill_rectangle(sl->mvd_cache[list][ scan8[0] + 16*i ], 4, 2, 8, 0, 2);
fill_rectangle(sl->mv_cache[list][ scan8[0] + 16*i ], 4, 2, 8, 0, 4);
}
}
@@ -2298,10 +2298,10 @@ decode_intra_mb:
DECODE_CABAC_MB_MVD( h, list, 4*i)
tprintf(h->avctx, "final mv:%d %d\n", mx, my);
- fill_rectangle(h->mvd_cache[list][ scan8[0] + 2*i ], 2, 4, 8, pack8to16(mpx,mpy), 2);
+ fill_rectangle(sl->mvd_cache[list][ scan8[0] + 2*i ], 2, 4, 8, pack8to16(mpx,mpy), 2);
fill_rectangle(sl->mv_cache[list][ scan8[0] + 2*i ], 2, 4, 8, pack16to32(mx,my), 4);
}else{
- fill_rectangle(h->mvd_cache[list][ scan8[0] + 2*i ], 2, 4, 8, 0, 2);
+ fill_rectangle(sl->mvd_cache[list][ scan8[0] + 2*i ], 2, 4, 8, 0, 2);
fill_rectangle(sl->mv_cache[list][ scan8[0] + 2*i ], 2, 4, 8, 0, 4);
}
}