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 113
00036 #define LIBAVCODEC_VERSION_MICRO 2
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
00265
00266 CODEC_ID_PCM_S16LE= 0x10000,
00267 CODEC_ID_PCM_S16BE,
00268 CODEC_ID_PCM_U16LE,
00269 CODEC_ID_PCM_U16BE,
00270 CODEC_ID_PCM_S8,
00271 CODEC_ID_PCM_U8,
00272 CODEC_ID_PCM_MULAW,
00273 CODEC_ID_PCM_ALAW,
00274 CODEC_ID_PCM_S32LE,
00275 CODEC_ID_PCM_S32BE,
00276 CODEC_ID_PCM_U32LE,
00277 CODEC_ID_PCM_U32BE,
00278 CODEC_ID_PCM_S24LE,
00279 CODEC_ID_PCM_S24BE,
00280 CODEC_ID_PCM_U24LE,
00281 CODEC_ID_PCM_U24BE,
00282 CODEC_ID_PCM_S24DAUD,
00283 CODEC_ID_PCM_ZORK,
00284 CODEC_ID_PCM_S16LE_PLANAR,
00285 CODEC_ID_PCM_DVD,
00286 CODEC_ID_PCM_F32BE,
00287 CODEC_ID_PCM_F32LE,
00288 CODEC_ID_PCM_F64BE,
00289 CODEC_ID_PCM_F64LE,
00290 CODEC_ID_PCM_BLURAY,
00291 CODEC_ID_PCM_LXF,
00292
00293
00294 CODEC_ID_ADPCM_IMA_QT= 0x11000,
00295 CODEC_ID_ADPCM_IMA_WAV,
00296 CODEC_ID_ADPCM_IMA_DK3,
00297 CODEC_ID_ADPCM_IMA_DK4,
00298 CODEC_ID_ADPCM_IMA_WS,
00299 CODEC_ID_ADPCM_IMA_SMJPEG,
00300 CODEC_ID_ADPCM_MS,
00301 CODEC_ID_ADPCM_4XM,
00302 CODEC_ID_ADPCM_XA,
00303 CODEC_ID_ADPCM_ADX,
00304 CODEC_ID_ADPCM_EA,
00305 CODEC_ID_ADPCM_G726,
00306 CODEC_ID_ADPCM_CT,
00307 CODEC_ID_ADPCM_SWF,
00308 CODEC_ID_ADPCM_YAMAHA,
00309 CODEC_ID_ADPCM_SBPRO_4,
00310 CODEC_ID_ADPCM_SBPRO_3,
00311 CODEC_ID_ADPCM_SBPRO_2,
00312 CODEC_ID_ADPCM_THP,
00313 CODEC_ID_ADPCM_IMA_AMV,
00314 CODEC_ID_ADPCM_EA_R1,
00315 CODEC_ID_ADPCM_EA_R3,
00316 CODEC_ID_ADPCM_EA_R2,
00317 CODEC_ID_ADPCM_IMA_EA_SEAD,
00318 CODEC_ID_ADPCM_IMA_EA_EACS,
00319 CODEC_ID_ADPCM_EA_XAS,
00320 CODEC_ID_ADPCM_EA_MAXIS_XA,
00321 CODEC_ID_ADPCM_IMA_ISS,
00322 CODEC_ID_ADPCM_G722,
00323
00324
00325 CODEC_ID_AMR_NB= 0x12000,
00326 CODEC_ID_AMR_WB,
00327
00328
00329 CODEC_ID_RA_144= 0x13000,
00330 CODEC_ID_RA_288,
00331
00332
00333 CODEC_ID_ROQ_DPCM= 0x14000,
00334 CODEC_ID_INTERPLAY_DPCM,
00335 CODEC_ID_XAN_DPCM,
00336 CODEC_ID_SOL_DPCM,
00337
00338
00339 CODEC_ID_MP2= 0x15000,
00340 CODEC_ID_MP3,
00341 CODEC_ID_AAC,
00342 CODEC_ID_AC3,
00343 CODEC_ID_DTS,
00344 CODEC_ID_VORBIS,
00345 CODEC_ID_DVAUDIO,
00346 CODEC_ID_WMAV1,
00347 CODEC_ID_WMAV2,
00348 CODEC_ID_MACE3,
00349 CODEC_ID_MACE6,
00350 CODEC_ID_VMDAUDIO,
00351 CODEC_ID_SONIC,
00352 CODEC_ID_SONIC_LS,
00353 CODEC_ID_FLAC,
00354 CODEC_ID_MP3ADU,
00355 CODEC_ID_MP3ON4,
00356 CODEC_ID_SHORTEN,
00357 CODEC_ID_ALAC,
00358 CODEC_ID_WESTWOOD_SND1,
00359 CODEC_ID_GSM,
00360 CODEC_ID_QDM2,
00361 CODEC_ID_COOK,
00362 CODEC_ID_TRUESPEECH,
00363 CODEC_ID_TTA,
00364 CODEC_ID_SMACKAUDIO,
00365 CODEC_ID_QCELP,
00366 CODEC_ID_WAVPACK,
00367 CODEC_ID_DSICINAUDIO,
00368 CODEC_ID_IMC,
00369 CODEC_ID_MUSEPACK7,
00370 CODEC_ID_MLP,
00371 CODEC_ID_GSM_MS,
00372 CODEC_ID_ATRAC3,
00373 CODEC_ID_VOXWARE,
00374 CODEC_ID_APE,
00375 CODEC_ID_NELLYMOSER,
00376 CODEC_ID_MUSEPACK8,
00377 CODEC_ID_SPEEX,
00378 CODEC_ID_WMAVOICE,
00379 CODEC_ID_WMAPRO,
00380 CODEC_ID_WMALOSSLESS,
00381 CODEC_ID_ATRAC3P,
00382 CODEC_ID_EAC3,
00383 CODEC_ID_SIPR,
00384 CODEC_ID_MP1,
00385 CODEC_ID_TWINVQ,
00386 CODEC_ID_TRUEHD,
00387 CODEC_ID_MP4ALS,
00388 CODEC_ID_ATRAC1,
00389 CODEC_ID_BINKAUDIO_RDFT,
00390 CODEC_ID_BINKAUDIO_DCT,
00391 CODEC_ID_AAC_LATM,
00392 CODEC_ID_QDMC,
00393
00394
00395 CODEC_ID_DVD_SUBTITLE= 0x17000,
00396 CODEC_ID_DVB_SUBTITLE,
00397 CODEC_ID_TEXT,
00398 CODEC_ID_XSUB,
00399 CODEC_ID_SSA,
00400 CODEC_ID_MOV_TEXT,
00401 CODEC_ID_HDMV_PGS_SUBTITLE,
00402 CODEC_ID_DVB_TELETEXT,
00403 CODEC_ID_SRT,
00404
00405
00406 CODEC_ID_TTF= 0x18000,
00407
00408 CODEC_ID_PROBE= 0x19000,
00409
00410 CODEC_ID_MPEG2TS= 0x20000,
00412 CODEC_ID_FFMETADATA=0x21000,
00413 };
00414
00415 #if LIBAVCODEC_VERSION_MAJOR < 53
00416 #define CodecType AVMediaType
00417
00418 #define CODEC_TYPE_UNKNOWN AVMEDIA_TYPE_UNKNOWN
00419 #define CODEC_TYPE_VIDEO AVMEDIA_TYPE_VIDEO
00420 #define CODEC_TYPE_AUDIO AVMEDIA_TYPE_AUDIO
00421 #define CODEC_TYPE_DATA AVMEDIA_TYPE_DATA
00422 #define CODEC_TYPE_SUBTITLE AVMEDIA_TYPE_SUBTITLE
00423 #define CODEC_TYPE_ATTACHMENT AVMEDIA_TYPE_ATTACHMENT
00424 #define CODEC_TYPE_NB AVMEDIA_TYPE_NB
00425 #endif
00426
00427 #if FF_API_OLD_SAMPLE_FMT
00428 #define SampleFormat AVSampleFormat
00429
00430 #define SAMPLE_FMT_NONE AV_SAMPLE_FMT_NONE
00431 #define SAMPLE_FMT_U8 AV_SAMPLE_FMT_U8
00432 #define SAMPLE_FMT_S16 AV_SAMPLE_FMT_S16
00433 #define SAMPLE_FMT_S32 AV_SAMPLE_FMT_S32
00434 #define SAMPLE_FMT_FLT AV_SAMPLE_FMT_FLT
00435 #define SAMPLE_FMT_DBL AV_SAMPLE_FMT_DBL
00436 #define SAMPLE_FMT_NB AV_SAMPLE_FMT_NB
00437 #endif
00438
00439 #if FF_API_OLD_AUDIOCONVERT
00440 #include "libavutil/audioconvert.h"
00441
00442
00443 #define CH_FRONT_LEFT AV_CH_FRONT_LEFT
00444 #define CH_FRONT_RIGHT AV_CH_FRONT_RIGHT
00445 #define CH_FRONT_CENTER AV_CH_FRONT_CENTER
00446 #define CH_LOW_FREQUENCY AV_CH_LOW_FREQUENCY
00447 #define CH_BACK_LEFT AV_CH_BACK_LEFT
00448 #define CH_BACK_RIGHT AV_CH_BACK_RIGHT
00449 #define CH_FRONT_LEFT_OF_CENTER AV_CH_FRONT_LEFT_OF_CENTER
00450 #define CH_FRONT_RIGHT_OF_CENTER AV_CH_FRONT_RIGHT_OF_CENTER
00451 #define CH_BACK_CENTER AV_CH_BACK_CENTER
00452 #define CH_SIDE_LEFT AV_CH_SIDE_LEFT
00453 #define CH_SIDE_RIGHT AV_CH_SIDE_RIGHT
00454 #define CH_TOP_CENTER AV_CH_TOP_CENTER
00455 #define CH_TOP_FRONT_LEFT AV_CH_TOP_FRONT_LEFT
00456 #define CH_TOP_FRONT_CENTER AV_CH_TOP_FRONT_CENTER
00457 #define CH_TOP_FRONT_RIGHT AV_CH_TOP_FRONT_RIGHT
00458 #define CH_TOP_BACK_LEFT AV_CH_TOP_BACK_LEFT
00459 #define CH_TOP_BACK_CENTER AV_CH_TOP_BACK_CENTER
00460 #define CH_TOP_BACK_RIGHT AV_CH_TOP_BACK_RIGHT
00461 #define CH_STEREO_LEFT AV_CH_STEREO_LEFT
00462 #define CH_STEREO_RIGHT AV_CH_STEREO_RIGHT
00463
00467 #define CH_LAYOUT_NATIVE AV_CH_LAYOUT_NATIVE
00468
00469
00470 #define CH_LAYOUT_MONO AV_CH_LAYOUT_MONO
00471 #define CH_LAYOUT_STEREO AV_CH_LAYOUT_STEREO
00472 #define CH_LAYOUT_2_1 AV_CH_LAYOUT_2_1
00473 #define CH_LAYOUT_SURROUND AV_CH_LAYOUT_SURROUND
00474 #define CH_LAYOUT_4POINT0 AV_CH_LAYOUT_4POINT0
00475 #define CH_LAYOUT_2_2 AV_CH_LAYOUT_2_2
00476 #define CH_LAYOUT_QUAD AV_CH_LAYOUT_QUAD
00477 #define CH_LAYOUT_5POINT0 AV_CH_LAYOUT_5POINT0
00478 #define CH_LAYOUT_5POINT1 AV_CH_LAYOUT_5POINT1
00479 #define CH_LAYOUT_5POINT0_BACK AV_CH_LAYOUT_5POINT0_BACK
00480 #define CH_LAYOUT_5POINT1_BACK AV_CH_LAYOUT_5POINT1_BACK
00481 #define CH_LAYOUT_7POINT0 AV_CH_LAYOUT_7POINT0
00482 #define CH_LAYOUT_7POINT1 AV_CH_LAYOUT_7POINT1
00483 #define CH_LAYOUT_7POINT1_WIDE AV_CH_LAYOUT_7POINT1_WIDE
00484 #define CH_LAYOUT_STEREO_DOWNMIX AV_CH_LAYOUT_STEREO_DOWNMIX
00485 #endif
00486
00487
00488 #define AVCODEC_MAX_AUDIO_FRAME_SIZE 192000 // 1 second of 48khz 32bit audio
00489
00497 #define FF_INPUT_BUFFER_PADDING_SIZE 8
00498
00503 #define FF_MIN_BUFFER_SIZE 16384
00504
00505
00509 enum Motion_Est_ID {
00510 ME_ZERO = 1,
00511 ME_FULL,
00512 ME_LOG,
00513 ME_PHODS,
00514 ME_EPZS,
00515 ME_X1,
00516 ME_HEX,
00517 ME_UMH,
00518 ME_ITER,
00519 ME_TESA,
00520 };
00521
00522 enum AVDiscard{
00523
00524
00525 AVDISCARD_NONE =-16,
00526 AVDISCARD_DEFAULT= 0,
00527 AVDISCARD_NONREF = 8,
00528 AVDISCARD_BIDIR = 16,
00529 AVDISCARD_NONKEY = 32,
00530 AVDISCARD_ALL = 48,
00531 };
00532
00533 enum AVColorPrimaries{
00534 AVCOL_PRI_BT709 =1,
00535 AVCOL_PRI_UNSPECIFIED=2,
00536 AVCOL_PRI_BT470M =4,
00537 AVCOL_PRI_BT470BG =5,
00538 AVCOL_PRI_SMPTE170M =6,
00539 AVCOL_PRI_SMPTE240M =7,
00540 AVCOL_PRI_FILM =8,
00541 AVCOL_PRI_NB ,
00542 };
00543
00544 enum AVColorTransferCharacteristic{
00545 AVCOL_TRC_BT709 =1,
00546 AVCOL_TRC_UNSPECIFIED=2,
00547 AVCOL_TRC_GAMMA22 =4,
00548 AVCOL_TRC_GAMMA28 =5,
00549 AVCOL_TRC_NB ,
00550 };
00551
00552 enum AVColorSpace{
00553 AVCOL_SPC_RGB =0,
00554 AVCOL_SPC_BT709 =1,
00555 AVCOL_SPC_UNSPECIFIED=2,
00556 AVCOL_SPC_FCC =4,
00557 AVCOL_SPC_BT470BG =5,
00558 AVCOL_SPC_SMPTE170M =6,
00559 AVCOL_SPC_SMPTE240M =7,
00560 AVCOL_SPC_NB ,
00561 };
00562
00563 enum AVColorRange{
00564 AVCOL_RANGE_UNSPECIFIED=0,
00565 AVCOL_RANGE_MPEG =1,
00566 AVCOL_RANGE_JPEG =2,
00567 AVCOL_RANGE_NB ,
00568 };
00569
00575 enum AVChromaLocation{
00576 AVCHROMA_LOC_UNSPECIFIED=0,
00577 AVCHROMA_LOC_LEFT =1,
00578 AVCHROMA_LOC_CENTER =2,
00579 AVCHROMA_LOC_TOPLEFT =3,
00580 AVCHROMA_LOC_TOP =4,
00581 AVCHROMA_LOC_BOTTOMLEFT =5,
00582 AVCHROMA_LOC_BOTTOM =6,
00583 AVCHROMA_LOC_NB ,
00584 };
00585
00589 enum AVLPCType {
00590 AV_LPC_TYPE_DEFAULT = -1,
00591 AV_LPC_TYPE_NONE = 0,
00592 AV_LPC_TYPE_FIXED = 1,
00593 AV_LPC_TYPE_LEVINSON = 2,
00594 AV_LPC_TYPE_CHOLESKY = 3,
00595 AV_LPC_TYPE_NB ,
00596 };
00597
00598 typedef struct RcOverride{
00599 int start_frame;
00600 int end_frame;
00601 int qscale;
00602 float quality_factor;
00603 } RcOverride;
00604
00605 #define FF_MAX_B_FRAMES 16
00606
00607
00608
00609
00610
00611
00612 #define CODEC_FLAG_QSCALE 0x0002
00613 #define CODEC_FLAG_4MV 0x0004
00614 #define CODEC_FLAG_QPEL 0x0010
00615 #define CODEC_FLAG_GMC 0x0020
00616 #define CODEC_FLAG_MV0 0x0040
00617 #define CODEC_FLAG_PART 0x0080
00618
00623 #define CODEC_FLAG_INPUT_PRESERVED 0x0100
00624 #define CODEC_FLAG_PASS1 0x0200
00625 #define CODEC_FLAG_PASS2 0x0400
00626 #define CODEC_FLAG_EXTERN_HUFF 0x1000
00627 #define CODEC_FLAG_GRAY 0x2000
00628 #define CODEC_FLAG_EMU_EDGE 0x4000
00629 #define CODEC_FLAG_PSNR 0x8000
00630 #define CODEC_FLAG_TRUNCATED 0x00010000
00632 #define CODEC_FLAG_NORMALIZE_AQP 0x00020000
00633 #define CODEC_FLAG_INTERLACED_DCT 0x00040000
00634 #define CODEC_FLAG_LOW_DELAY 0x00080000
00635 #define CODEC_FLAG_ALT_SCAN 0x00100000
00636 #define CODEC_FLAG_GLOBAL_HEADER 0x00400000
00637 #define CODEC_FLAG_BITEXACT 0x00800000
00638
00639 #define CODEC_FLAG_AC_PRED 0x01000000
00640 #define CODEC_FLAG_H263P_UMV 0x02000000
00641 #define CODEC_FLAG_CBP_RD 0x04000000
00642 #define CODEC_FLAG_QP_RD 0x08000000
00643 #define CODEC_FLAG_H263P_AIV 0x00000008
00644 #define CODEC_FLAG_OBMC 0x00000001
00645 #define CODEC_FLAG_LOOP_FILTER 0x00000800
00646 #define CODEC_FLAG_H263P_SLICE_STRUCT 0x10000000
00647 #define CODEC_FLAG_INTERLACED_ME 0x20000000
00648 #define CODEC_FLAG_SVCD_SCAN_OFFSET 0x40000000
00649 #define CODEC_FLAG_CLOSED_GOP 0x80000000
00650 #define CODEC_FLAG2_FAST 0x00000001
00651 #define CODEC_FLAG2_STRICT_GOP 0x00000002
00652 #define CODEC_FLAG2_NO_OUTPUT 0x00000004
00653 #define CODEC_FLAG2_LOCAL_HEADER 0x00000008
00654 #define CODEC_FLAG2_BPYRAMID 0x00000010
00655 #define CODEC_FLAG2_WPRED 0x00000020
00656 #define CODEC_FLAG2_MIXED_REFS 0x00000040
00657 #define CODEC_FLAG2_8X8DCT 0x00000080
00658 #define CODEC_FLAG2_FASTPSKIP 0x00000100
00659 #define CODEC_FLAG2_AUD 0x00000200
00660 #define CODEC_FLAG2_BRDO 0x00000400
00661 #define CODEC_FLAG2_INTRA_VLC 0x00000800
00662 #define CODEC_FLAG2_MEMC_ONLY 0x00001000
00663 #define CODEC_FLAG2_DROP_FRAME_TIMECODE 0x00002000
00664 #define CODEC_FLAG2_SKIP_RD 0x00004000
00665 #define CODEC_FLAG2_CHUNKS 0x00008000
00666 #define CODEC_FLAG2_NON_LINEAR_QUANT 0x00010000
00667 #define CODEC_FLAG2_BIT_RESERVOIR 0x00020000
00668 #define CODEC_FLAG2_MBTREE 0x00040000
00669 #define CODEC_FLAG2_PSY 0x00080000
00670 #define CODEC_FLAG2_SSIM 0x00100000
00671 #define CODEC_FLAG2_INTRA_REFRESH 0x00200000
00672
00673
00674
00675
00676
00677
00678
00679
00680 #define CODEC_CAP_DRAW_HORIZ_BAND 0x0001
00681
00686 #define CODEC_CAP_DR1 0x0002
00687
00688 #define CODEC_CAP_PARSE_ONLY 0x0004
00689 #define CODEC_CAP_TRUNCATED 0x0008
00690
00691 #define CODEC_CAP_HWACCEL 0x0010
00692
00696 #define CODEC_CAP_DELAY 0x0020
00697
00701 #define CODEC_CAP_SMALL_LAST_FRAME 0x0040
00702
00705 #define CODEC_CAP_HWACCEL_VDPAU 0x0080
00706
00717 #define CODEC_CAP_SUBFRAMES 0x0100
00718
00722 #define CODEC_CAP_EXPERIMENTAL 0x0200
00723
00726 #define CODEC_CAP_CHANNEL_CONF 0x0400
00727
00730 #define CODEC_CAP_NEG_LINESIZES 0x0800
00731
00734 #define CODEC_CAP_FRAME_THREADS 0x1000
00735
00736
00737 #define MB_TYPE_INTRA4x4 0x0001
00738 #define MB_TYPE_INTRA16x16 0x0002 //FIXME H.264-specific
00739 #define MB_TYPE_INTRA_PCM 0x0004 //FIXME H.264-specific
00740 #define MB_TYPE_16x16 0x0008
00741 #define MB_TYPE_16x8 0x0010
00742 #define MB_TYPE_8x16 0x0020
00743 #define MB_TYPE_8x8 0x0040
00744 #define MB_TYPE_INTERLACED 0x0080
00745 #define MB_TYPE_DIRECT2 0x0100 //FIXME
00746 #define MB_TYPE_ACPRED 0x0200
00747 #define MB_TYPE_GMC 0x0400
00748 #define MB_TYPE_SKIP 0x0800
00749 #define MB_TYPE_P0L0 0x1000
00750 #define MB_TYPE_P1L0 0x2000
00751 #define MB_TYPE_P0L1 0x4000
00752 #define MB_TYPE_P1L1 0x8000
00753 #define MB_TYPE_L0 (MB_TYPE_P0L0 | MB_TYPE_P1L0)
00754 #define MB_TYPE_L1 (MB_TYPE_P0L1 | MB_TYPE_P1L1)
00755 #define MB_TYPE_L0L1 (MB_TYPE_L0 | MB_TYPE_L1)
00756 #define MB_TYPE_QUANT 0x00010000
00757 #define MB_TYPE_CBP 0x00020000
00758
00759
00765 typedef struct AVPanScan{
00771 int id;
00772
00778 int width;
00779 int height;
00780
00786 int16_t position[3][2];
00787 }AVPanScan;
00788
00789 #define FF_COMMON_FRAME \
00790 \
00796 uint8_t *data[4];\
00797 int linesize[4];\
00798 \
00804 uint8_t *base[4];\
00805 \
00810 int key_frame;\
00811 \
00812 \
00817 int pict_type;\
00818 \
00819 \
00825 int64_t pts;\
00826 \
00827 \
00832 int coded_picture_number;\
00833 \
00838 int display_picture_number;\
00839 \
00840 \
00845 int quality; \
00846 \
00847 \
00853 int age;\
00854 \
00855 \
00863 int reference;\
00864 \
00865 \
00870 int8_t *qscale_table;\
00871 \
00876 int qstride;\
00877 \
00878 \
00884 uint8_t *mbskip_table;\
00885 \
00886 \
00898 int16_t (*motion_val[2])[2];\
00899 \
00900 \
00906 uint32_t *mb_type;\
00907 \
00908 \
00914 uint8_t motion_subsample_log2;\
00915 \
00916 \
00921 void *opaque;\
00922 \
00923 \
00928 uint64_t error[4];\
00929 \
00930 \
00936 int type;\
00937 \
00938 \
00944 int repeat_pict;\
00945 \
00946 \
00949 int qscale_type;\
00950 \
00951 \
00956 int interlaced_frame;\
00957 \
00958 \
00963 int top_field_first;\
00964 \
00965 \
00970 AVPanScan *pan_scan;\
00971 \
00972 \
00977 int palette_has_changed;\
00978 \
00979 \
00984 int buffer_hints;\
00985 \
00986 \
00991 short *dct_coeff;\
00992 \
00993 \
00999 int8_t *ref_index[2];\
01000 \
01001 \
01012 int64_t reordered_opaque;\
01013 \
01014 \
01019 void *hwaccel_picture_private;\
01020 \
01021 \
01026 int64_t pkt_pts;\
01027 \
01028 \
01033 int64_t pkt_dts;\
01034 \
01035 \
01040 struct AVCodecContext *owner;\
01041 \
01042 \
01047 void *thread_opaque;\
01048
01049 #define FF_QSCALE_TYPE_MPEG1 0
01050 #define FF_QSCALE_TYPE_MPEG2 1
01051 #define FF_QSCALE_TYPE_H264 2
01052 #define FF_QSCALE_TYPE_VP56 3
01053
01054 #define FF_BUFFER_TYPE_INTERNAL 1
01055 #define FF_BUFFER_TYPE_USER 2
01056 #define FF_BUFFER_TYPE_SHARED 4
01057 #define FF_BUFFER_TYPE_COPY 8
01058
01059
01060 #define FF_I_TYPE 1
01061 #define FF_P_TYPE 2
01062 #define FF_B_TYPE 3
01063 #define FF_S_TYPE 4
01064 #define FF_SI_TYPE 5
01065 #define FF_SP_TYPE 6
01066 #define FF_BI_TYPE 7
01067
01068 #define FF_BUFFER_HINTS_VALID 0x01 // Buffer hints value is meaningful (if 0 ignore).
01069 #define FF_BUFFER_HINTS_READABLE 0x02 // Codec will read from buffer.
01070 #define FF_BUFFER_HINTS_PRESERVE 0x04 // User must not alter buffer content.
01071 #define FF_BUFFER_HINTS_REUSABLE 0x08 // Codec will reuse the buffer (update).
01072
01073 typedef struct AVPacket {
01083 int64_t pts;
01089 int64_t dts;
01090 uint8_t *data;
01091 int size;
01092 int stream_index;
01093 int flags;
01098 int duration;
01099 void (*destruct)(struct AVPacket *);
01100 void *priv;
01101 int64_t pos;
01102
01120 int64_t convergence_duration;
01121 } AVPacket;
01122 #define AV_PKT_FLAG_KEY 0x0001
01123 #if LIBAVCODEC_VERSION_MAJOR < 53
01124 #define PKT_FLAG_KEY AV_PKT_FLAG_KEY
01125 #endif
01126
01136 typedef struct AVFrame {
01137 FF_COMMON_FRAME
01138 } AVFrame;
01139
01147 typedef struct AVCodecContext {
01152 const AVClass *av_class;
01158 int bit_rate;
01159
01166 int bit_rate_tolerance;
01167
01173 int flags;
01174
01183 int sub_id;
01184
01192 int me_method;
01193
01205 uint8_t *extradata;
01206 int extradata_size;
01207
01216 AVRational time_base;
01217
01218
01226 int width, height;
01227
01228 #define FF_ASPECT_EXTENDED 15
01229
01235 int gop_size;
01236
01244 enum PixelFormat pix_fmt;
01245
01252 int rate_emu;
01253
01277 void (*draw_horiz_band)(struct AVCodecContext *s,
01278 const AVFrame *src, int offset[4],
01279 int y, int type, int height);
01280
01281
01282 int sample_rate;
01283 int channels;
01284
01290 enum AVSampleFormat sample_fmt;
01291
01292
01296 int frame_size;
01297 int frame_number;
01298 #if LIBAVCODEC_VERSION_MAJOR < 53
01299 int real_pict_num;
01300 #endif
01301
01308 int delay;
01309
01310
01311 float qcompress;
01312 float qblur;
01313
01319 int qmin;
01320
01326 int qmax;
01327
01333 int max_qdiff;
01334
01341 int max_b_frames;
01342
01350 float b_quant_factor;
01351
01353 int rc_strategy;
01354 #define FF_RC_STRATEGY_XVID 1
01355
01356 int b_frame_strategy;
01357
01364 int hurry_up;
01365
01366 struct AVCodec *codec;
01367
01368 void *priv_data;
01369
01370 int rtp_payload_size;
01371
01372
01373
01374
01375
01376
01377
01378
01379
01380
01381
01382
01383
01384 void (*rtp_callback)(struct AVCodecContext *avctx, void *data, int size, int mb_nb);
01385
01386
01387 int mv_bits;
01388 int header_bits;
01389 int i_tex_bits;
01390 int p_tex_bits;
01391 int i_count;
01392 int p_count;
01393 int skip_count;
01394 int misc_bits;
01395
01401 int frame_bits;
01402
01408 void *opaque;
01409
01410 char codec_name[32];
01411 enum AVMediaType codec_type;
01412 enum CodecID codec_id;
01413
01427 unsigned int codec_tag;
01428
01434 int workaround_bugs;
01435 #define FF_BUG_AUTODETECT 1
01436 #define FF_BUG_OLD_MSMPEG4 2
01437 #define FF_BUG_XVID_ILACE 4
01438 #define FF_BUG_UMP4 8
01439 #define FF_BUG_NO_PADDING 16
01440 #define FF_BUG_AMV 32
01441 #define FF_BUG_AC_VLC 0
01442 #define FF_BUG_QPEL_CHROMA 64
01443 #define FF_BUG_STD_QPEL 128
01444 #define FF_BUG_QPEL_CHROMA2 256
01445 #define FF_BUG_DIRECT_BLOCKSIZE 512
01446 #define FF_BUG_EDGE 1024
01447 #define FF_BUG_HPEL_CHROMA 2048
01448 #define FF_BUG_DC_CLIP 4096
01449 #define FF_BUG_MS 8192
01450 #define FF_BUG_TRUNCATED 16384
01451
01452
01458 int luma_elim_threshold;
01459
01465 int chroma_elim_threshold;
01466
01479 int strict_std_compliance;
01480 #define FF_COMPLIANCE_VERY_STRICT 2
01481 #define FF_COMPLIANCE_STRICT 1
01482 #define FF_COMPLIANCE_NORMAL 0
01483 #if FF_API_INOFFICIAL
01484 #define FF_COMPLIANCE_INOFFICIAL -1
01485 #endif
01486 #define FF_COMPLIANCE_UNOFFICIAL -1
01487 #define FF_COMPLIANCE_EXPERIMENTAL -2
01488
01489
01494 float b_quant_offset;
01495
01502 int error_recognition;
01503 #define FF_ER_CAREFUL 1
01504 #define FF_ER_COMPLIANT 2
01505 #define FF_ER_AGGRESSIVE 3
01506 #define FF_ER_VERY_AGGRESSIVE 4
01507
01522 int (*get_buffer)(struct AVCodecContext *c, AVFrame *pic);
01523
01533 void (*release_buffer)(struct AVCodecContext *c, AVFrame *pic);
01534
01541 int has_b_frames;
01542
01547 int block_align;
01548
01549 int parse_only;
01550
01551
01552
01558 int mpeg_quant;
01559
01565 char *stats_out;
01566
01573 char *stats_in;
01574
01581 float rc_qsquish;
01582
01583 float rc_qmod_amp;
01584 int rc_qmod_freq;
01585
01591 RcOverride *rc_override;
01592 int rc_override_count;
01593
01599 const char *rc_eq;
01600
01606 int rc_max_rate;
01607
01613 int rc_min_rate;
01614
01620 int rc_buffer_size;
01621 float rc_buffer_aggressivity;
01622
01630 float i_quant_factor;
01631
01637 float i_quant_offset;
01638
01644 float rc_initial_cplx;
01645
01651 int dct_algo;
01652 #define FF_DCT_AUTO 0
01653 #define FF_DCT_FASTINT 1
01654 #define FF_DCT_INT 2
01655 #define FF_DCT_MMX 3
01656 #define FF_DCT_MLIB 4
01657 #define FF_DCT_ALTIVEC 5
01658 #define FF_DCT_FAAN 6
01659
01665 float lumi_masking;
01666
01672 float temporal_cplx_masking;
01673
01679 float spatial_cplx_masking;
01680
01686 float p_masking;
01687
01693 float dark_masking;
01694
01700 int idct_algo;
01701 #define FF_IDCT_AUTO 0
01702 #define FF_IDCT_INT 1
01703 #define FF_IDCT_SIMPLE 2
01704 #define FF_IDCT_SIMPLEMMX 3
01705 #define FF_IDCT_LIBMPEG2MMX 4
01706 #define FF_IDCT_PS2 5
01707 #define FF_IDCT_MLIB 6
01708 #define FF_IDCT_ARM 7
01709 #define FF_IDCT_ALTIVEC 8
01710 #define FF_IDCT_SH4 9
01711 #define FF_IDCT_SIMPLEARM 10
01712 #define FF_IDCT_H264 11
01713 #define FF_IDCT_VP3 12
01714 #define FF_IDCT_IPP 13
01715 #define FF_IDCT_XVIDMMX 14
01716 #define FF_IDCT_CAVS 15
01717 #define FF_IDCT_SIMPLEARMV5TE 16
01718 #define FF_IDCT_SIMPLEARMV6 17
01719 #define FF_IDCT_SIMPLEVIS 18
01720 #define FF_IDCT_WMV2 19
01721 #define FF_IDCT_FAAN 20
01722 #define FF_IDCT_EA 21
01723 #define FF_IDCT_SIMPLENEON 22
01724 #define FF_IDCT_SIMPLEALPHA 23
01725 #define FF_IDCT_BINK 24
01726
01732 int slice_count;
01738 int *slice_offset;
01739
01745 int error_concealment;
01746 #define FF_EC_GUESS_MVS 1
01747 #define FF_EC_DEBLOCK 2
01748
01757 unsigned dsp_mask;
01758
01759 #if FF_API_MM_FLAGS
01760 #define FF_MM_FORCE AV_CPU_FLAG_FORCE
01761 #define FF_MM_MMX AV_CPU_FLAG_MMX
01762 #define FF_MM_3DNOW AV_CPU_FLAG_3DNOW
01763 #define FF_MM_MMXEXT AV_CPU_FLAG_MMX2
01764 #define FF_MM_MMX2 AV_CPU_FLAG_MMX2
01765 #define FF_MM_SSE AV_CPU_FLAG_SSE
01766 #define FF_MM_SSE2 AV_CPU_FLAG_SSE2
01767 #define FF_MM_SSE2SLOW AV_CPU_FLAG_SSE2SLOW
01768 #define FF_MM_3DNOWEXT AV_CPU_FLAG_3DNOWEXT
01769 #define FF_MM_SSE3 AV_CPU_FLAG_SSE3
01770 #define FF_MM_SSE3SLOW AV_CPU_FLAG_SSE3SLOW
01771 #define FF_MM_SSSE3 AV_CPU_FLAG_SSSE3
01772 #define FF_MM_SSE4 AV_CPU_FLAG_SSE4
01773 #define FF_MM_SSE42 AV_CPU_FLAG_SSE42
01774 #define FF_MM_IWMMXT AV_CPU_FLAG_IWMMXT
01775 #define FF_MM_ALTIVEC AV_CPU_FLAG_ALTIVEC
01776 #endif
01777
01783 int bits_per_coded_sample;
01784
01790 int prediction_method;
01791 #define FF_PRED_LEFT 0
01792 #define FF_PRED_PLANE 1
01793 #define FF_PRED_MEDIAN 2
01794
01802 AVRational sample_aspect_ratio;
01803
01809 AVFrame *coded_frame;
01810
01816 int debug;
01817 #define FF_DEBUG_PICT_INFO 1
01818 #define FF_DEBUG_RC 2
01819 #define FF_DEBUG_BITSTREAM 4
01820 #define FF_DEBUG_MB_TYPE 8
01821 #define FF_DEBUG_QP 16
01822 #define FF_DEBUG_MV 32
01823 #define FF_DEBUG_DCT_COEFF 0x00000040
01824 #define FF_DEBUG_SKIP 0x00000080
01825 #define FF_DEBUG_STARTCODE 0x00000100
01826 #define FF_DEBUG_PTS 0x00000200
01827 #define FF_DEBUG_ER 0x00000400
01828 #define FF_DEBUG_MMCO 0x00000800
01829 #define FF_DEBUG_BUGS 0x00001000
01830 #define FF_DEBUG_VIS_QP 0x00002000
01831 #define FF_DEBUG_VIS_MB_TYPE 0x00004000
01832 #define FF_DEBUG_BUFFERS 0x00008000
01833 #define FF_DEBUG_THREADS 0x00010000
01834
01840 int debug_mv;
01841 #define FF_DEBUG_VIS_MV_P_FOR 0x00000001 //visualize forward predicted MVs of P frames
01842 #define FF_DEBUG_VIS_MV_B_FOR 0x00000002 //visualize forward predicted MVs of B frames
01843 #define FF_DEBUG_VIS_MV_B_BACK 0x00000004 //visualize backward predicted MVs of B frames
01844
01850 uint64_t error[4];
01851
01857 int mb_qmin;
01858
01864 int mb_qmax;
01865
01871 int me_cmp;
01877 int me_sub_cmp;
01883 int mb_cmp;
01889 int ildct_cmp;
01890 #define FF_CMP_SAD 0
01891 #define FF_CMP_SSE 1
01892 #define FF_CMP_SATD 2
01893 #define FF_CMP_DCT 3
01894 #define FF_CMP_PSNR 4
01895 #define FF_CMP_BIT 5
01896 #define FF_CMP_RD 6
01897 #define FF_CMP_ZERO 7
01898 #define FF_CMP_VSAD 8
01899 #define FF_CMP_VSSE 9
01900 #define FF_CMP_NSSE 10
01901 #define FF_CMP_W53 11
01902 #define FF_CMP_W97 12
01903 #define FF_CMP_DCTMAX 13
01904 #define FF_CMP_DCT264 14
01905 #define FF_CMP_CHROMA 256
01906
01912 int dia_size;
01913
01919 int last_predictor_count;
01920
01926 int pre_me;
01927
01933 int me_pre_cmp;
01934
01940 int pre_dia_size;
01941
01947 int me_subpel_quality;
01948
01958 enum PixelFormat (*get_format)(struct AVCodecContext *s, const enum PixelFormat * fmt);
01959
01968 int dtg_active_format;
01969 #define FF_DTG_AFD_SAME 8
01970 #define FF_DTG_AFD_4_3 9
01971 #define FF_DTG_AFD_16_9 10
01972 #define FF_DTG_AFD_14_9 11
01973 #define FF_DTG_AFD_4_3_SP_14_9 13
01974 #define FF_DTG_AFD_16_9_SP_14_9 14
01975 #define FF_DTG_AFD_SP_4_3 15
01976
01984 int me_range;
01985
01991 int intra_quant_bias;
01992 #define FF_DEFAULT_QUANT_BIAS 999999
01993
01999 int inter_quant_bias;
02000
02007 int color_table_id;
02008
02013 int internal_buffer_count;
02014
02019 void *internal_buffer;
02020
02027 int global_quality;
02028
02029 #define FF_CODER_TYPE_VLC 0
02030 #define FF_CODER_TYPE_AC 1
02031 #define FF_CODER_TYPE_RAW 2
02032 #define FF_CODER_TYPE_RLE 3
02033 #define FF_CODER_TYPE_DEFLATE 4
02034
02039 int coder_type;
02040
02046 int context_model;
02047 #if 0
02048
02053 uint8_t * (*realloc)(struct AVCodecContext *s, uint8_t *buf, int buf_size);
02054 #endif
02055
02061 int slice_flags;
02062 #define SLICE_FLAG_CODED_ORDER 0x0001
02063 #define SLICE_FLAG_ALLOW_FIELD 0x0002
02064 #define SLICE_FLAG_ALLOW_PLANE 0x0004
02065
02066
02071 int xvmc_acceleration;
02072
02078 int mb_decision;
02079 #define FF_MB_DECISION_SIMPLE 0
02080 #define FF_MB_DECISION_BITS 1
02081 #define FF_MB_DECISION_RD 2
02082
02083
02088 uint16_t *intra_matrix;
02089
02095 uint16_t *inter_matrix;
02096
02103 unsigned int stream_codec_tag;
02104
02111 int scenechange_threshold;
02112
02118 int lmin;
02119
02125 int lmax;
02126
02127 #if FF_API_PALETTE_CONTROL
02128
02133 struct AVPaletteControl *palctrl;
02134 #endif
02135
02141 int noise_reduction;
02142
02155 int (*reget_buffer)(struct AVCodecContext *c, AVFrame *pic);
02156
02162 int rc_initial_buffer_occupancy;
02163
02169 int inter_threshold;
02170
02176 int flags2;
02177
02183 int error_rate;
02184
02190 int antialias_algo;
02191 #define FF_AA_AUTO 0
02192 #define FF_AA_FASTINT 1 //not implemented yet
02193 #define FF_AA_INT 2
02194 #define FF_AA_FLOAT 3
02195
02200 int quantizer_noise_shaping;
02201
02208 int thread_count;
02209
02219 int (*execute)(struct AVCodecContext *c, int (*func)(struct AVCodecContext *c2, void *arg), void *arg2, int *ret, int count, int size);
02220
02227 void *thread_opaque;
02228
02236 int me_threshold;
02237
02243 int mb_threshold;
02244
02250 int intra_dc_precision;
02251
02257 int nsse_weight;
02258
02264 int skip_top;
02265
02271 int skip_bottom;
02272
02278 int profile;
02279 #define FF_PROFILE_UNKNOWN -99
02280
02281 #define FF_PROFILE_AAC_MAIN 0
02282 #define FF_PROFILE_AAC_LOW 1
02283 #define FF_PROFILE_AAC_SSR 2
02284 #define FF_PROFILE_AAC_LTP 3
02285
02286 #define FF_PROFILE_DTS 20
02287 #define FF_PROFILE_DTS_ES 30
02288 #define FF_PROFILE_DTS_96_24 40
02289 #define FF_PROFILE_DTS_HD_HRA 50
02290 #define FF_PROFILE_DTS_HD_MA 60
02291
02292 #define FF_PROFILE_H264_CONSTRAINED (1<<9) // 8+1; constraint_set1_flag
02293 #define FF_PROFILE_H264_INTRA (1<<11) // 8+3; constraint_set3_flag
02294
02295 #define FF_PROFILE_H264_BASELINE 66
02296 #define FF_PROFILE_H264_CONSTRAINED_BASELINE (66|FF_PROFILE_H264_CONSTRAINED)
02297 #define FF_PROFILE_H264_MAIN 77
02298 #define FF_PROFILE_H264_EXTENDED 88
02299 #define FF_PROFILE_H264_HIGH 100
02300 #define FF_PROFILE_H264_HIGH_10 110
02301 #define FF_PROFILE_H264_HIGH_10_INTRA (110|FF_PROFILE_H264_INTRA)
02302 #define FF_PROFILE_H264_HIGH_422 122
02303 #define FF_PROFILE_H264_HIGH_422_INTRA (122|FF_PROFILE_H264_INTRA)
02304 #define FF_PROFILE_H264_HIGH_444 144
02305 #define FF_PROFILE_H264_HIGH_444_PREDICTIVE 244
02306 #define FF_PROFILE_H264_HIGH_444_INTRA (244|FF_PROFILE_H264_INTRA)
02307 #define FF_PROFILE_H264_CAVLC_444 44
02308
02314 int level;
02315 #define FF_LEVEL_UNKNOWN -99
02316
02322 int lowres;
02323
02330 int coded_width, coded_height;
02331
02337 int frame_skip_threshold;
02338
02344 int frame_skip_factor;
02345
02351 int frame_skip_exp;
02352
02358 int frame_skip_cmp;
02359
02366 float border_masking;
02367
02373 int mb_lmin;
02374
02380 int mb_lmax;
02381
02387 int me_penalty_compensation;
02388
02394 enum AVDiscard skip_loop_filter;
02395
02401 enum AVDiscard skip_idct;
02402
02408 enum AVDiscard skip_frame;
02409
02415 int bidir_refine;
02416
02422 int brd_scale;
02423
02429 float crf;
02430
02436 int cqp;
02437
02443 int keyint_min;
02444
02450 int refs;
02451
02457 int chromaoffset;
02458
02464 int bframebias;
02465
02471 int trellis;
02472
02478 float complexityblur;
02479
02486 int deblockalpha;
02487
02494 int deblockbeta;
02495
02501 int partitions;
02502 #define X264_PART_I4X4 0x001
02503 #define X264_PART_I8X8 0x002
02504 #define X264_PART_P8X8 0x010
02505 #define X264_PART_P4X4 0x020
02506 #define X264_PART_B8X8 0x100
02507
02513 int directpred;
02514
02520 int cutoff;
02521
02527 int scenechange_factor;
02528
02535 int mv0_threshold;
02536
02542 int b_sensitivity;
02543
02548 int compression_level;
02549 #define FF_COMPRESSION_DEFAULT -1
02550
02551 #if FF_API_USE_LPC
02552
02558 int use_lpc;
02559 #endif
02560
02566 int lpc_coeff_precision;
02567
02572 int min_prediction_order;
02573
02578 int max_prediction_order;
02579
02585 int prediction_order_method;
02586
02591 int min_partition_order;
02592
02597 int max_partition_order;
02598
02604 int64_t timecode_frame_start;
02605
02606 #if LIBAVCODEC_VERSION_MAJOR < 53
02607
02613 int request_channels;
02614 #endif
02615
02622 float drc_scale;
02623
02631 int64_t reordered_opaque;
02632
02639 int bits_per_raw_sample;
02640
02646 int64_t channel_layout;
02647
02653 int64_t request_channel_layout;
02654
02660 float rc_max_available_vbv_use;
02661
02667 float rc_min_vbv_overflow_use;
02668
02674 struct AVHWAccel *hwaccel;
02675
02683 int ticks_per_frame;
02684
02695 void *hwaccel_context;
02696
02702 enum AVColorPrimaries color_primaries;
02703
02709 enum AVColorTransferCharacteristic color_trc;
02710
02716 enum AVColorSpace colorspace;
02717
02723 enum AVColorRange color_range;
02724
02730 enum AVChromaLocation chroma_sample_location;
02731
02750 int (*execute2)(struct AVCodecContext *c, int (*func)(struct AVCodecContext *c2, void *arg, int jobnr, int threadnr), void *arg2, int *ret, int count);
02751
02760 int weighted_p_pred;
02761
02770 int aq_mode;
02771
02778 float aq_strength;
02779
02786 float psy_rd;
02787
02794 float psy_trellis;
02795
02802 int rc_lookahead;
02803
02811 float crf_max;
02812
02813 int log_level_offset;
02814
02820 enum AVLPCType lpc_type;
02821
02827 int lpc_passes;
02828
02836 int slices;
02837
02846 uint8_t *subtitle_header;
02847 int subtitle_header_size;
02848
02856 AVPacket *pkt;
02857
02865 int is_copy;
02866
02875 int thread_type;
02876 #define FF_THREAD_FRAME 1 //< Decode more than one frame at once
02877 #define FF_THREAD_SLICE 2 //< Decode more than one part of a single frame at once
02878
02884 int active_thread_type;
02885
02894 int thread_safe_callbacks;
02895
02902 uint64_t vbv_delay;
02903 } AVCodecContext;
02904
02908 typedef struct AVProfile {
02909 int profile;
02910 const char *name;
02911 } AVProfile;
02912
02916 typedef struct AVCodec {
02923 const char *name;
02924 enum AVMediaType type;
02925 enum CodecID id;
02926 int priv_data_size;
02927 int (*init)(AVCodecContext *);
02928 int (*encode)(AVCodecContext *, uint8_t *buf, int buf_size, void *data);
02929 int (*close)(AVCodecContext *);
02930 int (*decode)(AVCodecContext *, void *outdata, int *outdata_size, AVPacket *avpkt);
02935 int capabilities;
02936 struct AVCodec *next;
02941 void (*flush)(AVCodecContext *);
02942 const AVRational *supported_framerates;
02943 const enum PixelFormat *pix_fmts;
02944
02948 const char *long_name;
02949 const int *supported_samplerates;
02950 const enum AVSampleFormat *sample_fmts;
02951 const int64_t *channel_layouts;
02952 uint8_t max_lowres;
02953 AVClass *priv_class;
02954 const AVProfile *profiles;
02955
02965 int (*init_thread_copy)(AVCodecContext *);
02973 int (*update_thread_context)(AVCodecContext *dst, const AVCodecContext *src);
02975 } AVCodec;
02976
02980 typedef struct AVHWAccel {
02986 const char *name;
02987
02993 enum AVMediaType type;
02994
03000 enum CodecID id;
03001
03007 enum PixelFormat pix_fmt;
03008
03013 int capabilities;
03014
03015 struct AVHWAccel *next;
03016
03031 int (*start_frame)(AVCodecContext *avctx, const uint8_t *buf, uint32_t buf_size);
03032
03044 int (*decode_slice)(AVCodecContext *avctx, const uint8_t *buf, uint32_t buf_size);
03045
03055 int (*end_frame)(AVCodecContext *avctx);
03056
03064 int priv_data_size;
03065 } AVHWAccel;
03066
03071 typedef struct AVPicture {
03072 uint8_t *data[4];
03073 int linesize[4];
03074 } AVPicture;
03075
03076 #if FF_API_PALETTE_CONTROL
03077
03085 #define AVPALETTE_SIZE 1024
03086 #define AVPALETTE_COUNT 256
03087 typedef struct AVPaletteControl {
03088
03089
03090
03091 int palette_changed;
03092
03093
03094
03095
03096
03097 unsigned int palette[AVPALETTE_COUNT];
03098
03099 } AVPaletteControl attribute_deprecated;
03100 #endif
03101
03102 enum AVSubtitleType {
03103 SUBTITLE_NONE,
03104
03105 SUBTITLE_BITMAP,
03106
03111 SUBTITLE_TEXT,
03112
03117 SUBTITLE_ASS,
03118 };
03119
03120 typedef struct AVSubtitleRect {
03121 int x;
03122 int y;
03123 int w;
03124 int h;
03125 int nb_colors;
03126
03131 AVPicture pict;
03132 enum AVSubtitleType type;
03133
03134 char *text;
03135
03141 char *ass;
03142 } AVSubtitleRect;
03143
03144 typedef struct AVSubtitle {
03145 uint16_t format;
03146 uint32_t start_display_time;
03147 uint32_t end_display_time;
03148 unsigned num_rects;
03149 AVSubtitleRect **rects;
03150 int64_t pts;
03151 } AVSubtitle;
03152
03153
03154
03158 attribute_deprecated void av_destruct_packet_nofree(AVPacket *pkt);
03159
03163 void av_destruct_packet(AVPacket *pkt);
03164
03170 void av_init_packet(AVPacket *pkt);
03171
03180 int av_new_packet(AVPacket *pkt, int size);
03181
03188 void av_shrink_packet(AVPacket *pkt, int size);
03189
03196 int av_grow_packet(AVPacket *pkt, int grow_by);
03197
03202 int av_dup_packet(AVPacket *pkt);
03203
03209 void av_free_packet(AVPacket *pkt);
03210
03211
03212
03213 struct ReSampleContext;
03214 struct AVResampleContext;
03215
03216 typedef struct ReSampleContext ReSampleContext;
03217
03218 #if FF_API_AUDIO_OLD
03219
03222 attribute_deprecated ReSampleContext *audio_resample_init(int output_channels, int input_channels,
03223 int output_rate, int input_rate);
03224 #endif
03225
03242 ReSampleContext *av_audio_resample_init(int output_channels, int input_channels,
03243 int output_rate, int input_rate,
03244 enum AVSampleFormat sample_fmt_out,
03245 enum AVSampleFormat sample_fmt_in,
03246 int filter_length, int log2_phase_count,
03247 int linear, double cutoff);
03248
03249 int audio_resample(ReSampleContext *s, short *output, short *input, int nb_samples);
03250
03257 void audio_resample_close(ReSampleContext *s);
03258
03259
03269 struct AVResampleContext *av_resample_init(int out_rate, int in_rate, int filter_length, int log2_phase_count, int linear, double cutoff);
03270
03280 int av_resample(struct AVResampleContext *c, short *dst, short *src, int *consumed, int src_size, int dst_size, int update_ctx);
03281
03282
03295 void av_resample_compensate(struct AVResampleContext *c, int sample_delta, int compensation_distance);
03296 void av_resample_close(struct AVResampleContext *c);
03297
03307 int avpicture_alloc(AVPicture *picture, enum PixelFormat pix_fmt, int width, int height);
03308
03314 void avpicture_free(AVPicture *picture);
03315
03333 int avpicture_fill(AVPicture *picture, uint8_t *ptr,
03334 enum PixelFormat pix_fmt, int width, int height);
03335 int avpicture_layout(const AVPicture* src, enum PixelFormat pix_fmt, int width, int height,
03336 unsigned char *dest, int dest_size);
03337
03350 int avpicture_get_size(enum PixelFormat pix_fmt, int width, int height);
03351 void avcodec_get_chroma_sub_sample(enum PixelFormat pix_fmt, int *h_shift, int *v_shift);
03352 const char *avcodec_get_pix_fmt_name(enum PixelFormat pix_fmt);
03353 void avcodec_set_dimensions(AVCodecContext *s, int width, int height);
03354
03355 #if LIBAVCODEC_VERSION_MAJOR < 53
03356
03369 attribute_deprecated enum PixelFormat avcodec_get_pix_fmt(const char* name);
03370 #endif
03371
03377 unsigned int avcodec_pix_fmt_to_codec_tag(enum PixelFormat pix_fmt);
03378
03386 size_t av_get_codec_tag_string(char *buf, size_t buf_size, unsigned int codec_tag);
03387
03388 #define FF_LOSS_RESOLUTION 0x0001
03389 #define FF_LOSS_DEPTH 0x0002
03390 #define FF_LOSS_COLORSPACE 0x0004
03391 #define FF_LOSS_ALPHA 0x0008
03392 #define FF_LOSS_COLORQUANT 0x0010
03393 #define FF_LOSS_CHROMA 0x0020
03412 int avcodec_get_pix_fmt_loss(enum PixelFormat dst_pix_fmt, enum PixelFormat src_pix_fmt,
03413 int has_alpha);
03414
03437 enum PixelFormat avcodec_find_best_pix_fmt(int64_t pix_fmt_mask, enum PixelFormat src_pix_fmt,
03438 int has_alpha, int *loss_ptr);
03439
03440 #if LIBAVCODEC_VERSION_MAJOR < 53
03441
03444 attribute_deprecated
03445 void avcodec_pix_fmt_string (char *buf, int buf_size, enum PixelFormat pix_fmt);
03446 #endif
03447
03448 #define FF_ALPHA_TRANSP 0x0001
03449 #define FF_ALPHA_SEMI_TRANSP 0x0002
03450
03455 int img_get_alpha_info(const AVPicture *src,
03456 enum PixelFormat pix_fmt, int width, int height);
03457
03458
03459
03460 int avpicture_deinterlace(AVPicture *dst, const AVPicture *src,
03461 enum PixelFormat pix_fmt, int width, int height);
03462
03463
03464
03470 AVCodec *av_codec_next(AVCodec *c);
03471
03475 unsigned avcodec_version(void);
03476
03480 const char *avcodec_configuration(void);
03481
03485 const char *avcodec_license(void);
03486
03493 void avcodec_init(void);
03494
03495 #if LIBAVCODEC_VERSION_MAJOR < 53
03496
03499 attribute_deprecated void register_avcodec(AVCodec *codec);
03500 #endif
03501
03507 void avcodec_register(AVCodec *codec);
03508
03515 AVCodec *avcodec_find_encoder(enum CodecID id);
03516
03523 AVCodec *avcodec_find_encoder_by_name(const char *name);
03524
03531 AVCodec *avcodec_find_decoder(enum CodecID id);
03532
03539 AVCodec *avcodec_find_decoder_by_name(const char *name);
03540 void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode);
03541
03549 const char *av_get_profile_name(const AVCodec *codec, int profile);
03550
03556 void avcodec_get_context_defaults(AVCodecContext *s);
03557
03560 void avcodec_get_context_defaults2(AVCodecContext *s, enum AVMediaType);
03561
03564 int avcodec_get_context_defaults3(AVCodecContext *s, AVCodec *codec);
03565
03573 AVCodecContext *avcodec_alloc_context(void);
03574
03577 AVCodecContext *avcodec_alloc_context2(enum AVMediaType);
03578
03581 AVCodecContext *avcodec_alloc_context3(AVCodec *codec);
03582
03594 int avcodec_copy_context(AVCodecContext *dest, const AVCodecContext *src);
03595
03601 void avcodec_get_frame_defaults(AVFrame *pic);
03602
03610 AVFrame *avcodec_alloc_frame(void);
03611
03612 int avcodec_default_get_buffer(AVCodecContext *s, AVFrame *pic);
03613 void avcodec_default_release_buffer(AVCodecContext *s, AVFrame *pic);
03614 int avcodec_default_reget_buffer(AVCodecContext *s, AVFrame *pic);
03615
03623 unsigned avcodec_get_edge_width(void);
03633 void avcodec_align_dimensions(AVCodecContext *s, int *width, int *height);
03643 void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height,
03644 int linesize_align[4]);
03645
03646 #if LIBAVCODEC_VERSION_MAJOR < 53
03647
03650 attribute_deprecated
03651 int avcodec_check_dimensions(void *av_log_ctx, unsigned int w, unsigned int h);
03652 #endif
03653
03654 enum PixelFormat avcodec_default_get_format(struct AVCodecContext *s, const enum PixelFormat * fmt);
03655
03656 #if LIBAVCODEC_VERSION_MAJOR < 53
03657
03660 attribute_deprecated
03661 int avcodec_thread_init(AVCodecContext *s, int thread_count);
03662 void avcodec_thread_free(AVCodecContext *s);
03663 #endif
03664 int avcodec_default_execute(AVCodecContext *c, int (*func)(AVCodecContext *c2, void *arg2),void *arg, int *ret, int count, int size);
03665 int avcodec_default_execute2(AVCodecContext *c, int (*func)(AVCodecContext *c2, void *arg2, int, int),void *arg, int *ret, int count);
03666
03667
03695 int avcodec_open(AVCodecContext *avctx, AVCodec *codec);
03696
03697 #if FF_API_AUDIO_OLD
03698
03711 attribute_deprecated int avcodec_decode_audio2(AVCodecContext *avctx, int16_t *samples,
03712 int *frame_size_ptr,
03713 const uint8_t *buf, int buf_size);
03714 #endif
03715
03755 int avcodec_decode_audio3(AVCodecContext *avctx, int16_t *samples,
03756 int *frame_size_ptr,
03757 AVPacket *avpkt);
03758
03759 #if FF_API_VIDEO_OLD
03760
03773 attribute_deprecated int avcodec_decode_video(AVCodecContext *avctx, AVFrame *picture,
03774 int *got_picture_ptr,
03775 const uint8_t *buf, int buf_size);
03776 #endif
03777
03818 int avcodec_decode_video2(AVCodecContext *avctx, AVFrame *picture,
03819 int *got_picture_ptr,
03820 AVPacket *avpkt);
03821
03822 #if FF_API_SUBTITLE_OLD
03823
03824
03825
03826 attribute_deprecated int avcodec_decode_subtitle(AVCodecContext *avctx, AVSubtitle *sub,
03827 int *got_sub_ptr,
03828 const uint8_t *buf, int buf_size);
03829 #endif
03830
03847 int avcodec_decode_subtitle2(AVCodecContext *avctx, AVSubtitle *sub,
03848 int *got_sub_ptr,
03849 AVPacket *avpkt);
03850
03856 void avsubtitle_free(AVSubtitle *sub);
03857
03858 int avcodec_parse_frame(AVCodecContext *avctx, uint8_t **pdata,
03859 int *data_size_ptr,
03860 uint8_t *buf, int buf_size);
03861
03881 int avcodec_encode_audio(AVCodecContext *avctx, uint8_t *buf, int buf_size,
03882 const short *samples);
03883
03896 int avcodec_encode_video(AVCodecContext *avctx, uint8_t *buf, int buf_size,
03897 const AVFrame *pict);
03898 int avcodec_encode_subtitle(AVCodecContext *avctx, uint8_t *buf, int buf_size,
03899 const AVSubtitle *sub);
03900
03901 int avcodec_close(AVCodecContext *avctx);
03902
03913 void avcodec_register_all(void);
03914
03918 void avcodec_flush_buffers(AVCodecContext *avctx);
03919
03920 void avcodec_default_free_buffers(AVCodecContext *s);
03921
03922
03923
03930 char av_get_pict_type_char(int pict_type);
03931
03938 int av_get_bits_per_sample(enum CodecID codec_id);
03939
03940 #if FF_API_OLD_SAMPLE_FMT
03941
03944 attribute_deprecated
03945 int av_get_bits_per_sample_format(enum AVSampleFormat sample_fmt);
03946 #endif
03947
03948
03949 typedef struct AVCodecParserContext {
03950 void *priv_data;
03951 struct AVCodecParser *parser;
03952 int64_t frame_offset;
03953 int64_t cur_offset;
03954
03955 int64_t next_frame_offset;
03956
03957 int pict_type;
03967 int repeat_pict;
03968 int64_t pts;
03969 int64_t dts;
03970
03971
03972 int64_t last_pts;
03973 int64_t last_dts;
03974 int fetch_timestamp;
03975
03976 #define AV_PARSER_PTS_NB 4
03977 int cur_frame_start_index;
03978 int64_t cur_frame_offset[AV_PARSER_PTS_NB];
03979 int64_t cur_frame_pts[AV_PARSER_PTS_NB];
03980 int64_t cur_frame_dts[AV_PARSER_PTS_NB];
03981
03982 int flags;
03983 #define PARSER_FLAG_COMPLETE_FRAMES 0x0001
03984 #define PARSER_FLAG_ONCE 0x0002
03986 #define PARSER_FLAG_FETCHED_OFFSET 0x0004
03987
03988 int64_t offset;
03989 int64_t cur_frame_end[AV_PARSER_PTS_NB];
03990
03997 int key_frame;
03998
04016 int64_t convergence_duration;
04017
04018
04028 int dts_sync_point;
04029
04043 int dts_ref_dts_delta;
04044
04057 int pts_dts_delta;
04058
04064 int64_t cur_frame_pos[AV_PARSER_PTS_NB];
04065
04069 int64_t pos;
04070
04074 int64_t last_pos;
04075 } AVCodecParserContext;
04076
04077 typedef struct AVCodecParser {
04078 int codec_ids[5];
04079 int priv_data_size;
04080 int (*parser_init)(AVCodecParserContext *s);
04081 int (*parser_parse)(AVCodecParserContext *s,
04082 AVCodecContext *avctx,
04083 const uint8_t **poutbuf, int *poutbuf_size,
04084 const uint8_t *buf, int buf_size);
04085 void (*parser_close)(AVCodecParserContext *s);
04086 int (*split)(AVCodecContext *avctx, const uint8_t *buf, int buf_size);
04087 struct AVCodecParser *next;
04088 } AVCodecParser;
04089
04090 AVCodecParser *av_parser_next(AVCodecParser *c);
04091
04092 void av_register_codec_parser(AVCodecParser *parser);
04093 AVCodecParserContext *av_parser_init(int codec_id);
04094
04095 #if LIBAVCODEC_VERSION_MAJOR < 53
04096 attribute_deprecated
04097 int av_parser_parse(AVCodecParserContext *s,
04098 AVCodecContext *avctx,
04099 uint8_t **poutbuf, int *poutbuf_size,
04100 const uint8_t *buf, int buf_size,
04101 int64_t pts, int64_t dts);
04102 #endif
04103
04132 int av_parser_parse2(AVCodecParserContext *s,
04133 AVCodecContext *avctx,
04134 uint8_t **poutbuf, int *poutbuf_size,
04135 const uint8_t *buf, int buf_size,
04136 int64_t pts, int64_t dts,
04137 int64_t pos);
04138
04139 int av_parser_change(AVCodecParserContext *s,
04140 AVCodecContext *avctx,
04141 uint8_t **poutbuf, int *poutbuf_size,
04142 const uint8_t *buf, int buf_size, int keyframe);
04143 void av_parser_close(AVCodecParserContext *s);
04144
04145
04146 typedef struct AVBitStreamFilterContext {
04147 void *priv_data;
04148 struct AVBitStreamFilter *filter;
04149 AVCodecParserContext *parser;
04150 struct AVBitStreamFilterContext *next;
04151 } AVBitStreamFilterContext;
04152
04153
04154 typedef struct AVBitStreamFilter {
04155 const char *name;
04156 int priv_data_size;
04157 int (*filter)(AVBitStreamFilterContext *bsfc,
04158 AVCodecContext *avctx, const char *args,
04159 uint8_t **poutbuf, int *poutbuf_size,
04160 const uint8_t *buf, int buf_size, int keyframe);
04161 void (*close)(AVBitStreamFilterContext *bsfc);
04162 struct AVBitStreamFilter *next;
04163 } AVBitStreamFilter;
04164
04165 void av_register_bitstream_filter(AVBitStreamFilter *bsf);
04166 AVBitStreamFilterContext *av_bitstream_filter_init(const char *name);
04167 int av_bitstream_filter_filter(AVBitStreamFilterContext *bsfc,
04168 AVCodecContext *avctx, const char *args,
04169 uint8_t **poutbuf, int *poutbuf_size,
04170 const uint8_t *buf, int buf_size, int keyframe);
04171 void av_bitstream_filter_close(AVBitStreamFilterContext *bsf);
04172
04173 AVBitStreamFilter *av_bitstream_filter_next(AVBitStreamFilter *f);
04174
04175
04176
04182 void *av_fast_realloc(void *ptr, unsigned int *size, FF_INTERNALC_MEM_TYPE min_size);
04183
04196 void av_fast_malloc(void *ptr, unsigned int *size, FF_INTERNALC_MEM_TYPE min_size);
04197
04198 #if LIBAVCODEC_VERSION_MAJOR < 53
04199
04202 attribute_deprecated
04203 void av_picture_data_copy(uint8_t *dst_data[4], int dst_linesize[4],
04204 uint8_t *src_data[4], int src_linesize[4],
04205 enum PixelFormat pix_fmt, int width, int height);
04206 #endif
04207
04211 void av_picture_copy(AVPicture *dst, const AVPicture *src,
04212 enum PixelFormat pix_fmt, int width, int height);
04213
04217 int av_picture_crop(AVPicture *dst, const AVPicture *src,
04218 enum PixelFormat pix_fmt, int top_band, int left_band);
04219
04223 int av_picture_pad(AVPicture *dst, const AVPicture *src, int height, int width, enum PixelFormat pix_fmt,
04224 int padtop, int padbottom, int padleft, int padright, int *color);
04225
04233 unsigned int av_xiphlacing(unsigned char *s, unsigned int v);
04234
04235 #if LIBAVCODEC_VERSION_MAJOR < 53
04236
04241 attribute_deprecated int av_parse_video_frame_size(int *width_ptr, int *height_ptr, const char *str);
04242
04248 attribute_deprecated int av_parse_video_frame_rate(AVRational *frame_rate, const char *str);
04249 #endif
04250
04263 void av_log_missing_feature(void *avc, const char *feature, int want_sample);
04264
04273 void av_log_ask_for_sample(void *avc, const char *msg);
04274
04278 void av_register_hwaccel(AVHWAccel *hwaccel);
04279
04285 AVHWAccel *av_hwaccel_next(AVHWAccel *hwaccel);
04286
04287
04291 enum AVLockOp {
04292 AV_LOCK_CREATE,
04293 AV_LOCK_OBTAIN,
04294 AV_LOCK_RELEASE,
04295 AV_LOCK_DESTROY,
04296 };
04297
04311 int av_lockmgr_register(int (*cb)(void **mutex, enum AVLockOp op));
04312
04313 #endif