From 76741b0e56bfbc74cfa32ff59e15cf420463569b Mon Sep 17 00:00:00 2001 From: Baptiste Coudurier Date: Tue, 16 Aug 2011 17:05:44 +0200 Subject: h264: 4:2:2 intra decoding support Signed-off-by: Diego Biurrun Signed-off-by: Ronald S. Bultje --- libavcodec/h264.h | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'libavcodec/h264.h') 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]); -- cgit v1.2.3