• Main Page
  • Related Pages
  • Modules
  • Data Structures
  • Files

hvirtual/quicktime/ffmpeg/libavcodec/avcodec.h

Go to the documentation of this file.
00001 #ifndef AVCODEC_H
00002 #define AVCODEC_H
00003 
00010 #ifdef __cplusplus
00011 extern "C" {
00012 #endif
00013 
00014 #include "common.h"
00015 #include "rational.h"
00016 #include <sys/types.h> /* size_t */
00017 
00018 #define FFMPEG_VERSION_INT     0x000409
00019 #define FFMPEG_VERSION         "CVS"
00020 #define LIBAVCODEC_BUILD       4759
00021 
00022 
00023 #define LIBAVCODEC_VERSION_INT FFMPEG_VERSION_INT
00024 #define LIBAVCODEC_VERSION     FFMPEG_VERSION
00025 
00026 #define AV_STRINGIFY(s) AV_TOSTRING(s)
00027 #define AV_TOSTRING(s) #s
00028 #define LIBAVCODEC_IDENT        "FFmpeg" LIBAVCODEC_VERSION "b" AV_STRINGIFY(LIBAVCODEC_BUILD)
00029 
00030 #define AV_NOPTS_VALUE int64_t_C(0x8000000000000000)
00031 #define AV_TIME_BASE 1000000
00032 #define AV_TIME_BASE_Q (AVRational){1, AV_TIME_BASE}
00033 
00034 enum CodecID {
00035     CODEC_ID_NONE, 
00036     CODEC_ID_MPEG1VIDEO,
00037     CODEC_ID_MPEG2VIDEO, /* prefered ID for MPEG Video 1 or 2 decoding */
00038     CODEC_ID_MPEG2VIDEO_XVMC,
00039     CODEC_ID_H261,
00040     CODEC_ID_H263,
00041     CODEC_ID_RV10,
00042     CODEC_ID_RV20,
00043     CODEC_ID_MJPEG,
00044     CODEC_ID_MJPEGB,
00045     CODEC_ID_LJPEG,
00046     CODEC_ID_SP5X,
00047     CODEC_ID_MPEG4,
00048     CODEC_ID_RAWVIDEO,
00049     CODEC_ID_MSMPEG4V1,
00050     CODEC_ID_MSMPEG4V2,
00051     CODEC_ID_MSMPEG4V3,
00052     CODEC_ID_WMV1,
00053     CODEC_ID_WMV2,
00054     CODEC_ID_H263P,
00055     CODEC_ID_H263I,
00056     CODEC_ID_FLV1,
00057     CODEC_ID_SVQ1,
00058     CODEC_ID_SVQ3,
00059     CODEC_ID_DVVIDEO,
00060     CODEC_ID_HUFFYUV,
00061     CODEC_ID_CYUV,
00062     CODEC_ID_H264,
00063     CODEC_ID_INDEO3,
00064     CODEC_ID_VP3,
00065     CODEC_ID_THEORA,
00066     CODEC_ID_ASV1,
00067     CODEC_ID_ASV2,
00068     CODEC_ID_FFV1,
00069     CODEC_ID_4XM,
00070     CODEC_ID_VCR1,
00071     CODEC_ID_CLJR,
00072     CODEC_ID_MDEC,
00073     CODEC_ID_ROQ,
00074     CODEC_ID_INTERPLAY_VIDEO,
00075     CODEC_ID_XAN_WC3,
00076     CODEC_ID_XAN_WC4,
00077     CODEC_ID_RPZA,
00078     CODEC_ID_CINEPAK,
00079     CODEC_ID_WS_VQA,
00080     CODEC_ID_MSRLE,
00081     CODEC_ID_MSVIDEO1,
00082     CODEC_ID_IDCIN,
00083     CODEC_ID_8BPS,
00084     CODEC_ID_SMC,
00085     CODEC_ID_FLIC,
00086     CODEC_ID_TRUEMOTION1,
00087     CODEC_ID_VMDVIDEO,
00088     CODEC_ID_MSZH,
00089     CODEC_ID_ZLIB,
00090     CODEC_ID_QTRLE,
00091     CODEC_ID_SNOW,
00092     CODEC_ID_TSCC,
00093     CODEC_ID_ULTI,
00094     CODEC_ID_QDRAW,
00095     CODEC_ID_VIXL,
00096     CODEC_ID_QPEG,
00097     CODEC_ID_XVID,
00098     CODEC_ID_PNG,
00099     CODEC_ID_PPM,
00100     CODEC_ID_PBM,
00101     CODEC_ID_PGM,
00102     CODEC_ID_PGMYUV,
00103     CODEC_ID_PAM,
00104     CODEC_ID_FFVHUFF,
00105     CODEC_ID_RV30,
00106     CODEC_ID_RV40,
00107     CODEC_ID_VC9,
00108     CODEC_ID_WMV3,
00109     CODEC_ID_LOCO,
00110     CODEC_ID_WNV1,
00111     CODEC_ID_AASC,
00112     CODEC_ID_INDEO2,
00113     CODEC_ID_FRAPS,
00114 
00115     /* various pcm "codecs" */
00116     CODEC_ID_PCM_S16LE= 0x10000,
00117     CODEC_ID_PCM_S16BE,
00118     CODEC_ID_PCM_U16LE,
00119     CODEC_ID_PCM_U16BE,
00120     CODEC_ID_PCM_S8,
00121     CODEC_ID_PCM_U8,
00122     CODEC_ID_PCM_MULAW,
00123     CODEC_ID_PCM_ALAW,
00124 
00125     /* various adpcm codecs */
00126     CODEC_ID_ADPCM_IMA_QT= 0x11000,
00127     CODEC_ID_ADPCM_IMA_WAV,
00128     CODEC_ID_ADPCM_IMA_DK3,
00129     CODEC_ID_ADPCM_IMA_DK4,
00130     CODEC_ID_ADPCM_IMA_WS,
00131     CODEC_ID_ADPCM_IMA_SMJPEG,
00132     CODEC_ID_ADPCM_MS,
00133     CODEC_ID_ADPCM_4XM,
00134     CODEC_ID_ADPCM_XA,
00135     CODEC_ID_ADPCM_ADX,
00136     CODEC_ID_ADPCM_EA,
00137     CODEC_ID_ADPCM_G726,
00138     CODEC_ID_ADPCM_CT,
00139     CODEC_ID_ADPCM_SWF,
00140     CODEC_ID_ADPCM_YAMAHA,
00141 
00142     /* AMR */
00143     CODEC_ID_AMR_NB= 0x12000,
00144     CODEC_ID_AMR_WB,
00145 
00146     /* RealAudio codecs*/
00147     CODEC_ID_RA_144= 0x13000,
00148     CODEC_ID_RA_288,
00149 
00150     /* various DPCM codecs */
00151     CODEC_ID_ROQ_DPCM= 0x14000,
00152     CODEC_ID_INTERPLAY_DPCM,
00153     CODEC_ID_XAN_DPCM,
00154     CODEC_ID_SOL_DPCM,
00155     
00156     CODEC_ID_MP2= 0x15000,
00157     CODEC_ID_MP3, /* prefered ID for MPEG Audio layer 1, 2 or3 decoding */
00158     CODEC_ID_AAC,
00159     CODEC_ID_MPEG4AAC,
00160     CODEC_ID_AC3,
00161     CODEC_ID_DTS,
00162     CODEC_ID_VORBIS,
00163     CODEC_ID_DVAUDIO,
00164     CODEC_ID_WMAV1,
00165     CODEC_ID_WMAV2,
00166     CODEC_ID_MACE3,
00167     CODEC_ID_MACE6,
00168     CODEC_ID_VMDAUDIO,
00169     CODEC_ID_SONIC,
00170     CODEC_ID_SONIC_LS,
00171     CODEC_ID_FLAC,
00172     CODEC_ID_MP3ADU,
00173     CODEC_ID_MP3ON4,
00174     CODEC_ID_SHORTEN,
00175     CODEC_ID_ALAC,
00176     CODEC_ID_WESTWOOD_SND1,
00177     CODEC_ID_GSM,    
00178     
00179     CODEC_ID_OGGTHEORA= 0x16000, 
00180 
00181     /* subtitle codecs */
00182     CODEC_ID_DVD_SUBTITLE= 0x17000, 
00183     CODEC_ID_DVB_SUBTITLE, 
00184     
00185     CODEC_ID_MPEG2TS= 0x20000, /* _FAKE_ codec to indicate a raw MPEG2 transport
00186                          stream (only used by libavformat) */
00187 };
00188 
00189 /* CODEC_ID_MP3LAME is absolete */
00190 #define CODEC_ID_MP3LAME CODEC_ID_MP3
00191 
00192 enum CodecType {
00193     CODEC_TYPE_UNKNOWN = -1,
00194     CODEC_TYPE_VIDEO,
00195     CODEC_TYPE_AUDIO,
00196     CODEC_TYPE_DATA,
00197     CODEC_TYPE_SUBTITLE,
00198 };
00199 
00218 enum PixelFormat {
00219     PIX_FMT_NONE= -1,
00220     PIX_FMT_YUV420P,   
00221     PIX_FMT_YUV422,    
00222     PIX_FMT_RGB24,     
00223     PIX_FMT_BGR24,     
00224     PIX_FMT_YUV422P,   
00225     PIX_FMT_YUV444P,   
00226     PIX_FMT_RGBA32,    
00227     PIX_FMT_YUV410P,   
00228     PIX_FMT_YUV411P,   
00229     PIX_FMT_RGB565,    
00230     PIX_FMT_RGB555,    
00231     PIX_FMT_GRAY8,
00232     PIX_FMT_MONOWHITE, 
00233     PIX_FMT_MONOBLACK, 
00234     PIX_FMT_PAL8,      
00235     PIX_FMT_YUVJ420P,  
00236     PIX_FMT_YUVJ422P,  
00237     PIX_FMT_YUVJ444P,  
00238     PIX_FMT_XVMC_MPEG2_MC,
00239     PIX_FMT_XVMC_MPEG2_IDCT,
00240     PIX_FMT_UYVY422,   
00241     PIX_FMT_UYVY411,   
00242     PIX_FMT_NB,
00243 };
00244 
00245 /* currently unused, may be used if 24/32 bits samples ever supported */
00246 enum SampleFormat {
00247     SAMPLE_FMT_S16 = 0,         
00248     SAMPLE_FMT_S32,             
00249     SAMPLE_FMT_FLT,             
00250     SAMPLE_FMT_DBL,             
00251 };
00252 
00253 /* in bytes */
00254 #define AVCODEC_MAX_AUDIO_FRAME_SIZE 131072
00255 
00263 #define FF_INPUT_BUFFER_PADDING_SIZE 8
00264 
00269 #define FF_MIN_BUFFER_SIZE 16384
00270 
00271 /* motion estimation type, EPZS by default */
00272 enum Motion_Est_ID {
00273     ME_ZERO = 1,
00274     ME_FULL,
00275     ME_LOG,
00276     ME_PHODS,
00277     ME_EPZS,
00278     ME_X1
00279 };
00280 
00281 enum AVRounding {
00282     AV_ROUND_ZERO     = 0, 
00283     AV_ROUND_INF      = 1, 
00284     AV_ROUND_DOWN     = 2, 
00285     AV_ROUND_UP       = 3, 
00286     AV_ROUND_NEAR_INF = 5, 
00287 };
00288 
00289 enum AVDiscard{
00290 //we leave some space between them for extensions (drop some keyframes for intra only or drop just some bidir frames)
00291     AVDISCARD_NONE   =-16, 
00292     AVDISCARD_DEFAULT=  0, 
00293     AVDISCARD_NONREF =  8, 
00294     AVDISCARD_BIDIR  = 16, 
00295     AVDISCARD_NONKEY = 32, 
00296     AVDISCARD_ALL    = 48, 
00297 };
00298 
00299 typedef struct RcOverride{
00300     int start_frame;
00301     int end_frame;
00302     int qscale; // if this is 0 then quality_factor will be used instead
00303     float quality_factor;
00304 } RcOverride;
00305 
00306 /* only for ME compatiblity with old apps */
00307 extern int motion_estimation_method;
00308 
00309 #define FF_MAX_B_FRAMES 8
00310 
00311 /* encoding support
00312    these flags can be passed in AVCodecContext.flags before initing 
00313    Note: not everything is supported yet.
00314 */
00315 
00316 #define CODEC_FLAG_QSCALE 0x0002  
00317 #define CODEC_FLAG_4MV    0x0004  
00318 #define CODEC_FLAG_QPEL   0x0010  
00319 #define CODEC_FLAG_GMC    0x0020  
00320 #define CODEC_FLAG_MV0    0x0040  
00321 #define CODEC_FLAG_PART   0x0080  
00322 /* parent program gurantees that the input for b-frame containing streams is not written to 
00323    for at least s->max_b_frames+1 frames, if this is not set than the input will be copied */
00324 #define CODEC_FLAG_INPUT_PRESERVED 0x0100
00325 #define CODEC_FLAG_PASS1 0x0200   
00326 #define CODEC_FLAG_PASS2 0x0400   
00327 #define CODEC_FLAG_EXTERN_HUFF 0x1000 
00328 #define CODEC_FLAG_GRAY  0x2000   
00329 #define CODEC_FLAG_EMU_EDGE 0x4000
00330 #define CODEC_FLAG_PSNR           0x8000 
00331 #define CODEC_FLAG_TRUNCATED  0x00010000 
00333 #define CODEC_FLAG_NORMALIZE_AQP  0x00020000 
00334 #define CODEC_FLAG_INTERLACED_DCT 0x00040000 
00335 #define CODEC_FLAG_LOW_DELAY      0x00080000 
00336 #define CODEC_FLAG_ALT_SCAN       0x00100000 
00337 #define CODEC_FLAG_TRELLIS_QUANT  0x00200000 
00338 #define CODEC_FLAG_GLOBAL_HEADER  0x00400000 
00339 #define CODEC_FLAG_BITEXACT       0x00800000 
00340 /* Fx : Flag for h263+ extra options */
00341 #define CODEC_FLAG_H263P_AIC      0x01000000 
00342 #define CODEC_FLAG_AC_PRED        0x01000000 
00343 #define CODEC_FLAG_H263P_UMV      0x02000000 
00344 #define CODEC_FLAG_CBP_RD         0x04000000 
00345 #define CODEC_FLAG_QP_RD          0x08000000 
00346 #define CODEC_FLAG_H263P_AIV      0x00000008 
00347 #define CODEC_FLAG_OBMC           0x00000001 
00348 #define CODEC_FLAG_LOOP_FILTER    0x00000800 
00349 #define CODEC_FLAG_H263P_SLICE_STRUCT 0x10000000
00350 #define CODEC_FLAG_INTERLACED_ME  0x20000000 
00351 #define CODEC_FLAG_SVCD_SCAN_OFFSET 0x40000000 
00352 #define CODEC_FLAG_CLOSED_GOP     0x80000000
00353 #define CODEC_FLAG2_FAST          0x00000001 
00354 #define CODEC_FLAG2_STRICT_GOP    0x00000002 
00355 #define CODEC_FLAG2_NO_OUTPUT     0x00000004 
00356 #define CODEC_FLAG2_LOCAL_HEADER  0x00000008 
00357 
00358 /* Unsupported options :
00359  *              Syntax Arithmetic coding (SAC)
00360  *              Reference Picture Selection
00361  *              Independant Segment Decoding */
00362 /* /Fx */
00363 /* codec capabilities */
00364 
00365 #define CODEC_CAP_DRAW_HORIZ_BAND 0x0001 
00366 
00370 #define CODEC_CAP_DR1             0x0002
00371 /* if 'parse_only' field is true, then avcodec_parse_frame() can be
00372    used */
00373 #define CODEC_CAP_PARSE_ONLY      0x0004
00374 #define CODEC_CAP_TRUNCATED       0x0008
00375 /* codec can export data for HW decoding (XvMC) */
00376 #define CODEC_CAP_HWACCEL         0x0010
00377 
00381 #define CODEC_CAP_DELAY           0x0020
00382 
00383 //the following defines may change, don't expect compatibility if you use them
00384 #define MB_TYPE_INTRA4x4   0x0001
00385 #define MB_TYPE_INTRA16x16 0x0002 //FIXME h264 specific
00386 #define MB_TYPE_INTRA_PCM  0x0004 //FIXME h264 specific
00387 #define MB_TYPE_16x16      0x0008
00388 #define MB_TYPE_16x8       0x0010
00389 #define MB_TYPE_8x16       0x0020
00390 #define MB_TYPE_8x8        0x0040
00391 #define MB_TYPE_INTERLACED 0x0080
00392 #define MB_TYPE_DIRECT2     0x0100 //FIXME
00393 #define MB_TYPE_ACPRED     0x0200
00394 #define MB_TYPE_GMC        0x0400
00395 #define MB_TYPE_SKIP       0x0800
00396 #define MB_TYPE_P0L0       0x1000
00397 #define MB_TYPE_P1L0       0x2000
00398 #define MB_TYPE_P0L1       0x4000
00399 #define MB_TYPE_P1L1       0x8000
00400 #define MB_TYPE_L0         (MB_TYPE_P0L0 | MB_TYPE_P1L0)
00401 #define MB_TYPE_L1         (MB_TYPE_P0L1 | MB_TYPE_P1L1)
00402 #define MB_TYPE_L0L1       (MB_TYPE_L0   | MB_TYPE_L1)
00403 #define MB_TYPE_QUANT      0x00010000
00404 #define MB_TYPE_CBP        0x00020000
00405 //Note bits 24-31 are reserved for codec specific use (h264 ref0, mpeg1 0mv, ...)
00406 
00411 typedef struct AVPanScan{
00417     int id;
00418 
00424     int width;
00425     int height;
00426 
00432     int16_t position[3][2];
00433 }AVPanScan;
00434 
00435 #define FF_COMMON_FRAME \
00436 \
00442     uint8_t *data[4];\
00443     int linesize[4];\
00444 \
00450     uint8_t *base[4];\
00451 \
00456     int key_frame;\
00457 \
00458 \
00463     int pict_type;\
00464 \
00465 \
00471     int64_t pts;\
00472 \
00473 \
00478     int coded_picture_number;\
00479 \
00484     int display_picture_number;\
00485 \
00486 \
00491     int quality; \
00492 \
00493 \
00499     int age;\
00500 \
00501 \
00506     int reference;\
00507 \
00508 \
00513     int8_t *qscale_table;\
00514 \
00519     int qstride;\
00520 \
00521 \
00527     uint8_t *mbskip_table;\
00528 \
00529 \
00541     int16_t (*motion_val[2])[2];\
00542 \
00543 \
00549     uint32_t *mb_type;\
00550 \
00551 \
00557     uint8_t motion_subsample_log2;\
00558 \
00559 \
00564     void *opaque;\
00565 \
00566 \
00571     uint64_t error[4];\
00572 \
00573 \
00579     int type;\
00580     \
00581 \
00587     int repeat_pict;\
00588     \
00589 \
00592     int qscale_type;\
00593     \
00594 \
00599     int interlaced_frame;\
00600     \
00601 \
00606     int top_field_first;\
00607     \
00608 \
00613     AVPanScan *pan_scan;\
00614     \
00615 \
00620     int palette_has_changed;\
00621     \
00622 \
00627     int buffer_hints;\
00628 \
00629 \
00634     short *dct_coeff;\
00635 \
00636 \
00641     int8_t *ref_index[2];
00642 
00643 #define FF_QSCALE_TYPE_MPEG1    0
00644 #define FF_QSCALE_TYPE_MPEG2    1
00645 
00646 #define FF_BUFFER_TYPE_INTERNAL 1
00647 #define FF_BUFFER_TYPE_USER     2 
00648 #define FF_BUFFER_TYPE_SHARED   4 
00649 #define FF_BUFFER_TYPE_COPY     8 
00650 
00651 
00652 #define FF_I_TYPE 1 // Intra
00653 #define FF_P_TYPE 2 // Predicted
00654 #define FF_B_TYPE 3 // Bi-dir predicted
00655 #define FF_S_TYPE 4 // S(GMC)-VOP MPEG4
00656 #define FF_SI_TYPE 5
00657 #define FF_SP_TYPE 6
00658 
00659 #define FF_BUFFER_HINTS_VALID    0x01 // Buffer hints value is meaningful (if 0 ignore)
00660 #define FF_BUFFER_HINTS_READABLE 0x02 // Codec will read from buffer
00661 #define FF_BUFFER_HINTS_PRESERVE 0x04 // User must not alter buffer content
00662 #define FF_BUFFER_HINTS_REUSABLE 0x08 // Codec will reuse the buffer (update)
00663 
00667 typedef struct AVFrame {
00668     FF_COMMON_FRAME
00669 } AVFrame;
00670 
00671 #define DEFAULT_FRAME_RATE_BASE 1001000
00672 
00676 typedef struct AVCLASS AVClass;
00677 struct AVCLASS {
00678     const char* class_name;
00679     const char* (*item_name)(void*); /* actually passing a pointer to an AVCodecContext
00680                                         or AVFormatContext, which begin with an AVClass.
00681                                         Needed because av_log is in libavcodec and has no visibility
00682                                         of AVIn/OutputFormat */
00683 };
00684 
00688 typedef struct AVCodecContext {
00693     AVClass *av_class;
00699     int bit_rate;
00700 
00707     int bit_rate_tolerance; 
00708 
00714     int flags;
00715 
00721     int sub_id;
00722 
00728     int me_method;
00729 
00740     void *extradata;
00741     int extradata_size;
00742     
00743     /* video only */
00749     AVRational time_base;
00750     
00758     int width, height;
00759     
00760 #define FF_ASPECT_EXTENDED 15
00761 
00767     int gop_size;
00768 
00774     enum PixelFormat pix_fmt;
00775  
00782     int rate_emu;
00783        
00796     void (*draw_horiz_band)(struct AVCodecContext *s,
00797                             const AVFrame *src, int offset[4],
00798                             int y, int type, int height);
00799 
00800     /* audio only */
00801     int sample_rate; 
00802     int channels;
00803 
00809     enum SampleFormat sample_fmt;  
00810 
00811     /* the following data should not be initialized */
00815     int frame_size;
00816     int frame_number;   
00817     int real_pict_num;  
00818     
00825     int delay;
00826     
00827     /* - encoding parameters */
00828     float qcompress;  
00829     float qblur;      
00830     
00836     int qmin;
00837 
00843     int qmax;
00844 
00850     int max_qdiff;
00851 
00858     int max_b_frames;
00859 
00865     float b_quant_factor;
00866     
00868     int rc_strategy;
00869     int b_frame_strategy;
00870 
00877     int hurry_up;
00878     
00879     struct AVCodec *codec;
00880     
00881     void *priv_data;
00882 
00883     /* unused, FIXME remove*/
00884     int rtp_mode;
00885     
00886     int rtp_payload_size;   /* The size of the RTP payload: the coder will  */
00887                             /* do it's best to deliver a chunk with size    */
00888                             /* below rtp_payload_size, the chunk will start */
00889                             /* with a start code on some codecs like H.263  */
00890                             /* This doesn't take account of any particular  */
00891                             /* headers inside the transmited RTP payload    */
00892 
00893     
00894     /* The RTP callback: This function is called   */
00895     /* every time the encoder has a packet to send */
00896     /* Depends on the encoder if the data starts   */
00897     /* with a Start Code (it should) H.263 does.   */
00898     /* mb_nb contains the number of macroblocks    */
00899     /* encoded in the RTP payload                  */
00900     void (*rtp_callback)(struct AVCodecContext *avctx, void *data, int size, int mb_nb); 
00901 
00902     /* statistics, used for 2-pass encoding */
00903     int mv_bits;
00904     int header_bits;
00905     int i_tex_bits;
00906     int p_tex_bits;
00907     int i_count;
00908     int p_count;
00909     int skip_count;
00910     int misc_bits;
00911     
00917     int frame_bits;
00918 
00924     void *opaque;
00925 
00926     char codec_name[32];
00927     enum CodecType codec_type; /* see CODEC_TYPE_xxx */
00928     enum CodecID codec_id; /* see CODEC_ID_xxx */
00929     
00936     unsigned int codec_tag;
00937     
00943     int workaround_bugs;
00944 #define FF_BUG_AUTODETECT       1  
00945 #define FF_BUG_OLD_MSMPEG4      2
00946 #define FF_BUG_XVID_ILACE       4
00947 #define FF_BUG_UMP4             8
00948 #define FF_BUG_NO_PADDING       16
00949 #define FF_BUG_AMV              32
00950 #define FF_BUG_AC_VLC           0  
00951 #define FF_BUG_QPEL_CHROMA      64
00952 #define FF_BUG_STD_QPEL         128
00953 #define FF_BUG_QPEL_CHROMA2     256
00954 #define FF_BUG_DIRECT_BLOCKSIZE 512
00955 #define FF_BUG_EDGE             1024
00956 #define FF_BUG_HPEL_CHROMA      2048
00957 #define FF_BUG_DC_CLIP          4096
00958 #define FF_BUG_MS               8192 
00959 //#define FF_BUG_FAKE_SCALABILITY 16 //autodetection should work 100%
00960         
00966     int luma_elim_threshold;
00967     
00973     int chroma_elim_threshold;
00974     
00980     int strict_std_compliance;
00981 #define FF_COMPLIANCE_VERY_STRICT   2 
00982 #define FF_COMPLIANCE_STRICT        1 
00983 #define FF_COMPLIANCE_NORMAL        0
00984 #define FF_COMPLIANCE_INOFFICIAL   -1 
00985 #define FF_COMPLIANCE_EXPERIMENTAL -2 
00986 
00987 
00994     float b_quant_offset;
00995     
01002     int error_resilience;
01003 #define FF_ER_CAREFUL         1
01004 #define FF_ER_COMPLIANT       2
01005 #define FF_ER_AGGRESSIVE      3
01006 #define FF_ER_VERY_AGGRESSIVE 4
01007     
01016     int (*get_buffer)(struct AVCodecContext *c, AVFrame *pic);
01017     
01025     void (*release_buffer)(struct AVCodecContext *c, AVFrame *pic);
01026 
01032     int has_b_frames;
01033 
01038     int block_align;
01039     
01040     int parse_only; /* - decoding only: if true, only parsing is done
01041                        (function avcodec_parse_frame()). The frame
01042                        data is returned. Only MPEG codecs support this now. */
01043     
01049     int mpeg_quant;
01050     
01056     char *stats_out;
01057     
01064     char *stats_in;
01065     
01072     float rc_qsquish;
01073 
01074     float rc_qmod_amp;
01075     int rc_qmod_freq;
01076     
01082     RcOverride *rc_override;
01083     int rc_override_count;
01084     
01090     char *rc_eq;
01091     
01097     int rc_max_rate;
01098     
01104     int rc_min_rate;
01105     
01111     int rc_buffer_size;
01112     float rc_buffer_aggressivity;
01113 
01121     float i_quant_factor;
01122     
01128     float i_quant_offset;
01129     
01135     float rc_initial_cplx;
01136 
01142     int dct_algo;
01143 #define FF_DCT_AUTO    0
01144 #define FF_DCT_FASTINT 1
01145 #define FF_DCT_INT     2
01146 #define FF_DCT_MMX     3
01147 #define FF_DCT_MLIB    4
01148 #define FF_DCT_ALTIVEC 5
01149 #define FF_DCT_FAAN    6
01150     
01156     float lumi_masking;
01157     
01163     float temporal_cplx_masking;
01164     
01170     float spatial_cplx_masking;
01171     
01177     float p_masking;
01178 
01184     float dark_masking;
01185     
01186     
01187     /* for binary compatibility */
01188     int unused;
01189     
01195     int idct_algo;
01196 #define FF_IDCT_AUTO         0
01197 #define FF_IDCT_INT          1
01198 #define FF_IDCT_SIMPLE       2
01199 #define FF_IDCT_SIMPLEMMX    3
01200 #define FF_IDCT_LIBMPEG2MMX  4
01201 #define FF_IDCT_PS2          5
01202 #define FF_IDCT_MLIB         6
01203 #define FF_IDCT_ARM          7
01204 #define FF_IDCT_ALTIVEC      8
01205 #define FF_IDCT_SH4          9
01206 #define FF_IDCT_SIMPLEARM    10
01207 #define FF_IDCT_H264         11
01208 #define FF_IDCT_VP3          12
01209 #define FF_IDCT_IPP          13
01210 
01216     int slice_count;
01222     int *slice_offset;
01223 
01229     int error_concealment;
01230 #define FF_EC_GUESS_MVS   1
01231 #define FF_EC_DEBLOCK     2
01232 
01241     unsigned dsp_mask;
01242 #define FF_MM_FORCE     0x80000000 /* force usage of selected flags (OR) */
01243     /* lower 16 bits - CPU features */
01244 #ifdef HAVE_MMX
01245 #define FF_MM_MMX       0x0001 /* standard MMX */
01246 #define FF_MM_3DNOW     0x0004 /* AMD 3DNOW */
01247 #define FF_MM_MMXEXT    0x0002 /* SSE integer functions or AMD MMX ext */
01248 #define FF_MM_SSE       0x0008 /* SSE functions */
01249 #define FF_MM_SSE2      0x0010 /* PIV SSE2 functions */
01250 #define FF_MM_3DNOWEXT  0x0020 /* AMD 3DNowExt */
01251 #endif /* HAVE_MMX */
01252 #ifdef HAVE_IWMMXT
01253 #define FF_MM_IWMMXT    0x0100 /* XScale IWMMXT */
01254 #endif /* HAVE_IWMMXT */
01255 
01261      int bits_per_sample;
01262     
01268      int prediction_method;
01269 #define FF_PRED_LEFT   0
01270 #define FF_PRED_PLANE  1
01271 #define FF_PRED_MEDIAN 2
01272     
01279     AVRational sample_aspect_ratio;
01280 
01286     AVFrame *coded_frame;
01287 
01293     int debug;
01294 #define FF_DEBUG_PICT_INFO 1
01295 #define FF_DEBUG_RC        2
01296 #define FF_DEBUG_BITSTREAM 4
01297 #define FF_DEBUG_MB_TYPE   8
01298 #define FF_DEBUG_QP        16
01299 #define FF_DEBUG_MV        32
01300 #define FF_DEBUG_DCT_COEFF 0x00000040
01301 #define FF_DEBUG_SKIP      0x00000080
01302 #define FF_DEBUG_STARTCODE 0x00000100
01303 #define FF_DEBUG_PTS       0x00000200
01304 #define FF_DEBUG_ER        0x00000400
01305 #define FF_DEBUG_MMCO      0x00000800
01306 #define FF_DEBUG_BUGS      0x00001000
01307 #define FF_DEBUG_VIS_QP    0x00002000
01308 #define FF_DEBUG_VIS_MB_TYPE 0x00004000
01309     
01315     int debug_mv;
01316 #define FF_DEBUG_VIS_MV_P_FOR  0x00000001 //visualize forward predicted MVs of P frames
01317 #define FF_DEBUG_VIS_MV_B_FOR  0x00000002 //visualize forward predicted MVs of B frames
01318 #define FF_DEBUG_VIS_MV_B_BACK 0x00000004 //visualize backward predicted MVs of B frames
01319 
01325     uint64_t error[4];
01326     
01332     int mb_qmin;
01333 
01339     int mb_qmax;