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 #include "libavutil/audioconvert.h"
00038
00039 #include "libavcodec/version.h"
00097 enum AVCodecID {
00098 AV_CODEC_ID_NONE,
00099
00100
00101 AV_CODEC_ID_MPEG1VIDEO,
00102 AV_CODEC_ID_MPEG2VIDEO,
00103 AV_CODEC_ID_MPEG2VIDEO_XVMC,
00104 AV_CODEC_ID_H261,
00105 AV_CODEC_ID_H263,
00106 AV_CODEC_ID_RV10,
00107 AV_CODEC_ID_RV20,
00108 AV_CODEC_ID_MJPEG,
00109 AV_CODEC_ID_MJPEGB,
00110 AV_CODEC_ID_LJPEG,
00111 AV_CODEC_ID_SP5X,
00112 AV_CODEC_ID_JPEGLS,
00113 AV_CODEC_ID_MPEG4,
00114 AV_CODEC_ID_RAWVIDEO,
00115 AV_CODEC_ID_MSMPEG4V1,
00116 AV_CODEC_ID_MSMPEG4V2,
00117 AV_CODEC_ID_MSMPEG4V3,
00118 AV_CODEC_ID_WMV1,
00119 AV_CODEC_ID_WMV2,
00120 AV_CODEC_ID_H263P,
00121 AV_CODEC_ID_H263I,
00122 AV_CODEC_ID_FLV1,
00123 AV_CODEC_ID_SVQ1,
00124 AV_CODEC_ID_SVQ3,
00125 AV_CODEC_ID_DVVIDEO,
00126 AV_CODEC_ID_HUFFYUV,
00127 AV_CODEC_ID_CYUV,
00128 AV_CODEC_ID_H264,
00129 AV_CODEC_ID_INDEO3,
00130 AV_CODEC_ID_VP3,
00131 AV_CODEC_ID_THEORA,
00132 AV_CODEC_ID_ASV1,
00133 AV_CODEC_ID_ASV2,
00134 AV_CODEC_ID_FFV1,
00135 AV_CODEC_ID_4XM,
00136 AV_CODEC_ID_VCR1,
00137 AV_CODEC_ID_CLJR,
00138 AV_CODEC_ID_MDEC,
00139 AV_CODEC_ID_ROQ,
00140 AV_CODEC_ID_INTERPLAY_VIDEO,
00141 AV_CODEC_ID_XAN_WC3,
00142 AV_CODEC_ID_XAN_WC4,
00143 AV_CODEC_ID_RPZA,
00144 AV_CODEC_ID_CINEPAK,
00145 AV_CODEC_ID_WS_VQA,
00146 AV_CODEC_ID_MSRLE,
00147 AV_CODEC_ID_MSVIDEO1,
00148 AV_CODEC_ID_IDCIN,
00149 AV_CODEC_ID_8BPS,
00150 AV_CODEC_ID_SMC,
00151 AV_CODEC_ID_FLIC,
00152 AV_CODEC_ID_TRUEMOTION1,
00153 AV_CODEC_ID_VMDVIDEO,
00154 AV_CODEC_ID_MSZH,
00155 AV_CODEC_ID_ZLIB,
00156 AV_CODEC_ID_QTRLE,
00157 AV_CODEC_ID_SNOW,
00158 AV_CODEC_ID_TSCC,
00159 AV_CODEC_ID_ULTI,
00160 AV_CODEC_ID_QDRAW,
00161 AV_CODEC_ID_VIXL,
00162 AV_CODEC_ID_QPEG,
00163 AV_CODEC_ID_PNG,
00164 AV_CODEC_ID_PPM,
00165 AV_CODEC_ID_PBM,
00166 AV_CODEC_ID_PGM,
00167 AV_CODEC_ID_PGMYUV,
00168 AV_CODEC_ID_PAM,
00169 AV_CODEC_ID_FFVHUFF,
00170 AV_CODEC_ID_RV30,
00171 AV_CODEC_ID_RV40,
00172 AV_CODEC_ID_VC1,
00173 AV_CODEC_ID_WMV3,
00174 AV_CODEC_ID_LOCO,
00175 AV_CODEC_ID_WNV1,
00176 AV_CODEC_ID_AASC,
00177 AV_CODEC_ID_INDEO2,
00178 AV_CODEC_ID_FRAPS,
00179 AV_CODEC_ID_TRUEMOTION2,
00180 AV_CODEC_ID_BMP,
00181 AV_CODEC_ID_CSCD,
00182 AV_CODEC_ID_MMVIDEO,
00183 AV_CODEC_ID_ZMBV,
00184 AV_CODEC_ID_AVS,
00185 AV_CODEC_ID_SMACKVIDEO,
00186 AV_CODEC_ID_NUV,
00187 AV_CODEC_ID_KMVC,
00188 AV_CODEC_ID_FLASHSV,
00189 AV_CODEC_ID_CAVS,
00190 AV_CODEC_ID_JPEG2000,
00191 AV_CODEC_ID_VMNC,
00192 AV_CODEC_ID_VP5,
00193 AV_CODEC_ID_VP6,
00194 AV_CODEC_ID_VP6F,
00195 AV_CODEC_ID_TARGA,
00196 AV_CODEC_ID_DSICINVIDEO,
00197 AV_CODEC_ID_TIERTEXSEQVIDEO,
00198 AV_CODEC_ID_TIFF,
00199 AV_CODEC_ID_GIF,
00200 AV_CODEC_ID_DXA,
00201 AV_CODEC_ID_DNXHD,
00202 AV_CODEC_ID_THP,
00203 AV_CODEC_ID_SGI,
00204 AV_CODEC_ID_C93,
00205 AV_CODEC_ID_BETHSOFTVID,
00206 AV_CODEC_ID_PTX,
00207 AV_CODEC_ID_TXD,
00208 AV_CODEC_ID_VP6A,
00209 AV_CODEC_ID_AMV,
00210 AV_CODEC_ID_VB,
00211 AV_CODEC_ID_PCX,
00212 AV_CODEC_ID_SUNRAST,
00213 AV_CODEC_ID_INDEO4,
00214 AV_CODEC_ID_INDEO5,
00215 AV_CODEC_ID_MIMIC,
00216 AV_CODEC_ID_RL2,
00217 AV_CODEC_ID_ESCAPE124,
00218 AV_CODEC_ID_DIRAC,
00219 AV_CODEC_ID_BFI,
00220 AV_CODEC_ID_CMV,
00221 AV_CODEC_ID_MOTIONPIXELS,
00222 AV_CODEC_ID_TGV,
00223 AV_CODEC_ID_TGQ,
00224 AV_CODEC_ID_TQI,
00225 AV_CODEC_ID_AURA,
00226 AV_CODEC_ID_AURA2,
00227 AV_CODEC_ID_V210X,
00228 AV_CODEC_ID_TMV,
00229 AV_CODEC_ID_V210,
00230 AV_CODEC_ID_DPX,
00231 AV_CODEC_ID_MAD,
00232 AV_CODEC_ID_FRWU,
00233 AV_CODEC_ID_FLASHSV2,
00234 AV_CODEC_ID_CDGRAPHICS,
00235 AV_CODEC_ID_R210,
00236 AV_CODEC_ID_ANM,
00237 AV_CODEC_ID_BINKVIDEO,
00238 AV_CODEC_ID_IFF_ILBM,
00239 AV_CODEC_ID_IFF_BYTERUN1,
00240 AV_CODEC_ID_KGV1,
00241 AV_CODEC_ID_YOP,
00242 AV_CODEC_ID_VP8,
00243 AV_CODEC_ID_PICTOR,
00244 AV_CODEC_ID_ANSI,
00245 AV_CODEC_ID_A64_MULTI,
00246 AV_CODEC_ID_A64_MULTI5,
00247 AV_CODEC_ID_R10K,
00248 AV_CODEC_ID_MXPEG,
00249 AV_CODEC_ID_LAGARITH,
00250 AV_CODEC_ID_PRORES,
00251 AV_CODEC_ID_JV,
00252 AV_CODEC_ID_DFA,
00253 AV_CODEC_ID_WMV3IMAGE,
00254 AV_CODEC_ID_VC1IMAGE,
00255 AV_CODEC_ID_UTVIDEO,
00256 AV_CODEC_ID_BMV_VIDEO,
00257 AV_CODEC_ID_VBLE,
00258 AV_CODEC_ID_DXTORY,
00259 AV_CODEC_ID_V410,
00260 AV_CODEC_ID_XWD,
00261 AV_CODEC_ID_CDXL,
00262 AV_CODEC_ID_XBM,
00263 AV_CODEC_ID_ZEROCODEC,
00264 AV_CODEC_ID_MSS1,
00265 AV_CODEC_ID_MSA1,
00266 AV_CODEC_ID_TSCC2,
00267 AV_CODEC_ID_MTS2,
00268 AV_CODEC_ID_CLLC,
00269 AV_CODEC_ID_MSS2,
00270 AV_CODEC_ID_Y41P = MKBETAG('Y','4','1','P'),
00271 AV_CODEC_ID_ESCAPE130 = MKBETAG('E','1','3','0'),
00272 AV_CODEC_ID_EXR = MKBETAG('0','E','X','R'),
00273 AV_CODEC_ID_AVRP = MKBETAG('A','V','R','P'),
00274
00275 AV_CODEC_ID_G2M = MKBETAG( 0 ,'G','2','M'),
00276 AV_CODEC_ID_AVUI = MKBETAG('A','V','U','I'),
00277 AV_CODEC_ID_AYUV = MKBETAG('A','Y','U','V'),
00278 AV_CODEC_ID_V308 = MKBETAG('V','3','0','8'),
00279 AV_CODEC_ID_V408 = MKBETAG('V','4','0','8'),
00280 AV_CODEC_ID_YUV4 = MKBETAG('Y','U','V','4'),
00281 AV_CODEC_ID_SANM = MKBETAG('S','A','N','M'),
00282 AV_CODEC_ID_PAF_VIDEO = MKBETAG('P','A','F','V'),
00283 AV_CODEC_ID_AVRN = MKBETAG('A','V','R','n'),
00284 AV_CODEC_ID_CPIA = MKBETAG('C','P','I','A'),
00285
00286
00287 AV_CODEC_ID_FIRST_AUDIO = 0x10000,
00288 AV_CODEC_ID_PCM_S16LE = 0x10000,
00289 AV_CODEC_ID_PCM_S16BE,
00290 AV_CODEC_ID_PCM_U16LE,
00291 AV_CODEC_ID_PCM_U16BE,
00292 AV_CODEC_ID_PCM_S8,
00293 AV_CODEC_ID_PCM_U8,
00294 AV_CODEC_ID_PCM_MULAW,
00295 AV_CODEC_ID_PCM_ALAW,
00296 AV_CODEC_ID_PCM_S32LE,
00297 AV_CODEC_ID_PCM_S32BE,
00298 AV_CODEC_ID_PCM_U32LE,
00299 AV_CODEC_ID_PCM_U32BE,
00300 AV_CODEC_ID_PCM_S24LE,
00301 AV_CODEC_ID_PCM_S24BE,
00302 AV_CODEC_ID_PCM_U24LE,
00303 AV_CODEC_ID_PCM_U24BE,
00304 AV_CODEC_ID_PCM_S24DAUD,
00305 AV_CODEC_ID_PCM_ZORK,
00306 AV_CODEC_ID_PCM_S16LE_PLANAR,
00307 AV_CODEC_ID_PCM_DVD,
00308 AV_CODEC_ID_PCM_F32BE,
00309 AV_CODEC_ID_PCM_F32LE,
00310 AV_CODEC_ID_PCM_F64BE,
00311 AV_CODEC_ID_PCM_F64LE,
00312 AV_CODEC_ID_PCM_BLURAY,
00313 AV_CODEC_ID_PCM_LXF,
00314 AV_CODEC_ID_S302M,
00315 AV_CODEC_ID_PCM_S8_PLANAR,
00316
00317
00318 AV_CODEC_ID_ADPCM_IMA_QT = 0x11000,
00319 AV_CODEC_ID_ADPCM_IMA_WAV,
00320 AV_CODEC_ID_ADPCM_IMA_DK3,
00321 AV_CODEC_ID_ADPCM_IMA_DK4,
00322 AV_CODEC_ID_ADPCM_IMA_WS,
00323 AV_CODEC_ID_ADPCM_IMA_SMJPEG,
00324 AV_CODEC_ID_ADPCM_MS,
00325 AV_CODEC_ID_ADPCM_4XM,
00326 AV_CODEC_ID_ADPCM_XA,
00327 AV_CODEC_ID_ADPCM_ADX,
00328 AV_CODEC_ID_ADPCM_EA,
00329 AV_CODEC_ID_ADPCM_G726,
00330 AV_CODEC_ID_ADPCM_CT,
00331 AV_CODEC_ID_ADPCM_SWF,
00332 AV_CODEC_ID_ADPCM_YAMAHA,
00333 AV_CODEC_ID_ADPCM_SBPRO_4,
00334 AV_CODEC_ID_ADPCM_SBPRO_3,
00335 AV_CODEC_ID_ADPCM_SBPRO_2,
00336 AV_CODEC_ID_ADPCM_THP,
00337 AV_CODEC_ID_ADPCM_IMA_AMV,
00338 AV_CODEC_ID_ADPCM_EA_R1,
00339 AV_CODEC_ID_ADPCM_EA_R3,
00340 AV_CODEC_ID_ADPCM_EA_R2,
00341 AV_CODEC_ID_ADPCM_IMA_EA_SEAD,
00342 AV_CODEC_ID_ADPCM_IMA_EA_EACS,
00343 AV_CODEC_ID_ADPCM_EA_XAS,
00344 AV_CODEC_ID_ADPCM_EA_MAXIS_XA,
00345 AV_CODEC_ID_ADPCM_IMA_ISS,
00346 AV_CODEC_ID_ADPCM_G722,
00347 AV_CODEC_ID_ADPCM_IMA_APC,
00348 AV_CODEC_ID_VIMA = MKBETAG('V','I','M','A'),
00349
00350
00351 AV_CODEC_ID_AMR_NB = 0x12000,
00352 AV_CODEC_ID_AMR_WB,
00353
00354
00355 AV_CODEC_ID_RA_144 = 0x13000,
00356 AV_CODEC_ID_RA_288,
00357
00358
00359 AV_CODEC_ID_ROQ_DPCM = 0x14000,
00360 AV_CODEC_ID_INTERPLAY_DPCM,
00361 AV_CODEC_ID_XAN_DPCM,
00362 AV_CODEC_ID_SOL_DPCM,
00363
00364
00365 AV_CODEC_ID_MP2 = 0x15000,
00366 AV_CODEC_ID_MP3,
00367 AV_CODEC_ID_AAC,
00368 AV_CODEC_ID_AC3,
00369 AV_CODEC_ID_DTS,
00370 AV_CODEC_ID_VORBIS,
00371 AV_CODEC_ID_DVAUDIO,
00372 AV_CODEC_ID_WMAV1,
00373 AV_CODEC_ID_WMAV2,
00374 AV_CODEC_ID_MACE3,
00375 AV_CODEC_ID_MACE6,
00376 AV_CODEC_ID_VMDAUDIO,
00377 AV_CODEC_ID_FLAC,
00378 AV_CODEC_ID_MP3ADU,
00379 AV_CODEC_ID_MP3ON4,
00380 AV_CODEC_ID_SHORTEN,
00381 AV_CODEC_ID_ALAC,
00382 AV_CODEC_ID_WESTWOOD_SND1,
00383 AV_CODEC_ID_GSM,
00384 AV_CODEC_ID_QDM2,
00385 AV_CODEC_ID_COOK,
00386 AV_CODEC_ID_TRUESPEECH,
00387 AV_CODEC_ID_TTA,
00388 AV_CODEC_ID_SMACKAUDIO,
00389 AV_CODEC_ID_QCELP,
00390 AV_CODEC_ID_WAVPACK,
00391 AV_CODEC_ID_DSICINAUDIO,
00392 AV_CODEC_ID_IMC,
00393 AV_CODEC_ID_MUSEPACK7,
00394 AV_CODEC_ID_MLP,
00395 AV_CODEC_ID_GSM_MS,
00396 AV_CODEC_ID_ATRAC3,
00397 AV_CODEC_ID_VOXWARE,
00398 AV_CODEC_ID_APE,
00399 AV_CODEC_ID_NELLYMOSER,
00400 AV_CODEC_ID_MUSEPACK8,
00401 AV_CODEC_ID_SPEEX,
00402 AV_CODEC_ID_WMAVOICE,
00403 AV_CODEC_ID_WMAPRO,
00404 AV_CODEC_ID_WMALOSSLESS,
00405 AV_CODEC_ID_ATRAC3P,
00406 AV_CODEC_ID_EAC3,
00407 AV_CODEC_ID_SIPR,
00408 AV_CODEC_ID_MP1,
00409 AV_CODEC_ID_TWINVQ,
00410 AV_CODEC_ID_TRUEHD,
00411 AV_CODEC_ID_MP4ALS,
00412 AV_CODEC_ID_ATRAC1,
00413 AV_CODEC_ID_BINKAUDIO_RDFT,
00414 AV_CODEC_ID_BINKAUDIO_DCT,
00415 AV_CODEC_ID_AAC_LATM,
00416 AV_CODEC_ID_QDMC,
00417 AV_CODEC_ID_CELT,
00418 AV_CODEC_ID_G723_1,
00419 AV_CODEC_ID_G729,
00420 AV_CODEC_ID_8SVX_EXP,
00421 AV_CODEC_ID_8SVX_FIB,
00422 AV_CODEC_ID_BMV_AUDIO,
00423 AV_CODEC_ID_RALF,
00424 AV_CODEC_ID_IAC,
00425 AV_CODEC_ID_ILBC,
00426 AV_CODEC_ID_FFWAVESYNTH = MKBETAG('F','F','W','S'),
00427 AV_CODEC_ID_8SVX_RAW = MKBETAG('8','S','V','X'),
00428 AV_CODEC_ID_SONIC = MKBETAG('S','O','N','C'),
00429 AV_CODEC_ID_SONIC_LS = MKBETAG('S','O','N','L'),
00430 AV_CODEC_ID_PAF_AUDIO = MKBETAG('P','A','F','A'),
00431 AV_CODEC_ID_OPUS = MKBETAG('O','P','U','S'),
00432
00433
00434 AV_CODEC_ID_FIRST_SUBTITLE = 0x17000,
00435 AV_CODEC_ID_DVD_SUBTITLE = 0x17000,
00436 AV_CODEC_ID_DVB_SUBTITLE,
00437 AV_CODEC_ID_TEXT,
00438 AV_CODEC_ID_XSUB,
00439 AV_CODEC_ID_SSA,
00440 AV_CODEC_ID_MOV_TEXT,
00441 AV_CODEC_ID_HDMV_PGS_SUBTITLE,
00442 AV_CODEC_ID_DVB_TELETEXT,
00443 AV_CODEC_ID_SRT,
00444 AV_CODEC_ID_MICRODVD = MKBETAG('m','D','V','D'),
00445 AV_CODEC_ID_EIA_608 = MKBETAG('c','6','0','8'),
00446 AV_CODEC_ID_JACOSUB = MKBETAG('J','S','U','B'),
00447 AV_CODEC_ID_SAMI = MKBETAG('S','A','M','I'),
00448 AV_CODEC_ID_REALTEXT = MKBETAG('R','T','X','T'),
00449 AV_CODEC_ID_SUBVIEWER = MKBETAG('S','u','b','V'),
00450 AV_CODEC_ID_SUBRIP = MKBETAG('S','R','i','p'),
00451 AV_CODEC_ID_WEBVTT = MKBETAG('W','V','T','T'),
00452
00453
00454 AV_CODEC_ID_FIRST_UNKNOWN = 0x18000,
00455 AV_CODEC_ID_TTF = 0x18000,
00456 AV_CODEC_ID_BINTEXT = MKBETAG('B','T','X','T'),
00457 AV_CODEC_ID_XBIN = MKBETAG('X','B','I','N'),
00458 AV_CODEC_ID_IDF = MKBETAG( 0 ,'I','D','F'),
00459 AV_CODEC_ID_OTF = MKBETAG( 0 ,'O','T','F'),
00460
00461 AV_CODEC_ID_PROBE = 0x19000,
00462
00463 AV_CODEC_ID_MPEG2TS = 0x20000,
00465 AV_CODEC_ID_MPEG4SYSTEMS = 0x20001,
00467 AV_CODEC_ID_FFMETADATA = 0x21000,
00468
00469 #if FF_API_CODEC_ID
00470 #include "old_codec_ids.h"
00471 #endif
00472 };
00473
00474 #if FF_API_CODEC_ID
00475 #define CodecID AVCodecID
00476 #endif
00477
00483 typedef struct AVCodecDescriptor {
00484 enum AVCodecID id;
00485 enum AVMediaType type;
00491 const char *name;
00495 const char *long_name;
00499 int props;
00500 } AVCodecDescriptor;
00501
00506 #define AV_CODEC_PROP_INTRA_ONLY (1 << 0)
00507
00512 #define AV_CODEC_PROP_LOSSY (1 << 1)
00513
00516 #define AV_CODEC_PROP_LOSSLESS (1 << 2)
00517
00518 #if FF_API_OLD_DECODE_AUDIO
00519
00520 #define AVCODEC_MAX_AUDIO_FRAME_SIZE 192000 // 1 second of 48khz 32bit audio
00521 #endif
00522
00531 #define FF_INPUT_BUFFER_PADDING_SIZE 16
00532
00538 #define FF_MIN_BUFFER_SIZE 16384
00539
00540
00545 enum Motion_Est_ID {
00546 ME_ZERO = 1,
00547 ME_FULL,
00548 ME_LOG,
00549 ME_PHODS,
00550 ME_EPZS,
00551 ME_X1,
00552 ME_HEX,
00553 ME_UMH,
00554 ME_ITER,
00555 ME_TESA,
00556 };
00557
00561 enum AVDiscard{
00562
00563
00564 AVDISCARD_NONE =-16,
00565 AVDISCARD_DEFAULT = 0,
00566 AVDISCARD_NONREF = 8,
00567 AVDISCARD_BIDIR = 16,
00568 AVDISCARD_NONKEY = 32,
00569 AVDISCARD_ALL = 48,
00570 };
00571
00572 enum AVColorPrimaries{
00573 AVCOL_PRI_BT709 = 1,
00574 AVCOL_PRI_UNSPECIFIED = 2,
00575 AVCOL_PRI_BT470M = 4,
00576 AVCOL_PRI_BT470BG = 5,
00577 AVCOL_PRI_SMPTE170M = 6,
00578 AVCOL_PRI_SMPTE240M = 7,
00579 AVCOL_PRI_FILM = 8,
00580 AVCOL_PRI_NB ,
00581 };
00582
00583 enum AVColorTransferCharacteristic{
00584 AVCOL_TRC_BT709 = 1,
00585 AVCOL_TRC_UNSPECIFIED = 2,
00586 AVCOL_TRC_GAMMA22 = 4,
00587 AVCOL_TRC_GAMMA28 = 5,
00588 AVCOL_TRC_SMPTE240M = 7,
00589 AVCOL_TRC_NB ,
00590 };
00591
00592 enum AVColorSpace{
00593 AVCOL_SPC_RGB = 0,
00594 AVCOL_SPC_BT709 = 1,
00595 AVCOL_SPC_UNSPECIFIED = 2,
00596 AVCOL_SPC_FCC = 4,
00597 AVCOL_SPC_BT470BG = 5,
00598 AVCOL_SPC_SMPTE170M = 6,
00599 AVCOL_SPC_SMPTE240M = 7,
00600 AVCOL_SPC_YCOCG = 8,
00601 AVCOL_SPC_NB ,
00602 };
00603 #define AVCOL_SPC_YCGCO AVCOL_SPC_YCOCG
00604
00605 enum AVColorRange{
00606 AVCOL_RANGE_UNSPECIFIED = 0,
00607 AVCOL_RANGE_MPEG = 1,
00608 AVCOL_RANGE_JPEG = 2,
00609 AVCOL_RANGE_NB ,
00610 };
00611
00617 enum AVChromaLocation{
00618 AVCHROMA_LOC_UNSPECIFIED = 0,
00619 AVCHROMA_LOC_LEFT = 1,
00620 AVCHROMA_LOC_CENTER = 2,
00621 AVCHROMA_LOC_TOPLEFT = 3,
00622 AVCHROMA_LOC_TOP = 4,
00623 AVCHROMA_LOC_BOTTOMLEFT = 5,
00624 AVCHROMA_LOC_BOTTOM = 6,
00625 AVCHROMA_LOC_NB ,
00626 };
00627
00628 enum AVAudioServiceType {
00629 AV_AUDIO_SERVICE_TYPE_MAIN = 0,
00630 AV_AUDIO_SERVICE_TYPE_EFFECTS = 1,
00631 AV_AUDIO_SERVICE_TYPE_VISUALLY_IMPAIRED = 2,
00632 AV_AUDIO_SERVICE_TYPE_HEARING_IMPAIRED = 3,
00633 AV_AUDIO_SERVICE_TYPE_DIALOGUE = 4,
00634 AV_AUDIO_SERVICE_TYPE_COMMENTARY = 5,
00635 AV_AUDIO_SERVICE_TYPE_EMERGENCY = 6,
00636 AV_AUDIO_SERVICE_TYPE_VOICE_OVER = 7,
00637 AV_AUDIO_SERVICE_TYPE_KARAOKE = 8,
00638 AV_AUDIO_SERVICE_TYPE_NB ,
00639 };
00640
00644 typedef struct RcOverride{
00645 int start_frame;
00646 int end_frame;
00647 int qscale;
00648 float quality_factor;
00649 } RcOverride;
00650
00651 #define FF_MAX_B_FRAMES 16
00652
00653
00654
00655
00656
00657
00658 #define CODEC_FLAG_QSCALE 0x0002
00659 #define CODEC_FLAG_4MV 0x0004
00660 #define CODEC_FLAG_QPEL 0x0010
00661 #define CODEC_FLAG_GMC 0x0020
00662 #define CODEC_FLAG_MV0 0x0040
00663
00668 #define CODEC_FLAG_INPUT_PRESERVED 0x0100
00669 #define CODEC_FLAG_PASS1 0x0200
00670 #define CODEC_FLAG_PASS2 0x0400
00671 #define CODEC_FLAG_GRAY 0x2000
00672 #define CODEC_FLAG_EMU_EDGE 0x4000
00673 #define CODEC_FLAG_PSNR 0x8000
00674 #define CODEC_FLAG_TRUNCATED 0x00010000
00676 #define CODEC_FLAG_NORMALIZE_AQP 0x00020000
00677 #define CODEC_FLAG_INTERLACED_DCT 0x00040000
00678 #define CODEC_FLAG_LOW_DELAY 0x00080000
00679 #define CODEC_FLAG_GLOBAL_HEADER 0x00400000
00680 #define CODEC_FLAG_BITEXACT 0x00800000
00681
00682 #define CODEC_FLAG_AC_PRED 0x01000000
00683 #define CODEC_FLAG_LOOP_FILTER 0x00000800
00684 #define CODEC_FLAG_INTERLACED_ME 0x20000000
00685 #define CODEC_FLAG_CLOSED_GOP 0x80000000
00686 #define CODEC_FLAG2_FAST 0x00000001
00687 #define CODEC_FLAG2_NO_OUTPUT 0x00000004
00688 #define CODEC_FLAG2_LOCAL_HEADER 0x00000008
00689 #define CODEC_FLAG2_DROP_FRAME_TIMECODE 0x00002000
00690 #if FF_API_MPV_GLOBAL_OPTS
00691 #define CODEC_FLAG_CBP_RD 0x04000000
00692 #define CODEC_FLAG_QP_RD 0x08000000
00693 #define CODEC_FLAG2_STRICT_GOP 0x00000002
00694 #define CODEC_FLAG2_SKIP_RD 0x00004000
00695 #endif
00696 #define CODEC_FLAG2_CHUNKS 0x00008000
00697 #define CODEC_FLAG2_SHOW_ALL 0x00400000
00698
00699
00700
00701
00702
00703
00704
00705
00706 #define CODEC_CAP_DRAW_HORIZ_BAND 0x0001
00707
00712 #define CODEC_CAP_DR1 0x0002
00713 #define CODEC_CAP_TRUNCATED 0x0008
00714
00715 #define CODEC_CAP_HWACCEL 0x0010
00716
00739 #define CODEC_CAP_DELAY 0x0020
00740
00744 #define CODEC_CAP_SMALL_LAST_FRAME 0x0040
00745
00748 #define CODEC_CAP_HWACCEL_VDPAU 0x0080
00749
00760 #define CODEC_CAP_SUBFRAMES 0x0100
00761
00765 #define CODEC_CAP_EXPERIMENTAL 0x0200
00766
00769 #define CODEC_CAP_CHANNEL_CONF 0x0400
00770
00774 #define CODEC_CAP_NEG_LINESIZES 0x0800
00775
00779 #define CODEC_CAP_FRAME_THREADS 0x1000
00780
00783 #define CODEC_CAP_SLICE_THREADS 0x2000
00784
00787 #define CODEC_CAP_PARAM_CHANGE 0x4000
00788
00791 #define CODEC_CAP_AUTO_THREADS 0x8000
00792
00795 #define CODEC_CAP_VARIABLE_FRAME_SIZE 0x10000
00796
00799 #define CODEC_CAP_INTRA_ONLY 0x40000000
00800
00803 #define CODEC_CAP_LOSSLESS 0x80000000
00804
00805
00806 #define MB_TYPE_INTRA4x4 0x0001
00807 #define MB_TYPE_INTRA16x16 0x0002 //FIXME H.264-specific
00808 #define MB_TYPE_INTRA_PCM 0x0004 //FIXME H.264-specific
00809 #define MB_TYPE_16x16 0x0008
00810 #define MB_TYPE_16x8 0x0010
00811 #define MB_TYPE_8x16 0x0020
00812 #define MB_TYPE_8x8 0x0040
00813 #define MB_TYPE_INTERLACED 0x0080
00814 #define MB_TYPE_DIRECT2 0x0100 //FIXME
00815 #define MB_TYPE_ACPRED 0x0200
00816 #define MB_TYPE_GMC 0x0400
00817 #define MB_TYPE_SKIP 0x0800
00818 #define MB_TYPE_P0L0 0x1000
00819 #define MB_TYPE_P1L0 0x2000
00820 #define MB_TYPE_P0L1 0x4000
00821 #define MB_TYPE_P1L1 0x8000
00822 #define MB_TYPE_L0 (MB_TYPE_P0L0 | MB_TYPE_P1L0)
00823 #define MB_TYPE_L1 (MB_TYPE_P0L1 | MB_TYPE_P1L1)
00824 #define MB_TYPE_L0L1 (MB_TYPE_L0 | MB_TYPE_L1)
00825 #define MB_TYPE_QUANT 0x00010000
00826 #define MB_TYPE_CBP 0x00020000
00827
00828
00834 typedef struct AVPanScan{
00840 int id;
00841
00847 int width;
00848 int height;
00849
00855 int16_t position[3][2];
00856 }AVPanScan;
00857
00858 #define FF_QSCALE_TYPE_MPEG1 0
00859 #define FF_QSCALE_TYPE_MPEG2 1
00860 #define FF_QSCALE_TYPE_H264 2
00861 #define FF_QSCALE_TYPE_VP56 3
00862
00863 #define FF_BUFFER_TYPE_INTERNAL 1
00864 #define FF_BUFFER_TYPE_USER 2
00865 #define FF_BUFFER_TYPE_SHARED 4
00866 #define FF_BUFFER_TYPE_COPY 8
00867
00868 #define FF_BUFFER_HINTS_VALID 0x01 // Buffer hints value is meaningful (if 0 ignore).
00869 #define FF_BUFFER_HINTS_READABLE 0x02 // Codec will read from buffer.
00870 #define FF_BUFFER_HINTS_PRESERVE 0x04 // User must not alter buffer content.
00871 #define FF_BUFFER_HINTS_REUSABLE 0x08 // Codec will reuse the buffer (update).
00872
00879 enum AVPacketSideDataType {
00880 AV_PKT_DATA_PALETTE,
00881 AV_PKT_DATA_NEW_EXTRADATA,
00882
00898 AV_PKT_DATA_PARAM_CHANGE,
00899
00919 AV_PKT_DATA_H263_MB_INFO,
00920
00930 AV_PKT_DATA_SKIP_SAMPLES=70,
00931
00940 AV_PKT_DATA_JP_DUALMONO,
00941 };
00942
00943 typedef struct AVPacket {
00953 int64_t pts;
00959 int64_t dts;
00960 uint8_t *data;
00961 int size;
00962 int stream_index;
00966 int flags;
00971 struct {
00972 uint8_t *data;
00973 int size;
00974 enum AVPacketSideDataType type;
00975 } *side_data;
00976 int side_data_elems;
00977
00982 int duration;
00983 void (*destruct)(struct AVPacket *);
00984 void *priv;
00985 int64_t pos;
00986
01004 int64_t convergence_duration;
01005 } AVPacket;
01006 #define AV_PKT_FLAG_KEY 0x0001
01007 #define AV_PKT_FLAG_CORRUPT 0x0002
01008
01009 enum AVSideDataParamChangeFlags {
01010 AV_SIDE_DATA_PARAM_CHANGE_CHANNEL_COUNT = 0x0001,
01011 AV_SIDE_DATA_PARAM_CHANGE_CHANNEL_LAYOUT = 0x0002,
01012 AV_SIDE_DATA_PARAM_CHANGE_SAMPLE_RATE = 0x0004,
01013 AV_SIDE_DATA_PARAM_CHANGE_DIMENSIONS = 0x0008,
01014 };
01029 typedef struct AVFrame {
01030 #define AV_NUM_DATA_POINTERS 8
01031
01037 uint8_t *data[AV_NUM_DATA_POINTERS];
01038
01048 int linesize[AV_NUM_DATA_POINTERS];
01049
01068 uint8_t **extended_data;
01069
01075 int width, height;
01076
01082 int nb_samples;
01083
01091 int format;
01092
01098 int key_frame;
01099
01105 enum AVPictureType pict_type;
01106
01113 uint8_t *base[AV_NUM_DATA_POINTERS];
01114
01120 AVRational sample_aspect_ratio;
01121
01128 int64_t pts;
01129
01135 int64_t pkt_pts;
01136
01142 int64_t pkt_dts;
01143
01149 int coded_picture_number;
01155 int display_picture_number;
01156
01162 int quality;
01163
01172 int reference;
01173
01179 int8_t *qscale_table;
01185 int qstride;
01186
01190 int qscale_type;
01191
01198 uint8_t *mbskip_table;
01199
01212 int16_t (*motion_val[2])[2];
01213
01220 uint32_t *mb_type;
01221
01227 short *dct_coeff;
01228
01235 int8_t *ref_index[2];
01236
01242 void *opaque;
01243
01249 uint64_t error[AV_NUM_DATA_POINTERS];
01250
01257 int type;
01258
01265 int repeat_pict;
01266
01272 int interlaced_frame;
01273
01279 int top_field_first;
01280
01286 int palette_has_changed;
01287
01293 int buffer_hints;
01294
01300 AVPanScan *pan_scan;
01301
01313 int64_t reordered_opaque;
01314
01320 void *hwaccel_picture_private;
01321
01327 struct AVCodecContext *owner;
01328
01334 void *thread_opaque;
01335
01342 uint8_t motion_subsample_log2;
01343
01350 int sample_rate;
01351
01358 uint64_t channel_layout;
01359
01367 int64_t best_effort_timestamp;
01368
01376 int64_t pkt_pos;
01377
01386 int64_t pkt_duration;
01387
01395 AVDictionary *metadata;
01396
01406 int decode_error_flags;
01407 #define FF_DECODE_ERROR_INVALID_BITSTREAM 1
01408 #define FF_DECODE_ERROR_MISSING_REFERENCE 2
01409
01417 int64_t channels;
01418 } AVFrame;
01419
01425 int64_t av_frame_get_best_effort_timestamp(const AVFrame *frame);
01426 void av_frame_set_best_effort_timestamp(AVFrame *frame, int64_t val);
01427 int64_t av_frame_get_pkt_duration (const AVFrame *frame);
01428 void av_frame_set_pkt_duration (AVFrame *frame, int64_t val);
01429 int64_t av_frame_get_pkt_pos (const AVFrame *frame);
01430 void av_frame_set_pkt_pos (AVFrame *frame, int64_t val);
01431 int64_t av_frame_get_channel_layout (const AVFrame *frame);
01432 void av_frame_set_channel_layout (AVFrame *frame, int64_t val);
01433 int av_frame_get_channels (const AVFrame *frame);
01434 void av_frame_set_channels (AVFrame *frame, int val);
01435 int av_frame_get_sample_rate (const AVFrame *frame);
01436 void av_frame_set_sample_rate (AVFrame *frame, int val);
01437 AVDictionary *av_frame_get_metadata (const AVFrame *frame);
01438 void av_frame_set_metadata (AVFrame *frame, AVDictionary *val);
01439 int av_frame_get_decode_error_flags (const AVFrame *frame);
01440 void av_frame_set_decode_error_flags (AVFrame *frame, int val);
01441
01442 struct AVCodecInternal;
01443
01444 enum AVFieldOrder {
01445 AV_FIELD_UNKNOWN,
01446 AV_FIELD_PROGRESSIVE,
01447 AV_FIELD_TT,
01448 AV_FIELD_BB,
01449 AV_FIELD_TB,
01450 AV_FIELD_BT,
01451 };
01452
01462 typedef struct AVCodecContext {
01467 const AVClass *av_class;
01468 int log_level_offset;
01469
01470 enum AVMediaType codec_type;
01471 const struct AVCodec *codec;
01472 char codec_name[32];
01473 enum AVCodecID codec_id;
01474
01488 unsigned int codec_tag;
01489
01496 unsigned int stream_codec_tag;
01497
01498 #if FF_API_SUB_ID
01499
01502 attribute_deprecated int sub_id;
01503 #endif
01504
01505 void *priv_data;
01506
01513 struct AVCodecInternal *internal;
01514
01520 void *opaque;
01521
01527 int bit_rate;
01528
01535 int bit_rate_tolerance;
01536
01543 int global_quality;
01544
01549 int compression_level;
01550 #define FF_COMPRESSION_DEFAULT -1
01551
01557 int flags;
01558
01564 int flags2;
01565
01577 uint8_t *extradata;
01578 int extradata_size;
01579
01588 AVRational time_base;
01589
01597 int ticks_per_frame;
01598
01620 int delay;
01621
01622
01623
01631 int width, height;
01632
01638 int coded_width, coded_height;
01639
01640 #define FF_ASPECT_EXTENDED 15
01641
01647 int gop_size;
01648
01656 enum PixelFormat pix_fmt;
01657
01665 int me_method;
01666
01690 void (*draw_horiz_band)(struct AVCodecContext *s,
01691 const AVFrame *src, int offset[AV_NUM_DATA_POINTERS],
01692 int y, int type, int height);
01693
01703 enum PixelFormat (*get_format)(struct AVCodecContext *s, const enum PixelFormat * fmt);
01704
01711 int max_b_frames;
01712
01720 float b_quant_factor;
01721
01723 int rc_strategy;
01724 #define FF_RC_STRATEGY_XVID 1
01725
01726 int b_frame_strategy;
01727
01728 #if FF_API_MPV_GLOBAL_OPTS
01729
01734 attribute_deprecated int luma_elim_threshold;
01735
01741 attribute_deprecated int chroma_elim_threshold;
01742 #endif
01743
01749 float b_quant_offset;
01750
01757 int has_b_frames;
01758
01764 int mpeg_quant;
01765
01773 float i_quant_factor;
01774
01780 float i_quant_offset;
01781
01787 float lumi_masking;
01788
01794 float temporal_cplx_masking;
01795
01801 float spatial_cplx_masking;
01802
01808 float p_masking;
01809
01815 float dark_masking;
01816
01822 int slice_count;
01828 int prediction_method;
01829 #define FF_PRED_LEFT 0
01830 #define FF_PRED_PLANE 1
01831 #define FF_PRED_MEDIAN 2
01832
01838 int *slice_offset;
01839
01847 AVRational sample_aspect_ratio;
01848
01854 int me_cmp;
01860 int me_sub_cmp;
01866 int mb_cmp;
01872 int ildct_cmp;
01873 #define FF_CMP_SAD 0
01874 #define FF_CMP_SSE 1
01875 #define FF_CMP_SATD 2
01876 #define FF_CMP_DCT 3
01877 #define FF_CMP_PSNR 4
01878 #define FF_CMP_BIT 5
01879 #define FF_CMP_RD 6
01880 #define FF_CMP_ZERO 7
01881 #define FF_CMP_VSAD 8
01882 #define FF_CMP_VSSE 9
01883 #define FF_CMP_NSSE 10
01884 #define FF_CMP_W53 11
01885 #define FF_CMP_W97 12
01886 #define FF_CMP_DCTMAX 13
01887 #define FF_CMP_DCT264 14
01888 #define FF_CMP_CHROMA 256
01889
01895 int dia_size;
01896
01902 int last_predictor_count;
01903
01909 int pre_me;
01910
01916 int me_pre_cmp;
01917
01923 int pre_dia_size;
01924
01930 int me_subpel_quality;
01931
01940 int dtg_active_format;
01941 #define FF_DTG_AFD_SAME 8
01942 #define FF_DTG_AFD_4_3 9
01943 #define FF_DTG_AFD_16_9 10
01944 #define FF_DTG_AFD_14_9 11
01945 #define FF_DTG_AFD_4_3_SP_14_9 13
01946 #define FF_DTG_AFD_16_9_SP_14_9 14
01947 #define FF_DTG_AFD_SP_4_3 15
01948
01956 int me_range;
01957
01963 int intra_quant_bias;
01964 #define FF_DEFAULT_QUANT_BIAS 999999
01965
01971 int inter_quant_bias;
01972
01973 #if FF_API_COLOR_TABLE_ID
01974
01980 attribute_deprecated int color_table_id;
01981 #endif
01982
01988 int slice_flags;
01989 #define SLICE_FLAG_CODED_ORDER 0x0001
01990 #define SLICE_FLAG_ALLOW_FIELD 0x0002
01991 #define SLICE_FLAG_ALLOW_PLANE 0x0004
01992
01993
01998 int xvmc_acceleration;
01999
02005 int mb_decision;
02006 #define FF_MB_DECISION_SIMPLE 0
02007 #define FF_MB_DECISION_BITS 1
02008 #define FF_MB_DECISION_RD 2
02009
02010
02015 uint16_t *intra_matrix;
02016
02022 uint16_t *inter_matrix;
02023
02030 int scenechange_threshold;
02031
02037 int noise_reduction;
02038
02039 #if FF_API_INTER_THRESHOLD
02040
02043 attribute_deprecated int inter_threshold;
02044 #endif
02045
02046 #if FF_API_MPV_GLOBAL_OPTS
02047
02050 attribute_deprecated int quantizer_noise_shaping;
02051 #endif
02052
02060 int me_threshold;
02061
02067 int mb_threshold;
02068
02074 int intra_dc_precision;
02075
02081 int skip_top;
02082
02088 int skip_bottom;
02089
02096 float border_masking;
02097
02103 int mb_lmin;
02104
02110 int mb_lmax;
02111
02117 int me_penalty_compensation;
02118
02124 int bidir_refine;
02125
02131 int brd_scale;
02132
02138 int keyint_min;
02139
02145 int refs;
02146
02152 int chromaoffset;
02153
02159 int scenechange_factor;
02160
02167 int mv0_threshold;
02168
02174 int b_sensitivity;
02175
02181 enum AVColorPrimaries color_primaries;
02182
02188 enum AVColorTransferCharacteristic color_trc;
02189
02195 enum AVColorSpace colorspace;
02196
02202 enum AVColorRange color_range;
02203
02209 enum AVChromaLocation chroma_sample_location;
02210
02218 int slices;
02219
02224 enum AVFieldOrder field_order;
02225
02226
02227 int sample_rate;
02228 int channels;
02229
02235 enum AVSampleFormat sample_fmt;
02236
02237
02241 int frame_size;
02242
02252 int frame_number;
02253
02258 int block_align;
02259
02265 int cutoff;
02266
02267 #if FF_API_REQUEST_CHANNELS
02268
02274 int request_channels;
02275 #endif
02276
02282 uint64_t channel_layout;
02283
02289 uint64_t request_channel_layout;
02290
02296 enum AVAudioServiceType audio_service_type;
02297
02304 enum AVSampleFormat request_sample_fmt;
02305
02361 int (*get_buffer)(struct AVCodecContext *c, AVFrame *pic);
02362
02372 void (*release_buffer)(struct AVCodecContext *c, AVFrame *pic);
02373
02386 int (*reget_buffer)(struct AVCodecContext *c, AVFrame *pic);
02387
02388
02389
02390 float qcompress;
02391 float qblur;
02392
02398 int qmin;
02399
02405 int qmax;
02406
02412 int max_qdiff;
02413
02420 float rc_qsquish;
02421
02422 float rc_qmod_amp;
02423 int rc_qmod_freq;
02424
02430 int rc_buffer_size;
02431
02437 int rc_override_count;
02438 RcOverride *rc_override;
02439
02445 const char *rc_eq;
02446
02452 int rc_max_rate;
02453
02459 int rc_min_rate;
02460
02461 float rc_buffer_aggressivity;
02462
02468 float rc_initial_cplx;
02469
02475 float rc_max_available_vbv_use;
02476
02482 float rc_min_vbv_overflow_use;
02483
02489 int rc_initial_buffer_occupancy;
02490
02491 #define FF_CODER_TYPE_VLC 0
02492 #define FF_CODER_TYPE_AC 1
02493 #define FF_CODER_TYPE_RAW 2
02494 #define FF_CODER_TYPE_RLE 3
02495 #define FF_CODER_TYPE_DEFLATE 4
02496
02501 int coder_type;
02502
02508 int context_model;
02509
02515 int lmin;
02516
02522 int lmax;
02523
02529 int frame_skip_threshold;
02530
02536 int frame_skip_factor;
02537
02543 int frame_skip_exp;
02544
02550 int frame_skip_cmp;
02551
02557 int trellis;
02558
02563 int min_prediction_order;
02564
02569 int max_prediction_order;
02570
02576 int64_t timecode_frame_start;
02577
02578
02579
02580
02581
02582
02583
02584 void (*rtp_callback)(struct AVCodecContext *avctx, void *data, int size, int mb_nb);
02585
02586 int rtp_payload_size;
02587
02588
02589
02590
02591
02592
02593
02594 int mv_bits;
02595 int header_bits;
02596 int i_tex_bits;
02597 int p_tex_bits;
02598 int i_count;
02599 int p_count;
02600 int skip_count;
02601 int misc_bits;
02602
02608 int frame_bits;
02609
02615 char *stats_out;
02616
02623 char *stats_in;
02624
02630 int workaround_bugs;
02631 #define FF_BUG_AUTODETECT 1
02632 #define FF_BUG_OLD_MSMPEG4 2
02633 #define FF_BUG_XVID_ILACE 4
02634 #define FF_BUG_UMP4 8
02635 #define FF_BUG_NO_PADDING 16
02636 #define FF_BUG_AMV 32
02637 #define FF_BUG_AC_VLC 0
02638 #define FF_BUG_QPEL_CHROMA 64
02639 #define FF_BUG_STD_QPEL 128
02640 #define FF_BUG_QPEL_CHROMA2 256
02641 #define FF_BUG_DIRECT_BLOCKSIZE 512
02642 #define FF_BUG_EDGE 1024
02643 #define FF_BUG_HPEL_CHROMA 2048
02644 #define FF_BUG_DC_CLIP 4096
02645 #define FF_BUG_MS 8192
02646 #define FF_BUG_TRUNCATED 16384
02647
02660 int strict_std_compliance;
02661 #define FF_COMPLIANCE_VERY_STRICT 2
02662 #define FF_COMPLIANCE_STRICT 1
02663 #define FF_COMPLIANCE_NORMAL 0
02664 #define FF_COMPLIANCE_UNOFFICIAL -1
02665 #define FF_COMPLIANCE_EXPERIMENTAL -2
02666
02667
02672 int error_concealment;
02673 #define FF_EC_GUESS_MVS 1
02674 #define FF_EC_DEBLOCK 2
02675
02681 int debug;
02682 #define FF_DEBUG_PICT_INFO 1
02683 #define FF_DEBUG_RC 2
02684 #define FF_DEBUG_BITSTREAM 4
02685 #define FF_DEBUG_MB_TYPE 8
02686 #define FF_DEBUG_QP 16
02687 #define FF_DEBUG_MV 32
02688 #define FF_DEBUG_DCT_COEFF 0x00000040
02689 #define FF_DEBUG_SKIP 0x00000080
02690 #define FF_DEBUG_STARTCODE 0x00000100
02691 #define FF_DEBUG_PTS 0x00000200
02692 #define FF_DEBUG_ER 0x00000400
02693 #define FF_DEBUG_MMCO 0x00000800
02694 #define FF_DEBUG_BUGS 0x00001000
02695 #define FF_DEBUG_VIS_QP 0x00002000
02696 #define FF_DEBUG_VIS_MB_TYPE 0x00004000
02697 #define FF_DEBUG_BUFFERS 0x00008000
02698 #define FF_DEBUG_THREADS 0x00010000
02699
02705 int debug_mv;
02706 #define FF_DEBUG_VIS_MV_P_FOR 0x00000001 //visualize forward predicted MVs of P frames
02707 #define FF_DEBUG_VIS_MV_B_FOR 0x00000002 //visualize forward predicted MVs of B frames
02708 #define FF_DEBUG_VIS_MV_B_BACK 0x00000004 //visualize backward predicted MVs of B frames
02709
02715 int err_recognition;
02716 #define AV_EF_CRCCHECK (1<<0)
02717 #define AV_EF_BITSTREAM (1<<1)
02718 #define AV_EF_BUFFER (1<<2)
02719 #define AV_EF_EXPLODE (1<<3)
02720
02721 #define AV_EF_CAREFUL (1<<16)
02722 #define AV_EF_COMPLIANT (1<<17)
02723 #define AV_EF_AGGRESSIVE (1<<18)
02724
02725
02733 int64_t reordered_opaque;
02734
02740 struct AVHWAccel *hwaccel;
02741
02752 void *hwaccel_context;
02753
02759 uint64_t error[AV_NUM_DATA_POINTERS];
02760
02766 int dct_algo;
02767 #define FF_DCT_AUTO 0
02768 #define FF_DCT_FASTINT 1
02769 #define FF_DCT_INT 2
02770 #define FF_DCT_MMX 3
02771 #define FF_DCT_ALTIVEC 5
02772 #define FF_DCT_FAAN 6
02773
02779 int idct_algo;
02780 #define FF_IDCT_AUTO 0
02781 #define FF_IDCT_INT 1
02782 #define FF_IDCT_SIMPLE 2
02783 #define FF_IDCT_SIMPLEMMX 3
02784 #define FF_IDCT_LIBMPEG2MMX 4
02785 #define FF_IDCT_MMI 5
02786 #define FF_IDCT_ARM 7
02787 #define FF_IDCT_ALTIVEC 8
02788 #define FF_IDCT_SH4 9
02789 #define FF_IDCT_SIMPLEARM 10
02790 #define FF_IDCT_H264 11
02791 #define FF_IDCT_VP3 12
02792 #define FF_IDCT_IPP 13
02793 #define FF_IDCT_XVIDMMX 14
02794 #define FF_IDCT_CAVS 15
02795 #define FF_IDCT_SIMPLEARMV5TE 16
02796 #define FF_IDCT_SIMPLEARMV6 17
02797 #define FF_IDCT_SIMPLEVIS 18
02798 #define FF_IDCT_WMV2 19
02799 #define FF_IDCT_FAAN 20
02800 #define FF_IDCT_EA 21
02801 #define FF_IDCT_SIMPLENEON 22
02802 #define FF_IDCT_SIMPLEALPHA 23
02803 #define FF_IDCT_BINK 24
02804
02805 #if FF_API_DSP_MASK
02806
02810 attribute_deprecated unsigned dsp_mask;
02811 #endif
02812
02818 int bits_per_coded_sample;
02819
02825 int bits_per_raw_sample;
02826
02832 int lowres;
02833
02839 AVFrame *coded_frame;
02840
02847 int thread_count;
02848
02857 int thread_type;
02858 #define FF_THREAD_FRAME 1
02859 #define FF_THREAD_SLICE 2
02860
02861
02866 int active_thread_type;
02867
02876 int thread_safe_callbacks;
02877
02887 int (*execute)(struct AVCodecContext *c, int (*func)(struct AVCodecContext *c2, void *arg), void *arg2, int *ret, int count, int size);
02888
02907 int (*execute2)(struct AVCodecContext *c, int (*func)(struct AVCodecContext *c2, void *arg, int jobnr, int threadnr), void *arg2, int *ret, int count);
02908
02915 void *thread_opaque;
02916
02922 int nsse_weight;
02923
02929 int profile;
02930 #define FF_PROFILE_UNKNOWN -99
02931 #define FF_PROFILE_RESERVED -100
02932
02933 #define FF_PROFILE_AAC_MAIN 0
02934 #define FF_PROFILE_AAC_LOW 1
02935 #define FF_PROFILE_AAC_SSR 2
02936 #define FF_PROFILE_AAC_LTP 3
02937 #define FF_PROFILE_AAC_HE 4
02938 #define FF_PROFILE_AAC_HE_V2 28
02939 #define FF_PROFILE_AAC_LD 22
02940 #define FF_PROFILE_AAC_ELD 38
02941
02942 #define FF_PROFILE_DTS 20
02943 #define FF_PROFILE_DTS_ES 30
02944 #define FF_PROFILE_DTS_96_24 40
02945 #define FF_PROFILE_DTS_HD_HRA 50
02946 #define FF_PROFILE_DTS_HD_MA 60
02947
02948 #define FF_PROFILE_MPEG2_422 0
02949 #define FF_PROFILE_MPEG2_HIGH 1
02950 #define FF_PROFILE_MPEG2_SS 2
02951 #define FF_PROFILE_MPEG2_SNR_SCALABLE 3
02952 #define FF_PROFILE_MPEG2_MAIN 4
02953 #define FF_PROFILE_MPEG2_SIMPLE 5
02954
02955 #define FF_PROFILE_H264_CONSTRAINED (1<<9) // 8+1; constraint_set1_flag
02956 #define FF_PROFILE_H264_INTRA (1<<11) // 8+3; constraint_set3_flag
02957
02958 #define FF_PROFILE_H264_BASELINE 66
02959 #define FF_PROFILE_H264_CONSTRAINED_BASELINE (66|FF_PROFILE_H264_CONSTRAINED)
02960 #define FF_PROFILE_H264_MAIN 77
02961 #define FF_PROFILE_H264_EXTENDED 88
02962 #define FF_PROFILE_H264_HIGH 100
02963 #define FF_PROFILE_H264_HIGH_10 110
02964 #define FF_PROFILE_H264_HIGH_10_INTRA (110|FF_PROFILE_H264_INTRA)
02965 #define FF_PROFILE_H264_HIGH_422 122
02966 #define FF_PROFILE_H264_HIGH_422_INTRA (122|FF_PROFILE_H264_INTRA)
02967 #define FF_PROFILE_H264_HIGH_444 144
02968 #define FF_PROFILE_H264_HIGH_444_PREDICTIVE 244
02969 #define FF_PROFILE_H264_HIGH_444_INTRA (244|FF_PROFILE_H264_INTRA)
02970 #define FF_PROFILE_H264_CAVLC_444 44
02971
02972 #define FF_PROFILE_VC1_SIMPLE 0
02973 #define FF_PROFILE_VC1_MAIN 1
02974 #define FF_PROFILE_VC1_COMPLEX 2
02975 #define FF_PROFILE_VC1_ADVANCED 3
02976
02977 #define FF_PROFILE_MPEG4_SIMPLE 0
02978 #define FF_PROFILE_MPEG4_SIMPLE_SCALABLE 1
02979 #define FF_PROFILE_MPEG4_CORE 2
02980 #define FF_PROFILE_MPEG4_MAIN 3
02981 #define FF_PROFILE_MPEG4_N_BIT 4
02982 #define FF_PROFILE_MPEG4_SCALABLE_TEXTURE 5
02983 #define FF_PROFILE_MPEG4_SIMPLE_FACE_ANIMATION 6
02984 #define FF_PROFILE_MPEG4_BASIC_ANIMATED_TEXTURE 7
02985 #define FF_PROFILE_MPEG4_HYBRID 8
02986 #define FF_PROFILE_MPEG4_ADVANCED_REAL_TIME 9
02987 #define FF_PROFILE_MPEG4_CORE_SCALABLE 10
02988 #define FF_PROFILE_MPEG4_ADVANCED_CODING 11
02989 #define FF_PROFILE_MPEG4_ADVANCED_CORE 12
02990 #define FF_PROFILE_MPEG4_ADVANCED_SCALABLE_TEXTURE 13
02991 #define FF_PROFILE_MPEG4_SIMPLE_STUDIO 14
02992 #define FF_PROFILE_MPEG4_ADVANCED_SIMPLE 15
02993
02999 int level;
03000 #define FF_LEVEL_UNKNOWN -99
03001
03007 enum AVDiscard skip_loop_filter;
03008
03014 enum AVDiscard skip_idct;
03015
03021 enum AVDiscard skip_frame;
03022
03031 uint8_t *subtitle_header;
03032 int subtitle_header_size;
03033
03039 int error_rate;
03040
03048 AVPacket *pkt;
03049
03056 uint64_t vbv_delay;
03057
03065 AVRational pkt_timebase;
03066
03074 const AVCodecDescriptor *codec_descriptor;
03075
03081 int64_t pts_correction_num_faulty_pts;
03082 int64_t pts_correction_num_faulty_dts;
03083 int64_t pts_correction_last_pts;
03084 int64_t pts_correction_last_dts;
03085 } AVCodecContext;
03086
03087 AVRational av_codec_get_pkt_timebase (const AVCodecContext *avctx);
03088 void av_codec_set_pkt_timebase (AVCodecContext *avctx, AVRational val);
03089
03090 const AVCodecDescriptor *av_codec_get_codec_descriptor(const AVCodecContext *avctx);
03091 void av_codec_set_codec_descriptor(AVCodecContext *avctx, const AVCodecDescriptor *desc);
03092
03096 typedef struct AVProfile {
03097 int profile;
03098 const char *name;
03099 } AVProfile;
03100
03101 typedef struct AVCodecDefault AVCodecDefault;
03102
03103 struct AVSubtitle;
03104
03108 typedef struct AVCodec {
03115 const char *name;
03120 const char *long_name;
03121 enum AVMediaType type;
03122 enum AVCodecID id;
03127 int capabilities;
03128 const AVRational *supported_framerates;
03129 const enum PixelFormat *pix_fmts;
03130 const int *supported_samplerates;
03131 const enum AVSampleFormat *sample_fmts;
03132 const uint64_t *channel_layouts;
03133 uint8_t max_lowres;
03134 const AVClass *priv_class;
03135 const AVProfile *profiles;
03136
03137
03138
03139
03140
03141
03142
03143
03144 int priv_data_size;
03145 struct AVCodec *next;
03155 int (*init_thread_copy)(AVCodecContext *);
03163 int (*update_thread_context)(AVCodecContext *dst, const AVCodecContext *src);
03169 const AVCodecDefault *defaults;
03170
03174 void (*init_static_data)(struct AVCodec *codec);
03175
03176 int (*init)(AVCodecContext *);
03177 int (*encode_sub)(AVCodecContext *, uint8_t *buf, int buf_size,
03178 const struct AVSubtitle *sub);
03189 int (*encode2)(AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame,
03190 int *got_packet_ptr);
03191 int (*decode)(AVCodecContext *, void *outdata, int *outdata_size, AVPacket *avpkt);
03192 int (*close)(AVCodecContext *);
03197 void (*flush)(AVCodecContext *);
03198 } AVCodec;
03199
03203 typedef struct AVHWAccel {
03209 const char *name;
03210
03216 enum AVMediaType type;
03217
03223 enum AVCodecID id;
03224
03230 enum PixelFormat pix_fmt;
03231
03236 int capabilities;
03237
03238 struct AVHWAccel *next;
03239
03254 int (*start_frame)(AVCodecContext *avctx, const uint8_t *buf, uint32_t buf_size);
03255
03267 int (*decode_slice)(AVCodecContext *avctx, const uint8_t *buf, uint32_t buf_size);
03268
03278 int (*end_frame)(AVCodecContext *avctx);
03279
03287 int priv_data_size;
03288 } AVHWAccel;
03289
03301 typedef struct AVPicture {
03302 uint8_t *data[AV_NUM_DATA_POINTERS];
03303 int linesize[AV_NUM_DATA_POINTERS];
03304 } AVPicture;
03305
03310 enum AVSubtitleType {
03311 SUBTITLE_NONE,
03312
03313 SUBTITLE_BITMAP,
03314
03319 SUBTITLE_TEXT,
03320
03325 SUBTITLE_ASS,
03326 };
03327
03328 typedef struct AVSubtitleRect {
03329 int x;
03330 int y;
03331 int w;
03332 int h;
03333 int nb_colors;
03334
03339 AVPicture pict;
03340 enum AVSubtitleType type;
03341
03342 char *text;
03343
03349 char *ass;
03350
03355 int forced;
03356 } AVSubtitleRect;
03357
03358 typedef struct AVSubtitle {
03359 uint16_t format;
03360 uint32_t start_display_time;
03361 uint32_t end_display_time;
03362 unsigned num_rects;
03363 AVSubtitleRect **rects;
03364 int64_t pts;
03365 } AVSubtitle;
03366
03372 AVCodec *av_codec_next(const AVCodec *c);
03373
03377 unsigned avcodec_version(void);
03378
03382 const char *avcodec_configuration(void);
03383
03387 const char *avcodec_license(void);
03388
03397 void avcodec_register(AVCodec *codec);
03398
03409 void avcodec_register_all(void);
03410
03411
03412 #if FF_API_ALLOC_CONTEXT
03413
03422 attribute_deprecated
03423 AVCodecContext *avcodec_alloc_context(void);
03424
03427 attribute_deprecated
03428 AVCodecContext *avcodec_alloc_context2(enum AVMediaType);
03429
03436 attribute_deprecated
03437 void avcodec_get_context_defaults(AVCodecContext *s);
03438
03441 attribute_deprecated
03442 void avcodec_get_context_defaults2(AVCodecContext *s, enum AVMediaType);
03443 #endif
03444
03460 AVCodecContext *avcodec_alloc_context3(const AVCodec *codec);
03461
03471 int avcodec_get_context_defaults3(AVCodecContext *s, const AVCodec *codec);
03472
03479 const AVClass *avcodec_get_class(void);
03480
03487 const AVClass *avcodec_get_frame_class(void);
03488
03495 const AVClass *avcodec_get_subtitle_rect_class(void);
03496
03508 int avcodec_copy_context(AVCodecContext *dest, const AVCodecContext *src);
03509
03517 AVFrame *avcodec_alloc_frame(void);
03518
03524 void avcodec_get_frame_defaults(AVFrame *frame);
03525
03536 void avcodec_free_frame(AVFrame **frame);
03537
03538 #if FF_API_AVCODEC_OPEN
03539
03568 attribute_deprecated
03569 int avcodec_open(AVCodecContext *avctx, AVCodec *codec);
03570 #endif
03571
03608 int avcodec_open2(AVCodecContext *avctx, const AVCodec *codec, AVDictionary **options);
03609
03619 int avcodec_close(AVCodecContext *avctx);
03620
03626 void avsubtitle_free(AVSubtitle *sub);
03627
03640 void av_destruct_packet(AVPacket *pkt);
03641
03650 void av_init_packet(AVPacket *pkt);
03651
03660 int av_new_packet(AVPacket *pkt, int size);
03661
03668 void av_shrink_packet(AVPacket *pkt, int size);
03669
03676 int av_grow_packet(AVPacket *pkt, int grow_by);
03677
03682 int av_dup_packet(AVPacket *pkt);
03683
03689 int av_copy_packet(AVPacket *dst, AVPacket *src);
03690
03696 void av_free_packet(AVPacket *pkt);
03697
03706 uint8_t* av_packet_new_side_data(AVPacket *pkt, enum AVPacketSideDataType type,
03707 int size);
03708
03717 int av_packet_shrink_side_data(AVPacket *pkt, enum AVPacketSideDataType type,
03718 int size);
03719
03728 uint8_t* av_packet_get_side_data(AVPacket *pkt, enum AVPacketSideDataType type,
03729 int *size);
03730
03731 int av_packet_merge_side_data(AVPacket *pkt);
03732
03733 int av_packet_split_side_data(AVPacket *pkt);
03734
03735
03751 AVCodec *avcodec_find_decoder(enum AVCodecID id);
03752
03759 AVCodec *avcodec_find_decoder_by_name(const char *name);
03760
03761 int avcodec_default_get_buffer(AVCodecContext *s, AVFrame *pic);
03762 void avcodec_default_release_buffer(AVCodecContext *s, AVFrame *pic);
03763 int avcodec_default_reget_buffer(AVCodecContext *s, AVFrame *pic);
03764
03772 unsigned avcodec_get_edge_width(void);
03773
03783 void avcodec_align_dimensions(AVCodecContext *s, int *width, int *height);
03784
03794 void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height,
03795 int linesize_align[AV_NUM_DATA_POINTERS]);
03796
03797 #if FF_API_OLD_DECODE_AUDIO
03798
03852 attribute_deprecated int avcodec_decode_audio3(AVCodecContext *avctx, int16_t *samples,
03853 int *frame_size_ptr,
03854 AVPacket *avpkt);
03855 #endif
03856
03890 int avcodec_decode_audio4(AVCodecContext *avctx, AVFrame *frame,
03891 int *got_frame_ptr, const AVPacket *avpkt);
03892
03934 int avcodec_decode_video2(AVCodecContext *avctx, AVFrame *picture,
03935 int *got_picture_ptr,
03936 const AVPacket *avpkt);
03937
03954 int avcodec_decode_subtitle2(AVCodecContext *avctx, AVSubtitle *sub,
03955 int *got_sub_ptr,
03956 AVPacket *avpkt);
03957
03963 typedef struct AVCodecParserContext {
03964 void *priv_data;
03965 struct AVCodecParser *parser;
03966 int64_t frame_offset;
03967 int64_t cur_offset;
03968
03969 int64_t next_frame_offset;
03970
03971 int pict_type;
03981 int repeat_pict;
03982 int64_t pts;
03983 int64_t dts;
03984
03985
03986 int64_t last_pts;
03987 int64_t last_dts;
03988 int fetch_timestamp;
03989
03990 #define AV_PARSER_PTS_NB 4
03991 int cur_frame_start_index;
03992 int64_t cur_frame_offset[AV_PARSER_PTS_NB];
03993 int64_t cur_frame_pts[AV_PARSER_PTS_NB];
03994 int64_t cur_frame_dts[AV_PARSER_PTS_NB];
03995
03996 int flags;
03997 #define PARSER_FLAG_COMPLETE_FRAMES 0x0001
03998 #define PARSER_FLAG_ONCE 0x0002
04000 #define PARSER_FLAG_FETCHED_OFFSET 0x0004
04001 #define PARSER_FLAG_USE_CODEC_TS 0x1000
04002
04003 int64_t offset;
04004 int64_t cur_frame_end[AV_PARSER_PTS_NB];
04005
04012 int key_frame;
04013
04031 int64_t convergence_duration;
04032
04033
04043 int dts_sync_point;
04044
04058 int dts_ref_dts_delta;
04059
04072 int pts_dts_delta;
04073
04079 int64_t cur_frame_pos[AV_PARSER_PTS_NB];
04080
04084 int64_t pos;
04085
04089 int64_t last_pos;
04090
04096 int duration;
04097 } AVCodecParserContext;
04098
04099 typedef struct AVCodecParser {
04100 int codec_ids[5];
04101 int priv_data_size;
04102 int (*parser_init)(AVCodecParserContext *s);
04103 int (*parser_parse)(AVCodecParserContext *s,
04104 AVCodecContext *avctx,
04105 const uint8_t **poutbuf, int *poutbuf_size,
04106 const uint8_t *buf, int buf_size);
04107 void (*parser_close)(AVCodecParserContext *s);
04108 int (*split)(AVCodecContext *avctx, const uint8_t *buf, int buf_size);
04109 struct AVCodecParser *next;
04110 } AVCodecParser;
04111
04112 AVCodecParser *av_parser_next(AVCodecParser *c);
04113
04114 void av_register_codec_parser(AVCodecParser *parser);
04115 AVCodecParserContext *av_parser_init(int codec_id);
04116
04145 int av_parser_parse2(AVCodecParserContext *s,
04146 AVCodecContext *avctx,
04147 uint8_t **poutbuf, int *poutbuf_size,
04148 const uint8_t *buf, int buf_size,
04149 int64_t pts, int64_t dts,
04150 int64_t pos);
04151
04152 int av_parser_change(AVCodecParserContext *s,
04153 AVCodecContext *avctx,
04154 uint8_t **poutbuf, int *poutbuf_size,
04155 const uint8_t *buf, int buf_size, int keyframe);
04156 void av_parser_close(AVCodecParserContext *s);
04157
04174 AVCodec *avcodec_find_encoder(enum AVCodecID id);
04175
04182 AVCodec *avcodec_find_encoder_by_name(const char *name);
04183
04184 #if FF_API_OLD_ENCODE_AUDIO
04185
04209 int attribute_deprecated avcodec_encode_audio(AVCodecContext *avctx,
04210 uint8_t *buf, int buf_size,
04211 const short *samples);
04212 #endif
04213
04253 int avcodec_encode_audio2(AVCodecContext *avctx, AVPacket *avpkt,
04254 const AVFrame *frame, int *got_packet_ptr);
04255
04256 #if FF_API_OLD_ENCODE_VIDEO
04257
04271 attribute_deprecated
04272 int avcodec_encode_video(AVCodecContext *avctx, uint8_t *buf, int buf_size,
04273 const AVFrame *pict);
04274 #endif
04275
04310 int avcodec_encode_video2(AVCodecContext *avctx, AVPacket *avpkt,
04311 const AVFrame *frame, int *got_packet_ptr);
04312
04313 int avcodec_encode_subtitle(AVCodecContext *avctx, uint8_t *buf, int buf_size,
04314 const AVSubtitle *sub);
04315
04316
04327 struct ReSampleContext;
04328 struct AVResampleContext;
04329
04330 typedef struct ReSampleContext ReSampleContext;
04331
04348 ReSampleContext *av_audio_resample_init(int output_channels, int input_channels,
04349 int output_rate, int input_rate,
04350 enum AVSampleFormat sample_fmt_out,
04351 enum AVSampleFormat sample_fmt_in,
04352 int filter_length, int log2_phase_count,
04353 int linear, double cutoff);
04354
04355 int audio_resample(ReSampleContext *s, short *output, short *input, int nb_samples);
04356
04363 void audio_resample_close(ReSampleContext *s);
04364
04365
04375 struct AVResampleContext *av_resample_init(int out_rate, int in_rate, int filter_length, int log2_phase_count, int linear, double cutoff);
04376
04386 int av_resample(struct AVResampleContext *c, short *dst, short *src, int *consumed, int src_size, int dst_size, int update_ctx);
04387
04388
04401 void av_resample_compensate(struct AVResampleContext *c, int sample_delta, int compensation_distance);
04402 void av_resample_close(struct AVResampleContext *c);
04403
04424 int avpicture_alloc(AVPicture *picture, enum PixelFormat pix_fmt, int width, int height);
04425
04433 void avpicture_free(AVPicture *picture);
04434
04441 int avpicture_fill(AVPicture *picture, uint8_t *ptr,
04442 enum PixelFormat pix_fmt, int width, int height);
04443
04450 int avpicture_layout(const AVPicture* src, enum PixelFormat pix_fmt, int width, int height,
04451 unsigned char *dest, int dest_size);
04452
04460 int avpicture_get_size(enum PixelFormat pix_fmt, int width, int height);
04461
04465 int avpicture_deinterlace(AVPicture *dst, const AVPicture *src,
04466 enum PixelFormat pix_fmt, int width, int height);
04470 void av_picture_copy(AVPicture *dst, const AVPicture *src,
04471 enum PixelFormat pix_fmt, int width, int height);
04472
04476 int av_picture_crop(AVPicture *dst, const AVPicture *src,
04477 enum PixelFormat pix_fmt, int top_band, int left_band);
04478
04482 int av_picture_pad(AVPicture *dst, const AVPicture *src, int height, int width, enum PixelFormat pix_fmt,
04483 int padtop, int padbottom, int padleft, int padright, int *color);
04484
04505 void avcodec_get_chroma_sub_sample(enum PixelFormat pix_fmt, int *h_shift, int *v_shift);
04506
04512 unsigned int avcodec_pix_fmt_to_codec_tag(enum PixelFormat pix_fmt);
04513
04514 #define FF_LOSS_RESOLUTION 0x0001
04515 #define FF_LOSS_DEPTH 0x0002
04516 #define FF_LOSS_COLORSPACE 0x0004
04517 #define FF_LOSS_ALPHA 0x0008
04518 #define FF_LOSS_COLORQUANT 0x0010
04519 #define FF_LOSS_CHROMA 0x0020
04539 int avcodec_get_pix_fmt_loss(enum PixelFormat dst_pix_fmt, enum PixelFormat src_pix_fmt,
04540 int has_alpha);
04541
04542 #if FF_API_FIND_BEST_PIX_FMT
04543
04569 attribute_deprecated
04570 enum PixelFormat avcodec_find_best_pix_fmt(int64_t pix_fmt_mask, enum PixelFormat src_pix_fmt,
04571 int has_alpha, int *loss_ptr);
04572 #endif
04573
04591 enum PixelFormat avcodec_find_best_pix_fmt_of_list(enum PixelFormat *pix_fmt_list,
04592 enum PixelFormat src_pix_fmt,
04593 int has_alpha, int *loss_ptr);
04594
04625 enum PixelFormat avcodec_find_best_pix_fmt_of_2(enum PixelFormat dst_pix_fmt1, enum PixelFormat dst_pix_fmt2,
04626 enum PixelFormat src_pix_fmt, int has_alpha, int *loss_ptr);
04627
04628 attribute_deprecated
04629 #if AV_HAVE_INCOMPATIBLE_FORK_ABI
04630 enum PixelFormat avcodec_find_best_pix_fmt2(enum PixelFormat *pix_fmt_list,
04631 enum PixelFormat src_pix_fmt,
04632 int has_alpha, int *loss_ptr);
04633 #else
04634 enum PixelFormat avcodec_find_best_pix_fmt2(enum PixelFormat dst_pix_fmt1, enum PixelFormat dst_pix_fmt2,
04635 enum PixelFormat src_pix_fmt, int has_alpha, int *loss_ptr);
04636 #endif
04637
04638
04639 enum PixelFormat avcodec_default_get_format(struct AVCodecContext *s, const enum PixelFormat * fmt);
04640
04645 void avcodec_set_dimensions(AVCodecContext *s, int width, int height);
04646
04654 size_t av_get_codec_tag_string(char *buf, size_t buf_size, unsigned int codec_tag);
04655
04656 void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode);
04657
04665 const char *av_get_profile_name(const AVCodec *codec, int profile);
04666
04667 int avcodec_default_execute(AVCodecContext *c, int (*func)(AVCodecContext *c2, void *arg2),void *arg, int *ret, int count, int size);
04668 int avcodec_default_execute2(AVCodecContext *c, int (*func)(AVCodecContext *c2, void *arg2, int, int),void *arg, int *ret, int count);
04669
04670
04687 int avcodec_fill_audio_frame(AVFrame *frame, int nb_channels,
04688 enum AVSampleFormat sample_fmt, const uint8_t *buf,
04689 int buf_size, int align);
04690
04694 void avcodec_flush_buffers(AVCodecContext *avctx);
04695
04696 void avcodec_default_free_buffers(AVCodecContext *s);
04697
04704 int av_get_bits_per_sample(enum AVCodecID codec_id);
04705
04712 enum AVCodecID av_get_pcm_codec(enum AVSampleFormat fmt, int be);
04713
04722 int av_get_exact_bits_per_sample(enum AVCodecID codec_id);
04723
04732 int av_get_audio_frame_duration(AVCodecContext *avctx, int frame_bytes);
04733
04734
04735 typedef struct AVBitStreamFilterContext {
04736 void *priv_data;
04737 struct AVBitStreamFilter *filter;
04738 AVCodecParserContext *parser;
04739 struct AVBitStreamFilterContext *next;
04740 } AVBitStreamFilterContext;
04741
04742
04743 typedef struct AVBitStreamFilter {
04744 const char *name;
04745 int priv_data_size;
04746 int (*filter)(AVBitStreamFilterContext *bsfc,
04747 AVCodecContext *avctx, const char *args,
04748 uint8_t **poutbuf, int *poutbuf_size,
04749 const uint8_t *buf, int buf_size, int keyframe);
04750 void (*close)(AVBitStreamFilterContext *bsfc);
04751 struct AVBitStreamFilter *next;
04752 } AVBitStreamFilter;
04753
04754 void av_register_bitstream_filter(AVBitStreamFilter *bsf);
04755 AVBitStreamFilterContext *av_bitstream_filter_init(const char *name);
04756 int av_bitstream_filter_filter(AVBitStreamFilterContext *bsfc,
04757 AVCodecContext *avctx, const char *args,
04758 uint8_t **poutbuf, int *poutbuf_size,
04759 const uint8_t *buf, int buf_size, int keyframe);
04760 void av_bitstream_filter_close(AVBitStreamFilterContext *bsf);
04761
04762 AVBitStreamFilter *av_bitstream_filter_next(AVBitStreamFilter *f);
04763
04764
04765
04771 void *av_fast_realloc(void *ptr, unsigned int *size, size_t min_size);
04772
04785 void av_fast_malloc(void *ptr, unsigned int *size, size_t min_size);
04786
04794 void av_fast_padded_malloc(void *ptr, unsigned int *size, size_t min_size);
04795
04800 void av_fast_padded_mallocz(void *ptr, unsigned int *size, size_t min_size);
04801
04809 unsigned int av_xiphlacing(unsigned char *s, unsigned int v);
04810
04823 void av_log_missing_feature(void *avc, const char *feature, int want_sample);
04824
04833 void av_log_ask_for_sample(void *avc, const char *msg, ...) av_printf_format(2, 3);
04834
04838 void av_register_hwaccel(AVHWAccel *hwaccel);
04839
04845 AVHWAccel *av_hwaccel_next(AVHWAccel *hwaccel);
04846
04847
04851 enum AVLockOp {
04852 AV_LOCK_CREATE,
04853 AV_LOCK_OBTAIN,
04854 AV_LOCK_RELEASE,
04855 AV_LOCK_DESTROY,
04856 };
04857
04871 int av_lockmgr_register(int (*cb)(void **mutex, enum AVLockOp op));
04872
04876 enum AVMediaType avcodec_get_type(enum AVCodecID codec_id);
04877
04882 const char *avcodec_get_name(enum AVCodecID id);
04883
04888 int avcodec_is_open(AVCodecContext *s);
04889
04893 int av_codec_is_encoder(const AVCodec *codec);
04894
04898 int av_codec_is_decoder(const AVCodec *codec);
04899
04903 const AVCodecDescriptor *avcodec_descriptor_get(enum AVCodecID id);
04904
04912 const AVCodecDescriptor *avcodec_descriptor_next(const AVCodecDescriptor *prev);
04913
04918 const AVCodecDescriptor *avcodec_descriptor_get_by_name(const char *name);
04919
04924 #endif