Revision 0da71265 libavcodec/mpegvideo.h

View differences:

libavcodec/mpegvideo.h
33 33
    FMT_MPEG1,
34 34
    FMT_H263,
35 35
    FMT_MJPEG, 
36
    FMT_H264,
36 37
};
37 38

  
38 39
#define EDGE_WIDTH 16
......
59 60
#define P_TYPE FF_P_TYPE  ///< Predicted
60 61
#define B_TYPE FF_B_TYPE  ///< Bi-dir predicted
61 62
#define S_TYPE FF_S_TYPE  ///< S(GMC)-VOP MPEG4
63
#define SI_TYPE FF_SI_TYPE  ///< Switching Intra
64
#define SP_TYPE FF_SP_TYPE  ///< Switching Predicted
62 65

  
63 66
typedef struct Predictor{
64 67
    double coeff;
......
127 130
typedef struct Picture{
128 131
    FF_COMMON_FRAME
129 132

  
133
    /**
134
     * halfpel luma planes.
135
     */
136
    uint8_t *interpolated[3];
137
    
138
    int16_t (*motion_val[2])[2];
139
    int8_t *ref_index[2];
140
    uint16_t *mb_type_base;
141
    uint16_t *mb_type;           ///< mb_type_base + mb_width + 2
142
#define MB_TYPE_INTRA4x4   0x0001
143
#define MB_TYPE_INTRA16x16 0x0002
144
#define MB_TYPE_INTRA_PCM  0x0004
145
#define MB_TYPE_16x16      0x0008
146
#define MB_TYPE_16x8       0x0010
147
#define MB_TYPE_8x16       0x0020
148
#define MB_TYPE_8x8        0x0040
149
#define MB_TYPE_INTERLACED 0x0080
150
#define MB_TYPE_DIRECT2     0x0100 //FIXME
151
#define MB_TYPE_REF0       0x0200
152
#define MB_TYPE_GMC2        0x0400 //FIXME
153
#define MB_TYPE_P0L0       0x1000
154
#define MB_TYPE_P1L0       0x2000
155
#define MB_TYPE_P0L1       0x4000
156
#define MB_TYPE_P1L1       0x8000
157

  
158
#define IS_INTRA4x4(a)   ((a)&MB_TYPE_INTRA4x4)
159
#define IS_INTRA16x16(a) ((a)&MB_TYPE_INTRA16x16)
160
#define IS_INTRA(a)      ((a)&3)
161
#define IS_INTER(a)      ((a)&(MB_TYPE_16x16|MB_TYPE_16x8|MB_TYPE_8x16|MB_TYPE_8x8))
162
#define IS_INTRA_PCM(a)  ((a)&MB_TYPE_INTRA_PCM)
163
#define IS_INTERLACED(a) ((a)&MB_TYPE_INTERLACED)
164
#define IS_DIRECT(a)     ((a)&MB_TYPE_DIRECT2)
165
#define IS_16X16(a)      ((a)&MB_TYPE_16x16)
166
#define IS_16X8(a)       ((a)&MB_TYPE_16x8)
167
#define IS_8X16(a)       ((a)&MB_TYPE_8x16)
168
#define IS_8X8(a)        ((a)&MB_TYPE_8x8)
169
#define IS_SUB_8X8(a)    ((a)&MB_TYPE_16x16) //note reused
170
#define IS_SUB_8X4(a)    ((a)&MB_TYPE_16x8)  //note reused
171
#define IS_SUB_4X8(a)    ((a)&MB_TYPE_8x16)  //note reused
172
#define IS_SUB_4X4(a)    ((a)&MB_TYPE_8x8)   //note reused
173
#define IS_REF0(a)       ((a)&MB_TYPE_REF0)
174
#define IS_DIR(a, part, list) ((a) & (MB_TYPE_P0L0<<((part)+2*(list))))
175
#define USES_LIST(a, list) ((a) & ((MB_TYPE_P0L0|MB_TYPE_P1L0)<<(2*(list)))) ///< does this mb use listX, note doesnt work if subMBs
176

  
177

  
178
    int field_poc[2];           ///< h264 top/bottom POC
179
    int poc;                    ///< h264 frame POC
180
    int frame_num;              ///< h264 frame_num
181
    int pic_id;                 ///< h264 pic_num or long_term_pic_idx
182
    int long_ref;               ///< 1->long term reference 0->short term reference
183

  
130 184
    int mb_var_sum;             ///< sum of MB variance for current frame 
131 185
    int mc_mb_var_sum;          ///< motion compensated MB variance for current frame 
132 186
    uint16_t *mb_var;           ///< Table for MB variances 
......
267 321
    Picture *current_picture_ptr;  ///< pointer to the current picture
268 322
    int last_dc[3];                ///< last DC values for MPEG1 
269 323
    int16_t *dc_val[3];            ///< used for mpeg4 DC prediction, all 3 arrays must be continuous 
324
    int16_t dc_cache[4*5];
270 325
    int y_dc_scale, c_dc_scale;
271 326
    uint8_t *y_dc_scale_table;     ///< qscale -> y_dc_scale table 
272 327
    uint8_t *c_dc_scale_table;     ///< qscale -> c_dc_scale table 
......
295 350
    /* motion compensation */
296 351
    int unrestricted_mv;        ///< mv can point outside of the coded picture 
297 352
    int h263_long_vectors;      ///< use horrible h263v1 long vector mode 
353
    int decode;                 ///< if 0 then decoding will be skiped (for encoding b frames for example)
298 354

  
299 355
    DSPContext dsp;             ///< pointers for accelerated dsp fucntions 
300 356
    int f_code;                 ///< forward MV resolution 
......
470 526
    int enhancement_type;
471 527
    int new_pred;
472 528
    int reduced_res_vop;
473
    int aspect_ratio_info;
474
    int aspected_width;
475
    int aspected_height;
529
    int aspect_ratio_info; //FIXME remove
530
    int aspected_width;    //FIXME remove
531
    int aspected_height;   //FIXME remove
476 532
    int sprite_warping_accuracy;
477 533
    int low_latency_sprite;
478 534
    int data_partitioning;           ///< data partitioning flag from header 
......
546 602
    int fake_picture_number; ///< picture number at the bitstream frame rate 
547 603
    int gop_picture_number;  ///< index of the first picture of a GOP based on fake_pic_num & mpeg1 specific 
548 604
    int last_mv_dir;         ///< last mv_dir, used for b frame encoding 
605
    int broken_link;         ///< no_output_of_prior_pics_flag
549 606
    
550 607
    /* MPEG2 specific - I wish I had not to support this mess. */
551 608
    int progressive_sequence;

Also available in: Unified diff