aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/h264.h
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-03-21 14:02:02 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-03-21 14:02:02 +0100
commitb7e0356cc33297d8db12b56051841f914b6f1ba9 (patch)
treec520d2fee090f90cd02b1565dea019c23dabd6df /libavcodec/h264.h
parent6ec279b54c09f47208930021a38a742f2cc09324 (diff)
parentf69574cf7aca4fe4d57a2155e925f37fc863474d (diff)
downloadffmpeg-b7e0356cc33297d8db12b56051841f914b6f1ba9.tar.gz
Merge commit 'f69574cf7aca4fe4d57a2155e925f37fc863474d'
* commit 'f69574cf7aca4fe4d57a2155e925f37fc863474d': h264: move non_zero_count_cache into the per-slice context Conflicts: libavcodec/h264.c libavcodec/h264_cabac.c libavcodec/h264_cavlc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/h264.h')
-rw-r--r--libavcodec/h264.h17
1 files changed, 9 insertions, 8 deletions
diff --git a/libavcodec/h264.h b/libavcodec/h264.h
index 54a69f40aa..6f7421af37 100644
--- a/libavcodec/h264.h
+++ b/libavcodec/h264.h
@@ -378,6 +378,12 @@ typedef struct H264SliceContext {
unsigned int top_samples_available;
unsigned int topright_samples_available;
unsigned int left_samples_available;
+
+ /**
+ * non zero coeff count cache.
+ * is 64 if not available.
+ */
+ DECLARE_ALIGNED(8, uint8_t, non_zero_count_cache)[15 * 8];
} H264SliceContext;
/**
@@ -420,12 +426,6 @@ typedef struct H264Context {
H264PredContext hpc;
uint8_t (*top_borders[2])[(16 * 3) * 2];
- /**
- * non zero coeff count cache.
- * is 64 if not available.
- */
- DECLARE_ALIGNED(8, uint8_t, non_zero_count_cache)[15 * 8];
-
uint8_t (*non_zero_count)[48];
/**
@@ -1017,11 +1017,12 @@ static av_always_inline void write_back_intra_pred_mode(H264Context *h,
i4x4[6] = i4x4_cache[7 + 8 * 1];
}
-static av_always_inline void write_back_non_zero_count(H264Context *h)
+static av_always_inline void write_back_non_zero_count(H264Context *h,
+ H264SliceContext *sl)
{
const int mb_xy = h->mb_xy;
uint8_t *nnz = h->non_zero_count[mb_xy];
- uint8_t *nnz_cache = h->non_zero_count_cache;
+ uint8_t *nnz_cache = sl->non_zero_count_cache;
AV_COPY32(&nnz[ 0], &nnz_cache[4 + 8 * 1]);
AV_COPY32(&nnz[ 4], &nnz_cache[4 + 8 * 2]);