00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 #ifndef AVCODEC_AVCODEC_H
00022 #define AVCODEC_AVCODEC_H
00023 
00029 #include <errno.h>
00030 #include "libavutil/samplefmt.h"
00031 #include "libavutil/avutil.h"
00032 #include "libavutil/cpu.h"
00033 #include "libavutil/dict.h"
00034 #include "libavutil/log.h"
00035 #include "libavutil/pixfmt.h"
00036 #include "libavutil/rational.h"
00037 
00038 #include "libavcodec/version.h"
00084 enum CodecID {
00085     CODEC_ID_NONE,
00086 
00087     
00088     CODEC_ID_MPEG1VIDEO,
00089     CODEC_ID_MPEG2VIDEO, 
00090     CODEC_ID_MPEG2VIDEO_XVMC,
00091     CODEC_ID_H261,
00092     CODEC_ID_H263,
00093     CODEC_ID_RV10,
00094     CODEC_ID_RV20,
00095     CODEC_ID_MJPEG,
00096     CODEC_ID_MJPEGB,
00097     CODEC_ID_LJPEG,
00098     CODEC_ID_SP5X,
00099     CODEC_ID_JPEGLS,
00100     CODEC_ID_MPEG4,
00101     CODEC_ID_RAWVIDEO,
00102     CODEC_ID_MSMPEG4V1,
00103     CODEC_ID_MSMPEG4V2,
00104     CODEC_ID_MSMPEG4V3,
00105     CODEC_ID_WMV1,
00106     CODEC_ID_WMV2,
00107     CODEC_ID_H263P,
00108     CODEC_ID_H263I,
00109     CODEC_ID_FLV1,
00110     CODEC_ID_SVQ1,
00111     CODEC_ID_SVQ3,
00112     CODEC_ID_DVVIDEO,
00113     CODEC_ID_HUFFYUV,
00114     CODEC_ID_CYUV,
00115     CODEC_ID_H264,
00116     CODEC_ID_INDEO3,
00117     CODEC_ID_VP3,
00118     CODEC_ID_THEORA,
00119     CODEC_ID_ASV1,
00120     CODEC_ID_ASV2,
00121     CODEC_ID_FFV1,
00122     CODEC_ID_4XM,
00123     CODEC_ID_VCR1,
00124     CODEC_ID_CLJR,
00125     CODEC_ID_MDEC,
00126     CODEC_ID_ROQ,
00127     CODEC_ID_INTERPLAY_VIDEO,
00128     CODEC_ID_XAN_WC3,
00129     CODEC_ID_XAN_WC4,
00130     CODEC_ID_RPZA,
00131     CODEC_ID_CINEPAK,
00132     CODEC_ID_WS_VQA,
00133     CODEC_ID_MSRLE,
00134     CODEC_ID_MSVIDEO1,
00135     CODEC_ID_IDCIN,
00136     CODEC_ID_8BPS,
00137     CODEC_ID_SMC,
00138     CODEC_ID_FLIC,
00139     CODEC_ID_TRUEMOTION1,
00140     CODEC_ID_VMDVIDEO,
00141     CODEC_ID_MSZH,
00142     CODEC_ID_ZLIB,
00143     CODEC_ID_QTRLE,
00144     CODEC_ID_SNOW,
00145     CODEC_ID_TSCC,
00146     CODEC_ID_ULTI,
00147     CODEC_ID_QDRAW,
00148     CODEC_ID_VIXL,
00149     CODEC_ID_QPEG,
00150     CODEC_ID_PNG,
00151     CODEC_ID_PPM,
00152     CODEC_ID_PBM,
00153     CODEC_ID_PGM,
00154     CODEC_ID_PGMYUV,
00155     CODEC_ID_PAM,
00156     CODEC_ID_FFVHUFF,
00157     CODEC_ID_RV30,
00158     CODEC_ID_RV40,
00159     CODEC_ID_VC1,
00160     CODEC_ID_WMV3,
00161     CODEC_ID_LOCO,
00162     CODEC_ID_WNV1,
00163     CODEC_ID_AASC,
00164     CODEC_ID_INDEO2,
00165     CODEC_ID_FRAPS,
00166     CODEC_ID_TRUEMOTION2,
00167     CODEC_ID_BMP,
00168     CODEC_ID_CSCD,
00169     CODEC_ID_MMVIDEO,
00170     CODEC_ID_ZMBV,
00171     CODEC_ID_AVS,
00172     CODEC_ID_SMACKVIDEO,
00173     CODEC_ID_NUV,
00174     CODEC_ID_KMVC,
00175     CODEC_ID_FLASHSV,
00176     CODEC_ID_CAVS,
00177     CODEC_ID_JPEG2000,
00178     CODEC_ID_VMNC,
00179     CODEC_ID_VP5,
00180     CODEC_ID_VP6,
00181     CODEC_ID_VP6F,
00182     CODEC_ID_TARGA,
00183     CODEC_ID_DSICINVIDEO,
00184     CODEC_ID_TIERTEXSEQVIDEO,
00185     CODEC_ID_TIFF,
00186     CODEC_ID_GIF,
00187 #if LIBAVCODEC_VERSION_MAJOR == 53
00188     CODEC_ID_FFH264,
00189 #endif
00190     CODEC_ID_DXA,
00191     CODEC_ID_DNXHD,
00192     CODEC_ID_THP,
00193     CODEC_ID_SGI,
00194     CODEC_ID_C93,
00195     CODEC_ID_BETHSOFTVID,
00196     CODEC_ID_PTX,
00197     CODEC_ID_TXD,
00198     CODEC_ID_VP6A,
00199     CODEC_ID_AMV,
00200     CODEC_ID_VB,
00201     CODEC_ID_PCX,
00202     CODEC_ID_SUNRAST,
00203     CODEC_ID_INDEO4,
00204     CODEC_ID_INDEO5,
00205     CODEC_ID_MIMIC,
00206     CODEC_ID_RL2,
00207 #if LIBAVCODEC_VERSION_MAJOR == 53
00208     CODEC_ID_8SVX_EXP,
00209     CODEC_ID_8SVX_FIB,
00210 #endif
00211     CODEC_ID_ESCAPE124,
00212     CODEC_ID_DIRAC,
00213     CODEC_ID_BFI,
00214     CODEC_ID_CMV,
00215     CODEC_ID_MOTIONPIXELS,
00216     CODEC_ID_TGV,
00217     CODEC_ID_TGQ,
00218     CODEC_ID_TQI,
00219     CODEC_ID_AURA,
00220     CODEC_ID_AURA2,
00221     CODEC_ID_V210X,
00222     CODEC_ID_TMV,
00223     CODEC_ID_V210,
00224     CODEC_ID_DPX,
00225     CODEC_ID_MAD,
00226     CODEC_ID_FRWU,
00227     CODEC_ID_FLASHSV2,
00228     CODEC_ID_CDGRAPHICS,
00229     CODEC_ID_R210,
00230     CODEC_ID_ANM,
00231     CODEC_ID_BINKVIDEO,
00232     CODEC_ID_IFF_ILBM,
00233     CODEC_ID_IFF_BYTERUN1,
00234     CODEC_ID_KGV1,
00235     CODEC_ID_YOP,
00236     CODEC_ID_VP8,
00237     CODEC_ID_PICTOR,
00238     CODEC_ID_ANSI,
00239     CODEC_ID_A64_MULTI,
00240     CODEC_ID_A64_MULTI5,
00241     CODEC_ID_R10K,
00242     CODEC_ID_MXPEG,
00243     CODEC_ID_LAGARITH,
00244     CODEC_ID_PRORES,
00245     CODEC_ID_JV,
00246     CODEC_ID_DFA,
00247     CODEC_ID_WMV3IMAGE,
00248     CODEC_ID_VC1IMAGE,
00249 #if LIBAVCODEC_VERSION_MAJOR == 53
00250     CODEC_ID_G723_1_DEPRECATED,
00251     CODEC_ID_G729_DEPRECATED,
00252 #endif
00253     CODEC_ID_UTVIDEO_DEPRECATED,
00254     CODEC_ID_BMV_VIDEO,
00255     CODEC_ID_VBLE,
00256     CODEC_ID_DXTORY,
00257     CODEC_ID_V410,
00258     CODEC_ID_Y41P       = MKBETAG('Y','4','1','P'),
00259     CODEC_ID_UTVIDEO = 0x800,
00260     CODEC_ID_ESCAPE130  = MKBETAG('E','1','3','0'),
00261 
00262     CODEC_ID_G2M        = MKBETAG( 0 ,'G','2','M'),
00263 
00264     
00265     CODEC_ID_FIRST_AUDIO = 0x10000,     
00266     CODEC_ID_PCM_S16LE = 0x10000,
00267     CODEC_ID_PCM_S16BE,
00268     CODEC_ID_PCM_U16LE,
00269     CODEC_ID_PCM_U16BE,
00270     CODEC_ID_PCM_S8,
00271     CODEC_ID_PCM_U8,
00272     CODEC_ID_PCM_MULAW,
00273     CODEC_ID_PCM_ALAW,
00274     CODEC_ID_PCM_S32LE,
00275     CODEC_ID_PCM_S32BE,
00276     CODEC_ID_PCM_U32LE,
00277     CODEC_ID_PCM_U32BE,
00278     CODEC_ID_PCM_S24LE,
00279     CODEC_ID_PCM_S24BE,
00280     CODEC_ID_PCM_U24LE,
00281     CODEC_ID_PCM_U24BE,
00282     CODEC_ID_PCM_S24DAUD,
00283     CODEC_ID_PCM_ZORK,
00284     CODEC_ID_PCM_S16LE_PLANAR,
00285     CODEC_ID_PCM_DVD,
00286     CODEC_ID_PCM_F32BE,
00287     CODEC_ID_PCM_F32LE,
00288     CODEC_ID_PCM_F64BE,
00289     CODEC_ID_PCM_F64LE,
00290     CODEC_ID_PCM_BLURAY,
00291     CODEC_ID_PCM_LXF,
00292     CODEC_ID_S302M,
00293     CODEC_ID_PCM_S8_PLANAR,
00294 
00295     
00296     CODEC_ID_ADPCM_IMA_QT = 0x11000,
00297     CODEC_ID_ADPCM_IMA_WAV,
00298     CODEC_ID_ADPCM_IMA_DK3,
00299     CODEC_ID_ADPCM_IMA_DK4,
00300     CODEC_ID_ADPCM_IMA_WS,
00301     CODEC_ID_ADPCM_IMA_SMJPEG,
00302     CODEC_ID_ADPCM_MS,
00303     CODEC_ID_ADPCM_4XM,
00304     CODEC_ID_ADPCM_XA,
00305     CODEC_ID_ADPCM_ADX,
00306     CODEC_ID_ADPCM_EA,
00307     CODEC_ID_ADPCM_G726,
00308     CODEC_ID_ADPCM_CT,
00309     CODEC_ID_ADPCM_SWF,
00310     CODEC_ID_ADPCM_YAMAHA,
00311     CODEC_ID_ADPCM_SBPRO_4,
00312     CODEC_ID_ADPCM_SBPRO_3,
00313     CODEC_ID_ADPCM_SBPRO_2,
00314     CODEC_ID_ADPCM_THP,
00315     CODEC_ID_ADPCM_IMA_AMV,
00316     CODEC_ID_ADPCM_EA_R1,
00317     CODEC_ID_ADPCM_EA_R3,
00318     CODEC_ID_ADPCM_EA_R2,
00319     CODEC_ID_ADPCM_IMA_EA_SEAD,
00320     CODEC_ID_ADPCM_IMA_EA_EACS,
00321     CODEC_ID_ADPCM_EA_XAS,
00322     CODEC_ID_ADPCM_EA_MAXIS_XA,
00323     CODEC_ID_ADPCM_IMA_ISS,
00324     CODEC_ID_ADPCM_G722,
00325 
00326     
00327     CODEC_ID_AMR_NB = 0x12000,
00328     CODEC_ID_AMR_WB,
00329 
00330     
00331     CODEC_ID_RA_144 = 0x13000,
00332     CODEC_ID_RA_288,
00333 
00334     
00335     CODEC_ID_ROQ_DPCM = 0x14000,
00336     CODEC_ID_INTERPLAY_DPCM,
00337     CODEC_ID_XAN_DPCM,
00338     CODEC_ID_SOL_DPCM,
00339 
00340     
00341     CODEC_ID_MP2 = 0x15000,
00342     CODEC_ID_MP3, 
00343     CODEC_ID_AAC,
00344     CODEC_ID_AC3,
00345     CODEC_ID_DTS,
00346     CODEC_ID_VORBIS,
00347     CODEC_ID_DVAUDIO,
00348     CODEC_ID_WMAV1,
00349     CODEC_ID_WMAV2,
00350     CODEC_ID_MACE3,
00351     CODEC_ID_MACE6,
00352     CODEC_ID_VMDAUDIO,
00353 #if LIBAVCODEC_VERSION_MAJOR == 53
00354     CODEC_ID_SONIC,
00355     CODEC_ID_SONIC_LS,
00356 #endif
00357     CODEC_ID_FLAC,
00358     CODEC_ID_MP3ADU,
00359     CODEC_ID_MP3ON4,
00360     CODEC_ID_SHORTEN,
00361     CODEC_ID_ALAC,
00362     CODEC_ID_WESTWOOD_SND1,
00363     CODEC_ID_GSM, 
00364     CODEC_ID_QDM2,
00365     CODEC_ID_COOK,
00366     CODEC_ID_TRUESPEECH,
00367     CODEC_ID_TTA,
00368     CODEC_ID_SMACKAUDIO,
00369     CODEC_ID_QCELP,
00370     CODEC_ID_WAVPACK,
00371     CODEC_ID_DSICINAUDIO,
00372     CODEC_ID_IMC,
00373     CODEC_ID_MUSEPACK7,
00374     CODEC_ID_MLP,
00375     CODEC_ID_GSM_MS, 
00376     CODEC_ID_ATRAC3,
00377     CODEC_ID_VOXWARE,
00378     CODEC_ID_APE,
00379     CODEC_ID_NELLYMOSER,
00380     CODEC_ID_MUSEPACK8,
00381     CODEC_ID_SPEEX,
00382     CODEC_ID_WMAVOICE,
00383     CODEC_ID_WMAPRO,
00384     CODEC_ID_WMALOSSLESS,
00385     CODEC_ID_ATRAC3P,
00386     CODEC_ID_EAC3,
00387     CODEC_ID_SIPR,
00388     CODEC_ID_MP1,
00389     CODEC_ID_TWINVQ,
00390     CODEC_ID_TRUEHD,
00391     CODEC_ID_MP4ALS,
00392     CODEC_ID_ATRAC1,
00393     CODEC_ID_BINKAUDIO_RDFT,
00394     CODEC_ID_BINKAUDIO_DCT,
00395     CODEC_ID_AAC_LATM,
00396     CODEC_ID_QDMC,
00397     CODEC_ID_CELT,
00398 #if LIBAVCODEC_VERSION_MAJOR > 53
00399     CODEC_ID_G723_1_DEPRECATED,
00400     CODEC_ID_G729_DEPRECATED,
00401     CODEC_ID_8SVX_EXP,
00402     CODEC_ID_8SVX_FIB,
00403 #endif
00404     CODEC_ID_BMV_AUDIO,
00405     CODEC_ID_G729 = 0x15800,
00406     CODEC_ID_G723_1= 0x15801,
00407     CODEC_ID_8SVX_RAW   = MKBETAG('8','S','V','X'),
00408 
00409     
00410     CODEC_ID_FIRST_SUBTITLE = 0x17000,          
00411     CODEC_ID_DVD_SUBTITLE = 0x17000,
00412     CODEC_ID_DVB_SUBTITLE,
00413     CODEC_ID_TEXT,  
00414     CODEC_ID_XSUB,
00415     CODEC_ID_SSA,
00416     CODEC_ID_MOV_TEXT,
00417     CODEC_ID_HDMV_PGS_SUBTITLE,
00418     CODEC_ID_DVB_TELETEXT,
00419     CODEC_ID_SRT,
00420     CODEC_ID_MICRODVD   = MKBETAG('m','D','V','D'),
00421 
00422     
00423     CODEC_ID_FIRST_UNKNOWN = 0x18000,           
00424     CODEC_ID_TTF = 0x18000,
00425     CODEC_ID_BINTEXT    = MKBETAG('B','T','X','T'),
00426     CODEC_ID_XBIN       = MKBETAG('X','B','I','N'),
00427     CODEC_ID_IDF        = MKBETAG( 0 ,'I','D','F'),
00428 
00429     CODEC_ID_PROBE = 0x19000, 
00430 
00431     CODEC_ID_MPEG2TS = 0x20000, 
00433     CODEC_ID_MPEG4SYSTEMS = 0x20001, 
00435     CODEC_ID_FFMETADATA = 0x21000,   
00436 };
00437 
00438 #if FF_API_OLD_SAMPLE_FMT
00439 #define SampleFormat AVSampleFormat
00440 
00441 #define SAMPLE_FMT_NONE AV_SAMPLE_FMT_NONE
00442 #define SAMPLE_FMT_U8   AV_SAMPLE_FMT_U8
00443 #define SAMPLE_FMT_S16  AV_SAMPLE_FMT_S16
00444 #define SAMPLE_FMT_S32  AV_SAMPLE_FMT_S32
00445 #define SAMPLE_FMT_FLT  AV_SAMPLE_FMT_FLT
00446 #define SAMPLE_FMT_DBL  AV_SAMPLE_FMT_DBL
00447 #define SAMPLE_FMT_NB   AV_SAMPLE_FMT_NB
00448 #endif
00449 
00450 #if FF_API_OLD_AUDIOCONVERT
00451 #include "libavutil/audioconvert.h"
00452 
00453 
00454 #define CH_FRONT_LEFT            AV_CH_FRONT_LEFT
00455 #define CH_FRONT_RIGHT           AV_CH_FRONT_RIGHT
00456 #define CH_FRONT_CENTER          AV_CH_FRONT_CENTER
00457 #define CH_LOW_FREQUENCY         AV_CH_LOW_FREQUENCY
00458 #define CH_BACK_LEFT             AV_CH_BACK_LEFT
00459 #define CH_BACK_RIGHT            AV_CH_BACK_RIGHT
00460 #define CH_FRONT_LEFT_OF_CENTER  AV_CH_FRONT_LEFT_OF_CENTER
00461 #define CH_FRONT_RIGHT_OF_CENTER AV_CH_FRONT_RIGHT_OF_CENTER
00462 #define CH_BACK_CENTER           AV_CH_BACK_CENTER
00463 #define CH_SIDE_LEFT             AV_CH_SIDE_LEFT
00464 #define CH_SIDE_RIGHT            AV_CH_SIDE_RIGHT
00465 #define CH_TOP_CENTER            AV_CH_TOP_CENTER
00466 #define CH_TOP_FRONT_LEFT        AV_CH_TOP_FRONT_LEFT
00467 #define CH_TOP_FRONT_CENTER      AV_CH_TOP_FRONT_CENTER
00468 #define CH_TOP_FRONT_RIGHT       AV_CH_TOP_FRONT_RIGHT
00469 #define CH_TOP_BACK_LEFT         AV_CH_TOP_BACK_LEFT
00470 #define CH_TOP_BACK_CENTER       AV_CH_TOP_BACK_CENTER
00471 #define CH_TOP_BACK_RIGHT        AV_CH_TOP_BACK_RIGHT
00472 #define CH_STEREO_LEFT           AV_CH_STEREO_LEFT
00473 #define CH_STEREO_RIGHT          AV_CH_STEREO_RIGHT
00474 
00478 #define CH_LAYOUT_NATIVE         AV_CH_LAYOUT_NATIVE
00479 
00480 
00481 #define CH_LAYOUT_MONO           AV_CH_LAYOUT_MONO
00482 #define CH_LAYOUT_STEREO         AV_CH_LAYOUT_STEREO
00483 #define CH_LAYOUT_2_1            AV_CH_LAYOUT_2_1
00484 #define CH_LAYOUT_SURROUND       AV_CH_LAYOUT_SURROUND
00485 #define CH_LAYOUT_4POINT0        AV_CH_LAYOUT_4POINT0
00486 #define CH_LAYOUT_2_2            AV_CH_LAYOUT_2_2
00487 #define CH_LAYOUT_QUAD           AV_CH_LAYOUT_QUAD
00488 #define CH_LAYOUT_5POINT0        AV_CH_LAYOUT_5POINT0
00489 #define CH_LAYOUT_5POINT1        AV_CH_LAYOUT_5POINT1
00490 #define CH_LAYOUT_5POINT0_BACK   AV_CH_LAYOUT_5POINT0_BACK
00491 #define CH_LAYOUT_5POINT1_BACK   AV_CH_LAYOUT_5POINT1_BACK
00492 #define CH_LAYOUT_7POINT0        AV_CH_LAYOUT_7POINT0
00493 #define CH_LAYOUT_7POINT1        AV_CH_LAYOUT_7POINT1
00494 #define CH_LAYOUT_7POINT1_WIDE   AV_CH_LAYOUT_7POINT1_WIDE
00495 #define CH_LAYOUT_STEREO_DOWNMIX AV_CH_LAYOUT_STEREO_DOWNMIX
00496 #endif
00497 
00498 #if FF_API_OLD_DECODE_AUDIO
00499 
00500 #define AVCODEC_MAX_AUDIO_FRAME_SIZE 192000 // 1 second of 48khz 32bit audio
00501 #endif
00502 
00510 #define FF_INPUT_BUFFER_PADDING_SIZE 16
00511 
00516 #define FF_MIN_BUFFER_SIZE 16384
00517 
00518 
00522 enum Motion_Est_ID {
00523     ME_ZERO = 1,    
00524     ME_FULL,
00525     ME_LOG,
00526     ME_PHODS,
00527     ME_EPZS,        
00528     ME_X1,          
00529     ME_HEX,         
00530     ME_UMH,         
00531     ME_ITER,        
00532     ME_TESA,        
00533 };
00534 
00535 enum AVDiscard{
00536     
00537 
00538     AVDISCARD_NONE   =-16, 
00539     AVDISCARD_DEFAULT=  0, 
00540     AVDISCARD_NONREF =  8, 
00541     AVDISCARD_BIDIR  = 16, 
00542     AVDISCARD_NONKEY = 32, 
00543     AVDISCARD_ALL    = 48, 
00544 };
00545 
00546 enum AVColorPrimaries{
00547     AVCOL_PRI_BT709      =1, 
00548     AVCOL_PRI_UNSPECIFIED=2,
00549     AVCOL_PRI_BT470M     =4,
00550     AVCOL_PRI_BT470BG    =5, 
00551     AVCOL_PRI_SMPTE170M  =6, 
00552     AVCOL_PRI_SMPTE240M  =7, 
00553     AVCOL_PRI_FILM       =8,
00554     AVCOL_PRI_NB           , 
00555 };
00556 
00557 enum AVColorTransferCharacteristic{
00558     AVCOL_TRC_BT709      =1, 
00559     AVCOL_TRC_UNSPECIFIED=2,
00560     AVCOL_TRC_GAMMA22    =4, 
00561     AVCOL_TRC_GAMMA28    =5, 
00562     AVCOL_TRC_SMPTE240M  =7,
00563     AVCOL_TRC_NB           , 
00564 };
00565 
00566 enum AVColorSpace{
00567     AVCOL_SPC_RGB        =0,
00568     AVCOL_SPC_BT709      =1, 
00569     AVCOL_SPC_UNSPECIFIED=2,
00570     AVCOL_SPC_FCC        =4,
00571     AVCOL_SPC_BT470BG    =5, 
00572     AVCOL_SPC_SMPTE170M  =6, 
00573     AVCOL_SPC_SMPTE240M  =7,
00574     AVCOL_SPC_YCGCO      =8,
00575     AVCOL_SPC_NB           , 
00576 };
00577 
00578 enum AVColorRange{
00579     AVCOL_RANGE_UNSPECIFIED=0,
00580     AVCOL_RANGE_MPEG       =1, 
00581     AVCOL_RANGE_JPEG       =2, 
00582     AVCOL_RANGE_NB           , 
00583 };
00584 
00590 enum AVChromaLocation{
00591     AVCHROMA_LOC_UNSPECIFIED=0,
00592     AVCHROMA_LOC_LEFT       =1, 
00593     AVCHROMA_LOC_CENTER     =2, 
00594     AVCHROMA_LOC_TOPLEFT    =3, 
00595     AVCHROMA_LOC_TOP        =4,
00596     AVCHROMA_LOC_BOTTOMLEFT =5,
00597     AVCHROMA_LOC_BOTTOM     =6,
00598     AVCHROMA_LOC_NB           , 
00599 };
00600 
00601 #if FF_API_FLAC_GLOBAL_OPTS
00602 
00605 enum AVLPCType {
00606     AV_LPC_TYPE_DEFAULT     = -1, 
00607     AV_LPC_TYPE_NONE        =  0, 
00608     AV_LPC_TYPE_FIXED       =  1, 
00609     AV_LPC_TYPE_LEVINSON    =  2, 
00610     AV_LPC_TYPE_CHOLESKY    =  3, 
00611     AV_LPC_TYPE_NB              , 
00612 };
00613 #endif
00614 
00615 enum AVAudioServiceType {
00616     AV_AUDIO_SERVICE_TYPE_MAIN              = 0,
00617     AV_AUDIO_SERVICE_TYPE_EFFECTS           = 1,
00618     AV_AUDIO_SERVICE_TYPE_VISUALLY_IMPAIRED = 2,
00619     AV_AUDIO_SERVICE_TYPE_HEARING_IMPAIRED  = 3,
00620     AV_AUDIO_SERVICE_TYPE_DIALOGUE          = 4,
00621     AV_AUDIO_SERVICE_TYPE_COMMENTARY        = 5,
00622     AV_AUDIO_SERVICE_TYPE_EMERGENCY         = 6,
00623     AV_AUDIO_SERVICE_TYPE_VOICE_OVER        = 7,
00624     AV_AUDIO_SERVICE_TYPE_KARAOKE           = 8,
00625     AV_AUDIO_SERVICE_TYPE_NB                   , 
00626 };
00627 
00628 typedef struct RcOverride{
00629     int start_frame;
00630     int end_frame;
00631     int qscale; 
00632     float quality_factor;
00633 } RcOverride;
00634 
00635 #define FF_MAX_B_FRAMES 16
00636 
00637 
00638 
00639 
00640 
00641 
00642 #define CODEC_FLAG_QSCALE 0x0002  
00643 #define CODEC_FLAG_4MV    0x0004  
00644 #define CODEC_FLAG_QPEL   0x0010  
00645 #define CODEC_FLAG_GMC    0x0020  
00646 #define CODEC_FLAG_MV0    0x0040  
00647 
00652 #define CODEC_FLAG_INPUT_PRESERVED 0x0100
00653 #define CODEC_FLAG_PASS1           0x0200   
00654 #define CODEC_FLAG_PASS2           0x0400   
00655 #define CODEC_FLAG_GRAY            0x2000   
00656 #define CODEC_FLAG_EMU_EDGE        0x4000   
00657 #define CODEC_FLAG_PSNR            0x8000   
00658 #define CODEC_FLAG_TRUNCATED       0x00010000 
00660 #define CODEC_FLAG_NORMALIZE_AQP  0x00020000 
00661 #define CODEC_FLAG_INTERLACED_DCT 0x00040000 
00662 #define CODEC_FLAG_LOW_DELAY      0x00080000 
00663 #define CODEC_FLAG_GLOBAL_HEADER  0x00400000 
00664 #define CODEC_FLAG_BITEXACT       0x00800000 
00665 
00666 #define CODEC_FLAG_AC_PRED        0x01000000 
00667 #define CODEC_FLAG_CBP_RD         0x04000000 
00668 #define CODEC_FLAG_QP_RD          0x08000000 
00669 #define CODEC_FLAG_LOOP_FILTER    0x00000800 
00670 #define CODEC_FLAG_INTERLACED_ME  0x20000000 
00671 #define CODEC_FLAG_CLOSED_GOP     0x80000000
00672 #define CODEC_FLAG2_FAST          0x00000001 
00673 #define CODEC_FLAG2_STRICT_GOP    0x00000002 
00674 #define CODEC_FLAG2_NO_OUTPUT     0x00000004 
00675 #define CODEC_FLAG2_LOCAL_HEADER  0x00000008 
00676 #define CODEC_FLAG2_SKIP_RD       0x00004000 
00677 #define CODEC_FLAG2_CHUNKS        0x00008000 
00678 #define CODEC_FLAG2_SHOW_ALL      0x00400000 
00679 
00684 #if FF_API_MPEGVIDEO_GLOBAL_OPTS
00685 #define CODEC_FLAG_OBMC           0x00000001 
00686 #define CODEC_FLAG_H263P_AIV      0x00000008 
00687 #define CODEC_FLAG_PART   0x0080  
00688 #define CODEC_FLAG_ALT_SCAN       0x00100000 
00689 #define CODEC_FLAG_H263P_UMV      0x02000000 
00690 #define CODEC_FLAG_H263P_SLICE_STRUCT 0x10000000
00691 #define CODEC_FLAG_SVCD_SCAN_OFFSET 0x40000000 
00692 #define CODEC_FLAG2_INTRA_VLC     0x00000800 
00693 #define CODEC_FLAG2_DROP_FRAME_TIMECODE 0x00002000 
00694 #define CODEC_FLAG2_NON_LINEAR_QUANT 0x00010000 
00695 #endif
00696 #if FF_API_MJPEG_GLOBAL_OPTS
00697 #define CODEC_FLAG_EXTERN_HUFF     0x1000   
00698 #endif
00699 #if FF_API_X264_GLOBAL_OPTS
00700 #define CODEC_FLAG2_BPYRAMID      0x00000010 
00701 #define CODEC_FLAG2_WPRED         0x00000020 
00702 #define CODEC_FLAG2_MIXED_REFS    0x00000040 
00703 #define CODEC_FLAG2_8X8DCT        0x00000080 
00704 #define CODEC_FLAG2_FASTPSKIP     0x00000100 
00705 #define CODEC_FLAG2_AUD           0x00000200 
00706 #define CODEC_FLAG2_BRDO          0x00000400 
00707 #define CODEC_FLAG2_MBTREE        0x00040000 
00708 #define CODEC_FLAG2_PSY           0x00080000 
00709 #define CODEC_FLAG2_SSIM          0x00100000 
00710 #define CODEC_FLAG2_INTRA_REFRESH 0x00200000 
00711 #endif
00712 #if FF_API_SNOW_GLOBAL_OPTS
00713 #define CODEC_FLAG2_MEMC_ONLY     0x00001000 
00714 #endif
00715 #if FF_API_LAME_GLOBAL_OPTS
00716 #define CODEC_FLAG2_BIT_RESERVOIR 0x00020000 
00717 #endif
00718 
00722 
00723 
00724 
00725 
00726 
00727 
00728 
00729 #define CODEC_CAP_DRAW_HORIZ_BAND 0x0001 
00730 
00735 #define CODEC_CAP_DR1             0x0002
00736 #if FF_API_PARSE_FRAME
00737 
00738 #define CODEC_CAP_PARSE_ONLY      0x0004
00739 #endif
00740 #define CODEC_CAP_TRUNCATED       0x0008
00741 
00742 #define CODEC_CAP_HWACCEL         0x0010
00743 
00749 #define CODEC_CAP_DELAY           0x0020
00750 
00754 #define CODEC_CAP_SMALL_LAST_FRAME 0x0040
00755 
00758 #define CODEC_CAP_HWACCEL_VDPAU    0x0080
00759 
00770 #define CODEC_CAP_SUBFRAMES        0x0100
00771 
00775 #define CODEC_CAP_EXPERIMENTAL     0x0200
00776 
00779 #define CODEC_CAP_CHANNEL_CONF     0x0400
00780 
00784 #define CODEC_CAP_NEG_LINESIZES    0x0800
00785 
00789 #define CODEC_CAP_FRAME_THREADS    0x1000
00790 
00793 #define CODEC_CAP_SLICE_THREADS    0x2000
00794 
00797 #define CODEC_CAP_PARAM_CHANGE     0x4000
00798 
00801 #define CODEC_CAP_LOSSLESS         0x80000000
00802 
00803 
00804 #define MB_TYPE_INTRA4x4   0x0001
00805 #define MB_TYPE_INTRA16x16 0x0002 //FIXME H.264-specific
00806 #define MB_TYPE_INTRA_PCM  0x0004 //FIXME H.264-specific
00807 #define MB_TYPE_16x16      0x0008
00808 #define MB_TYPE_16x8       0x0010
00809 #define MB_TYPE_8x16       0x0020
00810 #define MB_TYPE_8x8        0x0040
00811 #define MB_TYPE_INTERLACED 0x0080
00812 #define MB_TYPE_DIRECT2    0x0100 //FIXME
00813 #define MB_TYPE_ACPRED     0x0200
00814 #define MB_TYPE_GMC        0x0400
00815 #define MB_TYPE_SKIP       0x0800
00816 #define MB_TYPE_P0L0       0x1000
00817 #define MB_TYPE_P1L0       0x2000
00818 #define MB_TYPE_P0L1       0x4000
00819 #define MB_TYPE_P1L1       0x8000
00820 #define MB_TYPE_L0         (MB_TYPE_P0L0 | MB_TYPE_P1L0)
00821 #define MB_TYPE_L1         (MB_TYPE_P0L1 | MB_TYPE_P1L1)
00822 #define MB_TYPE_L0L1       (MB_TYPE_L0   | MB_TYPE_L1)
00823 #define MB_TYPE_QUANT      0x00010000
00824 #define MB_TYPE_CBP        0x00020000
00825 
00826 
00832 typedef struct AVPanScan{
00838     int id;
00839 
00845     int width;
00846     int height;
00847 
00853     int16_t position[3][2];
00854 }AVPanScan;
00855 
00856 #define FF_QSCALE_TYPE_MPEG1 0
00857 #define FF_QSCALE_TYPE_MPEG2 1
00858 #define FF_QSCALE_TYPE_H264  2
00859 #define FF_QSCALE_TYPE_VP56  3
00860 
00861 #define FF_BUFFER_TYPE_INTERNAL 1
00862 #define FF_BUFFER_TYPE_USER     2 
00863 #define FF_BUFFER_TYPE_SHARED   4 
00864 #define FF_BUFFER_TYPE_COPY     8 
00865 
00866 #if FF_API_OLD_FF_PICT_TYPES
00867 
00868 #define FF_I_TYPE  AV_PICTURE_TYPE_I  
00869 #define FF_P_TYPE  AV_PICTURE_TYPE_P  
00870 #define FF_B_TYPE  AV_PICTURE_TYPE_B  
00871 #define FF_S_TYPE  AV_PICTURE_TYPE_S  
00872 #define FF_SI_TYPE AV_PICTURE_TYPE_SI 
00873 #define FF_SP_TYPE AV_PICTURE_TYPE_SP 
00874 #define FF_BI_TYPE AV_PICTURE_TYPE_BI
00875 #endif
00876 
00877 #define FF_BUFFER_HINTS_VALID    0x01 // Buffer hints value is meaningful (if 0 ignore).
00878 #define FF_BUFFER_HINTS_READABLE 0x02 // Codec will read from buffer.
00879 #define FF_BUFFER_HINTS_PRESERVE 0x04 // User must not alter buffer content.
00880 #define FF_BUFFER_HINTS_REUSABLE 0x08 // Codec will reuse the buffer (update).
00881 
00882 enum AVPacketSideDataType {
00883     AV_PKT_DATA_PALETTE,
00884     AV_PKT_DATA_NEW_EXTRADATA,
00885     AV_PKT_DATA_PARAM_CHANGE,
00886 };
00887 
00888 typedef struct AVPacket {
00898     int64_t pts;
00904     int64_t dts;
00905     uint8_t *data;
00906     int   size;
00907     int   stream_index;
00911     int   flags;
00916     struct {
00917         uint8_t *data;
00918         int      size;
00919         enum AVPacketSideDataType type;
00920     } *side_data;
00921     int side_data_elems;
00922 
00927     int   duration;
00928     void  (*destruct)(struct AVPacket *);
00929     void  *priv;
00930     int64_t pos;                            
00931 
00949     int64_t convergence_duration;
00950 } AVPacket;
00951 #define AV_PKT_FLAG_KEY     0x0001 
00952 #define AV_PKT_FLAG_CORRUPT 0x0002 
00953 
00954 
00968 enum AVSideDataParamChangeFlags {
00969     AV_SIDE_DATA_PARAM_CHANGE_CHANNEL_COUNT  = 0x0001,
00970     AV_SIDE_DATA_PARAM_CHANGE_CHANNEL_LAYOUT = 0x0002,
00971     AV_SIDE_DATA_PARAM_CHANGE_SAMPLE_RATE    = 0x0004,
00972     AV_SIDE_DATA_PARAM_CHANGE_DIMENSIONS     = 0x0008,
00973 };
00974 
00985 typedef struct AVFrame {
00986 #if FF_API_DATA_POINTERS
00987 #define AV_NUM_DATA_POINTERS 4
00988 #else
00989 #define AV_NUM_DATA_POINTERS 8
00990 #endif
00991 
00997     uint8_t *data[AV_NUM_DATA_POINTERS];
00998 
01008     int linesize[AV_NUM_DATA_POINTERS];
01009 
01016     uint8_t *base[AV_NUM_DATA_POINTERS];
01022     int key_frame;
01023 
01029     enum AVPictureType pict_type;
01030 
01037     int64_t pts;
01038 
01044     int coded_picture_number;
01050     int display_picture_number;
01051 
01057     int quality;
01058 
01065     int age;
01066 
01075     int reference;
01076 
01082     int8_t *qscale_table;
01088     int qstride;
01089 
01096     uint8_t *mbskip_table;
01097 
01110     int16_t (*motion_val[2])[2];
01111 
01118     uint32_t *mb_type;
01119 
01126     uint8_t motion_subsample_log2;
01127 
01133     void *opaque;
01134 
01140     uint64_t error[AV_NUM_DATA_POINTERS];
01141 
01148     int type;
01149 
01156     int repeat_pict;
01157 
01161     int qscale_type;
01162 
01168     int interlaced_frame;
01169 
01175     int top_field_first;
01176 
01182     AVPanScan *pan_scan;
01183 
01189     int palette_has_changed;
01190 
01196     int buffer_hints;
01197 
01203     short *dct_coeff;
01204 
01211     int8_t *ref_index[2];
01212 
01224     int64_t reordered_opaque;
01225 
01231     void *hwaccel_picture_private;
01232 
01238     int64_t pkt_pts;
01239 
01245     int64_t pkt_dts;
01246 
01252     struct AVCodecContext *owner;
01253 
01259     void *thread_opaque;
01260 
01266     int nb_samples;
01267 
01286     uint8_t **extended_data;
01287 
01295     int64_t best_effort_timestamp;
01296 
01304     int64_t pkt_pos;
01305 
01313     AVRational sample_aspect_ratio;
01314 
01322     int width, height;
01323 
01333     int format;
01334 
01335 } AVFrame;
01336 
01337 struct AVCodecInternal;
01338 
01348 typedef struct AVCodecContext {
01353     const AVClass *av_class;
01359     int bit_rate;
01360 
01367     int bit_rate_tolerance;
01368 
01374     int flags;
01375 
01384     int sub_id;
01385 
01393     int me_method;
01394 
01406     uint8_t *extradata;
01407     int extradata_size;
01408 
01417     AVRational time_base;
01418 
01419     
01427     int width, height;
01428 
01429 #define FF_ASPECT_EXTENDED 15
01430 
01436     int gop_size;
01437 
01445     enum PixelFormat pix_fmt;
01446 
01470     void (*draw_horiz_band)(struct AVCodecContext *s,
01471                             const AVFrame *src, int offset[AV_NUM_DATA_POINTERS],
01472                             int y, int type, int height);
01473 
01474     
01475     int sample_rate; 
01476     int channels;    
01477 
01483     enum AVSampleFormat sample_fmt;  
01484 
01485     
01489     int frame_size;
01490     int frame_number;   
01491 
01500     int delay;
01501 
01502     
01503     float qcompress;  
01504     float qblur;      
01505 
01511     int qmin;
01512 
01518     int qmax;
01519 
01525     int max_qdiff;
01526 
01533     int max_b_frames;
01534 
01542     float b_quant_factor;
01543 
01545     int rc_strategy;
01546 #define FF_RC_STRATEGY_XVID 1
01547 
01548     int b_frame_strategy;
01549 
01550     struct AVCodec *codec;
01551 
01552     void *priv_data;
01553 
01554     int rtp_payload_size;   
01555                             
01556                             
01557                             
01558                             
01559                             
01560 
01561 
01562     
01563     
01564     
01565     
01566     
01567     
01568     void (*rtp_callback)(struct AVCodecContext *avctx, void *data, int size, int mb_nb);
01569 
01570     
01571     int mv_bits;
01572     int header_bits;
01573     int i_tex_bits;
01574     int p_tex_bits;
01575     int i_count;
01576     int p_count;
01577     int skip_count;
01578     int misc_bits;
01579 
01585     int frame_bits;
01586 
01592     void *opaque;
01593 
01594     char codec_name[32];
01595     enum AVMediaType codec_type; 
01596     enum CodecID codec_id; 
01597 
01611     unsigned int codec_tag;
01612 
01618     int workaround_bugs;
01619 #define FF_BUG_AUTODETECT       1  
01620 #define FF_BUG_OLD_MSMPEG4      2
01621 #define FF_BUG_XVID_ILACE       4
01622 #define FF_BUG_UMP4             8
01623 #define FF_BUG_NO_PADDING       16
01624 #define FF_BUG_AMV              32
01625 #define FF_BUG_AC_VLC           0  
01626 #define FF_BUG_QPEL_CHROMA      64
01627 #define FF_BUG_STD_QPEL         128
01628 #define FF_BUG_QPEL_CHROMA2     256
01629 #define FF_BUG_DIRECT_BLOCKSIZE 512
01630 #define FF_BUG_EDGE             1024
01631 #define FF_BUG_HPEL_CHROMA      2048
01632 #define FF_BUG_DC_CLIP          4096
01633 #define FF_BUG_MS               8192 
01634 #define FF_BUG_TRUNCATED       16384
01635 
01636 
01642     int luma_elim_threshold;
01643 
01649     int chroma_elim_threshold;
01650 
01663     int strict_std_compliance;
01664 #define FF_COMPLIANCE_VERY_STRICT   2 
01665 #define FF_COMPLIANCE_STRICT        1 
01666 #define FF_COMPLIANCE_NORMAL        0
01667 #define FF_COMPLIANCE_UNOFFICIAL   -1 
01668 #define FF_COMPLIANCE_EXPERIMENTAL -2 
01669 
01670 
01675     float b_quant_offset;
01676 
01677 #if FF_API_ER
01678 
01684     attribute_deprecated int error_recognition;
01685 #define FF_ER_CAREFUL         1
01686 #define FF_ER_COMPLIANT       2
01687 #define FF_ER_AGGRESSIVE      3
01688 #define FF_ER_VERY_AGGRESSIVE 4
01689 #define FF_ER_EXPLODE         5
01690 #endif 
01691 
01747     int (*get_buffer)(struct AVCodecContext *c, AVFrame *pic);
01748 
01758     void (*release_buffer)(struct AVCodecContext *c, AVFrame *pic);
01759 
01766     int has_b_frames;
01767 
01772     int block_align;
01773 
01774 #if FF_API_PARSE_FRAME
01775 
01781     attribute_deprecated int parse_only;
01782 #endif
01783 
01789     int mpeg_quant;
01790 
01796     char *stats_out;
01797 
01804     char *stats_in;
01805 
01812     float rc_qsquish;
01813 
01814     float rc_qmod_amp;
01815     int rc_qmod_freq;
01816 
01822     RcOverride *rc_override;
01823     int rc_override_count;
01824 
01830     const char *rc_eq;
01831 
01837     int rc_max_rate;
01838 
01844     int rc_min_rate;
01845 
01851     int rc_buffer_size;
01852     float rc_buffer_aggressivity;
01853 
01861     float i_quant_factor;
01862 
01868     float i_quant_offset;
01869 
01875     float rc_initial_cplx;
01876 
01882     int dct_algo;
01883 #define FF_DCT_AUTO    0
01884 #define FF_DCT_FASTINT 1
01885 #define FF_DCT_INT     2
01886 #define FF_DCT_MMX     3
01887 #define FF_DCT_MLIB    4
01888 #define FF_DCT_ALTIVEC 5
01889 #define FF_DCT_FAAN    6
01890 
01896     float lumi_masking;
01897 
01903     float temporal_cplx_masking;
01904 
01910     float spatial_cplx_masking;
01911 
01917     float p_masking;
01918 
01924     float dark_masking;
01925 
01931     int idct_algo;
01932 #define FF_IDCT_AUTO          0
01933 #define FF_IDCT_INT           1
01934 #define FF_IDCT_SIMPLE        2
01935 #define FF_IDCT_SIMPLEMMX     3
01936 #define FF_IDCT_LIBMPEG2MMX   4
01937 #define FF_IDCT_PS2           5
01938 #define FF_IDCT_MLIB          6
01939 #define FF_IDCT_ARM           7
01940 #define FF_IDCT_ALTIVEC       8
01941 #define FF_IDCT_SH4           9
01942 #define FF_IDCT_SIMPLEARM     10
01943 #define FF_IDCT_H264          11
01944 #define FF_IDCT_VP3           12
01945 #define FF_IDCT_IPP           13
01946 #define FF_IDCT_XVIDMMX       14
01947 #define FF_IDCT_CAVS          15
01948 #define FF_IDCT_SIMPLEARMV5TE 16
01949 #define FF_IDCT_SIMPLEARMV6   17
01950 #define FF_IDCT_SIMPLEVIS     18
01951 #define FF_IDCT_WMV2          19
01952 #define FF_IDCT_FAAN          20
01953 #define FF_IDCT_EA            21
01954 #define FF_IDCT_SIMPLENEON    22
01955 #define FF_IDCT_SIMPLEALPHA   23
01956 #define FF_IDCT_BINK          24
01957 
01963     int slice_count;
01969     int *slice_offset;
01970 
01976     int error_concealment;
01977 #define FF_EC_GUESS_MVS   1
01978 #define FF_EC_DEBLOCK     2
01979 
01988     unsigned dsp_mask;
01989 
01995      int bits_per_coded_sample;
01996 
02002      int prediction_method;
02003 #define FF_PRED_LEFT   0
02004 #define FF_PRED_PLANE  1
02005 #define FF_PRED_MEDIAN 2
02006 
02014     AVRational sample_aspect_ratio;
02015 
02021     AVFrame *coded_frame;
02022 
02028     int debug;
02029 #define FF_DEBUG_PICT_INFO   1
02030 #define FF_DEBUG_RC          2
02031 #define FF_DEBUG_BITSTREAM   4
02032 #define FF_DEBUG_MB_TYPE     8
02033 #define FF_DEBUG_QP          16
02034 #define FF_DEBUG_MV          32
02035 #define FF_DEBUG_DCT_COEFF   0x00000040
02036 #define FF_DEBUG_SKIP        0x00000080
02037 #define FF_DEBUG_STARTCODE   0x00000100
02038 #define FF_DEBUG_PTS         0x00000200
02039 #define FF_DEBUG_ER          0x00000400
02040 #define FF_DEBUG_MMCO        0x00000800
02041 #define FF_DEBUG_BUGS        0x00001000
02042 #define FF_DEBUG_VIS_QP      0x00002000
02043 #define FF_DEBUG_VIS_MB_TYPE 0x00004000
02044 #define FF_DEBUG_BUFFERS     0x00008000
02045 #define FF_DEBUG_THREADS     0x00010000
02046 
02052     int debug_mv;
02053 #define FF_DEBUG_VIS_MV_P_FOR  0x00000001 //visualize forward predicted MVs of P frames
02054 #define FF_DEBUG_VIS_MV_B_FOR  0x00000002 //visualize forward predicted MVs of B frames
02055 #define FF_DEBUG_VIS_MV_B_BACK 0x00000004 //visualize backward predicted MVs of B frames
02056 
02062     uint64_t error[AV_NUM_DATA_POINTERS];
02063 
02069     int me_cmp;
02075     int me_sub_cmp;
02081     int mb_cmp;
02087     int ildct_cmp;
02088 #define FF_CMP_SAD    0
02089 #define FF_CMP_SSE    1
02090 #define FF_CMP_SATD   2
02091 #define FF_CMP_DCT    3
02092 #define FF_CMP_PSNR   4
02093 #define FF_CMP_BIT    5
02094 #define FF_CMP_RD     6
02095 #define FF_CMP_ZERO   7
02096 #define FF_CMP_VSAD   8
02097 #define FF_CMP_VSSE   9
02098 #define FF_CMP_NSSE   10
02099 #define FF_CMP_W53    11
02100 #define FF_CMP_W97    12
02101 #define FF_CMP_DCTMAX 13
02102 #define FF_CMP_DCT264 14
02103 #define FF_CMP_CHROMA 256
02104 
02110     int dia_size;
02111 
02117     int last_predictor_count;
02118 
02124     int pre_me;
02125 
02131     int me_pre_cmp;
02132 
02138     int pre_dia_size;
02139 
02145     int me_subpel_quality;
02146 
02156     enum PixelFormat (*get_format)(struct AVCodecContext *s, const enum PixelFormat * fmt);
02157 
02166     int dtg_active_format;
02167 #define FF_DTG_AFD_SAME         8
02168 #define FF_DTG_AFD_4_3          9
02169 #define FF_DTG_AFD_16_9         10
02170 #define FF_DTG_AFD_14_9         11
02171 #define FF_DTG_AFD_4_3_SP_14_9  13
02172 #define FF_DTG_AFD_16_9_SP_14_9 14
02173 #define FF_DTG_AFD_SP_4_3       15
02174 
02182     int me_range;
02183 
02189     int intra_quant_bias;
02190 #define FF_DEFAULT_QUANT_BIAS 999999
02191 
02197     int inter_quant_bias;
02198 
02205     int color_table_id;
02206 
02207 #if FF_API_INTERNAL_CONTEXT
02208 
02213     attribute_deprecated int internal_buffer_count;
02214 
02220     attribute_deprecated void *internal_buffer;
02221 #endif
02222 
02229     int global_quality;
02230 
02231 #define FF_CODER_TYPE_VLC       0
02232 #define FF_CODER_TYPE_AC        1
02233 #define FF_CODER_TYPE_RAW       2
02234 #define FF_CODER_TYPE_RLE       3
02235 #define FF_CODER_TYPE_DEFLATE   4
02236 
02241     int coder_type;
02242 
02248     int context_model;
02249 #if 0
02250 
02255     uint8_t * (*realloc)(struct AVCodecContext *s, uint8_t *buf, int buf_size);
02256 #endif
02257 
02263     int slice_flags;
02264 #define SLICE_FLAG_CODED_ORDER    0x0001 
02265 #define SLICE_FLAG_ALLOW_FIELD    0x0002 
02266 #define SLICE_FLAG_ALLOW_PLANE    0x0004 
02267 
02268 
02273     int xvmc_acceleration;
02274 
02280     int mb_decision;
02281 #define FF_MB_DECISION_SIMPLE 0        
02282 #define FF_MB_DECISION_BITS   1        
02283 #define FF_MB_DECISION_RD     2        
02284 
02285 
02290     uint16_t *intra_matrix;
02291 
02297     uint16_t *inter_matrix;
02298 
02305     unsigned int stream_codec_tag;
02306 
02313     int scenechange_threshold;
02314 
02320     int lmin;
02321 
02327     int lmax;
02328 
02329 #if FF_API_PALETTE_CONTROL
02330 
02335     struct AVPaletteControl *palctrl;
02336 #endif
02337 
02343     int noise_reduction;
02344 
02357     int (*reget_buffer)(struct AVCodecContext *c, AVFrame *pic);
02358 
02364     int rc_initial_buffer_occupancy;
02365 
02371     int inter_threshold;
02372 
02378     int flags2;
02379 
02385     int error_rate;
02386 
02387 #if FF_API_ANTIALIAS_ALGO
02388 
02393     attribute_deprecated int antialias_algo;
02394 #define FF_AA_AUTO    0
02395 #define FF_AA_FASTINT 1 //not implemented yet
02396 #define FF_AA_INT     2
02397 #define FF_AA_FLOAT   3
02398 #endif
02399 
02405     int quantizer_noise_shaping;
02406 
02413     int thread_count;
02414 
02424     int (*execute)(struct AVCodecContext *c, int (*func)(struct AVCodecContext *c2, void *arg), void *arg2, int *ret, int count, int size);
02425 
02432     void *thread_opaque;
02433 
02441      int me_threshold;
02442 
02448      int mb_threshold;
02449 
02455      int intra_dc_precision;
02456 
02462      int nsse_weight;
02463 
02469      int skip_top;
02470 
02476      int skip_bottom;
02477 
02483      int profile;
02484 #define FF_PROFILE_UNKNOWN -99
02485 #define FF_PROFILE_RESERVED -100
02486 
02487 #define FF_PROFILE_AAC_MAIN 0
02488 #define FF_PROFILE_AAC_LOW  1
02489 #define FF_PROFILE_AAC_SSR  2
02490 #define FF_PROFILE_AAC_LTP  3
02491 
02492 #define FF_PROFILE_DTS         20
02493 #define FF_PROFILE_DTS_ES      30
02494 #define FF_PROFILE_DTS_96_24   40
02495 #define FF_PROFILE_DTS_HD_HRA  50
02496 #define FF_PROFILE_DTS_HD_MA   60
02497 
02498 #define FF_PROFILE_MPEG2_422    0
02499 #define FF_PROFILE_MPEG2_HIGH   1
02500 #define FF_PROFILE_MPEG2_SS     2
02501 #define FF_PROFILE_MPEG2_SNR_SCALABLE  3
02502 #define FF_PROFILE_MPEG2_MAIN   4
02503 #define FF_PROFILE_MPEG2_SIMPLE 5
02504 
02505 #define FF_PROFILE_H264_CONSTRAINED  (1<<9)  // 8+1; constraint_set1_flag
02506 #define FF_PROFILE_H264_INTRA        (1<<11) // 8+3; constraint_set3_flag
02507 
02508 #define FF_PROFILE_H264_BASELINE             66
02509 #define FF_PROFILE_H264_CONSTRAINED_BASELINE (66|FF_PROFILE_H264_CONSTRAINED)
02510 #define FF_PROFILE_H264_MAIN                 77
02511 #define FF_PROFILE_H264_EXTENDED             88
02512 #define FF_PROFILE_H264_HIGH                 100
02513 #define FF_PROFILE_H264_HIGH_10              110
02514 #define FF_PROFILE_H264_HIGH_10_INTRA        (110|FF_PROFILE_H264_INTRA)
02515 #define FF_PROFILE_H264_HIGH_422             122
02516 #define FF_PROFILE_H264_HIGH_422_INTRA       (122|FF_PROFILE_H264_INTRA)
02517 #define FF_PROFILE_H264_HIGH_444             144
02518 #define FF_PROFILE_H264_HIGH_444_PREDICTIVE  244
02519 #define FF_PROFILE_H264_HIGH_444_INTRA       (244|FF_PROFILE_H264_INTRA)
02520 #define FF_PROFILE_H264_CAVLC_444            44
02521 
02522 #define FF_PROFILE_VC1_SIMPLE   0
02523 #define FF_PROFILE_VC1_MAIN     1
02524 #define FF_PROFILE_VC1_COMPLEX  2
02525 #define FF_PROFILE_VC1_ADVANCED 3
02526 
02527 #define FF_PROFILE_MPEG4_SIMPLE                     0
02528 #define FF_PROFILE_MPEG4_SIMPLE_SCALABLE            1
02529 #define FF_PROFILE_MPEG4_CORE                       2
02530 #define FF_PROFILE_MPEG4_MAIN                       3
02531 #define FF_PROFILE_MPEG4_N_BIT                      4
02532 #define FF_PROFILE_MPEG4_SCALABLE_TEXTURE           5
02533 #define FF_PROFILE_MPEG4_SIMPLE_FACE_ANIMATION      6
02534 #define FF_PROFILE_MPEG4_BASIC_ANIMATED_TEXTURE     7
02535 #define FF_PROFILE_MPEG4_HYBRID                     8
02536 #define FF_PROFILE_MPEG4_ADVANCED_REAL_TIME         9
02537 #define FF_PROFILE_MPEG4_CORE_SCALABLE             10
02538 #define FF_PROFILE_MPEG4_ADVANCED_CODING           11
02539 #define FF_PROFILE_MPEG4_ADVANCED_CORE             12
02540 #define FF_PROFILE_MPEG4_ADVANCED_SCALABLE_TEXTURE 13
02541 #define FF_PROFILE_MPEG4_SIMPLE_STUDIO             14
02542 #define FF_PROFILE_MPEG4_ADVANCED_SIMPLE           15
02543 
02549      int level;
02550 #define FF_LEVEL_UNKNOWN -99
02551 
02557      int lowres;
02558 
02564     int coded_width, coded_height;
02565 
02571     int frame_skip_threshold;
02572 
02578     int frame_skip_factor;
02579 
02585     int frame_skip_exp;
02586 
02592     int frame_skip_cmp;
02593 
02600     float border_masking;
02601 
02607     int mb_lmin;
02608 
02614     int mb_lmax;
02615 
02621     int me_penalty_compensation;
02622 
02628     enum AVDiscard skip_loop_filter;
02629 
02635     enum AVDiscard skip_idct;
02636 
02642     enum AVDiscard skip_frame;
02643 
02649     int bidir_refine;
02650 
02656     int brd_scale;
02657 
02658 #if FF_API_X264_GLOBAL_OPTS
02659 
02665     attribute_deprecated float crf;
02666 
02673     attribute_deprecated int cqp;
02674 #endif
02675 
02681     int keyint_min;
02682 
02688     int refs;
02689 
02695     int chromaoffset;
02696 
02697 #if FF_API_X264_GLOBAL_OPTS
02698 
02703     attribute_deprecated int bframebias;
02704 #endif
02705 
02711     int trellis;
02712 
02713 #if FF_API_X264_GLOBAL_OPTS
02714 
02719     attribute_deprecated float complexityblur;
02720 
02727     attribute_deprecated int deblockalpha;
02728 
02735     attribute_deprecated int deblockbeta;
02736 
02742     attribute_deprecated int partitions;
02743 #define X264_PART_I4X4 0x001  
02744 #define X264_PART_I8X8 0x002  
02745 #define X264_PART_P8X8 0x010  
02746 #define X264_PART_P4X4 0x020  
02747 #define X264_PART_B8X8 0x100  
02748 
02754     attribute_deprecated int directpred;
02755 #endif
02756 
02762     int cutoff;
02763 
02769     int scenechange_factor;
02770 
02777     int mv0_threshold;
02778 
02784     int b_sensitivity;
02785 
02790     int compression_level;
02791 #define FF_COMPRESSION_DEFAULT -1
02792 
02797     int min_prediction_order;
02798 
02803     int max_prediction_order;
02804 
02805 #if FF_API_FLAC_GLOBAL_OPTS
02806 
02817     attribute_deprecated int lpc_coeff_precision;
02818 
02824     attribute_deprecated int prediction_order_method;
02825 
02830     attribute_deprecated int min_partition_order;
02831 
02836     attribute_deprecated int max_partition_order;
02840 #endif
02841 
02847     int64_t timecode_frame_start;
02848 
02849 #if FF_API_REQUEST_CHANNELS
02850 
02856     int request_channels;
02857 #endif
02858 
02859 #if FF_API_DRC_SCALE
02860 
02867     attribute_deprecated float drc_scale;
02868 #endif
02869 
02877     int64_t reordered_opaque;
02878 
02884     int bits_per_raw_sample;
02885 
02891     uint64_t channel_layout;
02892 
02898     uint64_t request_channel_layout;
02899 
02905     float rc_max_available_vbv_use;
02906 
02912     float rc_min_vbv_overflow_use;
02913 
02919     struct AVHWAccel *hwaccel;
02920 
02928     int ticks_per_frame;
02929 
02940     void *hwaccel_context;
02941 
02947     enum AVColorPrimaries color_primaries;
02948 
02954     enum AVColorTransferCharacteristic color_trc;
02955 
02961     enum AVColorSpace colorspace;
02962 
02968     enum AVColorRange color_range;
02969 
02975     enum AVChromaLocation chroma_sample_location;
02976 
02995     int (*execute2)(struct AVCodecContext *c, int (*func)(struct AVCodecContext *c2, void *arg, int jobnr, int threadnr), void *arg2, int *ret, int count);
02996 
02997 #if FF_API_X264_GLOBAL_OPTS
02998 
03006     attribute_deprecated int weighted_p_pred;
03007 
03016     attribute_deprecated int aq_mode;
03017 
03024     attribute_deprecated float aq_strength;
03025 
03032     attribute_deprecated float psy_rd;
03033 
03040     attribute_deprecated float psy_trellis;
03041 
03048     attribute_deprecated int rc_lookahead;
03049 
03057     attribute_deprecated float crf_max;
03058 #endif
03059 
03060     int log_level_offset;
03061 
03062 #if FF_API_FLAC_GLOBAL_OPTS
03063 
03068     attribute_deprecated enum AVLPCType lpc_type;
03069 
03075     attribute_deprecated int lpc_passes;
03076 #endif
03077 
03085     int slices;
03086 
03095     uint8_t *subtitle_header;
03096     int subtitle_header_size;
03097 
03105     AVPacket *pkt;
03106 
03107 #if FF_API_INTERNAL_CONTEXT
03108 
03117     attribute_deprecated int is_copy;
03118 #endif
03119 
03128     int thread_type;
03129 #define FF_THREAD_FRAME   1 
03130 #define FF_THREAD_SLICE   2 
03131 
03132 
03137     int active_thread_type;
03138 
03147     int thread_safe_callbacks;
03148 
03155     uint64_t vbv_delay;
03156 
03162     enum AVAudioServiceType audio_service_type;
03163 
03170     enum AVSampleFormat request_sample_fmt;
03171 
03177     int err_recognition;
03178 #define AV_EF_CRCCHECK  (1<<0)
03179 #define AV_EF_BITSTREAM (1<<1)
03180 #define AV_EF_BUFFER    (1<<2)
03181 #define AV_EF_EXPLODE   (1<<3)
03182 
03183 #define AV_EF_CAREFUL    (1<<16)
03184 #define AV_EF_COMPLIANT  (1<<17)
03185 #define AV_EF_AGGRESSIVE (1<<18)
03186 
03193     struct AVCodecInternal *internal;
03194 
03200     int64_t pts_correction_num_faulty_pts; 
03201     int64_t pts_correction_num_faulty_dts; 
03202     int64_t pts_correction_last_pts;       
03203     int64_t pts_correction_last_dts;       
03204 
03205 } AVCodecContext;
03206 
03210 typedef struct AVProfile {
03211     int profile;
03212     const char *name; 
03213 } AVProfile;
03214 
03215 typedef struct AVCodecDefault AVCodecDefault;
03216 
03220 typedef struct AVCodec {
03227     const char *name;
03228     enum AVMediaType type;
03229     enum CodecID id;
03230     int priv_data_size;
03231     int (*init)(AVCodecContext *);
03232     int (*encode)(AVCodecContext *, uint8_t *buf, int buf_size, void *data);
03233     int (*close)(AVCodecContext *);
03234     int (*decode)(AVCodecContext *, void *outdata, int *outdata_size, AVPacket *avpkt);
03239     int capabilities;
03240     struct AVCodec *next;
03245     void (*flush)(AVCodecContext *);
03246     const AVRational *supported_framerates; 
03247     const enum PixelFormat *pix_fmts;       
03248 
03252     const char *long_name;
03253     const int *supported_samplerates;       
03254     const enum AVSampleFormat *sample_fmts; 
03255     const uint64_t *channel_layouts;         
03256     uint8_t max_lowres;                     
03257     const AVClass *priv_class;              
03258     const AVProfile *profiles;              
03259 
03269     int (*init_thread_copy)(AVCodecContext *);
03277     int (*update_thread_context)(AVCodecContext *dst, const AVCodecContext *src);
03283     const AVCodecDefault *defaults;
03284 
03288     void (*init_static_data)(struct AVCodec *codec);
03289 } AVCodec;
03290 
03294 typedef struct AVHWAccel {
03300     const char *name;
03301 
03307     enum AVMediaType type;
03308 
03314     enum CodecID id;
03315 
03321     enum PixelFormat pix_fmt;
03322 
03327     int capabilities;
03328 
03329     struct AVHWAccel *next;
03330 
03345     int (*start_frame)(AVCodecContext *avctx, const uint8_t *buf, uint32_t buf_size);
03346 
03358     int (*decode_slice)(AVCodecContext *avctx, const uint8_t *buf, uint32_t buf_size);
03359 
03369     int (*end_frame)(AVCodecContext *avctx);
03370 
03378     int priv_data_size;
03379 } AVHWAccel;
03380 
03385 typedef struct AVPicture {
03386     uint8_t *data[AV_NUM_DATA_POINTERS];
03387     int linesize[AV_NUM_DATA_POINTERS];     
03388 } AVPicture;
03389 
03390 #define AVPALETTE_SIZE 1024
03391 #define AVPALETTE_COUNT 256
03392 #if FF_API_PALETTE_CONTROL
03393 
03401 typedef struct AVPaletteControl {
03402 
03403     
03404 
03405     int palette_changed;
03406 
03407     
03408 
03409 
03410 
03411     unsigned int palette[AVPALETTE_COUNT];
03412 
03413 } AVPaletteControl attribute_deprecated;
03414 #endif
03415 
03416 enum AVSubtitleType {
03417     SUBTITLE_NONE,
03418 
03419     SUBTITLE_BITMAP,                
03420 
03425     SUBTITLE_TEXT,
03426 
03431     SUBTITLE_ASS,
03432 };
03433 
03434 typedef struct AVSubtitleRect {
03435     int x;         
03436     int y;         
03437     int w;         
03438     int h;         
03439     int nb_colors; 
03440 
03445     AVPicture pict;
03446     enum AVSubtitleType type;
03447 
03448     char *text;                     
03449 
03455     char *ass;
03456 } AVSubtitleRect;
03457 
03458 typedef struct AVSubtitle {
03459     uint16_t format; 
03460     uint32_t start_display_time; 
03461     uint32_t end_display_time; 
03462     unsigned num_rects;
03463     AVSubtitleRect **rects;
03464     int64_t pts;    
03465 } AVSubtitle;
03466 
03467 
03468 
03472 attribute_deprecated void av_destruct_packet_nofree(AVPacket *pkt);
03473 
03477 void av_destruct_packet(AVPacket *pkt);
03478 
03484 void av_init_packet(AVPacket *pkt);
03485 
03494 int av_new_packet(AVPacket *pkt, int size);
03495 
03502 void av_shrink_packet(AVPacket *pkt, int size);
03503 
03510 int av_grow_packet(AVPacket *pkt, int grow_by);
03511 
03516 int av_dup_packet(AVPacket *pkt);
03517 
03523 void av_free_packet(AVPacket *pkt);
03524 
03533 uint8_t* av_packet_new_side_data(AVPacket *pkt, enum AVPacketSideDataType type,
03534                                  int size);
03535 
03544 uint8_t* av_packet_get_side_data(AVPacket *pkt, enum AVPacketSideDataType type,
03545                                  int *size);
03546 
03547 int av_packet_merge_side_data(AVPacket *pkt);
03548 
03549 int av_packet_split_side_data(AVPacket *pkt);
03550 
03551 
03552 
03553 
03554 struct ReSampleContext;
03555 struct AVResampleContext;
03556 
03557 typedef struct ReSampleContext ReSampleContext;
03558 
03575 ReSampleContext *av_audio_resample_init(int output_channels, int input_channels,
03576                                         int output_rate, int input_rate,
03577                                         enum AVSampleFormat sample_fmt_out,
03578                                         enum AVSampleFormat sample_fmt_in,
03579                                         int filter_length, int log2_phase_count,
03580                                         int linear, double cutoff);
03581 
03582 int audio_resample(ReSampleContext *s, short *output, short *input, int nb_samples);
03583 
03590 void audio_resample_close(ReSampleContext *s);
03591 
03592 
03602 struct AVResampleContext *av_resample_init(int out_rate, int in_rate, int filter_length, int log2_phase_count, int linear, double cutoff);
03603 
03613 int av_resample(struct AVResampleContext *c, short *dst, short *src, int *consumed, int src_size, int dst_size, int update_ctx);
03614 
03615 
03628 void av_resample_compensate(struct AVResampleContext *c, int sample_delta, int compensation_distance);
03629 void av_resample_close(struct AVResampleContext *c);
03630 
03642 int avpicture_alloc(AVPicture *picture, enum PixelFormat pix_fmt, int width, int height);
03643 
03651 void avpicture_free(AVPicture *picture);
03652 
03673 int avpicture_fill(AVPicture *picture, uint8_t *ptr,
03674                    enum PixelFormat pix_fmt, int width, int height);
03675 
03691 int avpicture_layout(const AVPicture* src, enum PixelFormat pix_fmt, int width, int height,
03692                      unsigned char *dest, int dest_size);
03693 
03706 int avpicture_get_size(enum PixelFormat pix_fmt, int width, int height);
03707 void avcodec_get_chroma_sub_sample(enum PixelFormat pix_fmt, int *h_shift, int *v_shift);
03708 
03713 const char *avcodec_get_name(enum CodecID id);
03714 
03715 #if FF_API_GET_PIX_FMT_NAME
03716 
03722 attribute_deprecated
03723 const char *avcodec_get_pix_fmt_name(enum PixelFormat pix_fmt);
03724 #endif
03725 
03726 void avcodec_set_dimensions(AVCodecContext *s, int width, int height);
03727 
03733 unsigned int avcodec_pix_fmt_to_codec_tag(enum PixelFormat pix_fmt);
03734 
03742 size_t av_get_codec_tag_string(char *buf, size_t buf_size, unsigned int codec_tag);
03743 
03744 #define FF_LOSS_RESOLUTION  0x0001 
03745 #define FF_LOSS_DEPTH       0x0002 
03746 #define FF_LOSS_COLORSPACE  0x0004 
03747 #define FF_LOSS_ALPHA       0x0008 
03748 #define FF_LOSS_COLORQUANT  0x0010 
03749 #define FF_LOSS_CHROMA      0x0020 
03769 int avcodec_get_pix_fmt_loss(enum PixelFormat dst_pix_fmt, enum PixelFormat src_pix_fmt,
03770                              int has_alpha);
03771 
03796 enum PixelFormat avcodec_find_best_pix_fmt(int64_t pix_fmt_mask, enum PixelFormat src_pix_fmt,
03797                               int has_alpha, int *loss_ptr);
03798 
03829 enum PixelFormat avcodec_find_best_pix_fmt2(enum PixelFormat dst_pix_fmt1, enum PixelFormat dst_pix_fmt2,
03830                                             enum PixelFormat src_pix_fmt, int has_alpha, int *loss_ptr);
03831 
03832 #if FF_API_GET_ALPHA_INFO
03833 #define FF_ALPHA_TRANSP       0x0001 
03834 #define FF_ALPHA_SEMI_TRANSP  0x0002 
03835 
03840 attribute_deprecated
03841 int img_get_alpha_info(const AVPicture *src,
03842                        enum PixelFormat pix_fmt, int width, int height);
03843 #endif
03844 
03845 
03846 
03847 int avpicture_deinterlace(AVPicture *dst, const AVPicture *src,
03848                           enum PixelFormat pix_fmt, int width, int height);
03849 
03850 
03851 
03857 AVCodec *av_codec_next(AVCodec *c);
03858 
03862 unsigned avcodec_version(void);
03863 
03867 const char *avcodec_configuration(void);
03868 
03872 const char *avcodec_license(void);
03873 
03874 #if FF_API_AVCODEC_INIT
03875 
03879 attribute_deprecated
03880 void avcodec_init(void);
03881 #endif
03882 
03891 void avcodec_register(AVCodec *codec);
03892 
03899 AVCodec *avcodec_find_encoder(enum CodecID id);
03900 
03907 AVCodec *avcodec_find_encoder_by_name(const char *name);
03908 
03915 AVCodec *avcodec_find_decoder(enum CodecID id);
03916 
03923 AVCodec *avcodec_find_decoder_by_name(const char *name);
03924 void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode);
03925 
03933 const char *av_get_profile_name(const AVCodec *codec, int profile);
03934 
03935 #if FF_API_ALLOC_CONTEXT
03936 
03942 attribute_deprecated
03943 void avcodec_get_context_defaults(AVCodecContext *s);
03944 
03947 attribute_deprecated
03948 void avcodec_get_context_defaults2(AVCodecContext *s, enum AVMediaType);
03949 #endif
03950 
03960 int avcodec_get_context_defaults3(AVCodecContext *s, AVCodec *codec);
03961 
03962 #if FF_API_ALLOC_CONTEXT
03963 
03972 attribute_deprecated
03973 AVCodecContext *avcodec_alloc_context(void);
03974 
03977 attribute_deprecated
03978 AVCodecContext *avcodec_alloc_context2(enum AVMediaType);
03979 #endif
03980 
03992 AVCodecContext *avcodec_alloc_context3(AVCodec *codec);
03993 
04005 int avcodec_copy_context(AVCodecContext *dest, const AVCodecContext *src);
04006 
04012 void avcodec_get_frame_defaults(AVFrame *pic);
04013 
04021 AVFrame *avcodec_alloc_frame(void);
04022 
04023 int avcodec_default_get_buffer(AVCodecContext *s, AVFrame *pic);
04024 void avcodec_default_release_buffer(AVCodecContext *s, AVFrame *pic);
04025 int avcodec_default_reget_buffer(AVCodecContext *s, AVFrame *pic);
04026 
04034 unsigned avcodec_get_edge_width(void);
04044 void avcodec_align_dimensions(AVCodecContext *s, int *width, int *height);
04054 void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height,
04055                                int linesize_align[AV_NUM_DATA_POINTERS]);
04056 
04057 enum PixelFormat avcodec_default_get_format(struct AVCodecContext *s, const enum PixelFormat * fmt);
04058 
04059 #if FF_API_THREAD_INIT
04060 
04063 attribute_deprecated
04064 int avcodec_thread_init(AVCodecContext *s, int thread_count);
04065 #endif
04066 
04067 int avcodec_default_execute(AVCodecContext *c, int (*func)(AVCodecContext *c2, void *arg2),void *arg, int *ret, int count, int size);
04068 int avcodec_default_execute2(AVCodecContext *c, int (*func)(AVCodecContext *c2, void *arg2, int, int),void *arg, int *ret, int count);
04069 
04070 
04071 #if FF_API_AVCODEC_OPEN
04072 
04101 attribute_deprecated
04102 int avcodec_open(AVCodecContext *avctx, AVCodec *codec);
04103 #endif
04104 
04136 int avcodec_open2(AVCodecContext *avctx, AVCodec *codec, AVDictionary **options);
04137 
04138 #if FF_API_OLD_DECODE_AUDIO
04139 
04188 attribute_deprecated int avcodec_decode_audio3(AVCodecContext *avctx, int16_t *samples,
04189                          int *frame_size_ptr,
04190                          AVPacket *avpkt);
04191 #endif
04192 
04226 int avcodec_decode_audio4(AVCodecContext *avctx, AVFrame *frame,
04227                           int *got_frame_ptr, AVPacket *avpkt);
04228 
04270 int avcodec_decode_video2(AVCodecContext *avctx, AVFrame *picture,
04271                          int *got_picture_ptr,
04272                          AVPacket *avpkt);
04273 
04290 int avcodec_decode_subtitle2(AVCodecContext *avctx, AVSubtitle *sub,
04291                             int *got_sub_ptr,
04292                             AVPacket *avpkt);
04293 
04299 void avsubtitle_free(AVSubtitle *sub);
04300 
04320 int avcodec_encode_audio(AVCodecContext *avctx, uint8_t *buf, int buf_size,
04321                          const short *samples);
04322 
04335 int avcodec_encode_video(AVCodecContext *avctx, uint8_t *buf, int buf_size,
04336                          const AVFrame *pict);
04337 int avcodec_encode_subtitle(AVCodecContext *avctx, uint8_t *buf, int buf_size,
04338                             const AVSubtitle *sub);
04339 
04340 int avcodec_close(AVCodecContext *avctx);
04341 
04352 void avcodec_register_all(void);
04353 
04357 void avcodec_flush_buffers(AVCodecContext *avctx);
04358 
04359 void avcodec_default_free_buffers(AVCodecContext *s);
04360 
04361 
04362 
04363 #if FF_API_OLD_FF_PICT_TYPES
04364 
04371 attribute_deprecated
04372 char av_get_pict_type_char(int pict_type);
04373 #endif
04374 
04381 int av_get_bits_per_sample(enum CodecID codec_id);
04382 
04383 #if FF_API_OLD_SAMPLE_FMT
04384 
04387 attribute_deprecated
04388 int av_get_bits_per_sample_format(enum AVSampleFormat sample_fmt);
04389 #endif
04390 
04391 
04392 typedef struct AVCodecParserContext {
04393     void *priv_data;
04394     struct AVCodecParser *parser;
04395     int64_t frame_offset; 
04396     int64_t cur_offset; 
04397 
04398     int64_t next_frame_offset; 
04399     
04400     int pict_type; 
04410     int repeat_pict; 
04411     int64_t pts;     
04412     int64_t dts;     
04413 
04414     
04415     int64_t last_pts;
04416     int64_t last_dts;
04417     int fetch_timestamp;
04418 
04419 #define AV_PARSER_PTS_NB 4
04420     int cur_frame_start_index;
04421     int64_t cur_frame_offset[AV_PARSER_PTS_NB];
04422     int64_t cur_frame_pts[AV_PARSER_PTS_NB];
04423     int64_t cur_frame_dts[AV_PARSER_PTS_NB];
04424 
04425     int flags;
04426 #define PARSER_FLAG_COMPLETE_FRAMES           0x0001
04427 #define PARSER_FLAG_ONCE                      0x0002
04429 #define PARSER_FLAG_FETCHED_OFFSET            0x0004
04430 
04431     int64_t offset;      
04432     int64_t cur_frame_end[AV_PARSER_PTS_NB];
04433 
04440     int key_frame;
04441 
04459     int64_t convergence_duration;
04460 
04461     
04471     int dts_sync_point;
04472 
04486     int dts_ref_dts_delta;
04487 
04500     int pts_dts_delta;
04501 
04507     int64_t cur_frame_pos[AV_PARSER_PTS_NB];
04508 
04512     int64_t pos;
04513 
04517     int64_t last_pos;
04518 } AVCodecParserContext;
04519 
04520 typedef struct AVCodecParser {
04521     int codec_ids[5]; 
04522     int priv_data_size;
04523     int (*parser_init)(AVCodecParserContext *s);
04524     int (*parser_parse)(AVCodecParserContext *s,
04525                         AVCodecContext *avctx,
04526                         const uint8_t **poutbuf, int *poutbuf_size,
04527                         const uint8_t *buf, int buf_size);
04528     void (*parser_close)(AVCodecParserContext *s);
04529     int (*split)(AVCodecContext *avctx, const uint8_t *buf, int buf_size);
04530     struct AVCodecParser *next;
04531 } AVCodecParser;
04532 
04533 AVCodecParser *av_parser_next(AVCodecParser *c);
04534 
04535 void av_register_codec_parser(AVCodecParser *parser);
04536 AVCodecParserContext *av_parser_init(int codec_id);
04537 
04566 int av_parser_parse2(AVCodecParserContext *s,
04567                      AVCodecContext *avctx,
04568                      uint8_t **poutbuf, int *poutbuf_size,
04569                      const uint8_t *buf, int buf_size,
04570                      int64_t pts, int64_t dts,
04571                      int64_t pos);
04572 
04573 int av_parser_change(AVCodecParserContext *s,
04574                      AVCodecContext *avctx,
04575                      uint8_t **poutbuf, int *poutbuf_size,
04576                      const uint8_t *buf, int buf_size, int keyframe);
04577 void av_parser_close(AVCodecParserContext *s);
04578 
04579 
04580 typedef struct AVBitStreamFilterContext {
04581     void *priv_data;
04582     struct AVBitStreamFilter *filter;
04583     AVCodecParserContext *parser;
04584     struct AVBitStreamFilterContext *next;
04585 } AVBitStreamFilterContext;
04586 
04587 
04588 typedef struct AVBitStreamFilter {
04589     const char *name;
04590     int priv_data_size;
04591     int (*filter)(AVBitStreamFilterContext *bsfc,
04592                   AVCodecContext *avctx, const char *args,
04593                   uint8_t **poutbuf, int *poutbuf_size,
04594                   const uint8_t *buf, int buf_size, int keyframe);
04595     void (*close)(AVBitStreamFilterContext *bsfc);
04596     struct AVBitStreamFilter *next;
04597 } AVBitStreamFilter;
04598 
04599 void av_register_bitstream_filter(AVBitStreamFilter *bsf);
04600 AVBitStreamFilterContext *av_bitstream_filter_init(const char *name);
04601 int av_bitstream_filter_filter(AVBitStreamFilterContext *bsfc,
04602                                AVCodecContext *avctx, const char *args,
04603                                uint8_t **poutbuf, int *poutbuf_size,
04604                                const uint8_t *buf, int buf_size, int keyframe);
04605 void av_bitstream_filter_close(AVBitStreamFilterContext *bsf);
04606 
04607 AVBitStreamFilter *av_bitstream_filter_next(AVBitStreamFilter *f);
04608 
04609 
04610 
04616 void *av_fast_realloc(void *ptr, unsigned int *size, size_t min_size);
04617 
04630 void av_fast_malloc(void *ptr, unsigned int *size, size_t min_size);
04631 
04635 void av_picture_copy(AVPicture *dst, const AVPicture *src,
04636                      enum PixelFormat pix_fmt, int width, int height);
04637 
04641 int av_picture_crop(AVPicture *dst, const AVPicture *src,
04642                     enum PixelFormat pix_fmt, int top_band, int left_band);
04643 
04647 int av_picture_pad(AVPicture *dst, const AVPicture *src, int height, int width, enum PixelFormat pix_fmt,
04648             int padtop, int padbottom, int padleft, int padright, int *color);
04649 
04657 unsigned int av_xiphlacing(unsigned char *s, unsigned int v);
04658 
04671 void av_log_missing_feature(void *avc, const char *feature, int want_sample);
04672 
04681 void av_log_ask_for_sample(void *avc, const char *msg, ...) av_printf_format(2, 3);
04682 
04686 void av_register_hwaccel(AVHWAccel *hwaccel);
04687 
04693 AVHWAccel *av_hwaccel_next(AVHWAccel *hwaccel);
04694 
04695 
04699 enum AVLockOp {
04700   AV_LOCK_CREATE,  
04701   AV_LOCK_OBTAIN,  
04702   AV_LOCK_RELEASE, 
04703   AV_LOCK_DESTROY, 
04704 };
04705 
04719 int av_lockmgr_register(int (*cb)(void **mutex, enum AVLockOp op));
04720 
04724 enum AVMediaType avcodec_get_type(enum CodecID codec_id);
04725 
04732 const AVClass *avcodec_get_class(void);
04733 
04740 const AVClass *avcodec_get_frame_class(void);
04741 
04742 #endif