• Main Page
  • Related Pages
  • Modules
  • Data Structures
  • Files
  • File List
  • Globals

debian/tmp/usr/include/libavcodec/avcodec.h

Go to the documentation of this file.
00001 /*
00002  * copyright (c) 2001 Fabrice Bellard
00003  *
00004  * This file is part of FFmpeg.
00005  *
00006  * FFmpeg is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU Lesser General Public
00008  * License as published by the Free Software Foundation; either
00009  * version 2.1 of the License, or (at your option) any later version.
00010  *
00011  * FFmpeg is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014  * Lesser General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU Lesser General Public
00017  * License along with FFmpeg; if not, write to the Free Software
00018  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
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     /* video codecs */
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_XWD,
00259     CODEC_ID_Y41P       = MKBETAG('Y','4','1','P'),
00260     CODEC_ID_UTVIDEO = 0x800,
00261     CODEC_ID_ESCAPE130  = MKBETAG('E','1','3','0'),
00262     CODEC_ID_AVRP       = MKBETAG('A','V','R','P'),
00263 
00264     CODEC_ID_G2M        = MKBETAG( 0 ,'G','2','M'),
00265     CODEC_ID_V308       = MKBETAG('V','3','0','8'),
00266     CODEC_ID_YUV4       = MKBETAG('Y','U','V','4'),
00267 
00268     /* various PCM "codecs" */
00269     CODEC_ID_FIRST_AUDIO = 0x10000,     
00270     CODEC_ID_PCM_S16LE = 0x10000,
00271     CODEC_ID_PCM_S16BE,
00272     CODEC_ID_PCM_U16LE,
00273     CODEC_ID_PCM_U16BE,
00274     CODEC_ID_PCM_S8,
00275     CODEC_ID_PCM_U8,
00276     CODEC_ID_PCM_MULAW,
00277     CODEC_ID_PCM_ALAW,
00278     CODEC_ID_PCM_S32LE,
00279     CODEC_ID_PCM_S32BE,
00280     CODEC_ID_PCM_U32LE,
00281     CODEC_ID_PCM_U32BE,
00282     CODEC_ID_PCM_S24LE,
00283     CODEC_ID_PCM_S24BE,
00284     CODEC_ID_PCM_U24LE,
00285     CODEC_ID_PCM_U24BE,
00286     CODEC_ID_PCM_S24DAUD,
00287     CODEC_ID_PCM_ZORK,
00288     CODEC_ID_PCM_S16LE_PLANAR,
00289     CODEC_ID_PCM_DVD,
00290     CODEC_ID_PCM_F32BE,
00291     CODEC_ID_PCM_F32LE,
00292     CODEC_ID_PCM_F64BE,
00293     CODEC_ID_PCM_F64LE,
00294     CODEC_ID_PCM_BLURAY,
00295     CODEC_ID_PCM_LXF,
00296     CODEC_ID_S302M,
00297     CODEC_ID_PCM_S8_PLANAR,
00298 
00299     /* various ADPCM codecs */
00300     CODEC_ID_ADPCM_IMA_QT = 0x11000,
00301     CODEC_ID_ADPCM_IMA_WAV,
00302     CODEC_ID_ADPCM_IMA_DK3,
00303     CODEC_ID_ADPCM_IMA_DK4,
00304     CODEC_ID_ADPCM_IMA_WS,
00305     CODEC_ID_ADPCM_IMA_SMJPEG,
00306     CODEC_ID_ADPCM_MS,
00307     CODEC_ID_ADPCM_4XM,
00308     CODEC_ID_ADPCM_XA,
00309     CODEC_ID_ADPCM_ADX,
00310     CODEC_ID_ADPCM_EA,
00311     CODEC_ID_ADPCM_G726,
00312     CODEC_ID_ADPCM_CT,
00313     CODEC_ID_ADPCM_SWF,
00314     CODEC_ID_ADPCM_YAMAHA,
00315     CODEC_ID_ADPCM_SBPRO_4,
00316     CODEC_ID_ADPCM_SBPRO_3,
00317     CODEC_ID_ADPCM_SBPRO_2,
00318     CODEC_ID_ADPCM_THP,
00319     CODEC_ID_ADPCM_IMA_AMV,
00320     CODEC_ID_ADPCM_EA_R1,
00321     CODEC_ID_ADPCM_EA_R3,
00322     CODEC_ID_ADPCM_EA_R2,
00323     CODEC_ID_ADPCM_IMA_EA_SEAD,
00324     CODEC_ID_ADPCM_IMA_EA_EACS,
00325     CODEC_ID_ADPCM_EA_XAS,
00326     CODEC_ID_ADPCM_EA_MAXIS_XA,
00327     CODEC_ID_ADPCM_IMA_ISS,
00328     CODEC_ID_ADPCM_G722,
00329     CODEC_ID_ADPCM_IMA_APC,
00330 
00331     /* AMR */
00332     CODEC_ID_AMR_NB = 0x12000,
00333     CODEC_ID_AMR_WB,
00334 
00335     /* RealAudio codecs*/
00336     CODEC_ID_RA_144 = 0x13000,
00337     CODEC_ID_RA_288,
00338 
00339     /* various DPCM codecs */
00340     CODEC_ID_ROQ_DPCM = 0x14000,
00341     CODEC_ID_INTERPLAY_DPCM,
00342     CODEC_ID_XAN_DPCM,
00343     CODEC_ID_SOL_DPCM,
00344 
00345     /* audio codecs */
00346     CODEC_ID_MP2 = 0x15000,
00347     CODEC_ID_MP3, 
00348     CODEC_ID_AAC,
00349     CODEC_ID_AC3,
00350     CODEC_ID_DTS,
00351     CODEC_ID_VORBIS,
00352     CODEC_ID_DVAUDIO,
00353     CODEC_ID_WMAV1,
00354     CODEC_ID_WMAV2,
00355     CODEC_ID_MACE3,
00356     CODEC_ID_MACE6,
00357     CODEC_ID_VMDAUDIO,
00358 #if LIBAVCODEC_VERSION_MAJOR == 53
00359     CODEC_ID_SONIC,
00360     CODEC_ID_SONIC_LS,
00361 #endif
00362     CODEC_ID_FLAC,
00363     CODEC_ID_MP3ADU,
00364     CODEC_ID_MP3ON4,
00365     CODEC_ID_SHORTEN,
00366     CODEC_ID_ALAC,
00367     CODEC_ID_WESTWOOD_SND1,
00368     CODEC_ID_GSM, 
00369     CODEC_ID_QDM2,
00370     CODEC_ID_COOK,
00371     CODEC_ID_TRUESPEECH,
00372     CODEC_ID_TTA,
00373     CODEC_ID_SMACKAUDIO,
00374     CODEC_ID_QCELP,
00375     CODEC_ID_WAVPACK,
00376     CODEC_ID_DSICINAUDIO,
00377     CODEC_ID_IMC,
00378     CODEC_ID_MUSEPACK7,
00379     CODEC_ID_MLP,
00380     CODEC_ID_GSM_MS, /* as found in WAV */
00381     CODEC_ID_ATRAC3,
00382     CODEC_ID_VOXWARE,
00383     CODEC_ID_APE,
00384     CODEC_ID_NELLYMOSER,
00385     CODEC_ID_MUSEPACK8,
00386     CODEC_ID_SPEEX,
00387     CODEC_ID_WMAVOICE,
00388     CODEC_ID_WMAPRO,
00389     CODEC_ID_WMALOSSLESS,
00390     CODEC_ID_ATRAC3P,
00391     CODEC_ID_EAC3,
00392     CODEC_ID_SIPR,
00393     CODEC_ID_MP1,
00394     CODEC_ID_TWINVQ,
00395     CODEC_ID_TRUEHD,
00396     CODEC_ID_MP4ALS,
00397     CODEC_ID_ATRAC1,
00398     CODEC_ID_BINKAUDIO_RDFT,
00399     CODEC_ID_BINKAUDIO_DCT,
00400     CODEC_ID_AAC_LATM,
00401     CODEC_ID_QDMC,
00402     CODEC_ID_CELT,
00403 #if LIBAVCODEC_VERSION_MAJOR > 53
00404     CODEC_ID_G723_1_DEPRECATED,
00405     CODEC_ID_G729_DEPRECATED,
00406     CODEC_ID_8SVX_EXP,
00407     CODEC_ID_8SVX_FIB,
00408 #endif
00409     CODEC_ID_BMV_AUDIO,
00410     CODEC_ID_G729 = 0x15800,
00411     CODEC_ID_G723_1= 0x15801,
00412     CODEC_ID_FFWAVESYNTH = MKBETAG('F','F','W','S'),
00413     CODEC_ID_8SVX_RAW   = MKBETAG('8','S','V','X'),
00414 
00415     /* subtitle codecs */
00416     CODEC_ID_FIRST_SUBTITLE = 0x17000,          
00417     CODEC_ID_DVD_SUBTITLE = 0x17000,
00418     CODEC_ID_DVB_SUBTITLE,
00419     CODEC_ID_TEXT,  
00420     CODEC_ID_XSUB,
00421     CODEC_ID_SSA,
00422     CODEC_ID_MOV_TEXT,
00423     CODEC_ID_HDMV_PGS_SUBTITLE,
00424     CODEC_ID_DVB_TELETEXT,
00425     CODEC_ID_SRT,
00426     CODEC_ID_MICRODVD   = MKBETAG('m','D','V','D'),
00427 
00428     /* other specific kind of codecs (generally used for attachments) */
00429     CODEC_ID_FIRST_UNKNOWN = 0x18000,           
00430     CODEC_ID_TTF = 0x18000,
00431     CODEC_ID_BINTEXT    = MKBETAG('B','T','X','T'),
00432     CODEC_ID_XBIN       = MKBETAG('X','B','I','N'),
00433     CODEC_ID_IDF        = MKBETAG( 0 ,'I','D','F'),
00434 
00435     CODEC_ID_PROBE = 0x19000, 
00436 
00437     CODEC_ID_MPEG2TS = 0x20000, 
00439     CODEC_ID_MPEG4SYSTEMS = 0x20001, 
00441     CODEC_ID_FFMETADATA = 0x21000,   
00442 };
00443 
00444 #if FF_API_OLD_SAMPLE_FMT
00445 #define SampleFormat AVSampleFormat
00446 
00447 #define SAMPLE_FMT_NONE AV_SAMPLE_FMT_NONE
00448 #define SAMPLE_FMT_U8   AV_SAMPLE_FMT_U8
00449 #define SAMPLE_FMT_S16  AV_SAMPLE_FMT_S16
00450 #define SAMPLE_FMT_S32  AV_SAMPLE_FMT_S32
00451 #define SAMPLE_FMT_FLT  AV_SAMPLE_FMT_FLT
00452 #define SAMPLE_FMT_DBL  AV_SAMPLE_FMT_DBL
00453 #define SAMPLE_FMT_NB   AV_SAMPLE_FMT_NB
00454 #endif
00455 
00456 #if FF_API_OLD_AUDIOCONVERT
00457 #include "libavutil/audioconvert.h"
00458 
00459 /* Audio channel masks */
00460 #define CH_FRONT_LEFT            AV_CH_FRONT_LEFT
00461 #define CH_FRONT_RIGHT           AV_CH_FRONT_RIGHT
00462 #define CH_FRONT_CENTER          AV_CH_FRONT_CENTER
00463 #define CH_LOW_FREQUENCY         AV_CH_LOW_FREQUENCY
00464 #define CH_BACK_LEFT             AV_CH_BACK_LEFT
00465 #define CH_BACK_RIGHT            AV_CH_BACK_RIGHT
00466 #define CH_FRONT_LEFT_OF_CENTER  AV_CH_FRONT_LEFT_OF_CENTER
00467 #define CH_FRONT_RIGHT_OF_CENTER AV_CH_FRONT_RIGHT_OF_CENTER
00468 #define CH_BACK_CENTER           AV_CH_BACK_CENTER
00469 #define CH_SIDE_LEFT             AV_CH_SIDE_LEFT
00470 #define CH_SIDE_RIGHT            AV_CH_SIDE_RIGHT
00471 #define CH_TOP_CENTER            AV_CH_TOP_CENTER
00472 #define CH_TOP_FRONT_LEFT        AV_CH_TOP_FRONT_LEFT
00473 #define CH_TOP_FRONT_CENTER      AV_CH_TOP_FRONT_CENTER
00474 #define CH_TOP_FRONT_RIGHT       AV_CH_TOP_FRONT_RIGHT
00475 #define CH_TOP_BACK_LEFT         AV_CH_TOP_BACK_LEFT
00476 #define CH_TOP_BACK_CENTER       AV_CH_TOP_BACK_CENTER
00477 #define CH_TOP_BACK_RIGHT        AV_CH_TOP_BACK_RIGHT
00478 #define CH_STEREO_LEFT           AV_CH_STEREO_LEFT
00479 #define CH_STEREO_RIGHT          AV_CH_STEREO_RIGHT
00480 
00484 #define CH_LAYOUT_NATIVE         AV_CH_LAYOUT_NATIVE
00485 
00486 /* Audio channel convenience macros */
00487 #define CH_LAYOUT_MONO           AV_CH_LAYOUT_MONO
00488 #define CH_LAYOUT_STEREO         AV_CH_LAYOUT_STEREO
00489 #define CH_LAYOUT_2_1            AV_CH_LAYOUT_2_1
00490 #define CH_LAYOUT_SURROUND       AV_CH_LAYOUT_SURROUND
00491 #define CH_LAYOUT_4POINT0        AV_CH_LAYOUT_4POINT0
00492 #define CH_LAYOUT_2_2            AV_CH_LAYOUT_2_2
00493 #define CH_LAYOUT_QUAD           AV_CH_LAYOUT_QUAD
00494 #define CH_LAYOUT_5POINT0        AV_CH_LAYOUT_5POINT0
00495 #define CH_LAYOUT_5POINT1        AV_CH_LAYOUT_5POINT1
00496 #define CH_LAYOUT_5POINT0_BACK   AV_CH_LAYOUT_5POINT0_BACK
00497 #define CH_LAYOUT_5POINT1_BACK   AV_CH_LAYOUT_5POINT1_BACK
00498 #define CH_LAYOUT_7POINT0        AV_CH_LAYOUT_7POINT0
00499 #define CH_LAYOUT_7POINT1        AV_CH_LAYOUT_7POINT1
00500 #define CH_LAYOUT_7POINT1_WIDE   AV_CH_LAYOUT_7POINT1_WIDE
00501 #define CH_LAYOUT_STEREO_DOWNMIX AV_CH_LAYOUT_STEREO_DOWNMIX
00502 #endif
00503 
00504 #if FF_API_OLD_DECODE_AUDIO
00505 /* in bytes */
00506 #define AVCODEC_MAX_AUDIO_FRAME_SIZE 192000 // 1 second of 48khz 32bit audio
00507 #endif
00508 
00516 #define FF_INPUT_BUFFER_PADDING_SIZE 16
00517 
00522 #define FF_MIN_BUFFER_SIZE 16384
00523 
00524 
00528 enum Motion_Est_ID {
00529     ME_ZERO = 1,    
00530     ME_FULL,
00531     ME_LOG,
00532     ME_PHODS,
00533     ME_EPZS,        
00534     ME_X1,          
00535     ME_HEX,         
00536     ME_UMH,         
00537     ME_ITER,        
00538     ME_TESA,        
00539 };
00540 
00541 enum AVDiscard{
00542     /* We leave some space between them for extensions (drop some
00543      * keyframes for intra-only or drop just some bidir frames). */
00544     AVDISCARD_NONE   =-16, 
00545     AVDISCARD_DEFAULT=  0, 
00546     AVDISCARD_NONREF =  8, 
00547     AVDISCARD_BIDIR  = 16, 
00548     AVDISCARD_NONKEY = 32, 
00549     AVDISCARD_ALL    = 48, 
00550 };
00551 
00552 enum AVColorPrimaries{
00553     AVCOL_PRI_BT709      =1, 
00554     AVCOL_PRI_UNSPECIFIED=2,
00555     AVCOL_PRI_BT470M     =4,
00556     AVCOL_PRI_BT470BG    =5, 
00557     AVCOL_PRI_SMPTE170M  =6, 
00558     AVCOL_PRI_SMPTE240M  =7, 
00559     AVCOL_PRI_FILM       =8,
00560     AVCOL_PRI_NB           , 
00561 };
00562 
00563 enum AVColorTransferCharacteristic{
00564     AVCOL_TRC_BT709      =1, 
00565     AVCOL_TRC_UNSPECIFIED=2,
00566     AVCOL_TRC_GAMMA22    =4, 
00567     AVCOL_TRC_GAMMA28    =5, 
00568     AVCOL_TRC_SMPTE240M  =7,
00569     AVCOL_TRC_NB           , 
00570 };
00571 
00572 enum AVColorSpace{
00573     AVCOL_SPC_RGB        =0,
00574     AVCOL_SPC_BT709      =1, 
00575     AVCOL_SPC_UNSPECIFIED=2,
00576     AVCOL_SPC_FCC        =4,
00577     AVCOL_SPC_BT470BG    =5, 
00578     AVCOL_SPC_SMPTE170M  =6, 
00579     AVCOL_SPC_SMPTE240M  =7,
00580     AVCOL_SPC_YCGCO      =8,
00581     AVCOL_SPC_NB           , 
00582 };
00583 
00584 enum AVColorRange{
00585     AVCOL_RANGE_UNSPECIFIED=0,
00586     AVCOL_RANGE_MPEG       =1, 
00587     AVCOL_RANGE_JPEG       =2, 
00588     AVCOL_RANGE_NB           , 
00589 };
00590 
00596 enum AVChromaLocation{
00597     AVCHROMA_LOC_UNSPECIFIED=0,
00598     AVCHROMA_LOC_LEFT       =1, 
00599     AVCHROMA_LOC_CENTER     =2, 
00600     AVCHROMA_LOC_TOPLEFT    =3, 
00601     AVCHROMA_LOC_TOP        =4,
00602     AVCHROMA_LOC_BOTTOMLEFT =5,
00603     AVCHROMA_LOC_BOTTOM     =6,
00604     AVCHROMA_LOC_NB           , 
00605 };
00606 
00607 #if FF_API_FLAC_GLOBAL_OPTS
00608 
00611 enum AVLPCType {
00612     AV_LPC_TYPE_DEFAULT     = -1, 
00613     AV_LPC_TYPE_NONE        =  0, 
00614     AV_LPC_TYPE_FIXED       =  1, 
00615     AV_LPC_TYPE_LEVINSON    =  2, 
00616     AV_LPC_TYPE_CHOLESKY    =  3, 
00617     AV_LPC_TYPE_NB              , 
00618 };
00619 #endif
00620 
00621 enum AVAudioServiceType {
00622     AV_AUDIO_SERVICE_TYPE_MAIN              = 0,
00623     AV_AUDIO_SERVICE_TYPE_EFFECTS           = 1,
00624     AV_AUDIO_SERVICE_TYPE_VISUALLY_IMPAIRED = 2,
00625     AV_AUDIO_SERVICE_TYPE_HEARING_IMPAIRED  = 3,
00626     AV_AUDIO_SERVICE_TYPE_DIALOGUE          = 4,
00627     AV_AUDIO_SERVICE_TYPE_COMMENTARY        = 5,
00628     AV_AUDIO_SERVICE_TYPE_EMERGENCY         = 6,
00629     AV_AUDIO_SERVICE_TYPE_VOICE_OVER        = 7,
00630     AV_AUDIO_SERVICE_TYPE_KARAOKE           = 8,
00631     AV_AUDIO_SERVICE_TYPE_NB                   , 
00632 };
00633 
00634 typedef struct RcOverride{
00635     int start_frame;
00636     int end_frame;
00637     int qscale; // If this is 0 then quality_factor will be used instead.
00638     float quality_factor;
00639 } RcOverride;
00640 
00641 #define FF_MAX_B_FRAMES 16
00642 
00643 /* encoding support
00644    These flags can be passed in AVCodecContext.flags before initialization.
00645    Note: Not everything is supported yet.
00646 */
00647 
00648 #define CODEC_FLAG_QSCALE 0x0002  ///< Use fixed qscale.
00649 #define CODEC_FLAG_4MV    0x0004  ///< 4 MV per MB allowed / advanced prediction for H.263.
00650 #define CODEC_FLAG_QPEL   0x0010  ///< Use qpel MC.
00651 #define CODEC_FLAG_GMC    0x0020  ///< Use GMC.
00652 #define CODEC_FLAG_MV0    0x0040  ///< Always try a MB with MV=<0,0>.
00653 
00658 #define CODEC_FLAG_INPUT_PRESERVED 0x0100
00659 #define CODEC_FLAG_PASS1           0x0200   ///< Use internal 2pass ratecontrol in first pass mode.
00660 #define CODEC_FLAG_PASS2           0x0400   ///< Use internal 2pass ratecontrol in second pass mode.
00661 #define CODEC_FLAG_GRAY            0x2000   ///< Only decode/encode grayscale.
00662 #define CODEC_FLAG_EMU_EDGE        0x4000   ///< Don't draw edges.
00663 #define CODEC_FLAG_PSNR            0x8000   ///< error[?] variables will be set during encoding.
00664 #define CODEC_FLAG_TRUNCATED       0x00010000 
00666 #define CODEC_FLAG_NORMALIZE_AQP  0x00020000 ///< Normalize adaptive quantization.
00667 #define CODEC_FLAG_INTERLACED_DCT 0x00040000 ///< Use interlaced DCT.
00668 #define CODEC_FLAG_LOW_DELAY      0x00080000 ///< Force low delay.
00669 #define CODEC_FLAG_GLOBAL_HEADER  0x00400000 ///< Place global headers in extradata instead of every keyframe.
00670 #define CODEC_FLAG_BITEXACT       0x00800000 ///< Use only bitexact stuff (except (I)DCT).
00671 /* Fx : Flag for h263+ extra options */
00672 #define CODEC_FLAG_AC_PRED        0x01000000 ///< H.263 advanced intra coding / MPEG-4 AC prediction
00673 #define CODEC_FLAG_CBP_RD         0x04000000 ///< Use rate distortion optimization for cbp.
00674 #define CODEC_FLAG_QP_RD          0x08000000 ///< Use rate distortion optimization for qp selectioon.
00675 #define CODEC_FLAG_LOOP_FILTER    0x00000800 ///< loop filter
00676 #define CODEC_FLAG_INTERLACED_ME  0x20000000 ///< interlaced motion estimation
00677 #define CODEC_FLAG_CLOSED_GOP     0x80000000
00678 #define CODEC_FLAG2_FAST          0x00000001 ///< Allow non spec compliant speedup tricks.
00679 #define CODEC_FLAG2_STRICT_GOP    0x00000002 ///< Strictly enforce GOP size.
00680 #define CODEC_FLAG2_NO_OUTPUT     0x00000004 ///< Skip bitstream encoding.
00681 #define CODEC_FLAG2_LOCAL_HEADER  0x00000008 ///< Place global headers at every keyframe instead of in extradata.
00682 #define CODEC_FLAG2_SKIP_RD       0x00004000 ///< RD optimal MB level residual skipping
00683 #define CODEC_FLAG2_CHUNKS        0x00008000 ///< Input bitstream might be truncated at a packet boundaries instead of only at frame boundaries.
00684 #define CODEC_FLAG2_SHOW_ALL      0x00400000 ///< Show all frames before the first keyframe
00685 
00690 #if FF_API_MPEGVIDEO_GLOBAL_OPTS
00691 #define CODEC_FLAG_OBMC           0x00000001 ///< OBMC
00692 #define CODEC_FLAG_H263P_AIV      0x00000008 ///< H.263 alternative inter VLC
00693 #define CODEC_FLAG_PART   0x0080  ///< Use data partitioning.
00694 #define CODEC_FLAG_ALT_SCAN       0x00100000 ///< Use alternate scan.
00695 #define CODEC_FLAG_H263P_UMV      0x02000000 ///< unlimited motion vector
00696 #define CODEC_FLAG_H263P_SLICE_STRUCT 0x10000000
00697 #define CODEC_FLAG_SVCD_SCAN_OFFSET 0x40000000 ///< Will reserve space for SVCD scan offset user data.
00698 #define CODEC_FLAG2_INTRA_VLC     0x00000800 ///< Use MPEG-2 intra VLC table.
00699 #define CODEC_FLAG2_DROP_FRAME_TIMECODE 0x00002000 ///< timecode is in drop frame format.
00700 #define CODEC_FLAG2_NON_LINEAR_QUANT 0x00010000 ///< Use MPEG-2 nonlinear quantizer.
00701 #endif
00702 #if FF_API_MJPEG_GLOBAL_OPTS
00703 #define CODEC_FLAG_EXTERN_HUFF     0x1000   ///< Use external Huffman table (for MJPEG).
00704 #endif
00705 #if FF_API_X264_GLOBAL_OPTS
00706 #define CODEC_FLAG2_BPYRAMID      0x00000010 ///< H.264 allow B-frames to be used as references.
00707 #define CODEC_FLAG2_WPRED         0x00000020 ///< H.264 weighted biprediction for B-frames
00708 #define CODEC_FLAG2_MIXED_REFS    0x00000040 ///< H.264 one reference per partition, as opposed to one reference per macroblock
00709 #define CODEC_FLAG2_8X8DCT        0x00000080 ///< H.264 high profile 8x8 transform
00710 #define CODEC_FLAG2_FASTPSKIP     0x00000100 ///< H.264 fast pskip
00711 #define CODEC_FLAG2_AUD           0x00000200 ///< H.264 access unit delimiters
00712 #define CODEC_FLAG2_BRDO          0x00000400 ///< B-frame rate-distortion optimization
00713 #define CODEC_FLAG2_MBTREE        0x00040000 ///< Use macroblock tree ratecontrol (x264 only)
00714 #define CODEC_FLAG2_PSY           0x00080000 ///< Use psycho visual optimizations.
00715 #define CODEC_FLAG2_SSIM          0x00100000 ///< Compute SSIM during encoding, error[] values are undefined.
00716 #define CODEC_FLAG2_INTRA_REFRESH 0x00200000 ///< Use periodic insertion of intra blocks instead of keyframes.
00717 #endif
00718 #if FF_API_SNOW_GLOBAL_OPTS
00719 #define CODEC_FLAG2_MEMC_ONLY     0x00001000 ///< Only do ME/MC (I frames -> ref, P frame -> ME+MC).
00720 #endif
00721 #if FF_API_LAME_GLOBAL_OPTS
00722 #define CODEC_FLAG2_BIT_RESERVOIR 0x00020000 ///< Use a bit reservoir when encoding if possible
00723 #endif
00724 
00728 /* Unsupported options :
00729  *              Syntax Arithmetic coding (SAC)
00730  *              Reference Picture Selection
00731  *              Independent Segment Decoding */
00732 /* /Fx */
00733 /* codec capabilities */
00734 
00735 #define CODEC_CAP_DRAW_HORIZ_BAND 0x0001 ///< Decoder can use draw_horiz_band callback.
00736 
00741 #define CODEC_CAP_DR1             0x0002
00742 #if FF_API_PARSE_FRAME
00743 /* If 'parse_only' field is true, then avcodec_parse_frame() can be used. */
00744 #define CODEC_CAP_PARSE_ONLY      0x0004
00745 #endif
00746 #define CODEC_CAP_TRUNCATED       0x0008
00747 /* Codec can export data for HW decoding (XvMC). */
00748 #define CODEC_CAP_HWACCEL         0x0010
00749 
00772 #define CODEC_CAP_DELAY           0x0020
00773 
00777 #define CODEC_CAP_SMALL_LAST_FRAME 0x0040
00778 
00781 #define CODEC_CAP_HWACCEL_VDPAU    0x0080
00782 
00793 #define CODEC_CAP_SUBFRAMES        0x0100
00794 
00798 #define CODEC_CAP_EXPERIMENTAL     0x0200
00799 
00802 #define CODEC_CAP_CHANNEL_CONF     0x0400
00803 
00807 #define CODEC_CAP_NEG_LINESIZES    0x0800
00808 
00812 #define CODEC_CAP_FRAME_THREADS    0x1000
00813 
00816 #define CODEC_CAP_SLICE_THREADS    0x2000
00817 
00820 #define CODEC_CAP_PARAM_CHANGE     0x4000
00821 
00824 #define CODEC_CAP_AUTO_THREADS     0x8000
00825 
00828 #define CODEC_CAP_VARIABLE_FRAME_SIZE 0x10000
00829 
00832 #define CODEC_CAP_LOSSLESS         0x80000000
00833 
00834 //The following defines may change, don't expect compatibility if you use them.
00835 #define MB_TYPE_INTRA4x4   0x0001
00836 #define MB_TYPE_INTRA16x16 0x0002 //FIXME H.264-specific
00837 #define MB_TYPE_INTRA_PCM  0x0004 //FIXME H.264-specific
00838 #define MB_TYPE_16x16      0x0008
00839 #define MB_TYPE_16x8       0x0010
00840 #define MB_TYPE_8x16       0x0020
00841 #define MB_TYPE_8x8        0x0040
00842 #define MB_TYPE_INTERLACED 0x0080
00843 #define MB_TYPE_DIRECT2    0x0100 //FIXME
00844 #define MB_TYPE_ACPRED     0x0200
00845 #define MB_TYPE_GMC        0x0400
00846 #define MB_TYPE_SKIP       0x0800
00847 #define MB_TYPE_P0L0       0x1000
00848 #define MB_TYPE_P1L0       0x2000
00849 #define MB_TYPE_P0L1       0x4000
00850 #define MB_TYPE_P1L1       0x8000
00851 #define MB_TYPE_L0         (MB_TYPE_P0L0 | MB_TYPE_P1L0)
00852 #define MB_TYPE_L1         (MB_TYPE_P0L1 | MB_TYPE_P1L1)
00853 #define MB_TYPE_L0L1       (MB_TYPE_L0   | MB_TYPE_L1)
00854 #define MB_TYPE_QUANT      0x00010000
00855 #define MB_TYPE_CBP        0x00020000
00856 //Note bits 24-31 are reserved for codec specific use (h264 ref0, mpeg1 0mv, ...)
00857 
00863 typedef struct AVPanScan{
00869     int id;
00870 
00876     int width;
00877     int height;
00878 
00884     int16_t position[3][2];
00885 }AVPanScan;
00886 
00887 #define FF_QSCALE_TYPE_MPEG1 0
00888 #define FF_QSCALE_TYPE_MPEG2 1
00889 #define FF_QSCALE_TYPE_H264  2
00890 #define FF_QSCALE_TYPE_VP56  3
00891 
00892 #define FF_BUFFER_TYPE_INTERNAL 1
00893 #define FF_BUFFER_TYPE_USER     2 ///< direct rendering buffers (image is (de)allocated by user)
00894 #define FF_BUFFER_TYPE_SHARED   4 ///< Buffer from somewhere else; don't deallocate image (data/base), all other tables are not shared.
00895 #define FF_BUFFER_TYPE_COPY     8 ///< Just a (modified) copy of some other buffer, don't deallocate anything.
00896 
00897 #if FF_API_OLD_FF_PICT_TYPES
00898 /* DEPRECATED, directly use the AV_PICTURE_TYPE_* enum values */
00899 #define FF_I_TYPE  AV_PICTURE_TYPE_I  ///< Intra
00900 #define FF_P_TYPE  AV_PICTURE_TYPE_P  ///< Predicted
00901 #define FF_B_TYPE  AV_PICTURE_TYPE_B  ///< Bi-dir predicted
00902 #define FF_S_TYPE  AV_PICTURE_TYPE_S  ///< S(GMC)-VOP MPEG4
00903 #define FF_SI_TYPE AV_PICTURE_TYPE_SI ///< Switching Intra
00904 #define FF_SP_TYPE AV_PICTURE_TYPE_SP ///< Switching Predicted
00905 #define FF_BI_TYPE AV_PICTURE_TYPE_BI
00906 #endif
00907 
00908 #define FF_BUFFER_HINTS_VALID    0x01 // Buffer hints value is meaningful (if 0 ignore).
00909 #define FF_BUFFER_HINTS_READABLE 0x02 // Codec will read from buffer.
00910 #define FF_BUFFER_HINTS_PRESERVE 0x04 // User must not alter buffer content.
00911 #define FF_BUFFER_HINTS_REUSABLE 0x08 // Codec will reuse the buffer (update).
00912 
00913 enum AVPacketSideDataType {
00914     AV_PKT_DATA_PALETTE,
00915     AV_PKT_DATA_NEW_EXTRADATA,
00916     AV_PKT_DATA_PARAM_CHANGE,
00917 };
00918 
00919 typedef struct AVPacket {
00929     int64_t pts;
00935     int64_t dts;
00936     uint8_t *data;
00937     int   size;
00938     int   stream_index;
00942     int   flags;
00947     struct {
00948         uint8_t *data;
00949         int      size;
00950         enum AVPacketSideDataType type;
00951     } *side_data;
00952     int side_data_elems;
00953 
00958     int   duration;
00959     void  (*destruct)(struct AVPacket *);
00960     void  *priv;
00961     int64_t pos;                            
00962 
00980     int64_t convergence_duration;
00981 } AVPacket;
00982 #define AV_PKT_FLAG_KEY     0x0001 ///< The packet contains a keyframe
00983 #define AV_PKT_FLAG_CORRUPT 0x0002 ///< The packet content is corrupted
00984 
00999 enum AVSideDataParamChangeFlags {
01000     AV_SIDE_DATA_PARAM_CHANGE_CHANNEL_COUNT  = 0x0001,
01001     AV_SIDE_DATA_PARAM_CHANGE_CHANNEL_LAYOUT = 0x0002,
01002     AV_SIDE_DATA_PARAM_CHANGE_SAMPLE_RATE    = 0x0004,
01003     AV_SIDE_DATA_PARAM_CHANGE_DIMENSIONS     = 0x0008,
01004 };
01005 
01016 typedef struct AVFrame {
01017 #if FF_API_DATA_POINTERS
01018 #define AV_NUM_DATA_POINTERS 4
01019 #else
01020 #define AV_NUM_DATA_POINTERS 8
01021 #endif
01022 
01028     uint8_t *data[AV_NUM_DATA_POINTERS];
01029 
01039     int linesize[AV_NUM_DATA_POINTERS];
01040 
01047     uint8_t *base[AV_NUM_DATA_POINTERS];
01053     int key_frame;
01054 
01060     enum AVPictureType pict_type;
01061 
01068     int64_t pts;
01069 
01075     int coded_picture_number;
01081     int display_picture_number;
01082 
01088     int quality;
01089 
01090 #if FF_API_AVFRAME_AGE
01091 
01094     attribute_deprecated int age;
01095 #endif
01096 
01105     int reference;
01106 
01112     int8_t *qscale_table;
01118     int qstride;
01119 
01126     uint8_t *mbskip_table;
01127 
01140     int16_t (*motion_val[2])[2];
01141 
01148     uint32_t *mb_type;
01149 
01156     uint8_t motion_subsample_log2;
01157 
01163     void *opaque;
01164 
01170     uint64_t error[AV_NUM_DATA_POINTERS];
01171 
01178     int type;
01179 
01186     int repeat_pict;
01187 
01191     int qscale_type;
01192 
01198     int interlaced_frame;
01199 
01205     int top_field_first;
01206 
01212     AVPanScan *pan_scan;
01213 
01219     int palette_has_changed;
01220 
01226     int buffer_hints;
01227 
01233     short *dct_coeff;
01234 
01241     int8_t *ref_index[2];
01242 
01254     int64_t reordered_opaque;
01255 
01261     void *hwaccel_picture_private;
01262 
01268     int64_t pkt_pts;
01269 
01275     int64_t pkt_dts;
01276 
01282     struct AVCodecContext *owner;
01283 
01289     void *thread_opaque;
01290 
01296     int nb_samples;
01297 
01316     uint8_t **extended_data;
01317 
01323     AVRational sample_aspect_ratio;
01324 
01330     int width, height;
01331 
01339     int format;
01340 
01348     int64_t best_effort_timestamp;
01349 
01357     int64_t pkt_pos;
01358 
01359 } AVFrame;
01360 
01361 struct AVCodecInternal;
01362 
01363 enum AVFieldOrder {
01364     AV_FIELD_UNKNOWN,
01365     AV_FIELD_PROGRESSIVE,
01366     AV_FIELD_TT,          //< Top coded_first, top displayed first
01367     AV_FIELD_BB,          //< Bottom coded first, bottom displayed first
01368     AV_FIELD_TB,          //< Top coded first, bottom displayed first
01369     AV_FIELD_BT,          //< Bottom coded first, top displayed first
01370 };
01371 
01381 typedef struct AVCodecContext {
01386     const AVClass *av_class;
01392     int bit_rate;
01393 
01400     int bit_rate_tolerance;
01401 
01407     int flags;
01408 
01417     int sub_id;
01418 
01426     int me_method;
01427 
01439     uint8_t *extradata;
01440     int extradata_size;
01441 
01450     AVRational time_base;
01451 
01452     /* video only */
01460     int width, height;
01461 
01462 #define FF_ASPECT_EXTENDED 15
01463 
01469     int gop_size;
01470 
01478     enum PixelFormat pix_fmt;
01479 
01503     void (*draw_horiz_band)(struct AVCodecContext *s,
01504                             const AVFrame *src, int offset[AV_NUM_DATA_POINTERS],
01505                             int y, int type, int height);
01506 
01507     /* audio only */
01508     int sample_rate; 
01509     int channels;    
01510 
01516     enum AVSampleFormat sample_fmt;  
01517 
01518     /* The following data should not be initialized. */
01522     int frame_size;
01523     int frame_number;   
01524 
01533     int delay;
01534 
01535     /* - encoding parameters */
01536     float qcompress;  
01537     float qblur;      
01538 
01544     int qmin;
01545 
01551     int qmax;
01552 
01558     int max_qdiff;
01559 
01566     int max_b_frames;
01567 
01575     float b_quant_factor;
01576 
01578     int rc_strategy;
01579 #define FF_RC_STRATEGY_XVID 1
01580 
01581     int b_frame_strategy;
01582 
01583     struct AVCodec *codec;
01584 
01585     void *priv_data;
01586 
01587     int rtp_payload_size;   /* The size of the RTP payload: the coder will  */
01588                             /* do its best to deliver a chunk with size     */
01589                             /* below rtp_payload_size, the chunk will start */
01590                             /* with a start code on some codecs like H.263. */
01591                             /* This doesn't take account of any particular  */
01592                             /* headers inside the transmitted RTP payload.  */
01593 
01594 
01595     /* The RTP callback: This function is called    */
01596     /* every time the encoder has a packet to send. */
01597     /* It depends on the encoder if the data starts */
01598     /* with a Start Code (it should). H.263 does.   */
01599     /* mb_nb contains the number of macroblocks     */
01600     /* encoded in the RTP payload.                  */
01601     void (*rtp_callback)(struct AVCodecContext *avctx, void *data, int size, int mb_nb);
01602 
01603     /* statistics, used for 2-pass encoding */
01604     int mv_bits;
01605     int header_bits;
01606     int i_tex_bits;
01607     int p_tex_bits;
01608     int i_count;
01609     int p_count;
01610     int skip_count;
01611     int misc_bits;
01612 
01618     int frame_bits;
01619 
01625     void *opaque;
01626 
01627     char codec_name[32];
01628     enum AVMediaType codec_type; /* see AVMEDIA_TYPE_xxx */
01629     enum CodecID codec_id; /* see CODEC_ID_xxx */
01630 
01644     unsigned int codec_tag;
01645 
01651     int workaround_bugs;
01652 #define FF_BUG_AUTODETECT       1  ///< autodetection
01653 #define FF_BUG_OLD_MSMPEG4      2
01654 #define FF_BUG_XVID_ILACE       4
01655 #define FF_BUG_UMP4             8
01656 #define FF_BUG_NO_PADDING       16
01657 #define FF_BUG_AMV              32
01658 #define FF_BUG_AC_VLC           0  ///< Will be removed, libavcodec can now handle these non-compliant files by default.
01659 #define FF_BUG_QPEL_CHROMA      64
01660 #define FF_BUG_STD_QPEL         128
01661 #define FF_BUG_QPEL_CHROMA2     256
01662 #define FF_BUG_DIRECT_BLOCKSIZE 512
01663 #define FF_BUG_EDGE             1024
01664 #define FF_BUG_HPEL_CHROMA      2048
01665 #define FF_BUG_DC_CLIP          4096
01666 #define FF_BUG_MS               8192 ///< Work around various bugs in Microsoft's broken decoders.
01667 #define FF_BUG_TRUNCATED       16384
01668 //#define FF_BUG_FAKE_SCALABILITY 16 //Autodetection should work 100%.
01669 
01675     int luma_elim_threshold;
01676 
01682     int chroma_elim_threshold;
01683 
01696     int strict_std_compliance;
01697 #define FF_COMPLIANCE_VERY_STRICT   2 ///< Strictly conform to an older more strict version of the spec or reference software.
01698 #define FF_COMPLIANCE_STRICT        1 ///< Strictly conform to all the things in the spec no matter what consequences.
01699 #define FF_COMPLIANCE_NORMAL        0
01700 #define FF_COMPLIANCE_UNOFFICIAL   -1 ///< Allow unofficial extensions
01701 #define FF_COMPLIANCE_EXPERIMENTAL -2 ///< Allow nonstandardized experimental things.
01702 
01708     float b_quant_offset;
01709 
01710 #if FF_API_ER
01711 
01717     attribute_deprecated int error_recognition;
01718 #define FF_ER_CAREFUL         1
01719 #define FF_ER_COMPLIANT       2
01720 #define FF_ER_AGGRESSIVE      3
01721 #define FF_ER_VERY_AGGRESSIVE 4
01722 #define FF_ER_EXPLODE         5
01723 #endif /* FF_API_ER */
01724 
01780     int (*get_buffer)(struct AVCodecContext *c, AVFrame *pic);
01781 
01791     void (*release_buffer)(struct AVCodecContext *c, AVFrame *pic);
01792 
01799     int has_b_frames;
01800 
01805     int block_align;
01806 
01807 #if FF_API_PARSE_FRAME
01808 
01814     attribute_deprecated int parse_only;
01815 #endif
01816 
01822     int mpeg_quant;
01823 
01829     char *stats_out;
01830 
01837     char *stats_in;
01838 
01845     float rc_qsquish;
01846 
01847     float rc_qmod_amp;
01848     int rc_qmod_freq;
01849 
01855     RcOverride *rc_override;
01856     int rc_override_count;
01857 
01863     const char *rc_eq;
01864 
01870     int rc_max_rate;
01871 
01877     int rc_min_rate;
01878 
01884     int rc_buffer_size;
01885     float rc_buffer_aggressivity;
01886 
01894     float i_quant_factor;
01895 
01901     float i_quant_offset;
01902 
01908     float rc_initial_cplx;
01909 
01915     int dct_algo;
01916 #define FF_DCT_AUTO    0
01917 #define FF_DCT_FASTINT 1
01918 #define FF_DCT_INT     2
01919 #define FF_DCT_MMX     3
01920 #define FF_DCT_MLIB    4
01921 #define FF_DCT_ALTIVEC 5
01922 #define FF_DCT_FAAN    6
01923 
01929     float lumi_masking;
01930 
01936     float temporal_cplx_masking;
01937 
01943     float spatial_cplx_masking;
01944 
01950     float p_masking;
01951 
01957     float dark_masking;
01958 
01964     int idct_algo;
01965 #define FF_IDCT_AUTO          0
01966 #define FF_IDCT_INT           1
01967 #define FF_IDCT_SIMPLE        2
01968 #define FF_IDCT_SIMPLEMMX     3
01969 #define FF_IDCT_LIBMPEG2MMX   4
01970 #define FF_IDCT_PS2           5
01971 #define FF_IDCT_MLIB          6
01972 #define FF_IDCT_ARM           7
01973 #define FF_IDCT_ALTIVEC       8
01974 #define FF_IDCT_SH4           9
01975 #define FF_IDCT_SIMPLEARM     10
01976 #define FF_IDCT_H264          11
01977 #define FF_IDCT_VP3           12
01978 #define FF_IDCT_IPP           13
01979 #define FF_IDCT_XVIDMMX       14
01980 #define FF_IDCT_CAVS          15
01981 #define FF_IDCT_SIMPLEARMV5TE 16
01982 #define FF_IDCT_SIMPLEARMV6   17
01983 #define FF_IDCT_SIMPLEVIS     18
01984 #define FF_IDCT_WMV2          19
01985 #define FF_IDCT_FAAN          20
01986 #define FF_IDCT_EA            21
01987 #define FF_IDCT_SIMPLENEON    22
01988 #define FF_IDCT_SIMPLEALPHA   23
01989 #define FF_IDCT_BINK          24
01990 
01996     int slice_count;
02002     int *slice_offset;
02003 
02009     int error_concealment;
02010 #define FF_EC_GUESS_MVS   1
02011 #define FF_EC_DEBLOCK     2
02012 
02021     unsigned dsp_mask;
02022 
02028      int bits_per_coded_sample;
02029 
02035      int prediction_method;
02036 #define FF_PRED_LEFT   0
02037 #define FF_PRED_PLANE  1
02038 #define FF_PRED_MEDIAN 2
02039 
02047     AVRational sample_aspect_ratio;
02048 
02054     AVFrame *coded_frame;
02055 
02061     int debug;
02062 #define FF_DEBUG_PICT_INFO   1
02063 #define FF_DEBUG_RC          2
02064 #define FF_DEBUG_BITSTREAM   4
02065 #define FF_DEBUG_MB_TYPE     8
02066 #define FF_DEBUG_QP          16
02067 #define FF_DEBUG_MV          32
02068 #define FF_DEBUG_DCT_COEFF   0x00000040
02069 #define FF_DEBUG_SKIP        0x00000080
02070 #define FF_DEBUG_STARTCODE   0x00000100
02071 #define FF_DEBUG_PTS         0x00000200
02072 #define FF_DEBUG_ER          0x00000400
02073 #define FF_DEBUG_MMCO        0x00000800
02074 #define FF_DEBUG_BUGS        0x00001000
02075 #define FF_DEBUG_VIS_QP      0x00002000
02076 #define FF_DEBUG_VIS_MB_TYPE 0x00004000
02077 #define FF_DEBUG_BUFFERS     0x00008000
02078 #define FF_DEBUG_THREADS     0x00010000
02079 
02085     int debug_mv;
02086 #define FF_DEBUG_VIS_MV_P_FOR  0x00000001 //visualize forward predicted MVs of P frames
02087 #define FF_DEBUG_VIS_MV_B_FOR  0x00000002 //visualize forward predicted MVs of B frames
02088 #define FF_DEBUG_VIS_MV_B_BACK 0x00000004 //visualize backward predicted MVs of B frames
02089 
02095     uint64_t error[AV_NUM_DATA_POINTERS];
02096 
02102     int me_cmp;
02108     int me_sub_cmp;
02114     int mb_cmp;
02120     int ildct_cmp;
02121 #define FF_CMP_SAD    0
02122 #define FF_CMP_SSE    1
02123 #define FF_CMP_SATD   2
02124 #define FF_CMP_DCT    3
02125 #define FF_CMP_PSNR   4
02126 #define FF_CMP_BIT    5
02127 #define FF_CMP_RD     6
02128 #define FF_CMP_ZERO   7
02129 #define FF_CMP_VSAD   8
02130 #define FF_CMP_VSSE   9
02131 #define FF_CMP_NSSE   10
02132 #define FF_CMP_W53    11
02133 #define FF_CMP_W97    12
02134 #define FF_CMP_DCTMAX 13
02135 #define FF_CMP_DCT264 14
02136 #define FF_CMP_CHROMA 256
02137 
02143     int dia_size;
02144 
02150     int last_predictor_count;
02151 
02157     int pre_me;
02158 
02164     int me_pre_cmp;
02165 
02171     int pre_dia_size;
02172 
02178     int me_subpel_quality;
02179 
02189     enum PixelFormat (*get_format)(struct AVCodecContext *s, const enum PixelFormat * fmt);
02190 
02199     int dtg_active_format;
02200 #define FF_DTG_AFD_SAME         8
02201 #define FF_DTG_AFD_4_3          9
02202 #define FF_DTG_AFD_16_9         10
02203 #define FF_DTG_AFD_14_9         11
02204 #define FF_DTG_AFD_4_3_SP_14_9  13
02205 #define FF_DTG_AFD_16_9_SP_14_9 14
02206 #define FF_DTG_AFD_SP_4_3       15
02207 
02215     int me_range;
02216 
02222     int intra_quant_bias;
02223 #define FF_DEFAULT_QUANT_BIAS 999999
02224 
02230     int inter_quant_bias;
02231 
02238     int color_table_id;
02239 
02240 #if FF_API_INTERNAL_CONTEXT
02241 
02246     attribute_deprecated int internal_buffer_count;
02247 
02253     attribute_deprecated void *internal_buffer;
02254 #endif
02255 
02262     int global_quality;
02263 
02264 #define FF_CODER_TYPE_VLC       0
02265 #define FF_CODER_TYPE_AC        1
02266 #define FF_CODER_TYPE_RAW       2
02267 #define FF_CODER_TYPE_RLE       3
02268 #define FF_CODER_TYPE_DEFLATE   4
02269 
02274     int coder_type;
02275 
02281     int context_model;
02282 #if 0
02283 
02288     uint8_t * (*realloc)(struct AVCodecContext *s, uint8_t *buf, int buf_size);
02289 #endif
02290 
02296     int slice_flags;
02297 #define SLICE_FLAG_CODED_ORDER    0x0001 ///< draw_horiz_band() is called in coded order instead of display
02298 #define SLICE_FLAG_ALLOW_FIELD    0x0002 ///< allow draw_horiz_band() with field slices (MPEG2 field pics)
02299 #define SLICE_FLAG_ALLOW_PLANE    0x0004 ///< allow draw_horiz_band() with 1 component at a time (SVQ1)
02300 
02306     int xvmc_acceleration;
02307 
02313     int mb_decision;
02314 #define FF_MB_DECISION_SIMPLE 0        ///< uses mb_cmp
02315 #define FF_MB_DECISION_BITS   1        ///< chooses the one which needs the fewest bits
02316 #define FF_MB_DECISION_RD     2        ///< rate distortion
02317 
02323     uint16_t *intra_matrix;
02324 
02330     uint16_t *inter_matrix;
02331 
02338     unsigned int stream_codec_tag;
02339 
02346     int scenechange_threshold;
02347 
02353     int lmin;
02354 
02360     int lmax;
02361 
02362 #if FF_API_PALETTE_CONTROL
02363 
02368     struct AVPaletteControl *palctrl;
02369 #endif
02370 
02376     int noise_reduction;
02377 
02390     int (*reget_buffer)(struct AVCodecContext *c, AVFrame *pic);
02391 
02397     int rc_initial_buffer_occupancy;
02398 
02404     int inter_threshold;
02405 
02411     int flags2;
02412 
02418     int error_rate;
02419 
02420 #if FF_API_ANTIALIAS_ALGO
02421 
02426     attribute_deprecated int antialias_algo;
02427 #define FF_AA_AUTO    0
02428 #define FF_AA_FASTINT 1 //not implemented yet
02429 #define FF_AA_INT     2
02430 #define FF_AA_FLOAT   3
02431 #endif
02432 
02438     int quantizer_noise_shaping;
02439 
02446     int thread_count;
02447 
02457     int (*execute)(struct AVCodecContext *c, int (*func)(struct AVCodecContext *c2, void *arg), void *arg2, int *ret, int count, int size);
02458 
02465     void *thread_opaque;
02466 
02474      int me_threshold;
02475 
02481      int mb_threshold;
02482 
02488      int intra_dc_precision;
02489 
02495      int nsse_weight;
02496 
02502      int skip_top;
02503 
02509      int skip_bottom;
02510 
02516      int profile;
02517 #define FF_PROFILE_UNKNOWN -99
02518 #define FF_PROFILE_RESERVED -100
02519 
02520 #define FF_PROFILE_AAC_MAIN 0
02521 #define FF_PROFILE_AAC_LOW  1
02522 #define FF_PROFILE_AAC_SSR  2
02523 #define FF_PROFILE_AAC_LTP  3
02524 
02525 #define FF_PROFILE_DTS         20
02526 #define FF_PROFILE_DTS_ES      30
02527 #define FF_PROFILE_DTS_96_24   40
02528 #define FF_PROFILE_DTS_HD_HRA  50
02529 #define FF_PROFILE_DTS_HD_MA   60
02530 
02531 #define FF_PROFILE_MPEG2_422    0
02532 #define FF_PROFILE_MPEG2_HIGH   1
02533 #define FF_PROFILE_MPEG2_SS     2
02534 #define FF_PROFILE_MPEG2_SNR_SCALABLE  3
02535 #define FF_PROFILE_MPEG2_MAIN   4
02536 #define FF_PROFILE_MPEG2_SIMPLE 5
02537 
02538 #define FF_PROFILE_H264_CONSTRAINED  (1<<9)  // 8+1; constraint_set1_flag
02539 #define FF_PROFILE_H264_INTRA        (1<<11) // 8+3; constraint_set3_flag
02540 
02541 #define FF_PROFILE_H264_BASELINE             66
02542 #define FF_PROFILE_H264_CONSTRAINED_BASELINE (66|FF_PROFILE_H264_CONSTRAINED)
02543 #define FF_PROFILE_H264_MAIN                 77
02544 #define FF_PROFILE_H264_EXTENDED             88
02545 #define FF_PROFILE_H264_HIGH                 100
02546 #define FF_PROFILE_H264_HIGH_10              110
02547 #define FF_PROFILE_H264_HIGH_10_INTRA        (110|FF_PROFILE_H264_INTRA)
02548 #define FF_PROFILE_H264_HIGH_422             122
02549 #define FF_PROFILE_H264_HIGH_422_INTRA       (122|FF_PROFILE_H264_INTRA)
02550 #define FF_PROFILE_H264_HIGH_444             144
02551 #define FF_PROFILE_H264_HIGH_444_PREDICTIVE  244
02552 #define FF_PROFILE_H264_HIGH_444_INTRA       (244|FF_PROFILE_H264_INTRA)
02553 #define FF_PROFILE_H264_CAVLC_444            44
02554 
02555 #define FF_PROFILE_VC1_SIMPLE   0
02556 #define FF_PROFILE_VC1_MAIN     1
02557 #define FF_PROFILE_VC1_COMPLEX  2
02558 #define FF_PROFILE_VC1_ADVANCED 3
02559 
02560 #define FF_PROFILE_MPEG4_SIMPLE                     0
02561 #define FF_PROFILE_MPEG4_SIMPLE_SCALABLE            1
02562 #define FF_PROFILE_MPEG4_CORE                       2
02563 #define FF_PROFILE_MPEG4_MAIN                       3
02564 #define FF_PROFILE_MPEG4_N_BIT                      4
02565 #define FF_PROFILE_MPEG4_SCALABLE_TEXTURE           5
02566 #define FF_PROFILE_MPEG4_SIMPLE_FACE_ANIMATION      6
02567 #define FF_PROFILE_MPEG4_BASIC_ANIMATED_TEXTURE     7
02568 #define FF_PROFILE_MPEG4_HYBRID                     8
02569 #define FF_PROFILE_MPEG4_ADVANCED_REAL_TIME         9
02570 #define FF_PROFILE_MPEG4_CORE_SCALABLE             10
02571 #define FF_PROFILE_MPEG4_ADVANCED_CODING           11
02572 #define FF_PROFILE_MPEG4_ADVANCED_CORE             12
02573 #define FF_PROFILE_MPEG4_ADVANCED_SCALABLE_TEXTURE 13
02574 #define FF_PROFILE_MPEG4_SIMPLE_STUDIO             14
02575 #define FF_PROFILE_MPEG4_ADVANCED_SIMPLE           15
02576 
02582      int level;
02583 #define FF_LEVEL_UNKNOWN -99
02584 
02590      int lowres;
02591 
02597     int coded_width, coded_height;
02598 
02604     int frame_skip_threshold;
02605 
02611     int frame_skip_factor;
02612 
02618     int frame_skip_exp;
02619 
02625     int frame_skip_cmp;
02626 
02633     float border_masking;
02634 
02640     int mb_lmin;
02641 
02647     int mb_lmax;
02648 
02654     int me_penalty_compensation;
02655 
02661     enum AVDiscard skip_loop_filter;
02662 
02668     enum AVDiscard skip_idct;
02669 
02675     enum AVDiscard skip_frame;
02676 
02682     int bidir_refine;
02683 
02689     int brd_scale;
02690 
02691 #if FF_API_X264_GLOBAL_OPTS
02692 
02698     attribute_deprecated float crf;
02699 
02706     attribute_deprecated int cqp;
02707 #endif
02708 
02714     int keyint_min;
02715 
02721     int refs;
02722 
02728     int chromaoffset;
02729 
02730 #if FF_API_X264_GLOBAL_OPTS
02731 
02736     attribute_deprecated int bframebias;
02737 #endif
02738 
02744     int trellis;
02745 
02746 #if FF_API_X264_GLOBAL_OPTS
02747 
02752     attribute_deprecated float complexityblur;
02753 
02760     attribute_deprecated int deblockalpha;
02761 
02768     attribute_deprecated int deblockbeta;
02769 
02775     attribute_deprecated int partitions;
02776 #define X264_PART_I4X4 0x001  /* Analyze i4x4 */
02777 #define X264_PART_I8X8 0x002  /* Analyze i8x8 (requires 8x8 transform) */
02778 #define X264_PART_P8X8 0x010  /* Analyze p16x8, p8x16 and p8x8 */
02779 #define X264_PART_P4X4 0x020  /* Analyze p8x4, p4x8, p4x4 */
02780 #define X264_PART_B8X8 0x100  /* Analyze b16x8, b8x16 and b8x8 */
02781 
02787     attribute_deprecated int directpred;
02788 #endif
02789 
02795     int cutoff;
02796 
02802     int scenechange_factor;
02803 
02810     int mv0_threshold;
02811 
02817     int b_sensitivity;
02818 
02823     int compression_level;
02824 #define FF_COMPRESSION_DEFAULT -1
02825 
02830     int min_prediction_order;
02831 
02836     int max_prediction_order;
02837 
02838 #if FF_API_FLAC_GLOBAL_OPTS
02839 
02850     attribute_deprecated int lpc_coeff_precision;
02851 
02857     attribute_deprecated int prediction_order_method;
02858 
02863     attribute_deprecated int min_partition_order;
02864 
02869     attribute_deprecated int max_partition_order;
02873 #endif
02874 
02880     int64_t timecode_frame_start;
02881 
02882 #if FF_API_REQUEST_CHANNELS
02883 
02889     int request_channels;
02890 #endif
02891 
02892 #if FF_API_DRC_SCALE
02893 
02900     attribute_deprecated float drc_scale;
02901 #endif
02902 
02910     int64_t reordered_opaque;
02911 
02917     int bits_per_raw_sample;
02918 
02924     uint64_t channel_layout;
02925 
02931     uint64_t request_channel_layout;
02932 
02938     float rc_max_available_vbv_use;
02939 
02945     float rc_min_vbv_overflow_use;
02946 
02952     struct AVHWAccel *hwaccel;
02953 
02961     int ticks_per_frame;
02962 
02973     void *hwaccel_context;
02974 
02980     enum AVColorPrimaries color_primaries;
02981 
02987     enum AVColorTransferCharacteristic color_trc;
02988 
02994     enum AVColorSpace colorspace;
02995 
03001     enum AVColorRange color_range;
03002 
03008     enum AVChromaLocation chroma_sample_location;
03009 
03028     int (*execute2)(struct AVCodecContext *c, int (*func)(struct AVCodecContext *c2, void *arg, int jobnr, int threadnr), void *arg2, int *ret, int count);
03029 
03030 #if FF_API_X264_GLOBAL_OPTS
03031 
03039     attribute_deprecated int weighted_p_pred;
03040 
03049     attribute_deprecated int aq_mode;
03050 
03057     attribute_deprecated float aq_strength;
03058 
03065     attribute_deprecated float psy_rd;
03066 
03073     attribute_deprecated float psy_trellis;
03074 
03081     attribute_deprecated int rc_lookahead;
03082 
03090     attribute_deprecated float crf_max;
03091 #endif
03092 
03093     int log_level_offset;
03094 
03095 #if FF_API_FLAC_GLOBAL_OPTS
03096 
03101     attribute_deprecated enum AVLPCType lpc_type;
03102 
03108     attribute_deprecated int lpc_passes;
03109 #endif
03110 
03118     int slices;
03119 
03128     uint8_t *subtitle_header;
03129     int subtitle_header_size;
03130 
03138     AVPacket *pkt;
03139 
03140 #if FF_API_INTERNAL_CONTEXT
03141 
03150     attribute_deprecated int is_copy;
03151 #endif
03152 
03161     int thread_type;
03162 #define FF_THREAD_FRAME   1 ///< Decode more than one frame at once
03163 #define FF_THREAD_SLICE   2 ///< Decode more than one part of a single frame at once
03164 
03170     int active_thread_type;
03171 
03180     int thread_safe_callbacks;
03181 
03188     uint64_t vbv_delay;
03189 
03195     enum AVAudioServiceType audio_service_type;
03196 
03203     enum AVSampleFormat request_sample_fmt;
03204 
03210     int err_recognition;
03211 #define AV_EF_CRCCHECK  (1<<0)
03212 #define AV_EF_BITSTREAM (1<<1)
03213 #define AV_EF_BUFFER    (1<<2)
03214 #define AV_EF_EXPLODE   (1<<3)
03215 
03216 #define AV_EF_CAREFUL    (1<<16)
03217 #define AV_EF_COMPLIANT  (1<<17)
03218 #define AV_EF_AGGRESSIVE (1<<18)
03219 
03226     struct AVCodecInternal *internal;
03227 
03232     enum AVFieldOrder field_order;
03233 
03239     int64_t pts_correction_num_faulty_pts; 
03240     int64_t pts_correction_num_faulty_dts; 
03241     int64_t pts_correction_last_pts;       
03242     int64_t pts_correction_last_dts;       
03243 
03244 } AVCodecContext;
03245 
03249 typedef struct AVProfile {
03250     int profile;
03251     const char *name; 
03252 } AVProfile;
03253 
03254 typedef struct AVCodecDefault AVCodecDefault;
03255 
03259 typedef struct AVCodec {
03266     const char *name;
03267     enum AVMediaType type;
03268     enum CodecID id;
03269     int priv_data_size;
03270     int (*init)(AVCodecContext *);
03271     int (*encode)(AVCodecContext *, uint8_t *buf, int buf_size, void *data);
03272     int (*close)(AVCodecContext *);
03273     int (*decode)(AVCodecContext *, void *outdata, int *outdata_size, AVPacket *avpkt);
03278     int capabilities;
03279     struct AVCodec *next;
03284     void (*flush)(AVCodecContext *);
03285     const AVRational *supported_framerates; 
03286     const enum PixelFormat *pix_fmts;       
03287 
03291     const char *long_name;
03292     const int *supported_samplerates;       
03293     const enum AVSampleFormat *sample_fmts; 
03294     const uint64_t *channel_layouts;         
03295     uint8_t max_lowres;                     
03296     const AVClass *priv_class;              
03297     const AVProfile *profiles;              
03298 
03308     int (*init_thread_copy)(AVCodecContext *);
03316     int (*update_thread_context)(AVCodecContext *dst, const AVCodecContext *src);
03322     const AVCodecDefault *defaults;
03323 
03327     void (*init_static_data)(struct AVCodec *codec);
03328 
03339     int (*encode2)(AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame,
03340                    int *got_packet_ptr);
03341 } AVCodec;
03342 
03346 typedef struct AVHWAccel {
03352     const char *name;
03353 
03359     enum AVMediaType type;
03360 
03366     enum CodecID id;
03367 
03373     enum PixelFormat pix_fmt;
03374 
03379     int capabilities;
03380 
03381     struct AVHWAccel *next;
03382 
03397     int (*start_frame)(AVCodecContext *avctx, const uint8_t *buf, uint32_t buf_size);
03398 
03410     int (*decode_slice)(AVCodecContext *avctx, const uint8_t *buf, uint32_t buf_size);
03411 
03421     int (*end_frame)(AVCodecContext *avctx);
03422 
03430     int priv_data_size;
03431 } AVHWAccel;
03432 
03437 typedef struct AVPicture {
03438     uint8_t *data[AV_NUM_DATA_POINTERS];
03439     int linesize[AV_NUM_DATA_POINTERS];     
03440 } AVPicture;
03441 
03442 #define AVPALETTE_SIZE 1024
03443 #define AVPALETTE_COUNT 256
03444 #if FF_API_PALETTE_CONTROL
03445 
03453 typedef struct AVPaletteControl {
03454 
03455     /* Demuxer sets this to 1 to indicate the palette has changed;
03456      * decoder resets to 0. */
03457     int palette_changed;
03458 
03459     /* 4-byte ARGB palette entries, stored in native byte order; note that
03460      * the individual palette components should be on a 8-bit scale; if
03461      * the palette data comes from an IBM VGA native format, the component
03462      * data is probably 6 bits in size and needs to be scaled. */
03463     unsigned int palette[AVPALETTE_COUNT];
03464 
03465 } AVPaletteControl attribute_deprecated;
03466 #endif
03467 
03468 enum AVSubtitleType {
03469     SUBTITLE_NONE,
03470 
03471     SUBTITLE_BITMAP,                
03472 
03477     SUBTITLE_TEXT,
03478 
03483     SUBTITLE_ASS,
03484 };
03485 
03486 typedef struct AVSubtitleRect {
03487     int x;         
03488     int y;         
03489     int w;         
03490     int h;         
03491     int nb_colors; 
03492 
03497     AVPicture pict;
03498     enum AVSubtitleType type;
03499 
03500     char *text;                     
03501 
03507     char *ass;
03508 } AVSubtitleRect;
03509 
03510 typedef struct AVSubtitle {
03511     uint16_t format; /* 0 = graphics */
03512     uint32_t start_display_time; /* relative to packet pts, in ms */
03513     uint32_t end_display_time; /* relative to packet pts, in ms */
03514     unsigned num_rects;
03515     AVSubtitleRect **rects;
03516     int64_t pts;    
03517 } AVSubtitle;
03518 
03519 /* packet functions */
03520 
03524 attribute_deprecated void av_destruct_packet_nofree(AVPacket *pkt);
03525 
03529 void av_destruct_packet(AVPacket *pkt);
03530 
03536 void av_init_packet(AVPacket *pkt);
03537 
03546 int av_new_packet(AVPacket *pkt, int size);
03547 
03554 void av_shrink_packet(AVPacket *pkt, int size);
03555 
03562 int av_grow_packet(AVPacket *pkt, int grow_by);
03563 
03568 int av_dup_packet(AVPacket *pkt);
03569 
03575 void av_free_packet(AVPacket *pkt);
03576 
03585 uint8_t* av_packet_new_side_data(AVPacket *pkt, enum AVPacketSideDataType type,
03586                                  int size);
03587 
03596 uint8_t* av_packet_get_side_data(AVPacket *pkt, enum AVPacketSideDataType type,
03597                                  int *size);
03598 
03599 int av_packet_merge_side_data(AVPacket *pkt);
03600 
03601 int av_packet_split_side_data(AVPacket *pkt);
03602 
03603 
03604 /* resample.c */
03605 
03606 struct ReSampleContext;
03607 struct AVResampleContext;
03608 
03609 typedef struct ReSampleContext ReSampleContext;
03610 
03627 ReSampleContext *av_audio_resample_init(int output_channels, int input_channels,
03628                                         int output_rate, int input_rate,
03629                                         enum AVSampleFormat sample_fmt_out,
03630                                         enum AVSampleFormat sample_fmt_in,
03631                                         int filter_length, int log2_phase_count,
03632                                         int linear, double cutoff);
03633 
03634 int audio_resample(ReSampleContext *s, short *output, short *input, int nb_samples);
03635 
03642 void audio_resample_close(ReSampleContext *s);
03643 
03644 
03654 struct AVResampleContext *av_resample_init(int out_rate, int in_rate, int filter_length, int log2_phase_count, int linear, double cutoff);
03655 
03665 int av_resample(struct AVResampleContext *c, short *dst, short *src, int *consumed, int src_size, int dst_size, int update_ctx);
03666 
03667 
03680 void av_resample_compensate(struct AVResampleContext *c, int sample_delta, int compensation_distance);
03681 void av_resample_close(struct AVResampleContext *c);
03682 
03694 int avpicture_alloc(AVPicture *picture, enum PixelFormat pix_fmt, int width, int height);
03695 
03703 void avpicture_free(AVPicture *picture);
03704 
03725 int avpicture_fill(AVPicture *picture, uint8_t *ptr,
03726                    enum PixelFormat pix_fmt, int width, int height);
03727 
03743 int avpicture_layout(const AVPicture* src, enum PixelFormat pix_fmt, int width, int height,
03744                      unsigned char *dest, int dest_size);
03745 
03758 int avpicture_get_size(enum PixelFormat pix_fmt, int width, int height);
03759 void avcodec_get_chroma_sub_sample(enum PixelFormat pix_fmt, int *h_shift, int *v_shift);
03760 
03765 const char *avcodec_get_name(enum CodecID id);
03766 
03767 #if FF_API_GET_PIX_FMT_NAME
03768 
03774 attribute_deprecated
03775 const char *avcodec_get_pix_fmt_name(enum PixelFormat pix_fmt);
03776 #endif
03777 
03778 void avcodec_set_dimensions(AVCodecContext *s, int width, int height);
03779 
03785 unsigned int avcodec_pix_fmt_to_codec_tag(enum PixelFormat pix_fmt);
03786 
03794 size_t av_get_codec_tag_string(char *buf, size_t buf_size, unsigned int codec_tag);
03795 
03796 #define FF_LOSS_RESOLUTION  0x0001 
03797 #define FF_LOSS_DEPTH       0x0002 
03798 #define FF_LOSS_COLORSPACE  0x0004 
03799 #define FF_LOSS_ALPHA       0x0008 
03800 #define FF_LOSS_COLORQUANT  0x0010 
03801 #define FF_LOSS_CHROMA      0x0020 
03821 int avcodec_get_pix_fmt_loss(enum PixelFormat dst_pix_fmt, enum PixelFormat src_pix_fmt,
03822                              int has_alpha);
03823 
03848 enum PixelFormat avcodec_find_best_pix_fmt(int64_t pix_fmt_mask, enum PixelFormat src_pix_fmt,
03849                               int has_alpha, int *loss_ptr);
03850 
03881 enum PixelFormat avcodec_find_best_pix_fmt2(enum PixelFormat dst_pix_fmt1, enum PixelFormat dst_pix_fmt2,
03882                                             enum PixelFormat src_pix_fmt, int has_alpha, int *loss_ptr);
03883 
03884 #if FF_API_GET_ALPHA_INFO
03885 #define FF_ALPHA_TRANSP       0x0001 /* image has some totally transparent pixels */
03886 #define FF_ALPHA_SEMI_TRANSP  0x0002 /* image has some transparent pixels */
03887 
03892 attribute_deprecated
03893 int img_get_alpha_info(const AVPicture *src,
03894                        enum PixelFormat pix_fmt, int width, int height);
03895 #endif
03896 
03897 /* deinterlace a picture */
03898 /* deinterlace - if not supported return -1 */
03899 int avpicture_deinterlace(AVPicture *dst, const AVPicture *src,
03900                           enum PixelFormat pix_fmt, int width, int height);
03901 
03902 /* external high level API */
03903 
03909 AVCodec *av_codec_next(AVCodec *c);
03910 
03914 unsigned avcodec_version(void);
03915 
03919 const char *avcodec_configuration(void);
03920 
03924 const char *avcodec_license(void);
03925 
03926 #if FF_API_AVCODEC_INIT
03927 
03931 attribute_deprecated
03932 void avcodec_init(void);
03933 #endif
03934 
03943 void avcodec_register(AVCodec *codec);
03944 
03951 AVCodec *avcodec_find_encoder(enum CodecID id);
03952 
03959 AVCodec *avcodec_find_encoder_by_name(const char *name);
03960 
03967 AVCodec *avcodec_find_decoder(enum CodecID id);
03968 
03975 AVCodec *avcodec_find_decoder_by_name(const char *name);
03976 void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode);
03977 
03985 const char *av_get_profile_name(const AVCodec *codec, int profile);
03986 
03987 #if FF_API_ALLOC_CONTEXT
03988 
03994 attribute_deprecated
03995 void avcodec_get_context_defaults(AVCodecContext *s);
03996 
03999 attribute_deprecated
04000 void avcodec_get_context_defaults2(AVCodecContext *s, enum AVMediaType);
04001 #endif
04002 
04012 int avcodec_get_context_defaults3(AVCodecContext *s, AVCodec *codec);
04013 
04014 #if FF_API_ALLOC_CONTEXT
04015 
04024 attribute_deprecated
04025 AVCodecContext *avcodec_alloc_context(void);
04026 
04029 attribute_deprecated
04030 AVCodecContext *avcodec_alloc_context2(enum AVMediaType);
04031 #endif
04032 
04045 AVCodecContext *avcodec_alloc_context3(AVCodec *codec);
04046 
04058 int avcodec_copy_context(AVCodecContext *dest, const AVCodecContext *src);
04059 
04065 void avcodec_get_frame_defaults(AVFrame *pic);
04066 
04074 AVFrame *avcodec_alloc_frame(void);
04075 
04076 int avcodec_default_get_buffer(AVCodecContext *s, AVFrame *pic);
04077 void avcodec_default_release_buffer(AVCodecContext *s, AVFrame *pic);
04078 int avcodec_default_reget_buffer(AVCodecContext *s, AVFrame *pic);
04079 
04087 unsigned avcodec_get_edge_width(void);
04097 void avcodec_align_dimensions(AVCodecContext *s, int *width, int *height);
04107 void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height,
04108                                int linesize_align[AV_NUM_DATA_POINTERS]);
04109 
04110 enum PixelFormat avcodec_default_get_format(struct AVCodecContext *s, const enum PixelFormat * fmt);
04111 
04112 #if FF_API_THREAD_INIT
04113 
04116 attribute_deprecated
04117 int avcodec_thread_init(AVCodecContext *s, int thread_count);
04118 #endif
04119 
04120 int avcodec_default_execute(AVCodecContext *c, int (*func)(AVCodecContext *c2, void *arg2),void *arg, int *ret, int count, int size);
04121 int avcodec_default_execute2(AVCodecContext *c, int (*func)(AVCodecContext *c2, void *arg2, int, int),void *arg, int *ret, int count);
04122 //FIXME func typedef
04123 
04124 #if FF_API_AVCODEC_OPEN
04125 
04154 attribute_deprecated
04155 int avcodec_open(AVCodecContext *avctx, AVCodec *codec);
04156 #endif
04157 
04194 int avcodec_open2(AVCodecContext *avctx, AVCodec *codec, AVDictionary **options);
04195 
04196 #if FF_API_OLD_DECODE_AUDIO
04197 
04251 attribute_deprecated int avcodec_decode_audio3(AVCodecContext *avctx, int16_t *samples,
04252                          int *frame_size_ptr,
04253                          AVPacket *avpkt);
04254 #endif
04255 
04289 int avcodec_decode_audio4(AVCodecContext *avctx, AVFrame *frame,
04290                           int *got_frame_ptr, AVPacket *avpkt);
04291 
04333 int avcodec_decode_video2(AVCodecContext *avctx, AVFrame *picture,
04334                          int *got_picture_ptr,
04335                          const AVPacket *avpkt);
04336 
04353 int avcodec_decode_subtitle2(AVCodecContext *avctx, AVSubtitle *sub,
04354                             int *got_sub_ptr,
04355                             AVPacket *avpkt);
04356 
04362 void avsubtitle_free(AVSubtitle *sub);
04363 
04364 #if FF_API_OLD_ENCODE_AUDIO
04365 
04389 int attribute_deprecated avcodec_encode_audio(AVCodecContext *avctx,
04390                                               uint8_t *buf, int buf_size,
04391                                               const short *samples);
04392 #endif
04393 
04432 int avcodec_encode_audio2(AVCodecContext *avctx, AVPacket *avpkt,
04433                           const AVFrame *frame, int *got_packet_ptr);
04434 
04451 int avcodec_fill_audio_frame(AVFrame *frame, int nb_channels,
04452                              enum AVSampleFormat sample_fmt, const uint8_t *buf,
04453                              int buf_size, int align);
04454 
04467 int avcodec_encode_video(AVCodecContext *avctx, uint8_t *buf, int buf_size,
04468                          const AVFrame *pict);
04469 int avcodec_encode_subtitle(AVCodecContext *avctx, uint8_t *buf, int buf_size,
04470                             const AVSubtitle *sub);
04471 
04481 int avcodec_close(AVCodecContext *avctx);
04482 
04493 void avcodec_register_all(void);
04494 
04498 void avcodec_flush_buffers(AVCodecContext *avctx);
04499 
04500 void avcodec_default_free_buffers(AVCodecContext *s);
04501 
04502 /* misc useful functions */
04503 
04504 #if FF_API_OLD_FF_PICT_TYPES
04505 
04512 attribute_deprecated
04513 char av_get_pict_type_char(int pict_type);
04514 #endif
04515 
04522 int av_get_bits_per_sample(enum CodecID codec_id);
04523 
04524 #if FF_API_OLD_SAMPLE_FMT
04525 
04528 attribute_deprecated
04529 int av_get_bits_per_sample_format(enum AVSampleFormat sample_fmt);
04530 #endif
04531 
04532 /* frame parsing */
04533 typedef struct AVCodecParserContext {
04534     void *priv_data;
04535     struct AVCodecParser *parser;
04536     int64_t frame_offset; /* offset of the current frame */
04537     int64_t cur_offset; /* current offset
04538                            (incremented by each av_parser_parse()) */
04539     int64_t next_frame_offset; /* offset of the next frame */
04540     /* video info */
04541     int pict_type; /* XXX: Put it back in AVCodecContext. */
04551     int repeat_pict; /* XXX: Put it back in AVCodecContext. */
04552     int64_t pts;     /* pts of the current frame */
04553     int64_t dts;     /* dts of the current frame */
04554 
04555     /* private data */
04556     int64_t last_pts;
04557     int64_t last_dts;
04558     int fetch_timestamp;
04559 
04560 #define AV_PARSER_PTS_NB 4
04561     int cur_frame_start_index;
04562     int64_t cur_frame_offset[AV_PARSER_PTS_NB];
04563     int64_t cur_frame_pts[AV_PARSER_PTS_NB];
04564     int64_t cur_frame_dts[AV_PARSER_PTS_NB];
04565 
04566     int flags;
04567 #define PARSER_FLAG_COMPLETE_FRAMES           0x0001
04568 #define PARSER_FLAG_ONCE                      0x0002
04569 
04570 #define PARSER_FLAG_FETCHED_OFFSET            0x0004
04571 
04572     int64_t offset;      
04573     int64_t cur_frame_end[AV_PARSER_PTS_NB];
04574 
04581     int key_frame;
04582 
04600     int64_t convergence_duration;
04601 
04602     // Timestamp generation support:
04612     int dts_sync_point;
04613 
04627     int dts_ref_dts_delta;
04628 
04641     int pts_dts_delta;
04642 
04648     int64_t cur_frame_pos[AV_PARSER_PTS_NB];
04649 
04653     int64_t pos;
04654 
04658     int64_t last_pos;
04659 } AVCodecParserContext;
04660 
04661 typedef struct AVCodecParser {
04662     int codec_ids[5]; /* several codec IDs are permitted */
04663     int priv_data_size;
04664     int (*parser_init)(AVCodecParserContext *s);
04665     int (*parser_parse)(AVCodecParserContext *s,
04666                         AVCodecContext *avctx,
04667                         const uint8_t **poutbuf, int *poutbuf_size,
04668                         const uint8_t *buf, int buf_size);
04669     void (*parser_close)(AVCodecParserContext *s);
04670     int (*split)(AVCodecContext *avctx, const uint8_t *buf, int buf_size);
04671     struct AVCodecParser *next;
04672 } AVCodecParser;
04673 
04674 AVCodecParser *av_parser_next(AVCodecParser *c);
04675 
04676 void av_register_codec_parser(AVCodecParser *parser);
04677 AVCodecParserContext *av_parser_init(int codec_id);
04678 
04707 int av_parser_parse2(AVCodecParserContext *s,
04708                      AVCodecContext *avctx,
04709                      uint8_t **poutbuf, int *poutbuf_size,
04710                      const uint8_t *buf, int buf_size,
04711                      int64_t pts, int64_t dts,
04712                      int64_t pos);
04713 
04714 int av_parser_change(AVCodecParserContext *s,
04715                      AVCodecContext *avctx,
04716                      uint8_t **poutbuf, int *poutbuf_size,
04717                      const uint8_t *buf, int buf_size, int keyframe);
04718 void av_parser_close(AVCodecParserContext *s);
04719 
04720 
04721 typedef struct AVBitStreamFilterContext {
04722     void *priv_data;
04723     struct AVBitStreamFilter *filter;
04724     AVCodecParserContext *parser;
04725     struct AVBitStreamFilterContext *next;
04726 } AVBitStreamFilterContext;
04727 
04728 
04729 typedef struct AVBitStreamFilter {
04730     const char *name;
04731     int priv_data_size;
04732     int (*filter)(AVBitStreamFilterContext *bsfc,
04733                   AVCodecContext *avctx, const char *args,
04734                   uint8_t **poutbuf, int *poutbuf_size,
04735                   const uint8_t *buf, int buf_size, int keyframe);
04736     void (*close)(AVBitStreamFilterContext *bsfc);
04737     struct AVBitStreamFilter *next;
04738 } AVBitStreamFilter;
04739 
04740 void av_register_bitstream_filter(AVBitStreamFilter *bsf);
04741 AVBitStreamFilterContext *av_bitstream_filter_init(const char *name);
04742 int av_bitstream_filter_filter(AVBitStreamFilterContext *bsfc,
04743                                AVCodecContext *avctx, const char *args,
04744                                uint8_t **poutbuf, int *poutbuf_size,
04745                                const uint8_t *buf, int buf_size, int keyframe);
04746 void av_bitstream_filter_close(AVBitStreamFilterContext *bsf);
04747 
04748 AVBitStreamFilter *av_bitstream_filter_next(AVBitStreamFilter *f);
04749 
04750 /* memory */
04751 
04757 void *av_fast_realloc(void *ptr, unsigned int *size, size_t min_size);
04758 
04771 void av_fast_malloc(void *ptr, unsigned int *size, size_t min_size);
04772 
04780 void av_fast_padded_malloc(void *ptr, unsigned int *size, size_t min_size);
04781 
04785 void av_picture_copy(AVPicture *dst, const AVPicture *src,
04786                      enum PixelFormat pix_fmt, int width, int height);
04787 
04791 int av_picture_crop(AVPicture *dst, const AVPicture *src,
04792                     enum PixelFormat pix_fmt, int top_band, int left_band);
04793 
04797 int av_picture_pad(AVPicture *dst, const AVPicture *src, int height, int width, enum PixelFormat pix_fmt,
04798             int padtop, int padbottom, int padleft, int padright, int *color);
04799 
04807 unsigned int av_xiphlacing(unsigned char *s, unsigned int v);
04808 
04821 void av_log_missing_feature(void *avc, const char *feature, int want_sample);
04822 
04831 void av_log_ask_for_sample(void *avc, const char *msg, ...) av_printf_format(2, 3);
04832 
04836 void av_register_hwaccel(AVHWAccel *hwaccel);
04837 
04843 AVHWAccel *av_hwaccel_next(AVHWAccel *hwaccel);
04844 
04845 
04849 enum AVLockOp {
04850   AV_LOCK_CREATE,  
04851   AV_LOCK_OBTAIN,  
04852   AV_LOCK_RELEASE, 
04853   AV_LOCK_DESTROY, 
04854 };
04855 
04869 int av_lockmgr_register(int (*cb)(void **mutex, enum AVLockOp op));
04870 
04874 enum AVMediaType avcodec_get_type(enum CodecID codec_id);
04875 
04882 const AVClass *avcodec_get_class(void);
04883 
04890 const AVClass *avcodec_get_frame_class(void);
04891 
04896 int avcodec_is_open(AVCodecContext *s);
04897 
04898 #endif /* AVCODEC_AVCODEC_H */
Generated on Fri Feb 1 2013 14:34:26 for FFmpeg by doxygen 1.7.1