diff options
author | Oskar Arvidsson <oskar@irock.se> | 2011-03-29 17:48:57 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-04-10 22:33:41 +0200 |
commit | dc172ecc6e59fb3e53af2991e00e0e81fe3c8884 (patch) | |
tree | 2c71000c44f1981d35224464b77a465dff38c7da /libavcodec/h264.h | |
parent | 86b0d9cd58137fc499f263267c3219ac6186b98e (diff) | |
download | ffmpeg-dc172ecc6e59fb3e53af2991e00e0e81fe3c8884.tar.gz |
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: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/h264.h')
-rw-r--r-- | libavcodec/h264.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/libavcodec/h264.h b/libavcodec/h264.h index 770a7ecb59..7182c86a8c 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_size; 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 |