X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fh264.h;h=1f1cb1c5d605e896bb4b350ed4ebd8157baf553b;hb=d3b4b74c32cf302d36a4c4d2cce08027f0a22560;hp=b06fed576d1d263ac59f5cc671d0e237c90e776b;hpb=4691a77db4672026d62d524fd292fb17db6514b4;p=ffmpeg diff --git a/libavcodec/h264.h b/libavcodec/h264.h index b06fed576d1..1f1cb1c5d60 100644 --- a/libavcodec/h264.h +++ b/libavcodec/h264.h @@ -25,12 +25,13 @@ * @author Michael Niedermayer */ -#ifndef H264_H -#define H264_H +#ifndef FFMPEG_H264_H +#define FFMPEG_H264_H #include "dsputil.h" #include "cabac.h" #include "mpegvideo.h" +#include "h264pred.h" #define interlaced_dct interlaced_dct_is_a_bad_name #define mb_intra mb_intra_is_not_initialized_see_mb_type @@ -50,21 +51,38 @@ #define MAX_MMCO_COUNT 66 +#define MAX_DELAYED_PIC_COUNT 16 + /* Compiling in interlaced support reduces the speed * of progressive decoding by about 2%. */ #define ALLOW_INTERLACE +#define ALLOW_NOCHROMA + #ifdef ALLOW_INTERLACE #define MB_MBAFF h->mb_mbaff #define MB_FIELD h->mb_field_decoding_flag #define FRAME_MBAFF h->mb_aff_frame +#define FIELD_PICTURE (s->picture_structure != PICT_FRAME) #else #define MB_MBAFF 0 #define MB_FIELD 0 #define FRAME_MBAFF 0 +#define FIELD_PICTURE 0 #undef IS_INTERLACED #define IS_INTERLACED(mb_type) 0 #endif +#define FIELD_OR_MBAFF_PICTURE (FRAME_MBAFF || FIELD_PICTURE) + +#ifdef ALLOW_NOCHROMA +#define CHROMA h->sps.chroma_format_idc +#else +#define CHROMA 1 +#endif + +#ifndef ENABLE_H264_ENCODER +#define ENABLE_H264_ENCODER 0 +#endif /** * Sequence parameter set @@ -73,6 +91,7 @@ typedef struct SPS{ int profile_idc; int level_idc; + int chroma_format_idc; int transform_bypass; ///< qpprime_y_zero_transform_bypass_flag int log2_max_frame_num; ///< log2_max_frame_num_minus4 + 4 int poc_type; ///< pic_order_cnt_type @@ -83,16 +102,16 @@ typedef struct SPS{ int poc_cycle_length; ///< num_ref_frames_in_pic_order_cnt_cycle int ref_frame_count; ///< num_ref_frames int gaps_in_frame_num_allowed_flag; - int mb_width; ///< frame_width_in_mbs_minus1 + 1 - int mb_height; ///< frame_height_in_mbs_minus1 + 1 + int mb_width; ///< pic_width_in_mbs_minus1 + 1 + int mb_height; ///< pic_height_in_map_units_minus1 + 1 int frame_mbs_only_flag; int mb_aff; ///