summaryrefslogtreecommitdiff
path: root/libavcodec/h264.h
diff options
context:
space:
mode:
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>2011-08-16 17:05:44 +0200
committerRonald S. Bultje <rsbultje@gmail.com>2011-10-21 01:00:41 -0700
commit76741b0e56bfbc74cfa32ff59e15cf420463569b (patch)
treee52409a6a6bf1b94c33e8c13fbb67f690f707c09 /libavcodec/h264.h
parentdc49bf127010fdff2c3282755407cedd429475f5 (diff)
h264: 4:2:2 intra decoding support
Signed-off-by: Diego Biurrun <diego@biurrun.de> Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
Diffstat (limited to 'libavcodec/h264.h')
-rw-r--r--libavcodec/h264.h12
1 files changed, 4 insertions, 8 deletions
diff --git a/libavcodec/h264.h b/libavcodec/h264.h
index 122a54aca0..bd2b5d8fe5 100644
--- a/libavcodec/h264.h
+++ b/libavcodec/h264.h
@@ -39,13 +39,6 @@
#define interlaced_dct interlaced_dct_is_a_bad_name
#define mb_intra mb_intra_is_not_initialized_see_mb_type
-#define CHROMA_DC_COEFF_TOKEN_VLC_BITS 8
-#define COEFF_TOKEN_VLC_BITS 8
-#define TOTAL_ZEROS_VLC_BITS 9
-#define CHROMA_DC_TOTAL_ZEROS_VLC_BITS 3
-#define RUN_VLC_BITS 3
-#define RUN7_VLC_BITS 6
-
#define MAX_SPS_COUNT 32
#define MAX_PPS_COUNT 256
@@ -92,6 +85,7 @@
#define CABAC h->pps.cabac
#endif
+#define CHROMA422 (h->sps.chroma_format_idc == 2)
#define CHROMA444 (h->sps.chroma_format_idc == 3)
#define EXTENDED_SAR 255
@@ -582,6 +576,8 @@ typedef struct H264Context{
// Timestamp stuff
int sei_buffering_period_present; ///< Buffering period SEI flag
int initial_cpb_removal_delay[32]; ///< Initial timestamps for CPBs
+
+ int cur_chroma_format_idc;
}H264Context;
@@ -809,7 +805,7 @@ static av_always_inline void write_back_non_zero_count(H264Context *h){
AV_COPY32(&nnz[32], &nnz_cache[4+8*11]);
AV_COPY32(&nnz[36], &nnz_cache[4+8*12]);
- if(CHROMA444){
+ if(!h->s.chroma_y_shift){
AV_COPY32(&nnz[24], &nnz_cache[4+8* 8]);
AV_COPY32(&nnz[28], &nnz_cache[4+8* 9]);
AV_COPY32(&nnz[40], &nnz_cache[4+8*13]);