aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-03-21 14:14:01 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-03-21 14:14:05 +0100
commit892a6d00280215ab4c1485c0931912f82318dc63 (patch)
treee855ce6f50dd9dcf86d9d3f00b46db8168002494
parentf1436a7f961519f2f149c5eda72af988004f4483 (diff)
parent99a35d1ccbb6b6cd260ce5c8369a897a79fe6a3a (diff)
downloadffmpeg-892a6d00280215ab4c1485c0931912f82318dc63.tar.gz
Merge commit '99a35d1ccbb6b6cd260ce5c8369a897a79fe6a3a'
* commit '99a35d1ccbb6b6cd260ce5c8369a897a79fe6a3a': h264: move neighbor_transform_size into the per-slice context Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/h264.h10
-rw-r--r--libavcodec/h264_cabac.c4
-rw-r--r--libavcodec/h264_mvpred.h2
3 files changed, 8 insertions, 8 deletions
diff --git a/libavcodec/h264.h b/libavcodec/h264.h
index 40d44dc13c..c03bd4b7dd 100644
--- a/libavcodec/h264.h
+++ b/libavcodec/h264.h
@@ -380,6 +380,11 @@ typedef struct H264SliceContext {
unsigned int left_samples_available;
/**
+ * number of neighbors (top and/or left) that used 8x8 dct
+ */
+ int neighbor_transform_size;
+
+ /**
* non zero coeff count cache.
* is 64 if not available.
*/
@@ -438,11 +443,6 @@ typedef struct H264Context {
#define PART_NOT_AVAILABLE -2
/**
- * number of neighbors (top and/or left) that used 8x8 dct
- */
- int neighbor_transform_size;
-
- /**
* block_offset[ 0..23] for frame macroblocks
* block_offset[24..47] for field macroblocks
*/
diff --git a/libavcodec/h264_cabac.c b/libavcodec/h264_cabac.c
index 51c437c3e2..cb40417ede 100644
--- a/libavcodec/h264_cabac.c
+++ b/libavcodec/h264_cabac.c
@@ -2056,7 +2056,7 @@ decode_intra_mb:
if( IS_INTRA( mb_type ) ) {
int i, pred_mode;
if( IS_INTRA4x4( mb_type ) ) {
- if( dct8x8_allowed && get_cabac_noinline( &h->cabac, &h->cabac_state[399 + h->neighbor_transform_size] ) ) {
+ if (dct8x8_allowed && get_cabac_noinline(&h->cabac, &h->cabac_state[399 + sl->neighbor_transform_size])) {
mb_type |= MB_TYPE_8x8DCT;
for( i = 0; i < 16; i+=4 ) {
int pred = pred_intra_mode(h, sl, i);
@@ -2319,7 +2319,7 @@ decode_intra_mb:
h->cbp_table[mb_xy] = h->cbp = cbp;
if( dct8x8_allowed && (cbp&15) && !IS_INTRA( mb_type ) ) {
- mb_type |= MB_TYPE_8x8DCT * get_cabac_noinline( &h->cabac, &h->cabac_state[399 + h->neighbor_transform_size] );
+ mb_type |= MB_TYPE_8x8DCT * get_cabac_noinline(&h->cabac, &h->cabac_state[399 + sl->neighbor_transform_size]);
}
/* It would be better to do this in fill_decode_caches, but we don't know
diff --git a/libavcodec/h264_mvpred.h b/libavcodec/h264_mvpred.h
index ffc2263f42..bc72fdf9ef 100644
--- a/libavcodec/h264_mvpred.h
+++ b/libavcodec/h264_mvpred.h
@@ -794,7 +794,7 @@ static void fill_decode_caches(H264Context *h, H264SliceContext *sl, int mb_type
}
}
- h->neighbor_transform_size = !!IS_8x8DCT(top_type) + !!IS_8x8DCT(left_type[LTOP]);
+ sl->neighbor_transform_size = !!IS_8x8DCT(top_type) + !!IS_8x8DCT(left_type[LTOP]);
}
/**