summaryrefslogtreecommitdiff
path: root/libavcodec/h264.h
diff options
context:
space:
mode:
authorOskar Arvidsson <oskar@irock.se>2011-03-29 17:48:57 +0200
committerRonald S. Bultje <rsbultje@gmail.com>2011-05-10 07:24:33 -0400
commit6e3ef511d787ff632547059f8730396ff4498e70 (patch)
treebda396b13aaa01e8dccbd60d697a543eff7643db /libavcodec/h264.h
parent44ca80df3445a59bc065924d8c6110fa10367d01 (diff)
Add the notion of pixel size in h264 related functions.
In high bit depth the pixels will not be stored in uint8_t like in the normal case, but in uint16_t. The pixel size is thus 1 in normal bit depth and 2 in high bit depth. Preparatory patch for high bit depth h264 decoding support. Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
Diffstat (limited to 'libavcodec/h264.h')
-rw-r--r--libavcodec/h264.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/libavcodec/h264.h b/libavcodec/h264.h
index 0a0ec36649..470d9bee63 100644
--- a/libavcodec/h264.h
+++ b/libavcodec/h264.h
@@ -265,6 +265,7 @@ typedef struct MMCO{
typedef struct H264Context{
MpegEncContext s;
H264DSPContext h264dsp;
+ int pixel_shift; ///< 0 for 8-bit H264, 1 for high-bit-depth H264
int chroma_qp[2]; //QPc
int qp_thresh; ///< QP threshold to skip loopfilter
@@ -296,7 +297,7 @@ typedef struct H264Context{
unsigned int top_samples_available;
unsigned int topright_samples_available;
unsigned int left_samples_available;
- uint8_t (*top_borders[2])[16+2*8];
+ uint8_t (*top_borders[2])[(16+2*8)*2];
/**
* non zero coeff count cache.
@@ -406,9 +407,9 @@ typedef struct H264Context{
GetBitContext *intra_gb_ptr;
GetBitContext *inter_gb_ptr;
- DECLARE_ALIGNED(16, DCTELEM, mb)[16*24];
- DECLARE_ALIGNED(16, DCTELEM, mb_luma_dc)[16];
- DCTELEM mb_padding[256]; ///< as mb is addressed by scantable[i] and scantable is uint8_t we can either check that i is not too large or ensure that there is some unused stuff after mb
+ DECLARE_ALIGNED(16, DCTELEM, mb)[16*24*2]; ///< as a dct coeffecient is int32_t in high depth, we need to reserve twice the space.
+ DECLARE_ALIGNED(16, DCTELEM, mb_luma_dc)[16*2];
+ DCTELEM mb_padding[256*2]; ///< as mb is addressed by scantable[i] and scantable is uint8_t we can either check that i is not too large or ensure that there is some unused stuff after mb
/**
* Cabac