]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/h264.h
Indentation
[ffmpeg] / libavcodec / h264.h
index d9a668c7b112e1a1afeb899a0e385d07d00ab2f0..622a55529983b32fce48d5cecfd5528a55918dd3 100644 (file)
@@ -25,8 +25,8 @@
  * @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"
@@ -59,7 +59,7 @@
 #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
@@ -68,6 +68,7 @@
 #undef  IS_INTERLACED
 #define IS_INTERLACED(mb_type) 0
 #endif
+#define FIELD_OR_MBAFF_PICTURE (FRAME_MBAFF || FIELD_PICTURE)
 
 /**
  * Sequence parameter set
@@ -92,10 +93,10 @@ typedef struct SPS{
     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;
@@ -285,7 +286,7 @@ typedef struct H264Context{
     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;
 
@@ -347,8 +348,8 @@ typedef struct H264Context{
     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
@@ -415,4 +416,4 @@ typedef struct H264Context{
 
 }H264Context;
 
-#endif /* H264_H */
+#endif /* FFMPEG_H264_H */