* @author Michael Niedermayer <michaelni@gmx.at>
*/
-#ifndef H264_H
-#define H264_H
+#ifndef FFMPEG_H264_H
+#define FFMPEG_H264_H
#include "dsputil.h"
#include "cabac.h"
#define MB_MBAFF h->mb_mbaff
#define MB_FIELD h->mb_field_decoding_flag
#define FRAME_MBAFF h->mb_aff_frame
-#define FIELD_PICTURE 0
+#define FIELD_PICTURE (s->picture_structure != PICT_FRAME)
#else
#define MB_MBAFF 0
#define MB_FIELD 0
#undef IS_INTERLACED
#define IS_INTERLACED(mb_type) 0
#endif
+#define FIELD_OR_MBAFF_PICTURE (FRAME_MBAFF || FIELD_PICTURE)
/**
* Sequence parameter set
int mb_aff; ///<mb_adaptive_frame_field_flag
int direct_8x8_inference_flag;
int crop; ///< frame_cropping_flag
- int crop_left; ///< frame_cropping_rect_left_offset
- int crop_right; ///< frame_cropping_rect_right_offset
- int crop_top; ///< frame_cropping_rect_top_offset
- int crop_bottom; ///< frame_cropping_rect_bottom_offset
+ unsigned int crop_left; ///< frame_cropping_rect_left_offset
+ unsigned int crop_right; ///< frame_cropping_rect_right_offset
+ unsigned int crop_top; ///< frame_cropping_rect_top_offset
+ unsigned int crop_bottom; ///< frame_cropping_rect_bottom_offset
int vui_parameters_present_flag;
AVRational sar;
int timing_info_present_flag;
int prev_frame_num; ///< frame_num of the last pic for POC type 1/2
/**
- * frame_num for frames or 2*frame_num for field pics.
+ * frame_num for frames or 2*frame_num+1 for field pics.
*/
int curr_pic_num;
GetBitContext *intra_gb_ptr;
GetBitContext *inter_gb_ptr;
- DECLARE_ALIGNED_8(DCTELEM, mb[16*24]);
- DCTELEM mb_padding[256]; ///< as mb is addressed by scantable[i] and scantable is uint8_t we can either check that i is not to large or ensure that there is some unused stuff after mb
+ DECLARE_ALIGNED_16(DCTELEM, mb[16*24]);
+ 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
/**
* Cabac
}H264Context;
-#endif /* H264_H */
+#endif /* FFMPEG_H264_H */