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/channel_layout.h"
00034 #include "libavutil/dict.h"
00035 #include "libavutil/log.h"
00036 #include "libavutil/pixfmt.h"
00037 #include "libavutil/rational.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_BRENDER_PIX= MKBETAG('B','P','I','X'),
00271 AV_CODEC_ID_Y41P = MKBETAG('Y','4','1','P'),
00272 AV_CODEC_ID_ESCAPE130 = MKBETAG('E','1','3','0'),
00273 AV_CODEC_ID_EXR = MKBETAG('0','E','X','R'),
00274 AV_CODEC_ID_AVRP = MKBETAG('A','V','R','P'),
00275
00276 AV_CODEC_ID_G2M = MKBETAG( 0 ,'G','2','M'),
00277 AV_CODEC_ID_AVUI = MKBETAG('A','V','U','I'),
00278 AV_CODEC_ID_AYUV = MKBETAG('A','Y','U','V'),
00279 AV_CODEC_ID_TARGA_Y216 = MKBETAG('T','2','1','6'),
00280 AV_CODEC_ID_V308 = MKBETAG('V','3','0','8'),
00281 AV_CODEC_ID_V408 = MKBETAG('V','4','0','8'),
00282 AV_CODEC_ID_YUV4 = MKBETAG('Y','U','V','4'),
00283 AV_CODEC_ID_SANM = MKBETAG('S','A','N','M'),
00284 AV_CODEC_ID_PAF_VIDEO = MKBETAG('P','A','F','V'),
00285 AV_CODEC_ID_AVRN = MKBETAG('A','V','R','n'),
00286 AV_CODEC_ID_CPIA = MKBETAG('C','P','I','A'),
00287 AV_CODEC_ID_XFACE = MKBETAG('X','F','A','C'),
00288
00289
00290 AV_CODEC_ID_FIRST_AUDIO = 0x10000,
00291 AV_CODEC_ID_PCM_S16LE = 0x10000,
00292 AV_CODEC_ID_PCM_S16BE,
00293 AV_CODEC_ID_PCM_U16LE,
00294 AV_CODEC_ID_PCM_U16BE,
00295 AV_CODEC_ID_PCM_S8,
00296 AV_CODEC_ID_PCM_U8,
00297 AV_CODEC_ID_PCM_MULAW,
00298 AV_CODEC_ID_PCM_ALAW,
00299 AV_CODEC_ID_PCM_S32LE,
00300 AV_CODEC_ID_PCM_S32BE,
00301 AV_CODEC_ID_PCM_U32LE,
00302 AV_CODEC_ID_PCM_U32BE,
00303 AV_CODEC_ID_PCM_S24LE,
00304 AV_CODEC_ID_PCM_S24BE,
00305 AV_CODEC_ID_PCM_U24LE,
00306 AV_CODEC_ID_PCM_U24BE,
00307 AV_CODEC_ID_PCM_S24DAUD,
00308 AV_CODEC_ID_PCM_ZORK,
00309 AV_CODEC_ID_PCM_S16LE_PLANAR,
00310 AV_CODEC_ID_PCM_DVD,
00311 AV_CODEC_ID_PCM_F32BE,
00312 AV_CODEC_ID_PCM_F32LE,
00313 AV_CODEC_ID_PCM_F64BE,
00314 AV_CODEC_ID_PCM_F64LE,
00315 AV_CODEC_ID_PCM_BLURAY,
00316 AV_CODEC_ID_PCM_LXF,
00317 AV_CODEC_ID_S302M,
00318 AV_CODEC_ID_PCM_S8_PLANAR,
00319 AV_CODEC_ID_PCM_S24LE_PLANAR = MKBETAG(24,'P','S','P'),
00320 AV_CODEC_ID_PCM_S32LE_PLANAR = MKBETAG(32,'P','S','P'),
00321 AV_CODEC_ID_PCM_S16BE_PLANAR = MKBETAG('P','S','P',16),
00322
00323
00324 AV_CODEC_ID_ADPCM_IMA_QT = 0x11000,
00325 AV_CODEC_ID_ADPCM_IMA_WAV,
00326 AV_CODEC_ID_ADPCM_IMA_DK3,
00327 AV_CODEC_ID_ADPCM_IMA_DK4,
00328 AV_CODEC_ID_ADPCM_IMA_WS,
00329 AV_CODEC_ID_ADPCM_IMA_SMJPEG,
00330 AV_CODEC_ID_ADPCM_MS,
00331 AV_CODEC_ID_ADPCM_4XM,
00332 AV_CODEC_ID_ADPCM_XA,
00333 AV_CODEC_ID_ADPCM_ADX,
00334 AV_CODEC_ID_ADPCM_EA,
00335 AV_CODEC_ID_ADPCM_G726,
00336 AV_CODEC_ID_ADPCM_CT,
00337 AV_CODEC_ID_ADPCM_SWF,
00338 AV_CODEC_ID_ADPCM_YAMAHA,
00339 AV_CODEC_ID_ADPCM_SBPRO_4,
00340 AV_CODEC_ID_ADPCM_SBPRO_3,
00341 AV_CODEC_ID_ADPCM_SBPRO_2,
00342 AV_CODEC_ID_ADPCM_THP,
00343 AV_CODEC_ID_ADPCM_IMA_AMV,
00344 AV_CODEC_ID_ADPCM_EA_R1,
00345 AV_CODEC_ID_ADPCM_EA_R3,
00346 AV_CODEC_ID_ADPCM_EA_R2,
00347 AV_CODEC_ID_ADPCM_IMA_EA_SEAD,
00348 AV_CODEC_ID_ADPCM_IMA_EA_EACS,
00349 AV_CODEC_ID_ADPCM_EA_XAS,
00350 AV_CODEC_ID_ADPCM_EA_MAXIS_XA,
00351 AV_CODEC_ID_ADPCM_IMA_ISS,
00352 AV_CODEC_ID_ADPCM_G722,
00353 AV_CODEC_ID_ADPCM_IMA_APC,
00354 AV_CODEC_ID_VIMA = MKBETAG('V','I','M','A'),
00355 AV_CODEC_ID_ADPCM_AFC = MKBETAG('A','F','C',' '),
00356 AV_CODEC_ID_ADPCM_IMA_OKI = MKBETAG('O','K','I',' '),
00357
00358
00359 AV_CODEC_ID_AMR_NB = 0x12000,
00360 AV_CODEC_ID_AMR_WB,
00361
00362
00363 AV_CODEC_ID_RA_144 = 0x13000,
00364 AV_CODEC_ID_RA_288,
00365
00366
00367 AV_CODEC_ID_ROQ_DPCM = 0x14000,
00368 AV_CODEC_ID_INTERPLAY_DPCM,
00369 AV_CODEC_ID_XAN_DPCM,
00370 AV_CODEC_ID_SOL_DPCM,
00371
00372
00373 AV_CODEC_ID_MP2 = 0x15000,
00374 AV_CODEC_ID_MP3,
00375 AV_CODEC_ID_AAC,
00376 AV_CODEC_ID_AC3,
00377 AV_CODEC_ID_DTS,
00378 AV_CODEC_ID_VORBIS,
00379 AV_CODEC_ID_DVAUDIO,
00380 AV_CODEC_ID_WMAV1,
00381 AV_CODEC_ID_WMAV2,
00382 AV_CODEC_ID_MACE3,
00383 AV_CODEC_ID_MACE6,
00384 AV_CODEC_ID_VMDAUDIO,
00385 AV_CODEC_ID_FLAC,
00386 AV_CODEC_ID_MP3ADU,
00387 AV_CODEC_ID_MP3ON4,
00388 AV_CODEC_ID_SHORTEN,
00389 AV_CODEC_ID_ALAC,
00390 AV_CODEC_ID_WESTWOOD_SND1,
00391 AV_CODEC_ID_GSM,
00392 AV_CODEC_ID_QDM2,
00393 AV_CODEC_ID_COOK,
00394 AV_CODEC_ID_TRUESPEECH,
00395 AV_CODEC_ID_TTA,
00396 AV_CODEC_ID_SMACKAUDIO,
00397 AV_CODEC_ID_QCELP,
00398 AV_CODEC_ID_WAVPACK,
00399 AV_CODEC_ID_DSICINAUDIO,
00400 AV_CODEC_ID_IMC,
00401 AV_CODEC_ID_MUSEPACK7,
00402 AV_CODEC_ID_MLP,
00403 AV_CODEC_ID_GSM_MS,
00404 AV_CODEC_ID_ATRAC3,
00405 AV_CODEC_ID_VOXWARE,
00406 AV_CODEC_ID_APE,
00407 AV_CODEC_ID_NELLYMOSER,
00408 AV_CODEC_ID_MUSEPACK8,
00409 AV_CODEC_ID_SPEEX,
00410 AV_CODEC_ID_WMAVOICE,
00411 AV_CODEC_ID_WMAPRO,
00412 AV_CODEC_ID_WMALOSSLESS,
00413 AV_CODEC_ID_ATRAC3P,
00414 AV_CODEC_ID_EAC3,
00415 AV_CODEC_ID_SIPR,
00416 AV_CODEC_ID_MP1,
00417 AV_CODEC_ID_TWINVQ,
00418 AV_CODEC_ID_TRUEHD,
00419 AV_CODEC_ID_MP4ALS,
00420 AV_CODEC_ID_ATRAC1,
00421 AV_CODEC_ID_BINKAUDIO_RDFT,
00422 AV_CODEC_ID_BINKAUDIO_DCT,
00423 AV_CODEC_ID_AAC_LATM,
00424 AV_CODEC_ID_QDMC,
00425 AV_CODEC_ID_CELT,
00426 AV_CODEC_ID_G723_1,
00427 AV_CODEC_ID_G729,
00428 AV_CODEC_ID_8SVX_EXP,
00429 AV_CODEC_ID_8SVX_FIB,
00430 AV_CODEC_ID_BMV_AUDIO,
00431 AV_CODEC_ID_RALF,
00432 AV_CODEC_ID_IAC,
00433 AV_CODEC_ID_ILBC,
00434 AV_CODEC_ID_OPUS_DEPRECATED,
00435 AV_CODEC_ID_COMFORT_NOISE,
00436 AV_CODEC_ID_TAK_DEPRECATED,
00437 AV_CODEC_ID_FFWAVESYNTH = MKBETAG('F','F','W','S'),
00438 #if LIBAVCODEC_VERSION_MAJOR <= 54
00439 AV_CODEC_ID_8SVX_RAW = MKBETAG('8','S','V','X'),
00440 #endif
00441 AV_CODEC_ID_SONIC = MKBETAG('S','O','N','C'),
00442 AV_CODEC_ID_SONIC_LS = MKBETAG('S','O','N','L'),
00443 AV_CODEC_ID_PAF_AUDIO = MKBETAG('P','A','F','A'),
00444 AV_CODEC_ID_OPUS = MKBETAG('O','P','U','S'),
00445 AV_CODEC_ID_TAK = MKBETAG('t','B','a','K'),
00446
00447
00448 AV_CODEC_ID_FIRST_SUBTITLE = 0x17000,
00449 AV_CODEC_ID_DVD_SUBTITLE = 0x17000,
00450 AV_CODEC_ID_DVB_SUBTITLE,
00451 AV_CODEC_ID_TEXT,
00452 AV_CODEC_ID_XSUB,
00453 AV_CODEC_ID_SSA,
00454 AV_CODEC_ID_MOV_TEXT,
00455 AV_CODEC_ID_HDMV_PGS_SUBTITLE,
00456 AV_CODEC_ID_DVB_TELETEXT,
00457 AV_CODEC_ID_SRT,
00458 AV_CODEC_ID_MICRODVD = MKBETAG('m','D','V','D'),
00459 AV_CODEC_ID_EIA_608 = MKBETAG('c','6','0','8'),
00460 AV_CODEC_ID_JACOSUB = MKBETAG('J','S','U','B'),
00461 AV_CODEC_ID_SAMI = MKBETAG('S','A','M','I'),
00462 AV_CODEC_ID_REALTEXT = MKBETAG('R','T','X','T'),
00463 AV_CODEC_ID_SUBVIEWER = MKBETAG('S','u','b','V'),
00464 AV_CODEC_ID_SUBRIP = MKBETAG('S','R','i','p'),
00465 AV_CODEC_ID_WEBVTT = MKBETAG('W','V','T','T'),
00466
00467
00468 AV_CODEC_ID_FIRST_UNKNOWN = 0x18000,
00469 AV_CODEC_ID_TTF = 0x18000,
00470 AV_CODEC_ID_BINTEXT = MKBETAG('B','T','X','T'),
00471 AV_CODEC_ID_XBIN = MKBETAG('X','B','I','N'),
00472 AV_CODEC_ID_IDF = MKBETAG( 0 ,'I','D','F'),
00473 AV_CODEC_ID_OTF = MKBETAG( 0 ,'O','T','F'),
00474 AV_CODEC_ID_SMPTE_KLV = MKBETAG('K','L','V','A'),
00475
00476 AV_CODEC_ID_PROBE = 0x19000,
00477
00478 AV_CODEC_ID_MPEG2TS = 0x20000,
00480 AV_CODEC_ID_MPEG4SYSTEMS = 0x20001,
00482 AV_CODEC_ID_FFMETADATA = 0x21000,
00483
00484 #if FF_API_CODEC_ID
00485 #include "old_codec_ids.h"
00486 #endif
00487 };
00488
00489 #if FF_API_CODEC_ID
00490 #define CodecID AVCodecID
00491 #endif
00492
00498 typedef struct AVCodecDescriptor {
00499 enum AVCodecID id;
00500 enum AVMediaType type;
00506 const char *name;
00510 const char *long_name;
00514 int props;
00515 } AVCodecDescriptor;
00516
00521 #define AV_CODEC_PROP_INTRA_ONLY (1 << 0)
00522
00527 #define AV_CODEC_PROP_LOSSY (1 << 1)
00528
00531 #define AV_CODEC_PROP_LOSSLESS (1 << 2)
00532
00533 #if FF_API_OLD_DECODE_AUDIO
00534
00535 #define AVCODEC_MAX_AUDIO_FRAME_SIZE 192000 // 1 second of 48khz 32bit audio
00536 #endif
00537
00546 #define FF_INPUT_BUFFER_PADDING_SIZE 16
00547
00553 #define FF_MIN_BUFFER_SIZE 16384
00554
00555
00560 enum Motion_Est_ID {
00561 ME_ZERO = 1,
00562 ME_FULL,
00563 ME_LOG,
00564 ME_PHODS,
00565 ME_EPZS,
00566 ME_X1,
00567 ME_HEX,
00568 ME_UMH,
00569 ME_ITER,
00570 ME_TESA,
00571 };
00572
00576 enum AVDiscard{
00577
00578
00579 AVDISCARD_NONE =-16,
00580 AVDISCARD_DEFAULT = 0,
00581 AVDISCARD_NONREF = 8,
00582 AVDISCARD_BIDIR = 16,
00583 AVDISCARD_NONKEY = 32,
00584 AVDISCARD_ALL = 48,
00585 };
00586
00587 enum AVColorPrimaries{
00588 AVCOL_PRI_BT709 = 1,
00589 AVCOL_PRI_UNSPECIFIED = 2,
00590 AVCOL_PRI_BT470M = 4,
00591 AVCOL_PRI_BT470BG = 5,
00592 AVCOL_PRI_SMPTE170M = 6,
00593 AVCOL_PRI_SMPTE240M = 7,
00594 AVCOL_PRI_FILM = 8,
00595 AVCOL_PRI_NB ,
00596 };
00597
00598 enum AVColorTransferCharacteristic{
00599 AVCOL_TRC_BT709 = 1,
00600 AVCOL_TRC_UNSPECIFIED = 2,
00601 AVCOL_TRC_GAMMA22 = 4,
00602 AVCOL_TRC_GAMMA28 = 5,
00603 AVCOL_TRC_SMPTE240M = 7,
00604 AVCOL_TRC_NB ,
00605 };
00606
00607 enum AVColorSpace{
00608 AVCOL_SPC_RGB = 0,
00609 AVCOL_SPC_BT709 = 1,
00610 AVCOL_SPC_UNSPECIFIED = 2,
00611 AVCOL_SPC_FCC = 4,
00612 AVCOL_SPC_BT470BG = 5,
00613 AVCOL_SPC_SMPTE170M = 6,
00614 AVCOL_SPC_SMPTE240M = 7,
00615 AVCOL_SPC_YCOCG = 8,
00616 AVCOL_SPC_NB ,
00617 };
00618 #define AVCOL_SPC_YCGCO AVCOL_SPC_YCOCG
00619
00620 enum AVColorRange{
00621 AVCOL_RANGE_UNSPECIFIED = 0,
00622 AVCOL_RANGE_MPEG = 1,
00623 AVCOL_RANGE_JPEG = 2,
00624 AVCOL_RANGE_NB ,
00625 };
00626
00632 enum AVChromaLocation{
00633 AVCHROMA_LOC_UNSPECIFIED = 0,
00634 AVCHROMA_LOC_LEFT = 1,
00635 AVCHROMA_LOC_CENTER = 2,
00636 AVCHROMA_LOC_TOPLEFT = 3,
00637 AVCHROMA_LOC_TOP = 4,
00638 AVCHROMA_LOC_BOTTOMLEFT = 5,
00639 AVCHROMA_LOC_BOTTOM = 6,
00640 AVCHROMA_LOC_NB ,
00641 };
00642
00643 enum AVAudioServiceType {
00644 AV_AUDIO_SERVICE_TYPE_MAIN = 0,
00645 AV_AUDIO_SERVICE_TYPE_EFFECTS = 1,
00646 AV_AUDIO_SERVICE_TYPE_VISUALLY_IMPAIRED = 2,
00647 AV_AUDIO_SERVICE_TYPE_HEARING_IMPAIRED = 3,
00648 AV_AUDIO_SERVICE_TYPE_DIALOGUE = 4,
00649 AV_AUDIO_SERVICE_TYPE_COMMENTARY = 5,
00650 AV_AUDIO_SERVICE_TYPE_EMERGENCY = 6,
00651 AV_AUDIO_SERVICE_TYPE_VOICE_OVER = 7,
00652 AV_AUDIO_SERVICE_TYPE_KARAOKE = 8,
00653 AV_AUDIO_SERVICE_TYPE_NB ,
00654 };
00655
00659 typedef struct RcOverride{
00660 int start_frame;
00661 int end_frame;
00662 int qscale;
00663 float quality_factor;
00664 } RcOverride;
00665
00666 #define FF_MAX_B_FRAMES 16
00667
00668
00669
00670
00671
00672
00673 #define CODEC_FLAG_QSCALE 0x0002
00674 #define CODEC_FLAG_4MV 0x0004
00675 #define CODEC_FLAG_QPEL 0x0010
00676 #define CODEC_FLAG_GMC 0x0020
00677 #define CODEC_FLAG_MV0 0x0040
00678
00683 #define CODEC_FLAG_INPUT_PRESERVED 0x0100
00684 #define CODEC_FLAG_PASS1 0x0200
00685 #define CODEC_FLAG_PASS2 0x0400
00686 #define CODEC_FLAG_GRAY 0x2000
00687 #define CODEC_FLAG_EMU_EDGE 0x4000
00688 #define CODEC_FLAG_PSNR 0x8000
00689 #define CODEC_FLAG_TRUNCATED 0x00010000
00691 #define CODEC_FLAG_NORMALIZE_AQP 0x00020000
00692 #define CODEC_FLAG_INTERLACED_DCT 0x00040000
00693 #define CODEC_FLAG_LOW_DELAY 0x00080000
00694 #define CODEC_FLAG_GLOBAL_HEADER 0x00400000
00695 #define CODEC_FLAG_BITEXACT 0x00800000
00696
00697 #define CODEC_FLAG_AC_PRED 0x01000000
00698 #define CODEC_FLAG_LOOP_FILTER 0x00000800
00699 #define CODEC_FLAG_INTERLACED_ME 0x20000000
00700 #define CODEC_FLAG_CLOSED_GOP 0x80000000
00701 #define CODEC_FLAG2_FAST 0x00000001
00702 #define CODEC_FLAG2_NO_OUTPUT 0x00000004
00703 #define CODEC_FLAG2_LOCAL_HEADER 0x00000008
00704 #define CODEC_FLAG2_DROP_FRAME_TIMECODE 0x00002000
00705 #if FF_API_MPV_GLOBAL_OPTS
00706 #define CODEC_FLAG_CBP_RD 0x04000000
00707 #define CODEC_FLAG_QP_RD 0x08000000
00708 #define CODEC_FLAG2_STRICT_GOP 0x00000002
00709 #define CODEC_FLAG2_SKIP_RD 0x00004000
00710 #endif
00711 #define CODEC_FLAG2_CHUNKS 0x00008000
00712 #define CODEC_FLAG2_SHOW_ALL 0x00400000
00713
00714
00715
00716
00717
00718
00719
00720
00721 #define CODEC_CAP_DRAW_HORIZ_BAND 0x0001
00722
00727 #define CODEC_CAP_DR1 0x0002
00728 #define CODEC_CAP_TRUNCATED 0x0008
00729
00730 #define CODEC_CAP_HWACCEL 0x0010
00731
00754 #define CODEC_CAP_DELAY 0x0020
00755
00759 #define CODEC_CAP_SMALL_LAST_FRAME 0x0040
00760
00763 #define CODEC_CAP_HWACCEL_VDPAU 0x0080
00764
00775 #define CODEC_CAP_SUBFRAMES 0x0100
00776
00780 #define CODEC_CAP_EXPERIMENTAL 0x0200
00781
00784 #define CODEC_CAP_CHANNEL_CONF 0x0400
00785
00789 #define CODEC_CAP_NEG_LINESIZES 0x0800
00790
00794 #define CODEC_CAP_FRAME_THREADS 0x1000
00795
00798 #define CODEC_CAP_SLICE_THREADS 0x2000
00799
00802 #define CODEC_CAP_PARAM_CHANGE 0x4000
00803
00806 #define CODEC_CAP_AUTO_THREADS 0x8000
00807
00810 #define CODEC_CAP_VARIABLE_FRAME_SIZE 0x10000
00811
00814 #define CODEC_CAP_INTRA_ONLY 0x40000000
00815
00818 #define CODEC_CAP_LOSSLESS 0x80000000
00819
00820
00821 #define MB_TYPE_INTRA4x4 0x0001
00822 #define MB_TYPE_INTRA16x16 0x0002 //FIXME H.264-specific
00823 #define MB_TYPE_INTRA_PCM 0x0004 //FIXME H.264-specific
00824 #define MB_TYPE_16x16 0x0008
00825 #define MB_TYPE_16x8 0x0010
00826 #define MB_TYPE_8x16 0x0020
00827 #define MB_TYPE_8x8 0x0040
00828 #define MB_TYPE_INTERLACED 0x0080
00829 #define MB_TYPE_DIRECT2 0x0100 //FIXME
00830 #define MB_TYPE_ACPRED 0x0200
00831 #define MB_TYPE_GMC 0x0400
00832 #define MB_TYPE_SKIP 0x0800
00833 #define MB_TYPE_P0L0 0x1000
00834 #define MB_TYPE_P1L0 0x2000
00835 #define MB_TYPE_P0L1 0x4000
00836 #define MB_TYPE_P1L1 0x8000
00837 #define MB_TYPE_L0 (MB_TYPE_P0L0 | MB_TYPE_P1L0)
00838 #define MB_TYPE_L1 (MB_TYPE_P0L1 | MB_TYPE_P1L1)
00839 #define MB_TYPE_L0L1 (MB_TYPE_L0 | MB_TYPE_L1)
00840 #define MB_TYPE_QUANT 0x00010000
00841 #define MB_TYPE_CBP 0x00020000
00842
00843
00849 typedef struct AVPanScan{
00855 int id;
00856
00862 int width;
00863 int height;
00864
00870 int16_t position[3][2];
00871 }AVPanScan;
00872
00873 #define FF_QSCALE_TYPE_MPEG1 0
00874 #define FF_QSCALE_TYPE_MPEG2 1
00875 #define FF_QSCALE_TYPE_H264 2
00876 #define FF_QSCALE_TYPE_VP56 3
00877
00878 #define FF_BUFFER_TYPE_INTERNAL 1
00879 #define FF_BUFFER_TYPE_USER 2
00880 #define FF_BUFFER_TYPE_SHARED 4
00881 #define FF_BUFFER_TYPE_COPY 8
00882
00883 #define FF_BUFFER_HINTS_VALID 0x01 // Buffer hints value is meaningful (if 0 ignore).
00884 #define FF_BUFFER_HINTS_READABLE 0x02 // Codec will read from buffer.
00885 #define FF_BUFFER_HINTS_PRESERVE 0x04 // User must not alter buffer content.
00886 #define FF_BUFFER_HINTS_REUSABLE 0x08 // Codec will reuse the buffer (update).
00887
00894 enum AVPacketSideDataType {
00895 AV_PKT_DATA_PALETTE,
00896 AV_PKT_DATA_NEW_EXTRADATA,
00897
00913 AV_PKT_DATA_PARAM_CHANGE,
00914
00934 AV_PKT_DATA_H263_MB_INFO,
00935
00945 AV_PKT_DATA_SKIP_SAMPLES=70,
00946
00955 AV_PKT_DATA_JP_DUALMONO,
00956
00961 AV_PKT_DATA_STRINGS_METADATA,
00962
00972 AV_PKT_DATA_SUBTITLE_POSITION,
00973 };
00974
00997 typedef struct AVPacket {
01007 int64_t pts;
01013 int64_t dts;
01014 uint8_t *data;
01015 int size;
01016 int stream_index;
01020 int flags;
01025 struct {
01026 uint8_t *data;
01027 int size;
01028 enum AVPacketSideDataType type;
01029 } *side_data;
01030 int side_data_elems;
01031
01036 int duration;
01037 void (*destruct)(struct AVPacket *);
01038 void *priv;
01039 int64_t pos;
01040
01058 int64_t convergence_duration;
01059 } AVPacket;
01060 #define AV_PKT_FLAG_KEY 0x0001
01061 #define AV_PKT_FLAG_CORRUPT 0x0002
01062
01063 enum AVSideDataParamChangeFlags {
01064 AV_SIDE_DATA_PARAM_CHANGE_CHANNEL_COUNT = 0x0001,
01065 AV_SIDE_DATA_PARAM_CHANGE_CHANNEL_LAYOUT = 0x0002,
01066 AV_SIDE_DATA_PARAM_CHANGE_SAMPLE_RATE = 0x0004,
01067 AV_SIDE_DATA_PARAM_CHANGE_DIMENSIONS = 0x0008,
01068 };
01083 typedef struct AVFrame {
01084 #define AV_NUM_DATA_POINTERS 8
01085
01091 uint8_t *data[AV_NUM_DATA_POINTERS];
01092
01102 int linesize[AV_NUM_DATA_POINTERS];
01103
01122 uint8_t **extended_data;
01123
01129 int width, height;
01130
01136 int nb_samples;
01137
01145 int format;
01146
01152 int key_frame;
01153
01159 enum AVPictureType pict_type;
01160
01167 uint8_t *base[AV_NUM_DATA_POINTERS];
01168
01174 AVRational sample_aspect_ratio;
01175
01182 int64_t pts;
01183
01189 int64_t pkt_pts;
01190
01196 int64_t pkt_dts;
01197
01203 int coded_picture_number;
01209 int display_picture_number;
01210
01216 int quality;
01217
01226 int reference;
01227
01233 int8_t *qscale_table;
01239 int qstride;
01240
01244 int qscale_type;
01245
01252 uint8_t *mbskip_table;
01253
01266 int16_t (*motion_val[2])[2];
01267
01274 uint32_t *mb_type;
01275
01281 short *dct_coeff;
01282
01289 int8_t *ref_index[2];
01290
01296 void *opaque;
01297
01303 uint64_t error[AV_NUM_DATA_POINTERS];
01304
01311 int type;
01312
01319 int repeat_pict;
01320
01326 int interlaced_frame;
01327
01333 int top_field_first;
01334
01340 int palette_has_changed;
01341
01347 int buffer_hints;
01348
01354 AVPanScan *pan_scan;
01355
01367 int64_t reordered_opaque;
01368
01374 void *hwaccel_picture_private;
01375
01381 struct AVCodecContext *owner;
01382
01388 void *thread_opaque;
01389
01396 uint8_t motion_subsample_log2;
01397
01404 int sample_rate;
01405
01412 uint64_t channel_layout;
01413
01421 int64_t best_effort_timestamp;
01422
01430 int64_t pkt_pos;
01431
01440 int64_t pkt_duration;
01441
01449 AVDictionary *metadata;
01450
01460 int decode_error_flags;
01461 #define FF_DECODE_ERROR_INVALID_BITSTREAM 1
01462 #define FF_DECODE_ERROR_MISSING_REFERENCE 2
01463
01471 int64_t channels;
01472
01481 int pkt_size;
01482 } AVFrame;
01483
01489 int64_t av_frame_get_best_effort_timestamp(const AVFrame *frame);
01490 void av_frame_set_best_effort_timestamp(AVFrame *frame, int64_t val);
01491 int64_t av_frame_get_pkt_duration (const AVFrame *frame);
01492 void av_frame_set_pkt_duration (AVFrame *frame, int64_t val);
01493 int64_t av_frame_get_pkt_pos (const AVFrame *frame);
01494 void av_frame_set_pkt_pos (AVFrame *frame, int64_t val);
01495 int64_t av_frame_get_channel_layout (const AVFrame *frame);
01496 void av_frame_set_channel_layout (AVFrame *frame, int64_t val);
01497 int av_frame_get_channels (const AVFrame *frame);
01498 void av_frame_set_channels (AVFrame *frame, int val);
01499 int av_frame_get_sample_rate (const AVFrame *frame);
01500 void av_frame_set_sample_rate (AVFrame *frame, int val);
01501 AVDictionary *av_frame_get_metadata (const AVFrame *frame);
01502 void av_frame_set_metadata (AVFrame *frame, AVDictionary *val);
01503 int av_frame_get_decode_error_flags (const AVFrame *frame);
01504 void av_frame_set_decode_error_flags (AVFrame *frame, int val);
01505 int av_frame_get_pkt_size(const AVFrame *frame);
01506 void av_frame_set_pkt_size(AVFrame *frame, int val);
01507
01508 struct AVCodecInternal;
01509
01510 enum AVFieldOrder {
01511 AV_FIELD_UNKNOWN,
01512 AV_FIELD_PROGRESSIVE,
01513 AV_FIELD_TT,
01514 AV_FIELD_BB,
01515 AV_FIELD_TB,
01516 AV_FIELD_BT,
01517 };
01518
01528 typedef struct AVCodecContext {
01533 const AVClass *av_class;
01534 int log_level_offset;
01535
01536 enum AVMediaType codec_type;
01537 const struct AVCodec *codec;
01538 char codec_name[32];
01539 enum AVCodecID codec_id;
01540
01554 unsigned int codec_tag;
01555
01562 unsigned int stream_codec_tag;
01563
01564 #if FF_API_SUB_ID
01565
01568 attribute_deprecated int sub_id;
01569 #endif
01570
01571 void *priv_data;
01572
01579 struct AVCodecInternal *internal;
01580
01586 void *opaque;
01587
01593 int bit_rate;
01594
01601 int bit_rate_tolerance;
01602
01609 int global_quality;
01610
01615 int compression_level;
01616 #define FF_COMPRESSION_DEFAULT -1
01617
01623 int flags;
01624
01630 int flags2;
01631
01643 uint8_t *extradata;
01644 int extradata_size;
01645
01654 AVRational time_base;
01655
01663 int ticks_per_frame;
01664
01691 int delay;
01692
01693
01694
01702 int width, height;
01703
01709 int coded_width, coded_height;
01710
01711 #define FF_ASPECT_EXTENDED 15
01712
01718 int gop_size;
01719
01727 enum AVPixelFormat pix_fmt;
01728
01736 int me_method;
01737
01761 void (*draw_horiz_band)(struct AVCodecContext *s,
01762 const AVFrame *src, int offset[AV_NUM_DATA_POINTERS],
01763 int y, int type, int height);
01764
01774 enum AVPixelFormat (*get_format)(struct AVCodecContext *s, const enum AVPixelFormat * fmt);
01775
01782 int max_b_frames;
01783
01791 float b_quant_factor;
01792
01794 int rc_strategy;
01795 #define FF_RC_STRATEGY_XVID 1
01796
01797 int b_frame_strategy;
01798
01799 #if FF_API_MPV_GLOBAL_OPTS
01800
01805 attribute_deprecated int luma_elim_threshold;
01806
01812 attribute_deprecated int chroma_elim_threshold;
01813 #endif
01814
01820 float b_quant_offset;
01821
01828 int has_b_frames;
01829
01835 int mpeg_quant;
01836
01844 float i_quant_factor;
01845
01851 float i_quant_offset;
01852
01858 float lumi_masking;
01859
01865 float temporal_cplx_masking;
01866
01872 float spatial_cplx_masking;
01873
01879 float p_masking;
01880
01886 float dark_masking;
01887
01893 int slice_count;
01899 int prediction_method;
01900 #define FF_PRED_LEFT 0
01901 #define FF_PRED_PLANE 1
01902 #define FF_PRED_MEDIAN 2
01903
01909 int *slice_offset;
01910
01918 AVRational sample_aspect_ratio;
01919
01925 int me_cmp;
01931 int me_sub_cmp;
01937 int mb_cmp;
01943 int ildct_cmp;
01944 #define FF_CMP_SAD 0
01945 #define FF_CMP_SSE 1
01946 #define FF_CMP_SATD 2
01947 #define FF_CMP_DCT 3
01948 #define FF_CMP_PSNR 4
01949 #define FF_CMP_BIT 5
01950 #define FF_CMP_RD 6
01951 #define FF_CMP_ZERO 7
01952 #define FF_CMP_VSAD 8
01953 #define FF_CMP_VSSE 9
01954 #define FF_CMP_NSSE 10
01955 #define FF_CMP_W53 11
01956 #define FF_CMP_W97 12
01957 #define FF_CMP_DCTMAX 13
01958 #define FF_CMP_DCT264 14
01959 #define FF_CMP_CHROMA 256
01960
01966 int dia_size;
01967
01973 int last_predictor_count;
01974
01980 int pre_me;
01981
01987 int me_pre_cmp;
01988
01994 int pre_dia_size;
01995
02001 int me_subpel_quality;
02002
02011 int dtg_active_format;
02012 #define FF_DTG_AFD_SAME 8
02013 #define FF_DTG_AFD_4_3 9
02014 #define FF_DTG_AFD_16_9 10
02015 #define FF_DTG_AFD_14_9 11
02016 #define FF_DTG_AFD_4_3_SP_14_9 13
02017 #define FF_DTG_AFD_16_9_SP_14_9 14
02018 #define FF_DTG_AFD_SP_4_3 15
02019
02027 int me_range;
02028
02034 int intra_quant_bias;
02035 #define FF_DEFAULT_QUANT_BIAS 999999
02036
02042 int inter_quant_bias;
02043
02044 #if FF_API_COLOR_TABLE_ID
02045
02051 attribute_deprecated int color_table_id;
02052 #endif
02053
02059 int slice_flags;
02060 #define SLICE_FLAG_CODED_ORDER 0x0001
02061 #define SLICE_FLAG_ALLOW_FIELD 0x0002
02062 #define SLICE_FLAG_ALLOW_PLANE 0x0004
02063
02064
02069 int xvmc_acceleration;
02070
02076 int mb_decision;
02077 #define FF_MB_DECISION_SIMPLE 0
02078 #define FF_MB_DECISION_BITS 1
02079 #define FF_MB_DECISION_RD 2
02080
02081
02086 uint16_t *intra_matrix;
02087
02093 uint16_t *inter_matrix;
02094
02101 int scenechange_threshold;
02102
02108 int noise_reduction;
02109
02110 #if FF_API_INTER_THRESHOLD
02111
02114 attribute_deprecated int inter_threshold;
02115 #endif
02116
02117 #if FF_API_MPV_GLOBAL_OPTS
02118
02121 attribute_deprecated int quantizer_noise_shaping;
02122 #endif
02123
02131 int me_threshold;
02132
02138 int mb_threshold;
02139
02145 int intra_dc_precision;
02146
02152 int skip_top;
02153
02159 int skip_bottom;
02160
02167 float border_masking;
02168
02174 int mb_lmin;
02175
02181 int mb_lmax;
02182
02188 int me_penalty_compensation;
02189
02195 int bidir_refine;
02196
02202 int brd_scale;
02203
02209 int keyint_min;
02210
02216 int refs;
02217
02223 int chromaoffset;
02224
02230 int scenechange_factor;
02231
02238 int mv0_threshold;
02239
02245 int b_sensitivity;
02246
02252 enum AVColorPrimaries color_primaries;
02253
02259 enum AVColorTransferCharacteristic color_trc;
02260
02266 enum AVColorSpace colorspace;
02267
02273 enum AVColorRange color_range;
02274
02280 enum AVChromaLocation chroma_sample_location;
02281
02289 int slices;
02290
02295 enum AVFieldOrder field_order;
02296
02297
02298 int sample_rate;
02299 int channels;
02300
02306 enum AVSampleFormat sample_fmt;
02307
02308
02318 int frame_size;
02319
02329 int frame_number;
02330
02335 int block_align;
02336
02342 int cutoff;
02343
02344 #if FF_API_REQUEST_CHANNELS
02345
02351 int request_channels;
02352 #endif
02353
02359 uint64_t channel_layout;
02360
02366 uint64_t request_channel_layout;
02367
02373 enum AVAudioServiceType audio_service_type;
02374
02381 enum AVSampleFormat request_sample_fmt;
02382
02443 int (*get_buffer)(struct AVCodecContext *c, AVFrame *pic);
02444
02454 void (*release_buffer)(struct AVCodecContext *c, AVFrame *pic);
02455
02468 int (*reget_buffer)(struct AVCodecContext *c, AVFrame *pic);
02469
02470
02471
02472 float qcompress;
02473 float qblur;
02474
02480 int qmin;
02481
02487 int qmax;
02488
02494 int max_qdiff;
02495
02502 float rc_qsquish;
02503
02504 float rc_qmod_amp;
02505 int rc_qmod_freq;
02506
02512 int rc_buffer_size;
02513
02519 int rc_override_count;
02520 RcOverride *rc_override;
02521
02527 const char *rc_eq;
02528
02534 int rc_max_rate;
02535
02541 int rc_min_rate;
02542
02543 float rc_buffer_aggressivity;
02544
02550 float rc_initial_cplx;
02551
02557 float rc_max_available_vbv_use;
02558
02564 float rc_min_vbv_overflow_use;
02565
02571 int rc_initial_buffer_occupancy;
02572
02573 #define FF_CODER_TYPE_VLC 0
02574 #define FF_CODER_TYPE_AC 1
02575 #define FF_CODER_TYPE_RAW 2
02576 #define FF_CODER_TYPE_RLE 3
02577 #define FF_CODER_TYPE_DEFLATE 4
02578
02583 int coder_type;
02584
02590 int context_model;
02591
02597 int lmin;
02598
02604 int lmax;
02605
02611 int frame_skip_threshold;
02612
02618 int frame_skip_factor;
02619
02625 int frame_skip_exp;
02626
02632 int frame_skip_cmp;
02633
02639 int trellis;
02640
02645 int min_prediction_order;
02646
02651 int max_prediction_order;
02652
02658 int64_t timecode_frame_start;
02659
02660
02661
02662
02663
02664
02665
02666 void (*rtp_callback)(struct AVCodecContext *avctx, void *data, int size, int mb_nb);
02667
02668 int rtp_payload_size;
02669
02670
02671
02672
02673
02674
02675
02676 int mv_bits;
02677 int header_bits;
02678 int i_tex_bits;
02679 int p_tex_bits;
02680 int i_count;
02681 int p_count;
02682 int skip_count;
02683 int misc_bits;
02684
02690 int frame_bits;
02691
02697 char *stats_out;
02698
02705 char *stats_in;
02706
02712 int workaround_bugs;
02713 #define FF_BUG_AUTODETECT 1
02714 #define FF_BUG_OLD_MSMPEG4 2
02715 #define FF_BUG_XVID_ILACE 4
02716 #define FF_BUG_UMP4 8
02717 #define FF_BUG_NO_PADDING 16
02718 #define FF_BUG_AMV 32
02719 #define FF_BUG_AC_VLC 0
02720 #define FF_BUG_QPEL_CHROMA 64
02721 #define FF_BUG_STD_QPEL 128
02722 #define FF_BUG_QPEL_CHROMA2 256
02723 #define FF_BUG_DIRECT_BLOCKSIZE 512
02724 #define FF_BUG_EDGE 1024
02725 #define FF_BUG_HPEL_CHROMA 2048
02726 #define FF_BUG_DC_CLIP 4096
02727 #define FF_BUG_MS 8192
02728 #define FF_BUG_TRUNCATED 16384
02729
02742 int strict_std_compliance;
02743 #define FF_COMPLIANCE_VERY_STRICT 2
02744 #define FF_COMPLIANCE_STRICT 1
02745 #define FF_COMPLIANCE_NORMAL 0
02746 #define FF_COMPLIANCE_UNOFFICIAL -1
02747 #define FF_COMPLIANCE_EXPERIMENTAL -2
02748
02749
02754 int error_concealment;
02755 #define FF_EC_GUESS_MVS 1
02756 #define FF_EC_DEBLOCK 2
02757
02763 int debug;
02764 #define FF_DEBUG_PICT_INFO 1
02765 #define FF_DEBUG_RC 2
02766 #define FF_DEBUG_BITSTREAM 4
02767 #define FF_DEBUG_MB_TYPE 8
02768 #define FF_DEBUG_QP 16
02769 #define FF_DEBUG_MV 32
02770 #define FF_DEBUG_DCT_COEFF 0x00000040
02771 #define FF_DEBUG_SKIP 0x00000080
02772 #define FF_DEBUG_STARTCODE 0x00000100
02773 #define FF_DEBUG_PTS 0x00000200
02774 #define FF_DEBUG_ER 0x00000400
02775 #define FF_DEBUG_MMCO 0x00000800
02776 #define FF_DEBUG_BUGS 0x00001000
02777 #define FF_DEBUG_VIS_QP 0x00002000
02778 #define FF_DEBUG_VIS_MB_TYPE 0x00004000
02779 #define FF_DEBUG_BUFFERS 0x00008000
02780 #define FF_DEBUG_THREADS 0x00010000
02781
02787 int debug_mv;
02788 #define FF_DEBUG_VIS_MV_P_FOR 0x00000001 //visualize forward predicted MVs of P frames
02789 #define FF_DEBUG_VIS_MV_B_FOR 0x00000002 //visualize forward predicted MVs of B frames
02790 #define FF_DEBUG_VIS_MV_B_BACK 0x00000004 //visualize backward predicted MVs of B frames
02791
02797 int err_recognition;
02798 #define AV_EF_CRCCHECK (1<<0)
02799 #define AV_EF_BITSTREAM (1<<1)
02800 #define AV_EF_BUFFER (1<<2)
02801 #define AV_EF_EXPLODE (1<<3)
02802
02803 #define AV_EF_CAREFUL (1<<16)
02804 #define AV_EF_COMPLIANT (1<<17)
02805 #define AV_EF_AGGRESSIVE (1<<18)
02806
02807
02815 int64_t reordered_opaque;
02816
02822 struct AVHWAccel *hwaccel;
02823
02834 void *hwaccel_context;
02835
02841 uint64_t error[AV_NUM_DATA_POINTERS];
02842
02848 int dct_algo;
02849 #define FF_DCT_AUTO 0
02850 #define FF_DCT_FASTINT 1
02851 #define FF_DCT_INT 2
02852 #define FF_DCT_MMX 3
02853 #define FF_DCT_ALTIVEC 5
02854 #define FF_DCT_FAAN 6
02855
02861 int idct_algo;
02862 #define FF_IDCT_AUTO 0
02863 #define FF_IDCT_INT 1
02864 #define FF_IDCT_SIMPLE 2
02865 #define FF_IDCT_SIMPLEMMX 3
02866 #define FF_IDCT_LIBMPEG2MMX 4
02867 #if FF_API_MMI
02868 #define FF_IDCT_MMI 5
02869 #endif
02870 #define FF_IDCT_ARM 7
02871 #define FF_IDCT_ALTIVEC 8
02872 #define FF_IDCT_SH4 9
02873 #define FF_IDCT_SIMPLEARM 10
02874 #define FF_IDCT_H264 11
02875 #define FF_IDCT_VP3 12
02876 #define FF_IDCT_IPP 13
02877 #define FF_IDCT_XVIDMMX 14
02878 #define FF_IDCT_CAVS 15
02879 #define FF_IDCT_SIMPLEARMV5TE 16
02880 #define FF_IDCT_SIMPLEARMV6 17
02881 #define FF_IDCT_SIMPLEVIS 18
02882 #define FF_IDCT_WMV2 19
02883 #define FF_IDCT_FAAN 20
02884 #define FF_IDCT_EA 21
02885 #define FF_IDCT_SIMPLENEON 22
02886 #define FF_IDCT_SIMPLEALPHA 23
02887 #define FF_IDCT_BINK 24
02888
02889 #if FF_API_DSP_MASK
02890
02894 attribute_deprecated unsigned dsp_mask;
02895 #endif
02896
02902 int bits_per_coded_sample;
02903
02909 int bits_per_raw_sample;
02910
02916 int lowres;
02917
02923 AVFrame *coded_frame;
02924
02931 int thread_count;
02932
02941 int thread_type;
02942 #define FF_THREAD_FRAME 1
02943 #define FF_THREAD_SLICE 2
02944
02945
02950 int active_thread_type;
02951
02960 int thread_safe_callbacks;
02961
02971 int (*execute)(struct AVCodecContext *c, int (*func)(struct AVCodecContext *c2, void *arg), void *arg2, int *ret, int count, int size);
02972
02991 int (*execute2)(struct AVCodecContext *c, int (*func)(struct AVCodecContext *c2, void *arg, int jobnr, int threadnr), void *arg2, int *ret, int count);
02992
02999 void *thread_opaque;
03000
03006 int nsse_weight;
03007
03013 int profile;
03014 #define FF_PROFILE_UNKNOWN -99
03015 #define FF_PROFILE_RESERVED -100
03016
03017 #define FF_PROFILE_AAC_MAIN 0
03018 #define FF_PROFILE_AAC_LOW 1
03019 #define FF_PROFILE_AAC_SSR 2
03020 #define FF_PROFILE_AAC_LTP 3
03021 #define FF_PROFILE_AAC_HE 4
03022 #define FF_PROFILE_AAC_HE_V2 28
03023 #define FF_PROFILE_AAC_LD 22
03024 #define FF_PROFILE_AAC_ELD 38
03025
03026 #define FF_PROFILE_DTS 20
03027 #define FF_PROFILE_DTS_ES 30
03028 #define FF_PROFILE_DTS_96_24 40
03029 #define FF_PROFILE_DTS_HD_HRA 50
03030 #define FF_PROFILE_DTS_HD_MA 60
03031
03032 #define FF_PROFILE_MPEG2_422 0
03033 #define FF_PROFILE_MPEG2_HIGH 1
03034 #define FF_PROFILE_MPEG2_SS 2
03035 #define FF_PROFILE_MPEG2_SNR_SCALABLE 3
03036 #define FF_PROFILE_MPEG2_MAIN 4
03037 #define FF_PROFILE_MPEG2_SIMPLE 5
03038
03039 #define FF_PROFILE_H264_CONSTRAINED (1<<9) // 8+1; constraint_set1_flag
03040 #define FF_PROFILE_H264_INTRA (1<<11) // 8+3; constraint_set3_flag
03041
03042 #define FF_PROFILE_H264_BASELINE 66
03043 #define FF_PROFILE_H264_CONSTRAINED_BASELINE (66|FF_PROFILE_H264_CONSTRAINED)
03044 #define FF_PROFILE_H264_MAIN 77
03045 #define FF_PROFILE_H264_EXTENDED 88
03046 #define FF_PROFILE_H264_HIGH 100
03047 #define FF_PROFILE_H264_HIGH_10 110
03048 #define FF_PROFILE_H264_HIGH_10_INTRA (110|FF_PROFILE_H264_INTRA)
03049 #define FF_PROFILE_H264_HIGH_422 122
03050 #define FF_PROFILE_H264_HIGH_422_INTRA (122|FF_PROFILE_H264_INTRA)
03051 #define FF_PROFILE_H264_HIGH_444 144
03052 #define FF_PROFILE_H264_HIGH_444_PREDICTIVE 244
03053 #define FF_PROFILE_H264_HIGH_444_INTRA (244|FF_PROFILE_H264_INTRA)
03054 #define FF_PROFILE_H264_CAVLC_444 44
03055
03056 #define FF_PROFILE_VC1_SIMPLE 0
03057 #define FF_PROFILE_VC1_MAIN 1
03058 #define FF_PROFILE_VC1_COMPLEX 2
03059 #define FF_PROFILE_VC1_ADVANCED 3
03060
03061 #define FF_PROFILE_MPEG4_SIMPLE 0
03062 #define FF_PROFILE_MPEG4_SIMPLE_SCALABLE 1
03063 #define FF_PROFILE_MPEG4_CORE 2
03064 #define FF_PROFILE_MPEG4_MAIN 3
03065 #define FF_PROFILE_MPEG4_N_BIT 4
03066 #define FF_PROFILE_MPEG4_SCALABLE_TEXTURE 5
03067 #define FF_PROFILE_MPEG4_SIMPLE_FACE_ANIMATION 6
03068 #define FF_PROFILE_MPEG4_BASIC_ANIMATED_TEXTURE 7
03069 #define FF_PROFILE_MPEG4_HYBRID 8
03070 #define FF_PROFILE_MPEG4_ADVANCED_REAL_TIME 9
03071 #define FF_PROFILE_MPEG4_CORE_SCALABLE 10
03072 #define FF_PROFILE_MPEG4_ADVANCED_CODING 11
03073 #define FF_PROFILE_MPEG4_ADVANCED_CORE 12
03074 #define FF_PROFILE_MPEG4_ADVANCED_SCALABLE_TEXTURE 13
03075 #define FF_PROFILE_MPEG4_SIMPLE_STUDIO 14
03076 #define FF_PROFILE_MPEG4_ADVANCED_SIMPLE 15
03077
03083 int level;
03084 #define FF_LEVEL_UNKNOWN -99
03085
03091 enum AVDiscard skip_loop_filter;
03092
03098 enum AVDiscard skip_idct;
03099
03105 enum AVDiscard skip_frame;
03106
03115 uint8_t *subtitle_header;
03116 int subtitle_header_size;
03117
03123 int error_rate;
03124
03132 AVPacket *pkt;
03133
03140 uint64_t vbv_delay;
03141
03149 AVRational pkt_timebase;
03150
03158 const AVCodecDescriptor *codec_descriptor;
03159
03165 int64_t pts_correction_num_faulty_pts;
03166 int64_t pts_correction_num_faulty_dts;
03167 int64_t pts_correction_last_pts;
03168 int64_t pts_correction_last_dts;
03169
03175 AVDictionary *metadata;
03176 } AVCodecContext;
03177
03178 AVRational av_codec_get_pkt_timebase (const AVCodecContext *avctx);
03179 void av_codec_set_pkt_timebase (AVCodecContext *avctx, AVRational val);
03180
03181 const AVCodecDescriptor *av_codec_get_codec_descriptor(const AVCodecContext *avctx);
03182 void av_codec_set_codec_descriptor(AVCodecContext *avctx, const AVCodecDescriptor *desc);
03183
03187 typedef struct AVProfile {
03188 int profile;
03189 const char *name;
03190 } AVProfile;
03191
03192 typedef struct AVCodecDefault AVCodecDefault;
03193
03194 struct AVSubtitle;
03195
03199 typedef struct AVCodec {
03206 const char *name;
03211 const char *long_name;
03212 enum AVMediaType type;
03213 enum AVCodecID id;
03218 int capabilities;
03219 const AVRational *supported_framerates;
03220 const enum AVPixelFormat *pix_fmts;
03221 const int *supported_samplerates;
03222 const enum AVSampleFormat *sample_fmts;
03223 const uint64_t *channel_layouts;
03224 uint8_t max_lowres;
03225 const AVClass *priv_class;
03226 const AVProfile *profiles;
03227
03228
03229
03230
03231
03232
03233
03234
03235 int priv_data_size;
03236 struct AVCodec *next;
03246 int (*init_thread_copy)(AVCodecContext *);
03254 int (*update_thread_context)(AVCodecContext *dst, const AVCodecContext *src);
03260 const AVCodecDefault *defaults;
03261
03265 void (*init_static_data)(struct AVCodec *codec);
03266
03267 int (*init)(AVCodecContext *);
03268 int (*encode_sub)(AVCodecContext *, uint8_t *buf, int buf_size,
03269 const struct AVSubtitle *sub);
03280 int (*encode2)(AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame,
03281 int *got_packet_ptr);
03282 int (*decode)(AVCodecContext *, void *outdata, int *outdata_size, AVPacket *avpkt);
03283 int (*close)(AVCodecContext *);
03288 void (*flush)(AVCodecContext *);
03289 } AVCodec;
03290
03294 typedef struct AVHWAccel {
03300 const char *name;
03301
03307 enum AVMediaType type;
03308
03314 enum AVCodecID id;
03315
03321 enum AVPixelFormat pix_fmt;
03322
03327 int capabilities;
03328
03329 struct AVHWAccel *next;
03330
03345 int (*start_frame)(AVCodecContext *avctx, const uint8_t *buf, uint32_t buf_size);
03346
03358 int (*decode_slice)(AVCodecContext *avctx, const uint8_t *buf, uint32_t buf_size);
03359
03369 int (*end_frame)(AVCodecContext *avctx);
03370
03378 int priv_data_size;
03379 } AVHWAccel;
03380
03392 typedef struct AVPicture {
03393 uint8_t *data[AV_NUM_DATA_POINTERS];
03394 int linesize[AV_NUM_DATA_POINTERS];
03395 } AVPicture;
03396
03401 enum AVSubtitleType {
03402 SUBTITLE_NONE,
03403
03404 SUBTITLE_BITMAP,
03405
03410 SUBTITLE_TEXT,
03411
03416 SUBTITLE_ASS,
03417 };
03418
03419 #define AV_SUBTITLE_FLAG_FORCED 0x00000001
03420
03421 typedef struct AVSubtitleRect {
03422 int x;
03423 int y;
03424 int w;
03425 int h;
03426 int nb_colors;
03427
03432 AVPicture pict;
03433 enum AVSubtitleType type;
03434
03435 char *text;
03436
03442 char *ass;
03443
03444 int flags;
03445 } AVSubtitleRect;
03446
03447 typedef struct AVSubtitle {
03448 uint16_t format;
03449 uint32_t start_display_time;
03450 uint32_t end_display_time;
03451 unsigned num_rects;
03452 AVSubtitleRect **rects;
03453 int64_t pts;
03454 } AVSubtitle;
03455
03461 AVCodec *av_codec_next(const AVCodec *c);
03462
03466 unsigned avcodec_version(void);
03467
03471 const char *avcodec_configuration(void);
03472
03476 const char *avcodec_license(void);
03477
03486 void avcodec_register(AVCodec *codec);
03487
03498 void avcodec_register_all(void);
03499
03500
03501 #if FF_API_ALLOC_CONTEXT
03502
03511 attribute_deprecated
03512 AVCodecContext *avcodec_alloc_context(void);
03513
03516 attribute_deprecated
03517 AVCodecContext *avcodec_alloc_context2(enum AVMediaType);
03518
03525 attribute_deprecated
03526 void avcodec_get_context_defaults(AVCodecContext *s);
03527
03530 attribute_deprecated
03531 void avcodec_get_context_defaults2(AVCodecContext *s, enum AVMediaType);
03532 #endif
03533
03549 AVCodecContext *avcodec_alloc_context3(const AVCodec *codec);
03550
03560 int avcodec_get_context_defaults3(AVCodecContext *s, const AVCodec *codec);
03561
03568 const AVClass *avcodec_get_class(void);
03569
03576 const AVClass *avcodec_get_frame_class(void);
03577
03584 const AVClass *avcodec_get_subtitle_rect_class(void);
03585
03597 int avcodec_copy_context(AVCodecContext *dest, const AVCodecContext *src);
03598
03606 AVFrame *avcodec_alloc_frame(void);
03607
03613 void avcodec_get_frame_defaults(AVFrame *frame);
03614
03625 void avcodec_free_frame(AVFrame **frame);
03626
03627 #if FF_API_AVCODEC_OPEN
03628
03657 attribute_deprecated
03658 int avcodec_open(AVCodecContext *avctx, AVCodec *codec);
03659 #endif
03660
03697 int avcodec_open2(AVCodecContext *avctx, const AVCodec *codec, AVDictionary **options);
03698
03708 int avcodec_close(AVCodecContext *avctx);
03709
03715 void avsubtitle_free(AVSubtitle *sub);
03716
03729 void av_destruct_packet(AVPacket *pkt);
03730
03739 void av_init_packet(AVPacket *pkt);
03740
03749 int av_new_packet(AVPacket *pkt, int size);
03750
03757 void av_shrink_packet(AVPacket *pkt, int size);
03758
03765 int av_grow_packet(AVPacket *pkt, int grow_by);
03766
03771 int av_dup_packet(AVPacket *pkt);
03772
03778 int av_copy_packet(AVPacket *dst, AVPacket *src);
03779
03785 void av_free_packet(AVPacket *pkt);
03786
03795 uint8_t* av_packet_new_side_data(AVPacket *pkt, enum AVPacketSideDataType type,
03796 int size);
03797
03806 int av_packet_shrink_side_data(AVPacket *pkt, enum AVPacketSideDataType type,
03807 int size);
03808
03817 uint8_t* av_packet_get_side_data(AVPacket *pkt, enum AVPacketSideDataType type,
03818 int *size);
03819
03820 int av_packet_merge_side_data(AVPacket *pkt);
03821
03822 int av_packet_split_side_data(AVPacket *pkt);
03823
03824
03840 AVCodec *avcodec_find_decoder(enum AVCodecID id);
03841
03848 AVCodec *avcodec_find_decoder_by_name(const char *name);
03849
03850 int avcodec_default_get_buffer(AVCodecContext *s, AVFrame *pic);
03851 void avcodec_default_release_buffer(AVCodecContext *s, AVFrame *pic);
03852 int avcodec_default_reget_buffer(AVCodecContext *s, AVFrame *pic);
03853
03861 unsigned avcodec_get_edge_width(void);
03862
03872 void avcodec_align_dimensions(AVCodecContext *s, int *width, int *height);
03873
03883 void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height,
03884 int linesize_align[AV_NUM_DATA_POINTERS]);
03885
03886 #if FF_API_OLD_DECODE_AUDIO
03887
03941 attribute_deprecated int avcodec_decode_audio3(AVCodecContext *avctx, int16_t *samples,
03942 int *frame_size_ptr,
03943 AVPacket *avpkt);
03944 #endif
03945
03979 int avcodec_decode_audio4(AVCodecContext *avctx, AVFrame *frame,
03980 int *got_frame_ptr, const AVPacket *avpkt);
03981
04023 int avcodec_decode_video2(AVCodecContext *avctx, AVFrame *picture,
04024 int *got_picture_ptr,
04025 const AVPacket *avpkt);
04026
04043 int avcodec_decode_subtitle2(AVCodecContext *avctx, AVSubtitle *sub,
04044 int *got_sub_ptr,
04045 AVPacket *avpkt);
04046
04052 typedef struct AVCodecParserContext {
04053 void *priv_data;
04054 struct AVCodecParser *parser;
04055 int64_t frame_offset;
04056 int64_t cur_offset;
04057
04058 int64_t next_frame_offset;
04059
04060 int pict_type;
04070 int repeat_pict;
04071 int64_t pts;
04072 int64_t dts;
04073
04074
04075 int64_t last_pts;
04076 int64_t last_dts;
04077 int fetch_timestamp;
04078
04079 #define AV_PARSER_PTS_NB 4
04080 int cur_frame_start_index;
04081 int64_t cur_frame_offset[AV_PARSER_PTS_NB];
04082 int64_t cur_frame_pts[AV_PARSER_PTS_NB];
04083 int64_t cur_frame_dts[AV_PARSER_PTS_NB];
04084
04085 int flags;
04086 #define PARSER_FLAG_COMPLETE_FRAMES 0x0001
04087 #define PARSER_FLAG_ONCE 0x0002
04089 #define PARSER_FLAG_FETCHED_OFFSET 0x0004
04090 #define PARSER_FLAG_USE_CODEC_TS 0x1000
04091
04092 int64_t offset;
04093 int64_t cur_frame_end[AV_PARSER_PTS_NB];
04094
04101 int key_frame;
04102
04120 int64_t convergence_duration;
04121
04122
04132 int dts_sync_point;
04133
04147 int dts_ref_dts_delta;
04148
04161 int pts_dts_delta;
04162
04168 int64_t cur_frame_pos[AV_PARSER_PTS_NB];
04169
04173 int64_t pos;
04174
04178 int64_t last_pos;
04179
04185 int duration;
04186 } AVCodecParserContext;
04187
04188 typedef struct AVCodecParser {
04189 int codec_ids[5];
04190 int priv_data_size;
04191 int (*parser_init)(AVCodecParserContext *s);
04192 int (*parser_parse)(AVCodecParserContext *s,
04193 AVCodecContext *avctx,
04194 const uint8_t **poutbuf, int *poutbuf_size,
04195 const uint8_t *buf, int buf_size);
04196 void (*parser_close)(AVCodecParserContext *s);
04197 int (*split)(AVCodecContext *avctx, const uint8_t *buf, int buf_size);
04198 struct AVCodecParser *next;
04199 } AVCodecParser;
04200
04201 AVCodecParser *av_parser_next(AVCodecParser *c);
04202
04203 void av_register_codec_parser(AVCodecParser *parser);
04204 AVCodecParserContext *av_parser_init(int codec_id);
04205
04234 int av_parser_parse2(AVCodecParserContext *s,
04235 AVCodecContext *avctx,
04236 uint8_t **poutbuf, int *poutbuf_size,
04237 const uint8_t *buf, int buf_size,
04238 int64_t pts, int64_t dts,
04239 int64_t pos);
04240
04245 int av_parser_change(AVCodecParserContext *s,
04246 AVCodecContext *avctx,
04247 uint8_t **poutbuf, int *poutbuf_size,
04248 const uint8_t *buf, int buf_size, int keyframe);
04249 void av_parser_close(AVCodecParserContext *s);
04250
04267 AVCodec *avcodec_find_encoder(enum AVCodecID id);
04268
04275 AVCodec *avcodec_find_encoder_by_name(const char *name);
04276
04277 #if FF_API_OLD_ENCODE_AUDIO
04278
04302 int attribute_deprecated avcodec_encode_audio(AVCodecContext *avctx,
04303 uint8_t *buf, int buf_size,
04304 const short *samples);
04305 #endif
04306
04346 int avcodec_encode_audio2(AVCodecContext *avctx, AVPacket *avpkt,
04347 const AVFrame *frame, int *got_packet_ptr);
04348
04349 #if FF_API_OLD_ENCODE_VIDEO
04350
04364 attribute_deprecated
04365 int avcodec_encode_video(AVCodecContext *avctx, uint8_t *buf, int buf_size,
04366 const AVFrame *pict);
04367 #endif
04368
04403 int avcodec_encode_video2(AVCodecContext *avctx, AVPacket *avpkt,
04404 const AVFrame *frame, int *got_packet_ptr);
04405
04406 int avcodec_encode_subtitle(AVCodecContext *avctx, uint8_t *buf, int buf_size,
04407 const AVSubtitle *sub);
04408
04409
04414 #if FF_API_AVCODEC_RESAMPLE
04415
04422 struct ReSampleContext;
04423 struct AVResampleContext;
04424
04425 typedef struct ReSampleContext ReSampleContext;
04426
04443 attribute_deprecated
04444 ReSampleContext *av_audio_resample_init(int output_channels, int input_channels,
04445 int output_rate, int input_rate,
04446 enum AVSampleFormat sample_fmt_out,
04447 enum AVSampleFormat sample_fmt_in,
04448 int filter_length, int log2_phase_count,
04449 int linear, double cutoff);
04450
04451 attribute_deprecated
04452 int audio_resample(ReSampleContext *s, short *output, short *input, int nb_samples);
04453
04460 attribute_deprecated
04461 void audio_resample_close(ReSampleContext *s);
04462
04463
04473 attribute_deprecated
04474 struct AVResampleContext *av_resample_init(int out_rate, int in_rate, int filter_length, int log2_phase_count, int linear, double cutoff);
04475
04485 attribute_deprecated
04486 int av_resample(struct AVResampleContext *c, short *dst, short *src, int *consumed, int src_size, int dst_size, int update_ctx);
04487
04488
04501 attribute_deprecated
04502 void av_resample_compensate(struct AVResampleContext *c, int sample_delta, int compensation_distance);
04503 attribute_deprecated
04504 void av_resample_close(struct AVResampleContext *c);
04505
04509 #endif
04510
04527 int avpicture_alloc(AVPicture *picture, enum AVPixelFormat pix_fmt, int width, int height);
04528
04536 void avpicture_free(AVPicture *picture);
04537
04544 int avpicture_fill(AVPicture *picture, const uint8_t *ptr,
04545 enum AVPixelFormat pix_fmt, int width, int height);
04546
04553 int avpicture_layout(const AVPicture* src, enum AVPixelFormat pix_fmt,
04554 int width, int height,
04555 unsigned char *dest, int dest_size);
04556
04564 int avpicture_get_size(enum AVPixelFormat pix_fmt, int width, int height);
04565
04569 int avpicture_deinterlace(AVPicture *dst, const AVPicture *src,
04570 enum AVPixelFormat pix_fmt, int width, int height);
04574 void av_picture_copy(AVPicture *dst, const AVPicture *src,
04575 enum AVPixelFormat pix_fmt, int width, int height);
04576
04580 int av_picture_crop(AVPicture *dst, const AVPicture *src,
04581 enum AVPixelFormat pix_fmt, int top_band, int left_band);
04582
04586 int av_picture_pad(AVPicture *dst, const AVPicture *src, int height, int width, enum AVPixelFormat pix_fmt,
04587 int padtop, int padbottom, int padleft, int padright, int *color);
04588
04624 void avcodec_get_chroma_sub_sample(enum AVPixelFormat pix_fmt, int *h_shift, int *v_shift);
04625
04631 unsigned int avcodec_pix_fmt_to_codec_tag(enum AVPixelFormat pix_fmt);
04632
04633 #define FF_LOSS_RESOLUTION 0x0001
04634 #define FF_LOSS_DEPTH 0x0002
04635 #define FF_LOSS_COLORSPACE 0x0004
04636 #define FF_LOSS_ALPHA 0x0008
04637 #define FF_LOSS_COLORQUANT 0x0010
04638 #define FF_LOSS_CHROMA 0x0020
04658 int avcodec_get_pix_fmt_loss(enum AVPixelFormat dst_pix_fmt, enum AVPixelFormat src_pix_fmt,
04659 int has_alpha);
04660
04661 #if FF_API_FIND_BEST_PIX_FMT
04662
04688 attribute_deprecated
04689 enum AVPixelFormat avcodec_find_best_pix_fmt(int64_t pix_fmt_mask, enum AVPixelFormat src_pix_fmt,
04690 int has_alpha, int *loss_ptr);
04691 #endif
04692
04710 enum AVPixelFormat avcodec_find_best_pix_fmt_of_list(enum AVPixelFormat *pix_fmt_list,
04711 enum AVPixelFormat src_pix_fmt,
04712 int has_alpha, int *loss_ptr);
04713
04744 enum AVPixelFormat avcodec_find_best_pix_fmt_of_2(enum AVPixelFormat dst_pix_fmt1, enum AVPixelFormat dst_pix_fmt2,
04745 enum AVPixelFormat src_pix_fmt, int has_alpha, int *loss_ptr);
04746
04747 attribute_deprecated
04748 #if AV_HAVE_INCOMPATIBLE_FORK_ABI
04749 enum AVPixelFormat avcodec_find_best_pix_fmt2(enum AVPixelFormat *pix_fmt_list,
04750 enum AVPixelFormat src_pix_fmt,
04751 int has_alpha, int *loss_ptr);
04752 #else
04753 enum AVPixelFormat avcodec_find_best_pix_fmt2(enum AVPixelFormat dst_pix_fmt1, enum AVPixelFormat dst_pix_fmt2,
04754 enum AVPixelFormat src_pix_fmt, int has_alpha, int *loss_ptr);
04755 #endif
04756
04757
04758 enum AVPixelFormat avcodec_default_get_format(struct AVCodecContext *s, const enum AVPixelFormat * fmt);
04759
04764 void avcodec_set_dimensions(AVCodecContext *s, int width, int height);
04765
04773 size_t av_get_codec_tag_string(char *buf, size_t buf_size, unsigned int codec_tag);
04774
04775 void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode);
04776
04784 const char *av_get_profile_name(const AVCodec *codec, int profile);
04785
04786 int avcodec_default_execute(AVCodecContext *c, int (*func)(AVCodecContext *c2, void *arg2),void *arg, int *ret, int count, int size);
04787 int avcodec_default_execute2(AVCodecContext *c, int (*func)(AVCodecContext *c2, void *arg2, int, int),void *arg, int *ret, int count);
04788
04789
04813 int avcodec_fill_audio_frame(AVFrame *frame, int nb_channels,
04814 enum AVSampleFormat sample_fmt, const uint8_t *buf,
04815 int buf_size, int align);
04816
04820 void avcodec_flush_buffers(AVCodecContext *avctx);
04821
04822 void avcodec_default_free_buffers(AVCodecContext *s);
04823
04830 int av_get_bits_per_sample(enum AVCodecID codec_id);
04831
04838 enum AVCodecID av_get_pcm_codec(enum AVSampleFormat fmt, int be);
04839
04848 int av_get_exact_bits_per_sample(enum AVCodecID codec_id);
04849
04858 int av_get_audio_frame_duration(AVCodecContext *avctx, int frame_bytes);
04859
04860
04861 typedef struct AVBitStreamFilterContext {
04862 void *priv_data;
04863 struct AVBitStreamFilter *filter;
04864 AVCodecParserContext *parser;
04865 struct AVBitStreamFilterContext *next;
04866 } AVBitStreamFilterContext;
04867
04868
04869 typedef struct AVBitStreamFilter {
04870 const char *name;
04871 int priv_data_size;
04872 int (*filter)(AVBitStreamFilterContext *bsfc,
04873 AVCodecContext *avctx, const char *args,
04874 uint8_t **poutbuf, int *poutbuf_size,
04875 const uint8_t *buf, int buf_size, int keyframe);
04876 void (*close)(AVBitStreamFilterContext *bsfc);
04877 struct AVBitStreamFilter *next;
04878 } AVBitStreamFilter;
04879
04880 void av_register_bitstream_filter(AVBitStreamFilter *bsf);
04881 AVBitStreamFilterContext *av_bitstream_filter_init(const char *name);
04882 int av_bitstream_filter_filter(AVBitStreamFilterContext *bsfc,
04883 AVCodecContext *avctx, const char *args,
04884 uint8_t **poutbuf, int *poutbuf_size,
04885 const uint8_t *buf, int buf_size, int keyframe);
04886 void av_bitstream_filter_close(AVBitStreamFilterContext *bsf);
04887
04888 AVBitStreamFilter *av_bitstream_filter_next(AVBitStreamFilter *f);
04889
04890
04891
04897 void *av_fast_realloc(void *ptr, unsigned int *size, size_t min_size);
04898
04911 void av_fast_malloc(void *ptr, unsigned int *size, size_t min_size);
04912
04920 void av_fast_padded_malloc(void *ptr, unsigned int *size, size_t min_size);
04921
04926 void av_fast_padded_mallocz(void *ptr, unsigned int *size, size_t min_size);
04927
04935 unsigned int av_xiphlacing(unsigned char *s, unsigned int v);
04936
04949 void av_log_missing_feature(void *avc, const char *feature, int want_sample);
04950
04959 void av_log_ask_for_sample(void *avc, const char *msg, ...) av_printf_format(2, 3);
04960
04964 void av_register_hwaccel(AVHWAccel *hwaccel);
04965
04971 AVHWAccel *av_hwaccel_next(AVHWAccel *hwaccel);
04972
04973
04977 enum AVLockOp {
04978 AV_LOCK_CREATE,
04979 AV_LOCK_OBTAIN,
04980 AV_LOCK_RELEASE,
04981 AV_LOCK_DESTROY,
04982 };
04983
04997 int av_lockmgr_register(int (*cb)(void **mutex, enum AVLockOp op));
04998
05002 enum AVMediaType avcodec_get_type(enum AVCodecID codec_id);
05003
05008 const char *avcodec_get_name(enum AVCodecID id);
05009
05014 int avcodec_is_open(AVCodecContext *s);
05015
05019 int av_codec_is_encoder(const AVCodec *codec);
05020
05024 int av_codec_is_decoder(const AVCodec *codec);
05025
05029 const AVCodecDescriptor *avcodec_descriptor_get(enum AVCodecID id);
05030
05038 const AVCodecDescriptor *avcodec_descriptor_next(const AVCodecDescriptor *prev);
05039
05044 const AVCodecDescriptor *avcodec_descriptor_get_by_name(const char *name);
05045
05050 #endif