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
00034 #define LIBAVCODEC_VERSION_MAJOR 52
00035 #define LIBAVCODEC_VERSION_MINOR 114
00036 #define LIBAVCODEC_VERSION_MICRO 0
00037
00038 #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
00039 LIBAVCODEC_VERSION_MINOR, \
00040 LIBAVCODEC_VERSION_MICRO)
00041 #define LIBAVCODEC_VERSION AV_VERSION(LIBAVCODEC_VERSION_MAJOR, \
00042 LIBAVCODEC_VERSION_MINOR, \
00043 LIBAVCODEC_VERSION_MICRO)
00044 #define LIBAVCODEC_BUILD LIBAVCODEC_VERSION_INT
00045
00046 #define LIBAVCODEC_IDENT "Lavc" AV_STRINGIFY(LIBAVCODEC_VERSION)
00047
00052 #ifndef FF_API_PALETTE_CONTROL
00053 #define FF_API_PALETTE_CONTROL (LIBAVCODEC_VERSION_MAJOR < 54)
00054 #endif
00055 #ifndef FF_API_MM_FLAGS
00056 #define FF_API_MM_FLAGS (LIBAVCODEC_VERSION_MAJOR < 53)
00057 #endif
00058 #ifndef FF_API_OPT_SHOW
00059 #define FF_API_OPT_SHOW (LIBAVCODEC_VERSION_MAJOR < 53)
00060 #endif
00061 #ifndef FF_API_AUDIO_OLD
00062 #define FF_API_AUDIO_OLD (LIBAVCODEC_VERSION_MAJOR < 53)
00063 #endif
00064 #ifndef FF_API_VIDEO_OLD
00065 #define FF_API_VIDEO_OLD (LIBAVCODEC_VERSION_MAJOR < 53)
00066 #endif
00067 #ifndef FF_API_SUBTITLE_OLD
00068 #define FF_API_SUBTITLE_OLD (LIBAVCODEC_VERSION_MAJOR < 53)
00069 #endif
00070 #ifndef FF_API_USE_LPC
00071 #define FF_API_USE_LPC (LIBAVCODEC_VERSION_MAJOR < 53)
00072 #endif
00073 #ifndef FF_API_SET_STRING_OLD
00074 #define FF_API_SET_STRING_OLD (LIBAVCODEC_VERSION_MAJOR < 53)
00075 #endif
00076 #ifndef FF_API_INOFFICIAL
00077 #define FF_API_INOFFICIAL (LIBAVCODEC_VERSION_MAJOR < 53)
00078 #endif
00079 #ifndef FF_API_OLD_SAMPLE_FMT
00080 #define FF_API_OLD_SAMPLE_FMT (LIBAVCODEC_VERSION_MAJOR < 53)
00081 #endif
00082 #ifndef FF_API_OLD_AUDIOCONVERT
00083 #define FF_API_OLD_AUDIOCONVERT (LIBAVCODEC_VERSION_MAJOR < 53)
00084 #endif
00085
00086 #if LIBAVCODEC_VERSION_MAJOR < 53
00087 # define FF_INTERNALC_MEM_TYPE unsigned int
00088 #else
00089 # define FF_INTERNALC_MEM_TYPE size_t
00090 #endif
00091
00104 enum CodecID {
00105 CODEC_ID_NONE,
00106
00107
00108 CODEC_ID_MPEG1VIDEO,
00109 CODEC_ID_MPEG2VIDEO,
00110 CODEC_ID_MPEG2VIDEO_XVMC,
00111 CODEC_ID_H261,
00112 CODEC_ID_H263,
00113 CODEC_ID_RV10,
00114 CODEC_ID_RV20,
00115 CODEC_ID_MJPEG,
00116 CODEC_ID_MJPEGB,
00117 CODEC_ID_LJPEG,
00118 CODEC_ID_SP5X,
00119 CODEC_ID_JPEGLS,
00120 CODEC_ID_MPEG4,
00121 CODEC_ID_RAWVIDEO,
00122 CODEC_ID_MSMPEG4V1,
00123 CODEC_ID_MSMPEG4V2,
00124 CODEC_ID_MSMPEG4V3,
00125 CODEC_ID_WMV1,
00126 CODEC_ID_WMV2,
00127 CODEC_ID_H263P,
00128 CODEC_ID_H263I,
00129 CODEC_ID_FLV1,
00130 CODEC_ID_SVQ1,
00131 CODEC_ID_SVQ3,
00132 CODEC_ID_DVVIDEO,
00133 CODEC_ID_HUFFYUV,
00134 CODEC_ID_CYUV,
00135 CODEC_ID_H264,
00136 CODEC_ID_INDEO3,
00137 CODEC_ID_VP3,
00138 CODEC_ID_THEORA,
00139 CODEC_ID_ASV1,
00140 CODEC_ID_ASV2,
00141 CODEC_ID_FFV1,
00142 CODEC_ID_4XM,
00143 CODEC_ID_VCR1,
00144 CODEC_ID_CLJR,
00145 CODEC_ID_MDEC,
00146 CODEC_ID_ROQ,
00147 CODEC_ID_INTERPLAY_VIDEO,
00148 CODEC_ID_XAN_WC3,
00149 CODEC_ID_XAN_WC4,
00150 CODEC_ID_RPZA,
00151 CODEC_ID_CINEPAK,
00152 CODEC_ID_WS_VQA,
00153 CODEC_ID_MSRLE,
00154 CODEC_ID_MSVIDEO1,
00155 CODEC_ID_IDCIN,
00156 CODEC_ID_8BPS,
00157 CODEC_ID_SMC,
00158 CODEC_ID_FLIC,
00159 CODEC_ID_TRUEMOTION1,
00160 CODEC_ID_VMDVIDEO,
00161 CODEC_ID_MSZH,
00162 CODEC_ID_ZLIB,
00163 CODEC_ID_QTRLE,
00164 CODEC_ID_SNOW,
00165 CODEC_ID_TSCC,
00166 CODEC_ID_ULTI,
00167 CODEC_ID_QDRAW,
00168 CODEC_ID_VIXL,
00169 CODEC_ID_QPEG,
00170 #if LIBAVCODEC_VERSION_MAJOR < 53
00171 CODEC_ID_XVID,
00172 #endif
00173 CODEC_ID_PNG,
00174 CODEC_ID_PPM,
00175 CODEC_ID_PBM,
00176 CODEC_ID_PGM,
00177 CODEC_ID_PGMYUV,
00178 CODEC_ID_PAM,
00179 CODEC_ID_FFVHUFF,
00180 CODEC_ID_RV30,
00181 CODEC_ID_RV40,
00182 CODEC_ID_VC1,
00183 CODEC_ID_WMV3,
00184 CODEC_ID_LOCO,
00185 CODEC_ID_WNV1,
00186 CODEC_ID_AASC,
00187 CODEC_ID_INDEO2,
00188 CODEC_ID_FRAPS,
00189 CODEC_ID_TRUEMOTION2,
00190 CODEC_ID_BMP,
00191 CODEC_ID_CSCD,
00192 CODEC_ID_MMVIDEO,
00193 CODEC_ID_ZMBV,
00194 CODEC_ID_AVS,
00195 CODEC_ID_SMACKVIDEO,
00196 CODEC_ID_NUV,
00197 CODEC_ID_KMVC,
00198 CODEC_ID_FLASHSV,
00199 CODEC_ID_CAVS,
00200 CODEC_ID_JPEG2000,
00201 CODEC_ID_VMNC,
00202 CODEC_ID_VP5,
00203 CODEC_ID_VP6,
00204 CODEC_ID_VP6F,
00205 CODEC_ID_TARGA,
00206 CODEC_ID_DSICINVIDEO,
00207 CODEC_ID_TIERTEXSEQVIDEO,
00208 CODEC_ID_TIFF,
00209 CODEC_ID_GIF,
00210 CODEC_ID_FFH264,
00211 CODEC_ID_DXA,
00212 CODEC_ID_DNXHD,
00213 CODEC_ID_THP,
00214 CODEC_ID_SGI,
00215 CODEC_ID_C93,
00216 CODEC_ID_BETHSOFTVID,
00217 CODEC_ID_PTX,
00218 CODEC_ID_TXD,
00219 CODEC_ID_VP6A,
00220 CODEC_ID_AMV,
00221 CODEC_ID_VB,
00222 CODEC_ID_PCX,
00223 CODEC_ID_SUNRAST,
00224 CODEC_ID_INDEO4,
00225 CODEC_ID_INDEO5,
00226 CODEC_ID_MIMIC,
00227 CODEC_ID_RL2,
00228 CODEC_ID_8SVX_EXP,
00229 CODEC_ID_8SVX_FIB,
00230 CODEC_ID_ESCAPE124,
00231 CODEC_ID_DIRAC,
00232 CODEC_ID_BFI,
00233 CODEC_ID_CMV,
00234 CODEC_ID_MOTIONPIXELS,
00235 CODEC_ID_TGV,
00236 CODEC_ID_TGQ,
00237 CODEC_ID_TQI,
00238 CODEC_ID_AURA,
00239 CODEC_ID_AURA2,
00240 CODEC_ID_V210X,
00241 CODEC_ID_TMV,
00242 CODEC_ID_V210,
00243 CODEC_ID_DPX,
00244 CODEC_ID_MAD,
00245 CODEC_ID_FRWU,
00246 CODEC_ID_FLASHSV2,
00247 CODEC_ID_CDGRAPHICS,
00248 CODEC_ID_R210,
00249 CODEC_ID_ANM,
00250 CODEC_ID_BINKVIDEO,
00251 CODEC_ID_IFF_ILBM,
00252 CODEC_ID_IFF_BYTERUN1,
00253 CODEC_ID_KGV1,
00254 CODEC_ID_YOP,
00255 CODEC_ID_VP8,
00256 CODEC_ID_PICTOR,
00257 CODEC_ID_ANSI,
00258 CODEC_ID_A64_MULTI,
00259 CODEC_ID_A64_MULTI5,
00260 CODEC_ID_R10K,
00261 CODEC_ID_MXPEG,
00262 CODEC_ID_LAGARITH,
00263 CODEC_ID_PRORES,
00264 CODEC_ID_JV,
00265
00266
00267 CODEC_ID_PCM_S16LE= 0x10000,
00268 CODEC_ID_PCM_S16BE,
00269 CODEC_ID_PCM_U16LE,
00270 CODEC_ID_PCM_U16BE,
00271 CODEC_ID_PCM_S8,
00272 CODEC_ID_PCM_U8,
00273 CODEC_ID_PCM_MULAW,
00274 CODEC_ID_PCM_ALAW,
00275 CODEC_ID_PCM_S32LE,
00276 CODEC_ID_PCM_S32BE,
00277 CODEC_ID_PCM_U32LE,
00278 CODEC_ID_PCM_U32BE,
00279 CODEC_ID_PCM_S24LE,
00280 CODEC_ID_PCM_S24BE,
00281 CODEC_ID_PCM_U24LE,
00282 CODEC_ID_PCM_U24BE,
00283 CODEC_ID_PCM_S24DAUD,
00284 CODEC_ID_PCM_ZORK,
00285 CODEC_ID_PCM_S16LE_PLANAR,
00286 CODEC_ID_PCM_DVD,
00287 CODEC_ID_PCM_F32BE,
00288 CODEC_ID_PCM_F32LE,
00289 CODEC_ID_PCM_F64BE,
00290 CODEC_ID_PCM_F64LE,
00291 CODEC_ID_PCM_BLURAY,
00292 CODEC_ID_PCM_LXF,
00293
00294
00295 CODEC_ID_ADPCM_IMA_QT= 0x11000,
00296 CODEC_ID_ADPCM_IMA_WAV,
00297 CODEC_ID_ADPCM_IMA_DK3,
00298 CODEC_ID_ADPCM_IMA_DK4,
00299 CODEC_ID_ADPCM_IMA_WS,
00300 CODEC_ID_ADPCM_IMA_SMJPEG,
00301 CODEC_ID_ADPCM_MS,
00302 CODEC_ID_ADPCM_4XM,
00303 CODEC_ID_ADPCM_XA,
00304 CODEC_ID_ADPCM_ADX,
00305 CODEC_ID_ADPCM_EA,
00306 CODEC_ID_ADPCM_G726,
00307 CODEC_ID_ADPCM_CT,
00308 CODEC_ID_ADPCM_SWF,
00309 CODEC_ID_ADPCM_YAMAHA,
00310 CODEC_ID_ADPCM_SBPRO_4,
00311 CODEC_ID_ADPCM_SBPRO_3,
00312 CODEC_ID_ADPCM_SBPRO_2,
00313 CODEC_ID_ADPCM_THP,
00314 CODEC_ID_ADPCM_IMA_AMV,
00315 CODEC_ID_ADPCM_EA_R1,
00316 CODEC_ID_ADPCM_EA_R3,
00317 CODEC_ID_ADPCM_EA_R2,
00318 CODEC_ID_ADPCM_IMA_EA_SEAD,
00319 CODEC_ID_ADPCM_IMA_EA_EACS,
00320 CODEC_ID_ADPCM_EA_XAS,
00321 CODEC_ID_ADPCM_EA_MAXIS_XA,
00322 CODEC_ID_ADPCM_IMA_ISS,
00323 CODEC_ID_ADPCM_G722,
00324
00325
00326 CODEC_ID_AMR_NB= 0x12000,
00327 CODEC_ID_AMR_WB,
00328
00329
00330 CODEC_ID_RA_144= 0x13000,
00331 CODEC_ID_RA_288,
00332
00333
00334 CODEC_ID_ROQ_DPCM= 0x14000,
00335 CODEC_ID_INTERPLAY_DPCM,
00336 CODEC_ID_XAN_DPCM,
00337 CODEC_ID_SOL_DPCM,
00338
00339
00340 CODEC_ID_MP2= 0x15000,
00341 CODEC_ID_MP3,
00342 CODEC_ID_AAC,
00343 CODEC_ID_AC3,
00344 CODEC_ID_DTS,
00345 CODEC_ID_VORBIS,
00346 CODEC_ID_DVAUDIO,
00347 CODEC_ID_WMAV1,
00348 CODEC_ID_WMAV2,
00349 CODEC_ID_MACE3,
00350 CODEC_ID_MACE6,
00351 CODEC_ID_VMDAUDIO,
00352 CODEC_ID_SONIC,
00353 CODEC_ID_SONIC_LS,
00354 CODEC_ID_FLAC,
00355 CODEC_ID_MP3ADU,
00356 CODEC_ID_MP3ON4,
00357 CODEC_ID_SHORTEN,
00358 CODEC_ID_ALAC,
00359 CODEC_ID_WESTWOOD_SND1,
00360 CODEC_ID_GSM,
00361 CODEC_ID_QDM2,
00362 CODEC_ID_COOK,
00363 CODEC_ID_TRUESPEECH,
00364 CODEC_ID_TTA,
00365 CODEC_ID_SMACKAUDIO,
00366 CODEC_ID_QCELP,
00367 CODEC_ID_WAVPACK,
00368 CODEC_ID_DSICINAUDIO,
00369 CODEC_ID_IMC,
00370 CODEC_ID_MUSEPACK7,
00371 CODEC_ID_MLP,
00372 CODEC_ID_GSM_MS,
00373 CODEC_ID_ATRAC3,
00374 CODEC_ID_VOXWARE,
00375 CODEC_ID_APE,
00376 CODEC_ID_NELLYMOSER,
00377 CODEC_ID_MUSEPACK8,
00378 CODEC_ID_SPEEX,
00379 CODEC_ID_WMAVOICE,
00380 CODEC_ID_WMAPRO,
00381 CODEC_ID_WMALOSSLESS,
00382 CODEC_ID_ATRAC3P,
00383 CODEC_ID_EAC3,
00384 CODEC_ID_SIPR,
00385 CODEC_ID_MP1,
00386 CODEC_ID_TWINVQ,
00387 CODEC_ID_TRUEHD,
00388 CODEC_ID_MP4ALS,
00389 CODEC_ID_ATRAC1,
00390 CODEC_ID_BINKAUDIO_RDFT,
00391 CODEC_ID_BINKAUDIO_DCT,
00392 CODEC_ID_AAC_LATM,
00393 CODEC_ID_QDMC,
00394
00395
00396 CODEC_ID_DVD_SUBTITLE= 0x17000,
00397 CODEC_ID_DVB_SUBTITLE,
00398 CODEC_ID_TEXT,
00399 CODEC_ID_XSUB,
00400 CODEC_ID_SSA,
00401 CODEC_ID_MOV_TEXT,
00402 CODEC_ID_HDMV_PGS_SUBTITLE,
00403 CODEC_ID_DVB_TELETEXT,
00404 CODEC_ID_SRT,
00405
00406
00407 CODEC_ID_TTF= 0x18000,
00408
00409 CODEC_ID_PROBE= 0x19000,
00410
00411 CODEC_ID_MPEG2TS= 0x20000,
00413 CODEC_ID_FFMETADATA=0x21000,
00414 };
00415
00416 #if LIBAVCODEC_VERSION_MAJOR < 53
00417 #define CodecType AVMediaType
00418
00419 #define CODEC_TYPE_UNKNOWN AVMEDIA_TYPE_UNKNOWN
00420 #define CODEC_TYPE_VIDEO AVMEDIA_TYPE_VIDEO
00421 #define CODEC_TYPE_AUDIO AVMEDIA_TYPE_AUDIO
00422 #define CODEC_TYPE_DATA AVMEDIA_TYPE_DATA
00423 #define CODEC_TYPE_SUBTITLE AVMEDIA_TYPE_SUBTITLE
00424 #define CODEC_TYPE_ATTACHMENT AVMEDIA_TYPE_ATTACHMENT
00425 #define CODEC_TYPE_NB AVMEDIA_TYPE_NB
00426 #endif
00427
00428 #if FF_API_OLD_SAMPLE_FMT
00429 #define SampleFormat AVSampleFormat
00430
00431 #define SAMPLE_FMT_NONE AV_SAMPLE_FMT_NONE
00432 #define SAMPLE_FMT_U8 AV_SAMPLE_FMT_U8
00433 #define SAMPLE_FMT_S16 AV_SAMPLE_FMT_S16
00434 #define SAMPLE_FMT_S32 AV_SAMPLE_FMT_S32
00435 #define SAMPLE_FMT_FLT AV_SAMPLE_FMT_FLT
00436 #define SAMPLE_FMT_DBL AV_SAMPLE_FMT_DBL
00437 #define SAMPLE_FMT_NB AV_SAMPLE_FMT_NB
00438 #endif
00439
00440 #if FF_API_OLD_AUDIOCONVERT
00441 #include "libavutil/audioconvert.h"
00442
00443
00444 #define CH_FRONT_LEFT AV_CH_FRONT_LEFT
00445 #define CH_FRONT_RIGHT AV_CH_FRONT_RIGHT
00446 #define CH_FRONT_CENTER AV_CH_FRONT_CENTER
00447 #define CH_LOW_FREQUENCY AV_CH_LOW_FREQUENCY
00448 #define CH_BACK_LEFT AV_CH_BACK_LEFT
00449 #define CH_BACK_RIGHT AV_CH_BACK_RIGHT
00450 #define CH_FRONT_LEFT_OF_CENTER AV_CH_FRONT_LEFT_OF_CENTER
00451 #define CH_FRONT_RIGHT_OF_CENTER AV_CH_FRONT_RIGHT_OF_CENTER
00452 #define CH_BACK_CENTER AV_CH_BACK_CENTER
00453 #define CH_SIDE_LEFT AV_CH_SIDE_LEFT
00454 #define CH_SIDE_RIGHT AV_CH_SIDE_RIGHT
00455 #define CH_TOP_CENTER AV_CH_TOP_CENTER
00456 #define CH_TOP_FRONT_LEFT AV_CH_TOP_FRONT_LEFT
00457 #define CH_TOP_FRONT_CENTER AV_CH_TOP_FRONT_CENTER
00458 #define CH_TOP_FRONT_RIGHT AV_CH_TOP_FRONT_RIGHT
00459 #define CH_TOP_BACK_LEFT AV_CH_TOP_BACK_LEFT
00460 #define CH_TOP_BACK_CENTER AV_CH_TOP_BACK_CENTER
00461 #define CH_TOP_BACK_RIGHT AV_CH_TOP_BACK_RIGHT
00462 #define CH_STEREO_LEFT AV_CH_STEREO_LEFT
00463 #define CH_STEREO_RIGHT AV_CH_STEREO_RIGHT
00464
00468 #define CH_LAYOUT_NATIVE AV_CH_LAYOUT_NATIVE
00469
00470
00471 #define CH_LAYOUT_MONO AV_CH_LAYOUT_MONO
00472 #define CH_LAYOUT_STEREO AV_CH_LAYOUT_STEREO
00473 #define CH_LAYOUT_2_1 AV_CH_LAYOUT_2_1
00474 #define CH_LAYOUT_SURROUND AV_CH_LAYOUT_SURROUND
00475 #define CH_LAYOUT_4POINT0 AV_CH_LAYOUT_4POINT0
00476 #define CH_LAYOUT_2_2 AV_CH_LAYOUT_2_2
00477 #define CH_LAYOUT_QUAD AV_CH_LAYOUT_QUAD
00478 #define CH_LAYOUT_5POINT0 AV_CH_LAYOUT_5POINT0
00479 #define CH_LAYOUT_5POINT1 AV_CH_LAYOUT_5POINT1
00480 #define CH_LAYOUT_5POINT0_BACK AV_CH_LAYOUT_5POINT0_BACK
00481 #define CH_LAYOUT_5POINT1_BACK AV_CH_LAYOUT_5POINT1_BACK
00482 #define CH_LAYOUT_7POINT0 AV_CH_LAYOUT_7POINT0
00483 #define CH_LAYOUT_7POINT1 AV_CH_LAYOUT_7POINT1
00484 #define CH_LAYOUT_7POINT1_WIDE AV_CH_LAYOUT_7POINT1_WIDE
00485 #define CH_LAYOUT_STEREO_DOWNMIX AV_CH_LAYOUT_STEREO_DOWNMIX
00486 #endif
00487
00488
00489 #define AVCODEC_MAX_AUDIO_FRAME_SIZE 192000 // 1 second of 48khz 32bit audio
00490
00498 #define FF_INPUT_BUFFER_PADDING_SIZE 8
00499
00504 #define FF_MIN_BUFFER_SIZE 16384
00505
00506
00510 enum Motion_Est_ID {
00511 ME_ZERO = 1,
00512 ME_FULL,
00513 ME_LOG,
00514 ME_PHODS,
00515 ME_EPZS,
00516 ME_X1,
00517 ME_HEX,
00518 ME_UMH,
00519 ME_ITER,
00520 ME_TESA,
00521 };
00522
00523 enum AVDiscard{
00524
00525
00526 AVDISCARD_NONE =-16,
00527 AVDISCARD_DEFAULT= 0,
00528 AVDISCARD_NONREF = 8,
00529 AVDISCARD_BIDIR = 16,
00530 AVDISCARD_NONKEY = 32,
00531 AVDISCARD_ALL = 48,
00532 };
00533
00534 enum AVColorPrimaries{
00535 AVCOL_PRI_BT709 =1,
00536 AVCOL_PRI_UNSPECIFIED=2,
00537 AVCOL_PRI_BT470M =4,
00538 AVCOL_PRI_BT470BG =5,
00539 AVCOL_PRI_SMPTE170M =6,
00540 AVCOL_PRI_SMPTE240M =7,
00541 AVCOL_PRI_FILM =8,
00542 AVCOL_PRI_NB ,
00543 };
00544
00545 enum AVColorTransferCharacteristic{
00546 AVCOL_TRC_BT709 =1,
00547 AVCOL_TRC_UNSPECIFIED=2,
00548 AVCOL_TRC_GAMMA22 =4,
00549 AVCOL_TRC_GAMMA28 =5,
00550 AVCOL_TRC_NB ,
00551 };
00552
00553 enum AVColorSpace{
00554 AVCOL_SPC_RGB =0,
00555 AVCOL_SPC_BT709 =1,
00556 AVCOL_SPC_UNSPECIFIED=2,
00557 AVCOL_SPC_FCC =4,
00558 AVCOL_SPC_BT470BG =5,
00559 AVCOL_SPC_SMPTE170M =6,
00560 AVCOL_SPC_SMPTE240M =7,
00561 AVCOL_SPC_NB ,
00562 };
00563
00564 enum AVColorRange{
00565 AVCOL_RANGE_UNSPECIFIED=0,
00566 AVCOL_RANGE_MPEG =1,
00567 AVCOL_RANGE_JPEG =2,
00568 AVCOL_RANGE_NB ,
00569 };
00570
00576 enum AVChromaLocation{
00577 AVCHROMA_LOC_UNSPECIFIED=0,
00578 AVCHROMA_LOC_LEFT =1,
00579 AVCHROMA_LOC_CENTER =2,
00580 AVCHROMA_LOC_TOPLEFT =3,
00581 AVCHROMA_LOC_TOP =4,
00582 AVCHROMA_LOC_BOTTOMLEFT =5,
00583 AVCHROMA_LOC_BOTTOM =6,
00584 AVCHROMA_LOC_NB ,
00585 };
00586
00590 enum AVLPCType {
00591 AV_LPC_TYPE_DEFAULT = -1,
00592 AV_LPC_TYPE_NONE = 0,
00593 AV_LPC_TYPE_FIXED = 1,
00594 AV_LPC_TYPE_LEVINSON = 2,
00595 AV_LPC_TYPE_CHOLESKY = 3,
00596 AV_LPC_TYPE_NB ,
00597 };
00598
00599 typedef struct RcOverride{
00600 int start_frame;
00601 int end_frame;
00602 int qscale;
00603 float quality_factor;
00604 } RcOverride;
00605
00606 #define FF_MAX_B_FRAMES 16
00607
00608
00609
00610
00611
00612
00613 #define CODEC_FLAG_QSCALE 0x0002
00614 #define CODEC_FLAG_4MV 0x0004
00615 #define CODEC_FLAG_QPEL 0x0010
00616 #define CODEC_FLAG_GMC 0x0020
00617 #define CODEC_FLAG_MV0 0x0040
00618 #define CODEC_FLAG_PART 0x0080
00619
00624 #define CODEC_FLAG_INPUT_PRESERVED 0x0100
00625 #define CODEC_FLAG_PASS1 0x0200
00626 #define CODEC_FLAG_PASS2 0x0400
00627 #define CODEC_FLAG_EXTERN_HUFF 0x1000
00628 #define CODEC_FLAG_GRAY 0x2000
00629 #define CODEC_FLAG_EMU_EDGE 0x4000
00630 #define CODEC_FLAG_PSNR 0x8000
00631 #define CODEC_FLAG_TRUNCATED 0x00010000
00633 #define CODEC_FLAG_NORMALIZE_AQP 0x00020000
00634 #define CODEC_FLAG_INTERLACED_DCT 0x00040000
00635 #define CODEC_FLAG_LOW_DELAY 0x00080000
00636 #define CODEC_FLAG_ALT_SCAN 0x00100000
00637 #define CODEC_FLAG_GLOBAL_HEADER 0x00400000
00638 #define CODEC_FLAG_BITEXACT 0x00800000
00639
00640 #define CODEC_FLAG_AC_PRED 0x01000000
00641 #define CODEC_FLAG_H263P_UMV 0x02000000
00642 #define CODEC_FLAG_CBP_RD 0x04000000
00643 #define CODEC_FLAG_QP_RD 0x08000000
00644 #define CODEC_FLAG_H263P_AIV 0x00000008
00645 #define CODEC_FLAG_OBMC 0x00000001
00646 #define CODEC_FLAG_LOOP_FILTER 0x00000800
00647 #define CODEC_FLAG_H263P_SLICE_STRUCT 0x10000000
00648 #define CODEC_FLAG_INTERLACED_ME 0x20000000
00649 #define CODEC_FLAG_SVCD_SCAN_OFFSET 0x40000000
00650 #define CODEC_FLAG_CLOSED_GOP 0x80000000
00651 #define CODEC_FLAG2_FAST 0x00000001
00652 #define CODEC_FLAG2_STRICT_GOP 0x00000002
00653 #define CODEC_FLAG2_NO_OUTPUT 0x00000004
00654 #define CODEC_FLAG2_LOCAL_HEADER 0x00000008
00655 #define CODEC_FLAG2_BPYRAMID 0x00000010
00656 #define CODEC_FLAG2_WPRED 0x00000020
00657 #define CODEC_FLAG2_MIXED_REFS 0x00000040
00658 #define CODEC_FLAG2_8X8DCT 0x00000080
00659 #define CODEC_FLAG2_FASTPSKIP 0x00000100
00660 #define CODEC_FLAG2_AUD 0x00000200
00661 #define CODEC_FLAG2_BRDO 0x00000400
00662 #define CODEC_FLAG2_INTRA_VLC 0x00000800
00663 #define CODEC_FLAG2_MEMC_ONLY 0x00001000
00664 #define CODEC_FLAG2_DROP_FRAME_TIMECODE 0x00002000
00665 #define CODEC_FLAG2_SKIP_RD 0x00004000
00666 #define CODEC_FLAG2_CHUNKS 0x00008000
00667 #define CODEC_FLAG2_NON_LINEAR_QUANT 0x00010000
00668 #define CODEC_FLAG2_BIT_RESERVOIR 0x00020000
00669 #define CODEC_FLAG2_MBTREE 0x00040000
00670 #define CODEC_FLAG2_PSY 0x00080000
00671 #define CODEC_FLAG2_SSIM 0x00100000
00672 #define CODEC_FLAG2_INTRA_REFRESH 0x00200000
00673
00674
00675
00676
00677
00678
00679
00680
00681 #define CODEC_CAP_DRAW_HORIZ_BAND 0x0001
00682
00687 #define CODEC_CAP_DR1 0x0002
00688
00689 #define CODEC_CAP_PARSE_ONLY 0x0004
00690 #define CODEC_CAP_TRUNCATED 0x0008
00691
00692 #define CODEC_CAP_HWACCEL 0x0010
00693
00697 #define CODEC_CAP_DELAY 0x0020
00698
00702 #define CODEC_CAP_SMALL_LAST_FRAME 0x0040
00703
00706 #define CODEC_CAP_HWACCEL_VDPAU 0x0080
00707
00718 #define CODEC_CAP_SUBFRAMES 0x0100
00719
00723 #define CODEC_CAP_EXPERIMENTAL 0x0200
00724
00727 #define CODEC_CAP_CHANNEL_CONF 0x0400
00728
00732 #define CODEC_CAP_NEG_LINESIZES 0x0800
00733
00737 #define CODEC_CAP_FRAME_THREADS 0x1000
00738
00739
00740 #define MB_TYPE_INTRA4x4 0x0001
00741 #define MB_TYPE_INTRA16x16 0x0002 //FIXME H.264-specific
00742 #define MB_TYPE_INTRA_PCM 0x0004 //FIXME H.264-specific
00743 #define MB_TYPE_16x16 0x0008
00744 #define MB_TYPE_16x8 0x0010
00745 #define MB_TYPE_8x16 0x0020
00746 #define MB_TYPE_8x8 0x0040
00747 #define MB_TYPE_INTERLACED 0x0080
00748 #define MB_TYPE_DIRECT2 0x0100 //FIXME
00749 #define MB_TYPE_ACPRED 0x0200
00750 #define MB_TYPE_GMC 0x0400
00751 #define MB_TYPE_SKIP 0x0800
00752 #define MB_TYPE_P0L0 0x1000
00753 #define MB_TYPE_P1L0 0x2000
00754 #define MB_TYPE_P0L1 0x4000
00755 #define MB_TYPE_P1L1 0x8000
00756 #define MB_TYPE_L0 (MB_TYPE_P0L0 | MB_TYPE_P1L0)
00757 #define MB_TYPE_L1 (MB_TYPE_P0L1 | MB_TYPE_P1L1)
00758 #define MB_TYPE_L0L1 (MB_TYPE_L0 | MB_TYPE_L1)
00759 #define MB_TYPE_QUANT 0x00010000
00760 #define MB_TYPE_CBP 0x00020000
00761
00762
00768 typedef struct AVPanScan{
00774 int id;
00775
00781 int width;
00782 int height;
00783
00789 int16_t position[3][2];
00790 }AVPanScan;
00791
00792 #define FF_COMMON_FRAME \
00793 \
00799 uint8_t *data[4];\
00800 int linesize[4];\
00801 \
00807 uint8_t *base[4];\
00808 \
00813 int key_frame;\
00814 \
00815 \
00820 int pict_type;\
00821 \
00822 \
00828 int64_t pts;\
00829 \
00830 \
00835 int coded_picture_number;\
00836 \
00841 int display_picture_number;\
00842 \
00843 \
00848 int quality; \
00849 \
00850 \
00856 int age;\
00857 \
00858 \
00866 int reference;\
00867 \
00868 \
00873 int8_t *qscale_table;\
00874 \
00879 int qstride;\
00880 \
00881 \
00887 uint8_t *mbskip_table;\
00888 \
00889 \
00901 int16_t (*motion_val[2])[2];\
00902 \
00903 \
00909 uint32_t *mb_type;\
00910 \
00911 \
00917 uint8_t motion_subsample_log2;\
00918 \
00919 \
00924 void *opaque;\
00925 \
00926 \
00931 uint64_t error[4];\
00932 \
00933 \
00939 int type;\
00940 \
00941 \
00947 int repeat_pict;\
00948 \
00949 \
00952 int qscale_type;\
00953 \
00954 \
00959 int interlaced_frame;\
00960 \
00961 \
00966 int top_field_first;\
00967 \
00968 \
00973 AVPanScan *pan_scan;\
00974 \
00975 \
00980 int palette_has_changed;\
00981 \
00982 \
00987 int buffer_hints;\
00988 \
00989 \
00994 short *dct_coeff;\
00995 \
00996 \
01002 int8_t *ref_index[2];\
01003 \
01004 \
01015 int64_t reordered_opaque;\
01016 \
01017 \
01022 void *hwaccel_picture_private;\
01023 \
01024 \
01029 int64_t pkt_pts;\
01030 \
01031 \
01036 int64_t pkt_dts;\
01037 \
01038 \
01043 struct AVCodecContext *owner;\
01044 \
01045 \
01050 void *thread_opaque;\
01051 \
01052 \
01057 int64_t best_effort_timestamp;\
01058
01059
01060 #define FF_QSCALE_TYPE_MPEG1 0
01061 #define FF_QSCALE_TYPE_MPEG2 1
01062 #define FF_QSCALE_TYPE_H264 2
01063 #define FF_QSCALE_TYPE_VP56 3
01064
01065 #define FF_BUFFER_TYPE_INTERNAL 1
01066 #define FF_BUFFER_TYPE_USER 2
01067 #define FF_BUFFER_TYPE_SHARED 4
01068 #define FF_BUFFER_TYPE_COPY 8
01069
01070
01071 #define FF_I_TYPE 1
01072 #define FF_P_TYPE 2
01073 #define FF_B_TYPE 3
01074 #define FF_S_TYPE 4
01075 #define FF_SI_TYPE 5
01076 #define FF_SP_TYPE 6
01077 #define FF_BI_TYPE 7
01078
01079 #define FF_BUFFER_HINTS_VALID 0x01 // Buffer hints value is meaningful (if 0 ignore).
01080 #define FF_BUFFER_HINTS_READABLE 0x02 // Codec will read from buffer.
01081 #define FF_BUFFER_HINTS_PRESERVE 0x04 // User must not alter buffer content.
01082 #define FF_BUFFER_HINTS_REUSABLE 0x08 // Codec will reuse the buffer (update).
01083
01084 typedef struct AVPacket {
01094 int64_t pts;
01100 int64_t dts;
01101 uint8_t *data;
01102 int size;
01103 int stream_index;
01104 int flags;
01109 int duration;
01110 void (*destruct)(struct AVPacket *);
01111 void *priv;
01112 int64_t pos;
01113
01131 int64_t convergence_duration;
01132 } AVPacket;
01133 #define AV_PKT_FLAG_KEY 0x0001
01134 #if LIBAVCODEC_VERSION_MAJOR < 53
01135 #define PKT_FLAG_KEY AV_PKT_FLAG_KEY
01136 #endif
01137
01147 typedef struct AVFrame {
01148 FF_COMMON_FRAME
01149 } AVFrame;
01150
01158 typedef struct AVCodecContext {
01163 const AVClass *av_class;
01169 int bit_rate;
01170
01177 int bit_rate_tolerance;
01178
01184 int flags;
01185
01194 int sub_id;
01195
01203 int me_method;
01204
01216 uint8_t *extradata;
01217 int extradata_size;
01218
01227 AVRational time_base;
01228
01229
01237 int width, height;
01238
01239 #define FF_ASPECT_EXTENDED 15
01240
01246 int gop_size;
01247
01255 enum PixelFormat pix_fmt;
01256
01263 int rate_emu;
01264
01288 void (*draw_horiz_band)(struct AVCodecContext *s,
01289 const AVFrame *src, int offset[4],
01290 int y, int type, int height);
01291
01292
01293 int sample_rate;
01294 int channels;
01295
01301 enum AVSampleFormat sample_fmt;
01302
01303
01307 int frame_size;
01308 int frame_number;
01309 #if LIBAVCODEC_VERSION_MAJOR < 53
01310 int real_pict_num;
01311 #endif
01312
01319 int delay;
01320
01321
01322 float qcompress;
01323 float qblur;
01324
01330 int qmin;
01331
01337 int qmax;
01338
01344 int max_qdiff;
01345
01352 int max_b_frames;
01353
01361 float b_quant_factor;
01362
01364 int rc_strategy;
01365 #define FF_RC_STRATEGY_XVID 1
01366
01367 int b_frame_strategy;
01368
01375 int hurry_up;
01376
01377 struct AVCodec *codec;
01378
01379 void *priv_data;
01380
01381 int rtp_payload_size;
01382
01383
01384
01385
01386
01387
01388
01389
01390
01391
01392
01393
01394
01395 void (*rtp_callback)(struct AVCodecContext *avctx, void *data, int size, int mb_nb);
01396
01397
01398 int mv_bits;
01399 int header_bits;
01400 int i_tex_bits;
01401 int p_tex_bits;
01402 int i_count;
01403 int p_count;
01404 int skip_count;
01405 int misc_bits;
01406
01412 int frame_bits;
01413
01419 void *opaque;
01420
01421 char codec_name[32];
01422 enum AVMediaType codec_type;
01423 enum CodecID codec_id;
01424
01438 unsigned int codec_tag;
01439
01445 int workaround_bugs;
01446 #define FF_BUG_AUTODETECT 1
01447 #define FF_BUG_OLD_MSMPEG4 2
01448 #define FF_BUG_XVID_ILACE 4
01449 #define FF_BUG_UMP4 8
01450 #define FF_BUG_NO_PADDING 16
01451 #define FF_BUG_AMV 32
01452 #define FF_BUG_AC_VLC 0
01453 #define FF_BUG_QPEL_CHROMA 64
01454 #define FF_BUG_STD_QPEL 128
01455 #define FF_BUG_QPEL_CHROMA2 256
01456 #define FF_BUG_DIRECT_BLOCKSIZE 512
01457 #define FF_BUG_EDGE 1024
01458 #define FF_BUG_HPEL_CHROMA 2048
01459 #define FF_BUG_DC_CLIP 4096
01460 #define FF_BUG_MS 8192
01461 #define FF_BUG_TRUNCATED 16384
01462
01463
01469 int luma_elim_threshold;
01470
01476 int chroma_elim_threshold;
01477
01490 int strict_std_compliance;
01491 #define FF_COMPLIANCE_VERY_STRICT 2
01492 #define FF_COMPLIANCE_STRICT 1
01493 #define FF_COMPLIANCE_NORMAL 0
01494 #if FF_API_INOFFICIAL
01495 #define FF_COMPLIANCE_INOFFICIAL -1
01496 #endif
01497 #define FF_COMPLIANCE_UNOFFICIAL -1
01498 #define FF_COMPLIANCE_EXPERIMENTAL -2
01499
01500
01505 float b_quant_offset;
01506
01513 int error_recognition;
01514 #define FF_ER_CAREFUL 1
01515 #define FF_ER_COMPLIANT 2
01516 #define FF_ER_AGGRESSIVE 3
01517 #define FF_ER_VERY_AGGRESSIVE 4
01518
01533 int (*get_buffer)(struct AVCodecContext *c, AVFrame *pic);
01534
01544 void (*release_buffer)(struct AVCodecContext *c, AVFrame *pic);
01545
01552 int has_b_frames;
01553
01558 int block_align;
01559
01560 int parse_only;
01561
01562
01563
01569 int mpeg_quant;
01570
01576 char *stats_out;
01577
01584 char *stats_in;
01585
01592 float rc_qsquish;
01593
01594 float rc_qmod_amp;
01595 int rc_qmod_freq;
01596
01602 RcOverride *rc_override;
01603 int rc_override_count;
01604
01610 const char *rc_eq;
01611
01617 int rc_max_rate;
01618
01624 int rc_min_rate;
01625
01631 int rc_buffer_size;
01632 float rc_buffer_aggressivity;
01633
01641 float i_quant_factor;
01642
01648 float i_quant_offset;
01649
01655 float rc_initial_cplx;
01656
01662 int dct_algo;
01663 #define FF_DCT_AUTO 0
01664 #define FF_DCT_FASTINT 1
01665 #define FF_DCT_INT 2
01666 #define FF_DCT_MMX 3
01667 #define FF_DCT_MLIB 4
01668 #define FF_DCT_ALTIVEC 5
01669 #define FF_DCT_FAAN 6
01670
01676 float lumi_masking;
01677
01683 float temporal_cplx_masking;
01684
01690 float spatial_cplx_masking;
01691
01697 float p_masking;
01698
01704 float dark_masking;
01705
01711 int idct_algo;
01712 #define FF_IDCT_AUTO 0
01713 #define FF_IDCT_INT 1
01714 #define FF_IDCT_SIMPLE 2
01715 #define FF_IDCT_SIMPLEMMX 3
01716 #define FF_IDCT_LIBMPEG2MMX 4
01717 #define FF_IDCT_PS2 5
01718 #define FF_IDCT_MLIB 6
01719 #define FF_IDCT_ARM 7
01720 #define FF_IDCT_ALTIVEC 8
01721 #define FF_IDCT_SH4 9
01722 #define FF_IDCT_SIMPLEARM 10
01723 #define FF_IDCT_H264 11
01724 #define FF_IDCT_VP3 12
01725 #define FF_IDCT_IPP 13
01726 #define FF_IDCT_XVIDMMX 14
01727 #define FF_IDCT_CAVS 15
01728 #define FF_IDCT_SIMPLEARMV5TE 16
01729 #define FF_IDCT_SIMPLEARMV6 17
01730 #define FF_IDCT_SIMPLEVIS 18
01731 #define FF_IDCT_WMV2 19
01732 #define FF_IDCT_FAAN 20
01733 #define FF_IDCT_EA 21
01734 #define FF_IDCT_SIMPLENEON 22
01735 #define FF_IDCT_SIMPLEALPHA 23
01736 #define FF_IDCT_BINK 24
01737
01743 int slice_count;
01749 int *slice_offset;
01750
01756 int error_concealment;
01757 #define FF_EC_GUESS_MVS 1
01758 #define FF_EC_DEBLOCK 2
01759
01768 unsigned dsp_mask;
01769
01770 #if FF_API_MM_FLAGS
01771 #define FF_MM_FORCE AV_CPU_FLAG_FORCE
01772 #define FF_MM_MMX AV_CPU_FLAG_MMX
01773 #define FF_MM_3DNOW AV_CPU_FLAG_3DNOW
01774 #define FF_MM_MMXEXT AV_CPU_FLAG_MMX2
01775 #define FF_MM_MMX2 AV_CPU_FLAG_MMX2
01776 #define FF_MM_SSE AV_CPU_FLAG_SSE
01777 #define FF_MM_SSE2 AV_CPU_FLAG_SSE2
01778 #define FF_MM_SSE2SLOW AV_CPU_FLAG_SSE2SLOW
01779 #define FF_MM_3DNOWEXT AV_CPU_FLAG_3DNOWEXT
01780 #define FF_MM_SSE3 AV_CPU_FLAG_SSE3
01781 #define FF_MM_SSE3SLOW AV_CPU_FLAG_SSE3SLOW
01782 #define FF_MM_SSSE3 AV_CPU_FLAG_SSSE3
01783 #define FF_MM_SSE4 AV_CPU_FLAG_SSE4
01784 #define FF_MM_SSE42 AV_CPU_FLAG_SSE42
01785 #define FF_MM_IWMMXT AV_CPU_FLAG_IWMMXT
01786 #define FF_MM_ALTIVEC AV_CPU_FLAG_ALTIVEC
01787 #endif
01788
01794 int bits_per_coded_sample;
01795
01801 int prediction_method;
01802 #define FF_PRED_LEFT 0
01803 #define FF_PRED_PLANE 1
01804 #define FF_PRED_MEDIAN 2
01805
01813 AVRational sample_aspect_ratio;
01814
01820 AVFrame *coded_frame;
01821
01827 int debug;
01828 #define FF_DEBUG_PICT_INFO 1
01829 #define FF_DEBUG_RC 2
01830 #define FF_DEBUG_BITSTREAM 4
01831 #define FF_DEBUG_MB_TYPE 8
01832 #define FF_DEBUG_QP 16
01833 #define FF_DEBUG_MV 32
01834 #define FF_DEBUG_DCT_COEFF 0x00000040
01835 #define FF_DEBUG_SKIP 0x00000080
01836 #define FF_DEBUG_STARTCODE 0x00000100
01837 #define FF_DEBUG_PTS 0x00000200
01838 #define FF_DEBUG_ER 0x00000400
01839 #define FF_DEBUG_MMCO 0x00000800
01840 #define FF_DEBUG_BUGS 0x00001000
01841 #define FF_DEBUG_VIS_QP 0x00002000
01842 #define FF_DEBUG_VIS_MB_TYPE 0x00004000
01843 #define FF_DEBUG_BUFFERS 0x00008000
01844 #define FF_DEBUG_THREADS 0x00010000
01845
01851 int debug_mv;
01852 #define FF_DEBUG_VIS_MV_P_FOR 0x00000001 //visualize forward predicted MVs of P frames
01853 #define FF_DEBUG_VIS_MV_B_FOR 0x00000002 //visualize forward predicted MVs of B frames
01854 #define FF_DEBUG_VIS_MV_B_BACK 0x00000004 //visualize backward predicted MVs of B frames
01855
01861 uint64_t error[4];
01862
01868 int mb_qmin;
01869
01875 int mb_qmax;
01876
01882 int me_cmp;
01888 int me_sub_cmp;
01894 int mb_cmp;
01900 int ildct_cmp;
01901 #define FF_CMP_SAD 0
01902 #define FF_CMP_SSE 1
01903 #define FF_CMP_SATD 2
01904 #define FF_CMP_DCT 3
01905 #define FF_CMP_PSNR 4
01906 #define FF_CMP_BIT 5
01907 #define FF_CMP_RD 6
01908 #define FF_CMP_ZERO 7
01909 #define FF_CMP_VSAD 8
01910 #define FF_CMP_VSSE 9
01911 #define FF_CMP_NSSE 10
01912 #define FF_CMP_W53 11
01913 #define FF_CMP_W97 12
01914 #define FF_CMP_DCTMAX 13
01915 #define FF_CMP_DCT264 14
01916 #define FF_CMP_CHROMA 256
01917
01923 int dia_size;
01924
01930 int last_predictor_count;
01931
01937 int pre_me;
01938
01944 int me_pre_cmp;
01945
01951 int pre_dia_size;
01952
01958 int me_subpel_quality;
01959
01969 enum PixelFormat (*get_format)(struct AVCodecContext *s, const enum PixelFormat * fmt);
01970
01979 int dtg_active_format;
01980 #define FF_DTG_AFD_SAME 8
01981 #define FF_DTG_AFD_4_3 9
01982 #define FF_DTG_AFD_16_9 10
01983 #define FF_DTG_AFD_14_9 11
01984 #define FF_DTG_AFD_4_3_SP_14_9 13
01985 #define FF_DTG_AFD_16_9_SP_14_9 14
01986 #define FF_DTG_AFD_SP_4_3 15
01987
01995 int me_range;
01996
02002 int intra_quant_bias;
02003 #define FF_DEFAULT_QUANT_BIAS 999999
02004
02010 int inter_quant_bias;
02011
02018 int color_table_id;
02019
02024 int internal_buffer_count;
02025
02030 void *internal_buffer;
02031
02038 int global_quality;
02039
02040 #define FF_CODER_TYPE_VLC 0
02041 #define FF_CODER_TYPE_AC 1
02042 #define FF_CODER_TYPE_RAW 2
02043 #define FF_CODER_TYPE_RLE 3
02044 #define FF_CODER_TYPE_DEFLATE 4
02045
02050 int coder_type;
02051
02057 int context_model;
02058 #if 0
02059
02064 uint8_t * (*realloc)(struct AVCodecContext *s, uint8_t *buf, int buf_size);
02065 #endif
02066
02072 int slice_flags;
02073 #define SLICE_FLAG_CODED_ORDER 0x0001
02074 #define SLICE_FLAG_ALLOW_FIELD 0x0002
02075 #define SLICE_FLAG_ALLOW_PLANE 0x0004
02076
02077
02082 int xvmc_acceleration;
02083
02089 int mb_decision;
02090 #define FF_MB_DECISION_SIMPLE 0
02091 #define FF_MB_DECISION_BITS 1
02092 #define FF_MB_DECISION_RD 2
02093
02094
02099 uint16_t *intra_matrix;
02100
02106 uint16_t *inter_matrix;
02107
02114 unsigned int stream_codec_tag;
02115
02122 int scenechange_threshold;
02123
02129 int lmin;
02130
02136 int lmax;
02137
02138 #if FF_API_PALETTE_CONTROL
02139
02144 struct AVPaletteControl *palctrl;
02145 #endif
02146
02152 int noise_reduction;
02153
02166 int (*reget_buffer)(struct AVCodecContext *c, AVFrame *pic);
02167
02173 int rc_initial_buffer_occupancy;
02174
02180 int inter_threshold;
02181
02187 int flags2;
02188
02194 int error_rate;
02195
02201 int antialias_algo;
02202 #define FF_AA_AUTO 0
02203 #define FF_AA_FASTINT 1 //not implemented yet
02204 #define FF_AA_INT 2
02205 #define FF_AA_FLOAT 3
02206
02211 int quantizer_noise_shaping;
02212
02219 int thread_count;
02220
02230 int (*execute)(struct AVCodecContext *c, int (*func)(struct AVCodecContext *c2, void *arg), void *arg2, int *ret, int count, int size);
02231
02238 void *thread_opaque;
02239
02247 int me_threshold;
02248
02254 int mb_threshold;
02255
02261 int intra_dc_precision;
02262
02268 int nsse_weight;
02269
02275 int skip_top;
02276
02282 int skip_bottom;
02283
02289 int profile;
02290 #define FF_PROFILE_UNKNOWN -99
02291 #define FF_PROFILE_RESERVED -100
02292
02293 #define FF_PROFILE_AAC_MAIN 0
02294 #define FF_PROFILE_AAC_LOW 1
02295 #define FF_PROFILE_AAC_SSR 2
02296 #define FF_PROFILE_AAC_LTP 3
02297
02298 #define FF_PROFILE_DTS 20
02299 #define FF_PROFILE_DTS_ES 30
02300 #define FF_PROFILE_DTS_96_24 40
02301 #define FF_PROFILE_DTS_HD_HRA 50
02302 #define FF_PROFILE_DTS_HD_MA 60
02303
02304 #define FF_PROFILE_MPEG2_422 0
02305 #define FF_PROFILE_MPEG2_HIGH 1
02306 #define FF_PROFILE_MPEG2_SS 2
02307 #define FF_PROFILE_MPEG2_SNR_SCALABLE 3
02308 #define FF_PROFILE_MPEG2_MAIN 4
02309 #define FF_PROFILE_MPEG2_SIMPLE 5
02310
02311 #define FF_PROFILE_H264_CONSTRAINED (1<<9) // 8+1; constraint_set1_flag
02312 #define FF_PROFILE_H264_INTRA (1<<11) // 8+3; constraint_set3_flag
02313
02314 #define FF_PROFILE_H264_BASELINE 66
02315 #define FF_PROFILE_H264_CONSTRAINED_BASELINE (66|FF_PROFILE_H264_CONSTRAINED)
02316 #define FF_PROFILE_H264_MAIN 77
02317 #define FF_PROFILE_H264_EXTENDED 88
02318 #define FF_PROFILE_H264_HIGH 100
02319 #define FF_PROFILE_H264_HIGH_10 110
02320 #define FF_PROFILE_H264_HIGH_10_INTRA (110|FF_PROFILE_H264_INTRA)
02321 #define FF_PROFILE_H264_HIGH_422 122
02322 #define FF_PROFILE_H264_HIGH_422_INTRA (122|FF_PROFILE_H264_INTRA)
02323 #define FF_PROFILE_H264_HIGH_444 144
02324 #define FF_PROFILE_H264_HIGH_444_PREDICTIVE 244
02325 #define FF_PROFILE_H264_HIGH_444_INTRA (244|FF_PROFILE_H264_INTRA)
02326 #define FF_PROFILE_H264_CAVLC_444 44
02327
02328 #define FF_PROFILE_VC1_SIMPLE 0
02329 #define FF_PROFILE_VC1_MAIN 1
02330 #define FF_PROFILE_VC1_COMPLEX 2
02331 #define FF_PROFILE_VC1_ADVANCED 3
02332
02338 int level;
02339 #define FF_LEVEL_UNKNOWN -99
02340
02346 int lowres;
02347
02354 int coded_width, coded_height;
02355
02361 int frame_skip_threshold;
02362
02368 int frame_skip_factor;
02369
02375 int frame_skip_exp;
02376
02382 int frame_skip_cmp;
02383
02390 float border_masking;
02391
02397 int mb_lmin;
02398
02404 int mb_lmax;
02405
02411 int me_penalty_compensation;
02412
02418 enum AVDiscard skip_loop_filter;
02419
02425 enum AVDiscard skip_idct;
02426
02432 enum AVDiscard skip_frame;
02433
02439 int bidir_refine;
02440
02446 int brd_scale;
02447
02453 float crf;
02454
02460 int cqp;
02461
02467 int keyint_min;
02468
02474 int refs;
02475
02481 int chromaoffset;
02482
02488 int bframebias;
02489
02495 int trellis;
02496
02502 float complexityblur;
02503
02510 int deblockalpha;
02511
02518 int deblockbeta;
02519
02525 int partitions;
02526 #define X264_PART_I4X4 0x001
02527 #define X264_PART_I8X8 0x002
02528 #define X264_PART_P8X8 0x010
02529 #define X264_PART_P4X4 0x020
02530 #define X264_PART_B8X8 0x100
02531
02537 int directpred;
02538
02544 int cutoff;
02545
02551 int scenechange_factor;
02552
02559 int mv0_threshold;
02560
02566 int b_sensitivity;
02567
02572 int compression_level;
02573 #define FF_COMPRESSION_DEFAULT -1
02574
02575 #if FF_API_USE_LPC
02576
02582 int use_lpc;
02583 #endif
02584
02590 int lpc_coeff_precision;
02591
02596 int min_prediction_order;
02597
02602 int max_prediction_order;
02603
02609 int prediction_order_method;
02610
02615 int min_partition_order;
02616
02621 int max_partition_order;
02622
02628 int64_t timecode_frame_start;
02629
02630 #if LIBAVCODEC_VERSION_MAJOR < 53
02631
02637 int request_channels;
02638 #endif
02639
02646 float drc_scale;
02647
02655 int64_t reordered_opaque;
02656
02663 int bits_per_raw_sample;
02664
02670 int64_t channel_layout;
02671
02677 int64_t request_channel_layout;
02678
02684 float rc_max_available_vbv_use;
02685
02691 float rc_min_vbv_overflow_use;
02692
02698 struct AVHWAccel *hwaccel;
02699
02707 int ticks_per_frame;
02708
02719 void *hwaccel_context;
02720
02726 enum AVColorPrimaries color_primaries;
02727
02733 enum AVColorTransferCharacteristic color_trc;
02734
02740 enum AVColorSpace colorspace;
02741
02747 enum AVColorRange color_range;
02748
02754 enum AVChromaLocation chroma_sample_location;
02755
02774 int (*execute2)(struct AVCodecContext *c, int (*func)(struct AVCodecContext *c2, void *arg, int jobnr, int threadnr), void *arg2, int *ret, int count);
02775
02784 int weighted_p_pred;
02785
02794 int aq_mode;
02795
02802 float aq_strength;
02803
02810 float psy_rd;
02811
02818 float psy_trellis;
02819
02826 int rc_lookahead;
02827
02835 float crf_max;
02836
02837 int log_level_offset;
02838
02844 enum AVLPCType lpc_type;
02845
02851 int lpc_passes;
02852
02860 int slices;
02861
02870 uint8_t *subtitle_header;
02871 int subtitle_header_size;
02872
02880 AVPacket *pkt;
02881
02889 int is_copy;
02890
02899 int thread_type;
02900 #define FF_THREAD_FRAME 1 //< Decode more than one frame at once
02901 #define FF_THREAD_SLICE 2 //< Decode more than one part of a single frame at once
02902
02908 int active_thread_type;
02909
02918 int thread_safe_callbacks;
02919
02926 uint64_t vbv_delay;
02927
02933 int64_t pts_correction_num_faulty_pts;
02934 int64_t pts_correction_num_faulty_dts;
02935 int64_t pts_correction_last_pts;
02936 int64_t pts_correction_last_dts;
02937
02938 } AVCodecContext;
02939
02943 typedef struct AVProfile {
02944 int profile;
02945 const char *name;
02946 } AVProfile;
02947
02951 typedef struct AVCodec {
02958 const char *name;
02959 enum AVMediaType type;
02960 enum CodecID id;
02961 int priv_data_size;
02962 int (*init)(AVCodecContext *);
02963 int (*encode)(AVCodecContext *, uint8_t *buf, int buf_size, void *data);
02964 int (*close)(AVCodecContext *);
02965 int (*decode)(AVCodecContext *, void *outdata, int *outdata_size, AVPacket *avpkt);
02970 int capabilities;
02971 struct AVCodec *next;
02976 void (*flush)(AVCodecContext *);
02977 const AVRational *supported_framerates;
02978 const enum PixelFormat *pix_fmts;
02979
02983 const char *long_name;
02984 const int *supported_samplerates;
02985 const enum AVSampleFormat *sample_fmts;
02986 const int64_t *channel_layouts;
02987 uint8_t max_lowres;
02988
02989 AVClass *priv_class;
02990
02991 const AVProfile *profiles;
02992
03002 int (*init_thread_copy)(AVCodecContext *);
03010 int (*update_thread_context)(AVCodecContext *dst, const AVCodecContext *src);
03012 } AVCodec;
03013
03017 typedef struct AVHWAccel {
03023 const char *name;
03024
03030 enum AVMediaType type;
03031
03037 enum CodecID id;
03038
03044 enum PixelFormat pix_fmt;
03045
03050 int capabilities;
03051
03052 struct AVHWAccel *next;
03053
03068 int (*start_frame)(AVCodecContext *avctx, const uint8_t *buf, uint32_t buf_size);
03069
03081 int (*decode_slice)(AVCodecContext *avctx, const uint8_t *buf, uint32_t buf_size);
03082
03092 int (*end_frame)(AVCodecContext *avctx);
03093
03101 int priv_data_size;
03102 } AVHWAccel;
03103
03108 typedef struct AVPicture {
03109 uint8_t *data[4];
03110 int linesize[4];
03111 } AVPicture;
03112
03113 #if FF_API_PALETTE_CONTROL
03114
03122 #define AVPALETTE_SIZE 1024
03123 #define AVPALETTE_COUNT 256
03124 typedef struct AVPaletteControl {
03125
03126
03127
03128 int palette_changed;
03129
03130
03131
03132
03133
03134 unsigned int palette[AVPALETTE_COUNT];
03135
03136 } AVPaletteControl attribute_deprecated;
03137 #endif
03138
03139 enum AVSubtitleType {
03140 SUBTITLE_NONE,
03141
03142 SUBTITLE_BITMAP,
03143
03148 SUBTITLE_TEXT,
03149
03154 SUBTITLE_ASS,
03155 };
03156
03157 typedef struct AVSubtitleRect {
03158 int x;
03159 int y;
03160 int w;
03161 int h;
03162 int nb_colors;
03163
03168 AVPicture pict;
03169 enum AVSubtitleType type;
03170
03171 char *text;
03172
03178 char *ass;
03179 } AVSubtitleRect;
03180
03181 typedef struct AVSubtitle {
03182 uint16_t format;
03183 uint32_t start_display_time;
03184 uint32_t end_display_time;
03185 unsigned num_rects;
03186 AVSubtitleRect **rects;
03187 int64_t pts;
03188 } AVSubtitle;
03189
03190
03191
03195 attribute_deprecated void av_destruct_packet_nofree(AVPacket *pkt);
03196
03200 void av_destruct_packet(AVPacket *pkt);
03201
03207 void av_init_packet(AVPacket *pkt);
03208
03217 int av_new_packet(AVPacket *pkt, int size);
03218
03225 void av_shrink_packet(AVPacket *pkt, int size);
03226
03233 int av_grow_packet(AVPacket *pkt, int grow_by);
03234
03239 int av_dup_packet(AVPacket *pkt);
03240
03246 void av_free_packet(AVPacket *pkt);
03247
03248
03249
03250 struct ReSampleContext;
03251 struct AVResampleContext;
03252
03253 typedef struct ReSampleContext ReSampleContext;
03254
03255 #if FF_API_AUDIO_OLD
03256
03259 attribute_deprecated ReSampleContext *audio_resample_init(int output_channels, int input_channels,
03260 int output_rate, int input_rate);
03261 #endif
03262
03279 ReSampleContext *av_audio_resample_init(int output_channels, int input_channels,
03280 int output_rate, int input_rate,
03281 enum AVSampleFormat sample_fmt_out,
03282 enum AVSampleFormat sample_fmt_in,
03283 int filter_length, int log2_phase_count,
03284 int linear, double cutoff);
03285
03286 int audio_resample(ReSampleContext *s, short *output, short *input, int nb_samples);
03287
03294 void audio_resample_close(ReSampleContext *s);
03295
03296
03306 struct AVResampleContext *av_resample_init(int out_rate, int in_rate, int filter_length, int log2_phase_count, int linear, double cutoff);
03307
03317 int av_resample(struct AVResampleContext *c, short *dst, short *src, int *consumed, int src_size, int dst_size, int update_ctx);
03318
03319
03332 void av_resample_compensate(struct AVResampleContext *c, int sample_delta, int compensation_distance);
03333 void av_resample_close(struct AVResampleContext *c);
03334
03344 int avpicture_alloc(AVPicture *picture, enum PixelFormat pix_fmt, int width, int height);
03345
03351 void avpicture_free(AVPicture *picture);
03352
03370 int avpicture_fill(AVPicture *picture, uint8_t *ptr,
03371 enum PixelFormat pix_fmt, int width, int height);
03372 int avpicture_layout(const AVPicture* src, enum PixelFormat pix_fmt, int width, int height,
03373 unsigned char *dest, int dest_size);
03374
03387 int avpicture_get_size(enum PixelFormat pix_fmt, int width, int height);
03388 void avcodec_get_chroma_sub_sample(enum PixelFormat pix_fmt, int *h_shift, int *v_shift);
03389 const char *avcodec_get_pix_fmt_name(enum PixelFormat pix_fmt);
03390 void avcodec_set_dimensions(AVCodecContext *s, int width, int height);
03391
03392 #if LIBAVCODEC_VERSION_MAJOR < 53
03393
03406 attribute_deprecated enum PixelFormat avcodec_get_pix_fmt(const char* name);
03407 #endif
03408
03414 unsigned int avcodec_pix_fmt_to_codec_tag(enum PixelFormat pix_fmt);
03415
03423 size_t av_get_codec_tag_string(char *buf, size_t buf_size, unsigned int codec_tag);
03424
03425 #define FF_LOSS_RESOLUTION 0x0001
03426 #define FF_LOSS_DEPTH 0x0002
03427 #define FF_LOSS_COLORSPACE 0x0004
03428 #define FF_LOSS_ALPHA 0x0008
03429 #define FF_LOSS_COLORQUANT 0x0010
03430 #define FF_LOSS_CHROMA 0x0020
03449 int avcodec_get_pix_fmt_loss(enum PixelFormat dst_pix_fmt, enum PixelFormat src_pix_fmt,
03450 int has_alpha);
03451
03474 enum PixelFormat avcodec_find_best_pix_fmt(int64_t pix_fmt_mask, enum PixelFormat src_pix_fmt,
03475 int has_alpha, int *loss_ptr);
03476
03477 #if LIBAVCODEC_VERSION_MAJOR < 53
03478
03481 attribute_deprecated
03482 void avcodec_pix_fmt_string (char *buf, int buf_size, enum PixelFormat pix_fmt);
03483 #endif
03484
03485 #define FF_ALPHA_TRANSP 0x0001
03486 #define FF_ALPHA_SEMI_TRANSP 0x0002
03487
03492 int img_get_alpha_info(const AVPicture *src,
03493 enum PixelFormat pix_fmt, int width, int height);
03494
03495
03496
03497 int avpicture_deinterlace(AVPicture *dst, const AVPicture *src,
03498 enum PixelFormat pix_fmt, int width, int height);
03499
03500
03501
03507 AVCodec *av_codec_next(AVCodec *c);
03508
03512 unsigned avcodec_version(void);
03513
03517 const char *avcodec_configuration(void);
03518
03522 const char *avcodec_license(void);
03523
03530 void avcodec_init(void);
03531
03532 #if LIBAVCODEC_VERSION_MAJOR < 53
03533
03536 attribute_deprecated void register_avcodec(AVCodec *codec);
03537 #endif
03538
03544 void avcodec_register(AVCodec *codec);
03545
03552 AVCodec *avcodec_find_encoder(enum CodecID id);
03553
03560 AVCodec *avcodec_find_encoder_by_name(const char *name);
03561
03568 AVCodec *avcodec_find_decoder(enum CodecID id);
03569
03576 AVCodec *avcodec_find_decoder_by_name(const char *name);
03577 void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode);
03578
03586 const char *av_get_profile_name(const AVCodec *codec, int profile);
03587
03593 void avcodec_get_context_defaults(AVCodecContext *s);
03594
03597 void avcodec_get_context_defaults2(AVCodecContext *s, enum AVMediaType);
03598
03601 int avcodec_get_context_defaults3(AVCodecContext *s, AVCodec *codec);
03602
03610 AVCodecContext *avcodec_alloc_context(void);
03611
03614 AVCodecContext *avcodec_alloc_context2(enum AVMediaType);
03615
03618 AVCodecContext *avcodec_alloc_context3(AVCodec *codec);
03619
03631 int avcodec_copy_context(AVCodecContext *dest, const AVCodecContext *src);
03632
03638 void avcodec_get_frame_defaults(AVFrame *pic);
03639
03647 AVFrame *avcodec_alloc_frame(void);
03648
03649 int avcodec_default_get_buffer(AVCodecContext *s, AVFrame *pic);
03650 void avcodec_default_release_buffer(AVCodecContext *s, AVFrame *pic);
03651 int avcodec_default_reget_buffer(AVCodecContext *s, AVFrame *pic);
03652
03660 unsigned avcodec_get_edge_width(void);
03670 void avcodec_align_dimensions(AVCodecContext *s, int *width, int *height);
03680 void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height,
03681 int linesize_align[4]);
03682
03683 #if LIBAVCODEC_VERSION_MAJOR < 53
03684
03687 attribute_deprecated
03688 int avcodec_check_dimensions(void *av_log_ctx, unsigned int w, unsigned int h);
03689 #endif
03690
03691 enum PixelFormat avcodec_default_get_format(struct AVCodecContext *s, const enum PixelFormat * fmt);
03692
03693 #if LIBAVCODEC_VERSION_MAJOR < 53
03694
03697 attribute_deprecated
03698 int avcodec_thread_init(AVCodecContext *s, int thread_count);
03699 void avcodec_thread_free(AVCodecContext *s);
03700 #endif
03701 int avcodec_default_execute(AVCodecContext *c, int (*func)(AVCodecContext *c2, void *arg2),void *arg, int *ret, int count, int size);
03702 int avcodec_default_execute2(AVCodecContext *c, int (*func)(AVCodecContext *c2, void *arg2, int, int),void *arg, int *ret, int count);
03703
03704
03732 int avcodec_open(AVCodecContext *avctx, AVCodec *codec);
03733
03734 #if FF_API_AUDIO_OLD
03735
03748 attribute_deprecated int avcodec_decode_audio2(AVCodecContext *avctx, int16_t *samples,
03749 int *frame_size_ptr,
03750 const uint8_t *buf, int buf_size);
03751 #endif
03752
03792 int avcodec_decode_audio3(AVCodecContext *avctx, int16_t *samples,
03793 int *frame_size_ptr,
03794 AVPacket *avpkt);
03795
03796 #if FF_API_VIDEO_OLD
03797
03810 attribute_deprecated int avcodec_decode_video(AVCodecContext *avctx, AVFrame *picture,
03811 int *got_picture_ptr,
03812 const uint8_t *buf, int buf_size);
03813 #endif
03814
03855 int avcodec_decode_video2(AVCodecContext *avctx, AVFrame *picture,
03856 int *got_picture_ptr,
03857 AVPacket *avpkt);
03858
03859 #if FF_API_SUBTITLE_OLD
03860
03861
03862
03863 attribute_deprecated int avcodec_decode_subtitle(AVCodecContext *avctx, AVSubtitle *sub,
03864 int *got_sub_ptr,
03865 const uint8_t *buf, int buf_size);
03866 #endif
03867
03884 int avcodec_decode_subtitle2(AVCodecContext *avctx, AVSubtitle *sub,
03885 int *got_sub_ptr,
03886 AVPacket *avpkt);
03887
03893 void avsubtitle_free(AVSubtitle *sub);
03894
03895 int avcodec_parse_frame(AVCodecContext *avctx, uint8_t **pdata,
03896 int *data_size_ptr,
03897 uint8_t *buf, int buf_size);
03898
03918 int avcodec_encode_audio(AVCodecContext *avctx, uint8_t *buf, int buf_size,
03919 const short *samples);
03920
03933 int avcodec_encode_video(AVCodecContext *avctx, uint8_t *buf, int buf_size,
03934 const AVFrame *pict);
03935 int avcodec_encode_subtitle(AVCodecContext *avctx, uint8_t *buf, int buf_size,
03936 const AVSubtitle *sub);
03937
03938 int avcodec_close(AVCodecContext *avctx);
03939
03950 void avcodec_register_all(void);
03951
03955 void avcodec_flush_buffers(AVCodecContext *avctx);
03956
03957 void avcodec_default_free_buffers(AVCodecContext *s);
03958
03959
03960
03967 char av_get_pict_type_char(int pict_type);
03968
03975 int av_get_bits_per_sample(enum CodecID codec_id);
03976
03977 #if FF_API_OLD_SAMPLE_FMT
03978
03981 attribute_deprecated
03982 int av_get_bits_per_sample_format(enum AVSampleFormat sample_fmt);
03983 #endif
03984
03985
03986 typedef struct AVCodecParserContext {
03987 void *priv_data;
03988 struct AVCodecParser *parser;
03989 int64_t frame_offset;
03990 int64_t cur_offset;
03991
03992 int64_t next_frame_offset;
03993
03994 int pict_type;
04004 int repeat_pict;
04005 int64_t pts;
04006 int64_t dts;
04007
04008
04009 int64_t last_pts;
04010 int64_t last_dts;
04011 int fetch_timestamp;
04012
04013 #define AV_PARSER_PTS_NB 4
04014 int cur_frame_start_index;
04015 int64_t cur_frame_offset[AV_PARSER_PTS_NB];
04016 int64_t cur_frame_pts[AV_PARSER_PTS_NB];
04017 int64_t cur_frame_dts[AV_PARSER_PTS_NB];
04018
04019 int flags;
04020 #define PARSER_FLAG_COMPLETE_FRAMES 0x0001
04021 #define PARSER_FLAG_ONCE 0x0002
04023 #define PARSER_FLAG_FETCHED_OFFSET 0x0004
04024
04025 int64_t offset;
04026 int64_t cur_frame_end[AV_PARSER_PTS_NB];
04027
04034 int key_frame;
04035
04053 int64_t convergence_duration;
04054
04055
04065 int dts_sync_point;
04066
04080 int dts_ref_dts_delta;
04081
04094 int pts_dts_delta;
04095
04101 int64_t cur_frame_pos[AV_PARSER_PTS_NB];
04102
04106 int64_t pos;
04107
04111 int64_t last_pos;
04112 } AVCodecParserContext;
04113
04114 typedef struct AVCodecParser {
04115 int codec_ids[5];
04116 int priv_data_size;
04117 int (*parser_init)(AVCodecParserContext *s);
04118 int (*parser_parse)(AVCodecParserContext *s,
04119 AVCodecContext *avctx,
04120 const uint8_t **poutbuf, int *poutbuf_size,
04121 const uint8_t *buf, int buf_size);
04122 void (*parser_close)(AVCodecParserContext *s);
04123 int (*split)(AVCodecContext *avctx, const uint8_t *buf, int buf_size);
04124 struct AVCodecParser *next;
04125 } AVCodecParser;
04126
04127 AVCodecParser *av_parser_next(AVCodecParser *c);
04128
04129 void av_register_codec_parser(AVCodecParser *parser);
04130 AVCodecParserContext *av_parser_init(int codec_id);
04131
04132 #if LIBAVCODEC_VERSION_MAJOR < 53
04133 attribute_deprecated
04134 int av_parser_parse(AVCodecParserContext *s,
04135 AVCodecContext *avctx,
04136 uint8_t **poutbuf, int *poutbuf_size,
04137 const uint8_t *buf, int buf_size,
04138 int64_t pts, int64_t dts);
04139 #endif
04140
04169 int av_parser_parse2(AVCodecParserContext *s,
04170 AVCodecContext *avctx,
04171 uint8_t **poutbuf, int *poutbuf_size,
04172 const uint8_t *buf, int buf_size,
04173 int64_t pts, int64_t dts,
04174 int64_t pos);
04175
04176 int av_parser_change(AVCodecParserContext *s,
04177 AVCodecContext *avctx,
04178 uint8_t **poutbuf, int *poutbuf_size,
04179 const uint8_t *buf, int buf_size, int keyframe);
04180 void av_parser_close(AVCodecParserContext *s);
04181
04182
04183 typedef struct AVBitStreamFilterContext {
04184 void *priv_data;
04185 struct AVBitStreamFilter *filter;
04186 AVCodecParserContext *parser;
04187 struct AVBitStreamFilterContext *next;
04188 } AVBitStreamFilterContext;
04189
04190
04191 typedef struct AVBitStreamFilter {
04192 const char *name;
04193 int priv_data_size;
04194 int (*filter)(AVBitStreamFilterContext *bsfc,
04195 AVCodecContext *avctx, const char *args,
04196 uint8_t **poutbuf, int *poutbuf_size,
04197 const uint8_t *buf, int buf_size, int keyframe);
04198 void (*close)(AVBitStreamFilterContext *bsfc);
04199 struct AVBitStreamFilter *next;
04200 } AVBitStreamFilter;
04201
04202 void av_register_bitstream_filter(AVBitStreamFilter *bsf);
04203 AVBitStreamFilterContext *av_bitstream_filter_init(const char *name);
04204 int av_bitstream_filter_filter(AVBitStreamFilterContext *bsfc,
04205 AVCodecContext *avctx, const char *args,
04206 uint8_t **poutbuf, int *poutbuf_size,
04207 const uint8_t *buf, int buf_size, int keyframe);
04208 void av_bitstream_filter_close(AVBitStreamFilterContext *bsf);
04209
04210 AVBitStreamFilter *av_bitstream_filter_next(AVBitStreamFilter *f);
04211
04212
04213
04219 void *av_fast_realloc(void *ptr, unsigned int *size, FF_INTERNALC_MEM_TYPE min_size);
04220
04233 void av_fast_malloc(void *ptr, unsigned int *size, FF_INTERNALC_MEM_TYPE min_size);
04234
04235 #if LIBAVCODEC_VERSION_MAJOR < 53
04236
04239 attribute_deprecated
04240 void av_picture_data_copy(uint8_t *dst_data[4], int dst_linesize[4],
04241 uint8_t *src_data[4], int src_linesize[4],
04242 enum PixelFormat pix_fmt, int width, int height);
04243 #endif
04244
04248 void av_picture_copy(AVPicture *dst, const AVPicture *src,
04249 enum PixelFormat pix_fmt, int width, int height);
04250
04254 int av_picture_crop(AVPicture *dst, const AVPicture *src,
04255 enum PixelFormat pix_fmt, int top_band, int left_band);
04256
04260 int av_picture_pad(AVPicture *dst, const AVPicture *src, int height, int width, enum PixelFormat pix_fmt,
04261 int padtop, int padbottom, int padleft, int padright, int *color);
04262
04270 unsigned int av_xiphlacing(unsigned char *s, unsigned int v);
04271
04272 #if LIBAVCODEC_VERSION_MAJOR < 53
04273
04278 attribute_deprecated int av_parse_video_frame_size(int *width_ptr, int *height_ptr, const char *str);
04279
04285 attribute_deprecated int av_parse_video_frame_rate(AVRational *frame_rate, const char *str);
04286 #endif
04287
04300 void av_log_missing_feature(void *avc, const char *feature, int want_sample);
04301
04310 void av_log_ask_for_sample(void *avc, const char *msg);
04311
04315 void av_register_hwaccel(AVHWAccel *hwaccel);
04316
04322 AVHWAccel *av_hwaccel_next(AVHWAccel *hwaccel);
04323
04324
04328 enum AVLockOp {
04329 AV_LOCK_CREATE,
04330 AV_LOCK_OBTAIN,
04331 AV_LOCK_RELEASE,
04332 AV_LOCK_DESTROY,
04333 };
04334
04348 int av_lockmgr_register(int (*cb)(void **mutex, enum AVLockOp op));
04349
04350 #endif