00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef AVCODEC_AVCODEC_H
00022 #define AVCODEC_AVCODEC_H
00023
00029 #include <errno.h>
00030 #include "libavutil/samplefmt.h"
00031 #include "libavutil/avutil.h"
00032 #include "libavutil/cpu.h"
00033 #include "libavutil/dict.h"
00034
00035 #include "libavcodec/version.h"
00036
00037 #if LIBAVCODEC_VERSION_MAJOR < 53
00038 # define FF_INTERNALC_MEM_TYPE unsigned int
00039 #else
00040 # define FF_INTERNALC_MEM_TYPE size_t
00041 #endif
00042
00055 enum CodecID {
00056 CODEC_ID_NONE,
00057
00058
00059 CODEC_ID_MPEG1VIDEO,
00060 CODEC_ID_MPEG2VIDEO,
00061 CODEC_ID_MPEG2VIDEO_XVMC,
00062 CODEC_ID_H261,
00063 CODEC_ID_H263,
00064 CODEC_ID_RV10,
00065 CODEC_ID_RV20,
00066 CODEC_ID_MJPEG,
00067 CODEC_ID_MJPEGB,
00068 CODEC_ID_LJPEG,
00069 CODEC_ID_SP5X,
00070 CODEC_ID_JPEGLS,
00071 CODEC_ID_MPEG4,
00072 CODEC_ID_RAWVIDEO,
00073 CODEC_ID_MSMPEG4V1,
00074 CODEC_ID_MSMPEG4V2,
00075 CODEC_ID_MSMPEG4V3,
00076 CODEC_ID_WMV1,
00077 CODEC_ID_WMV2,
00078 CODEC_ID_H263P,
00079 CODEC_ID_H263I,
00080 CODEC_ID_FLV1,
00081 CODEC_ID_SVQ1,
00082 CODEC_ID_SVQ3,
00083 CODEC_ID_DVVIDEO,
00084 CODEC_ID_HUFFYUV,
00085 CODEC_ID_CYUV,
00086 CODEC_ID_H264,
00087 CODEC_ID_INDEO3,
00088 CODEC_ID_VP3,
00089 CODEC_ID_THEORA,
00090 CODEC_ID_ASV1,
00091 CODEC_ID_ASV2,
00092 CODEC_ID_FFV1,
00093 CODEC_ID_4XM,
00094 CODEC_ID_VCR1,
00095 CODEC_ID_CLJR,
00096 CODEC_ID_MDEC,
00097 CODEC_ID_ROQ,
00098 CODEC_ID_INTERPLAY_VIDEO,
00099 CODEC_ID_XAN_WC3,
00100 CODEC_ID_XAN_WC4,
00101 CODEC_ID_RPZA,
00102 CODEC_ID_CINEPAK,
00103 CODEC_ID_WS_VQA,
00104 CODEC_ID_MSRLE,
00105 CODEC_ID_MSVIDEO1,
00106 CODEC_ID_IDCIN,
00107 CODEC_ID_8BPS,
00108 CODEC_ID_SMC,
00109 CODEC_ID_FLIC,
00110 CODEC_ID_TRUEMOTION1,
00111 CODEC_ID_VMDVIDEO,
00112 CODEC_ID_MSZH,
00113 CODEC_ID_ZLIB,
00114 CODEC_ID_QTRLE,
00115 CODEC_ID_SNOW,
00116 CODEC_ID_TSCC,
00117 CODEC_ID_ULTI,
00118 CODEC_ID_QDRAW,
00119 CODEC_ID_VIXL,
00120 CODEC_ID_QPEG,
00121 #if LIBAVCODEC_VERSION_MAJOR < 53
00122 CODEC_ID_XVID,
00123 #endif
00124 CODEC_ID_PNG,
00125 CODEC_ID_PPM,
00126 CODEC_ID_PBM,
00127 CODEC_ID_PGM,
00128 CODEC_ID_PGMYUV,
00129 CODEC_ID_PAM,
00130 CODEC_ID_FFVHUFF,
00131 CODEC_ID_RV30,
00132 CODEC_ID_RV40,
00133 CODEC_ID_VC1,
00134 CODEC_ID_WMV3,
00135 CODEC_ID_LOCO,
00136 CODEC_ID_WNV1,
00137 CODEC_ID_AASC,
00138 CODEC_ID_INDEO2,
00139 CODEC_ID_FRAPS,
00140 CODEC_ID_TRUEMOTION2,
00141 CODEC_ID_BMP,
00142 CODEC_ID_CSCD,
00143 CODEC_ID_MMVIDEO,
00144 CODEC_ID_ZMBV,
00145 CODEC_ID_AVS,
00146 CODEC_ID_SMACKVIDEO,
00147 CODEC_ID_NUV,
00148 CODEC_ID_KMVC,
00149 CODEC_ID_FLASHSV,
00150 CODEC_ID_CAVS,
00151 CODEC_ID_JPEG2000,
00152 CODEC_ID_VMNC,
00153 CODEC_ID_VP5,
00154 CODEC_ID_VP6,
00155 CODEC_ID_VP6F,
00156 CODEC_ID_TARGA,
00157 CODEC_ID_DSICINVIDEO,
00158 CODEC_ID_TIERTEXSEQVIDEO,
00159 CODEC_ID_TIFF,
00160 CODEC_ID_GIF,
00161 CODEC_ID_FFH264,
00162 CODEC_ID_DXA,
00163 CODEC_ID_DNXHD,
00164 CODEC_ID_THP,
00165 CODEC_ID_SGI,
00166 CODEC_ID_C93,
00167 CODEC_ID_BETHSOFTVID,
00168 CODEC_ID_PTX,
00169 CODEC_ID_TXD,
00170 CODEC_ID_VP6A,
00171 CODEC_ID_AMV,
00172 CODEC_ID_VB,
00173 CODEC_ID_PCX,
00174 CODEC_ID_SUNRAST,
00175 CODEC_ID_INDEO4,
00176 CODEC_ID_INDEO5,
00177 CODEC_ID_MIMIC,
00178 CODEC_ID_RL2,
00179 CODEC_ID_8SVX_EXP,
00180 CODEC_ID_8SVX_FIB,
00181 CODEC_ID_ESCAPE124,
00182 CODEC_ID_DIRAC,
00183 CODEC_ID_BFI,
00184 CODEC_ID_CMV,
00185 CODEC_ID_MOTIONPIXELS,
00186 CODEC_ID_TGV,
00187 CODEC_ID_TGQ,
00188 CODEC_ID_TQI,
00189 CODEC_ID_AURA,
00190 CODEC_ID_AURA2,
00191 CODEC_ID_V210X,
00192 CODEC_ID_TMV,
00193 CODEC_ID_V210,
00194 CODEC_ID_DPX,
00195 CODEC_ID_MAD,
00196 CODEC_ID_FRWU,
00197 CODEC_ID_FLASHSV2,
00198 CODEC_ID_CDGRAPHICS,
00199 CODEC_ID_R210,
00200 CODEC_ID_ANM,
00201 CODEC_ID_BINKVIDEO,
00202 CODEC_ID_IFF_ILBM,
00203 CODEC_ID_IFF_BYTERUN1,
00204 CODEC_ID_KGV1,
00205 CODEC_ID_YOP,
00206 CODEC_ID_VP8,
00207 CODEC_ID_PICTOR,
00208 CODEC_ID_ANSI,
00209 CODEC_ID_A64_MULTI,
00210 CODEC_ID_A64_MULTI5,
00211 CODEC_ID_R10K,
00212 CODEC_ID_MXPEG,
00213 CODEC_ID_LAGARITH,
00214 CODEC_ID_PRORES,
00215 CODEC_ID_JV,
00216 CODEC_ID_DFA,
00217 CODEC_ID_8SVX_RAW,
00218
00219
00220 CODEC_ID_PCM_S16LE= 0x10000,
00221 CODEC_ID_PCM_S16BE,
00222 CODEC_ID_PCM_U16LE,
00223 CODEC_ID_PCM_U16BE,
00224 CODEC_ID_PCM_S8,
00225 CODEC_ID_PCM_U8,
00226 CODEC_ID_PCM_MULAW,
00227 CODEC_ID_PCM_ALAW,
00228 CODEC_ID_PCM_S32LE,
00229 CODEC_ID_PCM_S32BE,
00230 CODEC_ID_PCM_U32LE,
00231 CODEC_ID_PCM_U32BE,
00232 CODEC_ID_PCM_S24LE,
00233 CODEC_ID_PCM_S24BE,
00234 CODEC_ID_PCM_U24LE,
00235 CODEC_ID_PCM_U24BE,
00236 CODEC_ID_PCM_S24DAUD,
00237 CODEC_ID_PCM_ZORK,
00238 CODEC_ID_PCM_S16LE_PLANAR,
00239 CODEC_ID_PCM_DVD,
00240 CODEC_ID_PCM_F32BE,
00241 CODEC_ID_PCM_F32LE,
00242 CODEC_ID_PCM_F64BE,
00243 CODEC_ID_PCM_F64LE,
00244 CODEC_ID_PCM_BLURAY,
00245 CODEC_ID_PCM_LXF,
00246 CODEC_ID_S302M,
00247
00248
00249 CODEC_ID_ADPCM_IMA_QT= 0x11000,
00250 CODEC_ID_ADPCM_IMA_WAV,
00251 CODEC_ID_ADPCM_IMA_DK3,
00252 CODEC_ID_ADPCM_IMA_DK4,
00253 CODEC_ID_ADPCM_IMA_WS,
00254 CODEC_ID_ADPCM_IMA_SMJPEG,
00255 CODEC_ID_ADPCM_MS,
00256 CODEC_ID_ADPCM_4XM,
00257 CODEC_ID_ADPCM_XA,
00258 CODEC_ID_ADPCM_ADX,
00259 CODEC_ID_ADPCM_EA,
00260 CODEC_ID_ADPCM_G726,
00261 CODEC_ID_ADPCM_CT,
00262 CODEC_ID_ADPCM_SWF,
00263 CODEC_ID_ADPCM_YAMAHA,
00264 CODEC_ID_ADPCM_SBPRO_4,
00265 CODEC_ID_ADPCM_SBPRO_3,
00266 CODEC_ID_ADPCM_SBPRO_2,
00267 CODEC_ID_ADPCM_THP,
00268 CODEC_ID_ADPCM_IMA_AMV,
00269 CODEC_ID_ADPCM_EA_R1,
00270 CODEC_ID_ADPCM_EA_R3,
00271 CODEC_ID_ADPCM_EA_R2,
00272 CODEC_ID_ADPCM_IMA_EA_SEAD,
00273 CODEC_ID_ADPCM_IMA_EA_EACS,
00274 CODEC_ID_ADPCM_EA_XAS,
00275 CODEC_ID_ADPCM_EA_MAXIS_XA,
00276 CODEC_ID_ADPCM_IMA_ISS,
00277 CODEC_ID_ADPCM_G722,
00278
00279
00280 CODEC_ID_AMR_NB= 0x12000,
00281 CODEC_ID_AMR_WB,
00282
00283
00284 CODEC_ID_RA_144= 0x13000,
00285 CODEC_ID_RA_288,
00286
00287
00288 CODEC_ID_ROQ_DPCM= 0x14000,
00289 CODEC_ID_INTERPLAY_DPCM,
00290 CODEC_ID_XAN_DPCM,
00291 CODEC_ID_SOL_DPCM,
00292
00293
00294 CODEC_ID_MP2= 0x15000,
00295 CODEC_ID_MP3,
00296 CODEC_ID_AAC,
00297 CODEC_ID_AC3,
00298 CODEC_ID_DTS,
00299 CODEC_ID_VORBIS,
00300 CODEC_ID_DVAUDIO,
00301 CODEC_ID_WMAV1,
00302 CODEC_ID_WMAV2,
00303 CODEC_ID_MACE3,
00304 CODEC_ID_MACE6,
00305 CODEC_ID_VMDAUDIO,
00306 CODEC_ID_SONIC,
00307 CODEC_ID_SONIC_LS,
00308 CODEC_ID_FLAC,
00309 CODEC_ID_MP3ADU,
00310 CODEC_ID_MP3ON4,
00311 CODEC_ID_SHORTEN,
00312 CODEC_ID_ALAC,
00313 CODEC_ID_WESTWOOD_SND1,
00314 CODEC_ID_GSM,
00315 CODEC_ID_QDM2,
00316 CODEC_ID_COOK,
00317 CODEC_ID_TRUESPEECH,
00318 CODEC_ID_TTA,
00319 CODEC_ID_SMACKAUDIO,
00320 CODEC_ID_QCELP,
00321 CODEC_ID_WAVPACK,
00322 CODEC_ID_DSICINAUDIO,
00323 CODEC_ID_IMC,
00324 CODEC_ID_MUSEPACK7,
00325 CODEC_ID_MLP,
00326 CODEC_ID_GSM_MS,
00327 CODEC_ID_ATRAC3,
00328 CODEC_ID_VOXWARE,
00329 CODEC_ID_APE,
00330 CODEC_ID_NELLYMOSER,
00331 CODEC_ID_MUSEPACK8,
00332 CODEC_ID_SPEEX,
00333 CODEC_ID_WMAVOICE,
00334 CODEC_ID_WMAPRO,
00335 CODEC_ID_WMALOSSLESS,
00336 CODEC_ID_ATRAC3P,
00337 CODEC_ID_EAC3,
00338 CODEC_ID_SIPR,
00339 CODEC_ID_MP1,
00340 CODEC_ID_TWINVQ,
00341 CODEC_ID_TRUEHD,
00342 CODEC_ID_MP4ALS,
00343 CODEC_ID_ATRAC1,
00344 CODEC_ID_BINKAUDIO_RDFT,
00345 CODEC_ID_BINKAUDIO_DCT,
00346 CODEC_ID_AAC_LATM,
00347 CODEC_ID_QDMC,
00348 CODEC_ID_CELT,
00349
00350
00351 CODEC_ID_DVD_SUBTITLE= 0x17000,
00352 CODEC_ID_DVB_SUBTITLE,
00353 CODEC_ID_TEXT,
00354 CODEC_ID_XSUB,
00355 CODEC_ID_SSA,
00356 CODEC_ID_MOV_TEXT,
00357 CODEC_ID_HDMV_PGS_SUBTITLE,
00358 CODEC_ID_DVB_TELETEXT,
00359 CODEC_ID_SRT,
00360 CODEC_ID_MICRODVD,
00361
00362
00363 CODEC_ID_TTF= 0x18000,
00364
00365 CODEC_ID_PROBE= 0x19000,
00366
00367 CODEC_ID_MPEG2TS= 0x20000,
00369 CODEC_ID_FFMETADATA=0x21000,
00370 };
00371
00372 #if LIBAVCODEC_VERSION_MAJOR < 53
00373 #define CodecType AVMediaType
00374
00375 #define CODEC_TYPE_UNKNOWN AVMEDIA_TYPE_UNKNOWN
00376 #define CODEC_TYPE_VIDEO AVMEDIA_TYPE_VIDEO
00377 #define CODEC_TYPE_AUDIO AVMEDIA_TYPE_AUDIO
00378 #define CODEC_TYPE_DATA AVMEDIA_TYPE_DATA
00379 #define CODEC_TYPE_SUBTITLE AVMEDIA_TYPE_SUBTITLE
00380 #define CODEC_TYPE_ATTACHMENT AVMEDIA_TYPE_ATTACHMENT
00381 #define CODEC_TYPE_NB AVMEDIA_TYPE_NB
00382 #endif
00383
00384 #if FF_API_OLD_SAMPLE_FMT
00385 #define SampleFormat AVSampleFormat
00386
00387 #define SAMPLE_FMT_NONE AV_SAMPLE_FMT_NONE
00388 #define SAMPLE_FMT_U8 AV_SAMPLE_FMT_U8
00389 #define SAMPLE_FMT_S16 AV_SAMPLE_FMT_S16
00390 #define SAMPLE_FMT_S32 AV_SAMPLE_FMT_S32
00391 #define SAMPLE_FMT_FLT AV_SAMPLE_FMT_FLT
00392 #define SAMPLE_FMT_DBL AV_SAMPLE_FMT_DBL
00393 #define SAMPLE_FMT_NB AV_SAMPLE_FMT_NB
00394 #endif
00395
00396 #if FF_API_OLD_AUDIOCONVERT
00397 #include "libavutil/audioconvert.h"
00398
00399
00400 #define CH_FRONT_LEFT AV_CH_FRONT_LEFT
00401 #define CH_FRONT_RIGHT AV_CH_FRONT_RIGHT
00402 #define CH_FRONT_CENTER AV_CH_FRONT_CENTER
00403 #define CH_LOW_FREQUENCY AV_CH_LOW_FREQUENCY
00404 #define CH_BACK_LEFT AV_CH_BACK_LEFT
00405 #define CH_BACK_RIGHT AV_CH_BACK_RIGHT
00406 #define CH_FRONT_LEFT_OF_CENTER AV_CH_FRONT_LEFT_OF_CENTER
00407 #define CH_FRONT_RIGHT_OF_CENTER AV_CH_FRONT_RIGHT_OF_CENTER
00408 #define CH_BACK_CENTER AV_CH_BACK_CENTER
00409 #define CH_SIDE_LEFT AV_CH_SIDE_LEFT
00410 #define CH_SIDE_RIGHT AV_CH_SIDE_RIGHT
00411 #define CH_TOP_CENTER AV_CH_TOP_CENTER
00412 #define CH_TOP_FRONT_LEFT AV_CH_TOP_FRONT_LEFT
00413 #define CH_TOP_FRONT_CENTER AV_CH_TOP_FRONT_CENTER
00414 #define CH_TOP_FRONT_RIGHT AV_CH_TOP_FRONT_RIGHT
00415 #define CH_TOP_BACK_LEFT AV_CH_TOP_BACK_LEFT
00416 #define CH_TOP_BACK_CENTER AV_CH_TOP_BACK_CENTER
00417 #define CH_TOP_BACK_RIGHT AV_CH_TOP_BACK_RIGHT
00418 #define CH_STEREO_LEFT AV_CH_STEREO_LEFT
00419 #define CH_STEREO_RIGHT AV_CH_STEREO_RIGHT
00420
00424 #define CH_LAYOUT_NATIVE AV_CH_LAYOUT_NATIVE
00425
00426
00427 #define CH_LAYOUT_MONO AV_CH_LAYOUT_MONO
00428 #define CH_LAYOUT_STEREO AV_CH_LAYOUT_STEREO
00429 #define CH_LAYOUT_2_1 AV_CH_LAYOUT_2_1
00430 #define CH_LAYOUT_SURROUND AV_CH_LAYOUT_SURROUND
00431 #define CH_LAYOUT_4POINT0 AV_CH_LAYOUT_4POINT0
00432 #define CH_LAYOUT_2_2 AV_CH_LAYOUT_2_2
00433 #define CH_LAYOUT_QUAD AV_CH_LAYOUT_QUAD
00434 #define CH_LAYOUT_5POINT0 AV_CH_LAYOUT_5POINT0
00435 #define CH_LAYOUT_5POINT1 AV_CH_LAYOUT_5POINT1
00436 #define CH_LAYOUT_5POINT0_BACK AV_CH_LAYOUT_5POINT0_BACK
00437 #define CH_LAYOUT_5POINT1_BACK AV_CH_LAYOUT_5POINT1_BACK
00438 #define CH_LAYOUT_7POINT0 AV_CH_LAYOUT_7POINT0
00439 #define CH_LAYOUT_7POINT1 AV_CH_LAYOUT_7POINT1
00440 #define CH_LAYOUT_7POINT1_WIDE AV_CH_LAYOUT_7POINT1_WIDE
00441 #define CH_LAYOUT_STEREO_DOWNMIX AV_CH_LAYOUT_STEREO_DOWNMIX
00442 #endif
00443
00444
00445 #define AVCODEC_MAX_AUDIO_FRAME_SIZE 192000 // 1 second of 48khz 32bit audio
00446
00454 #define FF_INPUT_BUFFER_PADDING_SIZE 8
00455
00460 #define FF_MIN_BUFFER_SIZE 16384
00461
00462
00466 enum Motion_Est_ID {
00467 ME_ZERO = 1,
00468 ME_FULL,
00469 ME_LOG,
00470 ME_PHODS,
00471 ME_EPZS,
00472 ME_X1,
00473 ME_HEX,
00474 ME_UMH,
00475 ME_ITER,
00476 ME_TESA,
00477 };
00478
00479 enum AVDiscard{
00480
00481
00482 AVDISCARD_NONE =-16,
00483 AVDISCARD_DEFAULT= 0,
00484 AVDISCARD_NONREF = 8,
00485 AVDISCARD_BIDIR = 16,
00486 AVDISCARD_NONKEY = 32,
00487 AVDISCARD_ALL = 48,
00488 };
00489
00490 enum AVColorPrimaries{
00491 AVCOL_PRI_BT709 =1,
00492 AVCOL_PRI_UNSPECIFIED=2,
00493 AVCOL_PRI_BT470M =4,
00494 AVCOL_PRI_BT470BG =5,
00495 AVCOL_PRI_SMPTE170M =6,
00496 AVCOL_PRI_SMPTE240M =7,
00497 AVCOL_PRI_FILM =8,
00498 AVCOL_PRI_NB ,
00499 };
00500
00501 enum AVColorTransferCharacteristic{
00502 AVCOL_TRC_BT709 =1,
00503 AVCOL_TRC_UNSPECIFIED=2,
00504 AVCOL_TRC_GAMMA22 =4,
00505 AVCOL_TRC_GAMMA28 =5,
00506 AVCOL_TRC_NB ,
00507 };
00508
00509 enum AVColorSpace{
00510 AVCOL_SPC_RGB =0,
00511 AVCOL_SPC_BT709 =1,
00512 AVCOL_SPC_UNSPECIFIED=2,
00513 AVCOL_SPC_FCC =4,
00514 AVCOL_SPC_BT470BG =5,
00515 AVCOL_SPC_SMPTE170M =6,
00516 AVCOL_SPC_SMPTE240M =7,
00517 AVCOL_SPC_NB ,
00518 };
00519
00520 enum AVColorRange{
00521 AVCOL_RANGE_UNSPECIFIED=0,
00522 AVCOL_RANGE_MPEG =1,
00523 AVCOL_RANGE_JPEG =2,
00524 AVCOL_RANGE_NB ,
00525 };
00526
00532 enum AVChromaLocation{
00533 AVCHROMA_LOC_UNSPECIFIED=0,
00534 AVCHROMA_LOC_LEFT =1,
00535 AVCHROMA_LOC_CENTER =2,
00536 AVCHROMA_LOC_TOPLEFT =3,
00537 AVCHROMA_LOC_TOP =4,
00538 AVCHROMA_LOC_BOTTOMLEFT =5,
00539 AVCHROMA_LOC_BOTTOM =6,
00540 AVCHROMA_LOC_NB ,
00541 };
00542
00543 #if FF_API_FLAC_GLOBAL_OPTS
00544
00547 enum AVLPCType {
00548 AV_LPC_TYPE_DEFAULT = -1,
00549 AV_LPC_TYPE_NONE = 0,
00550 AV_LPC_TYPE_FIXED = 1,
00551 AV_LPC_TYPE_LEVINSON = 2,
00552 AV_LPC_TYPE_CHOLESKY = 3,
00553 AV_LPC_TYPE_NB ,
00554 };
00555 #endif
00556
00557 enum AVAudioServiceType {
00558 AV_AUDIO_SERVICE_TYPE_MAIN = 0,
00559 AV_AUDIO_SERVICE_TYPE_EFFECTS = 1,
00560 AV_AUDIO_SERVICE_TYPE_VISUALLY_IMPAIRED = 2,
00561 AV_AUDIO_SERVICE_TYPE_HEARING_IMPAIRED = 3,
00562 AV_AUDIO_SERVICE_TYPE_DIALOGUE = 4,
00563 AV_AUDIO_SERVICE_TYPE_COMMENTARY = 5,
00564 AV_AUDIO_SERVICE_TYPE_EMERGENCY = 6,
00565 AV_AUDIO_SERVICE_TYPE_VOICE_OVER = 7,
00566 AV_AUDIO_SERVICE_TYPE_KARAOKE = 8,
00567 AV_AUDIO_SERVICE_TYPE_NB ,
00568 };
00569
00570 typedef struct RcOverride{
00571 int start_frame;
00572 int end_frame;
00573 int qscale;
00574 float quality_factor;
00575 } RcOverride;
00576
00577 #define FF_MAX_B_FRAMES 16
00578
00579
00580
00581
00582
00583
00584 #define CODEC_FLAG_QSCALE 0x0002
00585 #define CODEC_FLAG_4MV 0x0004
00586 #define CODEC_FLAG_QPEL 0x0010
00587 #define CODEC_FLAG_GMC 0x0020
00588 #define CODEC_FLAG_MV0 0x0040
00589 #define CODEC_FLAG_PART 0x0080
00590
00595 #define CODEC_FLAG_INPUT_PRESERVED 0x0100
00596 #define CODEC_FLAG_PASS1 0x0200
00597 #define CODEC_FLAG_PASS2 0x0400
00598 #define CODEC_FLAG_EXTERN_HUFF 0x1000
00599 #define CODEC_FLAG_GRAY 0x2000
00600 #define CODEC_FLAG_EMU_EDGE 0x4000
00601 #define CODEC_FLAG_PSNR 0x8000
00602 #define CODEC_FLAG_TRUNCATED 0x00010000
00604 #define CODEC_FLAG_NORMALIZE_AQP 0x00020000
00605 #define CODEC_FLAG_INTERLACED_DCT 0x00040000
00606 #define CODEC_FLAG_LOW_DELAY 0x00080000
00607 #define CODEC_FLAG_ALT_SCAN 0x00100000
00608 #define CODEC_FLAG_GLOBAL_HEADER 0x00400000
00609 #define CODEC_FLAG_BITEXACT 0x00800000
00610
00611 #define CODEC_FLAG_AC_PRED 0x01000000
00612 #define CODEC_FLAG_H263P_UMV 0x02000000
00613 #define CODEC_FLAG_CBP_RD 0x04000000
00614 #define CODEC_FLAG_QP_RD 0x08000000
00615 #define CODEC_FLAG_H263P_AIV 0x00000008
00616 #define CODEC_FLAG_OBMC 0x00000001
00617 #define CODEC_FLAG_LOOP_FILTER 0x00000800
00618 #define CODEC_FLAG_H263P_SLICE_STRUCT 0x10000000
00619 #define CODEC_FLAG_INTERLACED_ME 0x20000000
00620 #define CODEC_FLAG_SVCD_SCAN_OFFSET 0x40000000
00621 #define CODEC_FLAG_CLOSED_GOP 0x80000000
00622 #define CODEC_FLAG2_FAST 0x00000001
00623 #define CODEC_FLAG2_STRICT_GOP 0x00000002
00624 #define CODEC_FLAG2_NO_OUTPUT 0x00000004
00625 #define CODEC_FLAG2_LOCAL_HEADER 0x00000008
00626 #define CODEC_FLAG2_BPYRAMID 0x00000010
00627 #define CODEC_FLAG2_WPRED 0x00000020
00628 #define CODEC_FLAG2_MIXED_REFS 0x00000040
00629 #define CODEC_FLAG2_8X8DCT 0x00000080
00630 #define CODEC_FLAG2_FASTPSKIP 0x00000100
00631 #define CODEC_FLAG2_AUD 0x00000200
00632 #define CODEC_FLAG2_BRDO 0x00000400
00633 #define CODEC_FLAG2_INTRA_VLC 0x00000800
00634 #define CODEC_FLAG2_MEMC_ONLY 0x00001000
00635 #define CODEC_FLAG2_DROP_FRAME_TIMECODE 0x00002000
00636 #define CODEC_FLAG2_SKIP_RD 0x00004000
00637 #define CODEC_FLAG2_CHUNKS 0x00008000
00638 #define CODEC_FLAG2_NON_LINEAR_QUANT 0x00010000
00639 #define CODEC_FLAG2_BIT_RESERVOIR 0x00020000
00640 #define CODEC_FLAG2_MBTREE 0x00040000
00641 #define CODEC_FLAG2_PSY 0x00080000
00642 #define CODEC_FLAG2_SSIM 0x00100000
00643 #define CODEC_FLAG2_INTRA_REFRESH 0x00200000
00644
00645
00646
00647
00648
00649
00650
00651
00652 #define CODEC_CAP_DRAW_HORIZ_BAND 0x0001
00653
00658 #define CODEC_CAP_DR1 0x0002
00659
00660 #define CODEC_CAP_PARSE_ONLY 0x0004
00661 #define CODEC_CAP_TRUNCATED 0x0008
00662
00663 #define CODEC_CAP_HWACCEL 0x0010
00664
00668 #define CODEC_CAP_DELAY 0x0020
00669
00673 #define CODEC_CAP_SMALL_LAST_FRAME 0x0040
00674
00677 #define CODEC_CAP_HWACCEL_VDPAU 0x0080
00678
00689 #define CODEC_CAP_SUBFRAMES 0x0100
00690
00694 #define CODEC_CAP_EXPERIMENTAL 0x0200
00695
00698 #define CODEC_CAP_CHANNEL_CONF 0x0400
00699
00703 #define CODEC_CAP_NEG_LINESIZES 0x0800
00704
00708 #define CODEC_CAP_FRAME_THREADS 0x1000
00709
00712 #define CODEC_CAP_SLICE_THREADS 0x2000
00713
00716 #define CODEC_CAP_LOSSLESS 0x80000000
00717
00718
00719 #define MB_TYPE_INTRA4x4 0x0001
00720 #define MB_TYPE_INTRA16x16 0x0002 //FIXME H.264-specific
00721 #define MB_TYPE_INTRA_PCM 0x0004 //FIXME H.264-specific
00722 #define MB_TYPE_16x16 0x0008
00723 #define MB_TYPE_16x8 0x0010
00724 #define MB_TYPE_8x16 0x0020
00725 #define MB_TYPE_8x8 0x0040
00726 #define MB_TYPE_INTERLACED 0x0080
00727 #define MB_TYPE_DIRECT2 0x0100 //FIXME
00728 #define MB_TYPE_ACPRED 0x0200
00729 #define MB_TYPE_GMC 0x0400
00730 #define MB_TYPE_SKIP 0x0800
00731 #define MB_TYPE_P0L0 0x1000
00732 #define MB_TYPE_P1L0 0x2000
00733 #define MB_TYPE_P0L1 0x4000
00734 #define MB_TYPE_P1L1 0x8000
00735 #define MB_TYPE_L0 (MB_TYPE_P0L0 | MB_TYPE_P1L0)
00736 #define MB_TYPE_L1 (MB_TYPE_P0L1 | MB_TYPE_P1L1)
00737 #define MB_TYPE_L0L1 (MB_TYPE_L0 | MB_TYPE_L1)
00738 #define MB_TYPE_QUANT 0x00010000
00739 #define MB_TYPE_CBP 0x00020000
00740
00741
00747 typedef struct AVPanScan{
00753 int id;
00754
00760 int width;
00761 int height;
00762
00768 int16_t position[3][2];
00769 }AVPanScan;
00770
00771 #define FF_COMMON_FRAME \
00772 \
00778 uint8_t *data[4];\
00779 int linesize[4];\
00780 \
00786 uint8_t *base[4];\
00787 \
00792 int key_frame;\
00793 \
00794 \
00799 enum AVPictureType pict_type;\
00800 \
00801 \
00807 int64_t pts;\
00808 \
00809 \
00814 int coded_picture_number;\
00815 \
00820 int display_picture_number;\
00821 \
00822 \
00827 int quality; \
00828 \
00829 \
00835 int age;\
00836 \
00837 \
00845 int reference;\
00846 \
00847 \
00852 int8_t *qscale_table;\
00853 \
00858 int qstride;\
00859 \
00860 \
00866 uint8_t *mbskip_table;\
00867 \
00868 \
00880 int16_t (*motion_val[2])[2];\
00881 \
00882 \
00888 uint32_t *mb_type;\
00889 \
00890 \
00896 uint8_t motion_subsample_log2;\
00897 \
00898 \
00903 void *opaque;\
00904 \
00905 \
00910 uint64_t error[4];\
00911 \
00912 \
00918 int type;\
00919 \
00920 \
00926 int repeat_pict;\
00927 \
00928 \
00931 int qscale_type;\
00932 \
00933 \
00938 int interlaced_frame;\
00939 \
00940 \
00945 int top_field_first;\
00946 \
00947 \
00952 AVPanScan *pan_scan;\
00953 \
00954 \
00959 int palette_has_changed;\
00960 \
00961 \
00966 int buffer_hints;\
00967 \
00968 \
00973 short *dct_coeff;\
00974 \
00975 \
00981 int8_t *ref_index[2];\
00982 \
00983 \
00994 int64_t reordered_opaque;\
00995 \
00996 \
01001 void *hwaccel_picture_private;\
01002 \
01003 \
01008 int64_t pkt_pts;\
01009 \
01010 \
01015 int64_t pkt_dts;\
01016 \
01017 \
01022 struct AVCodecContext *owner;\
01023 \
01024 \
01029 void *thread_opaque;\
01030 \
01031 \
01036 int64_t best_effort_timestamp;\
01037 \
01038 \
01043 int64_t pkt_pos;\
01044 \
01045 \
01050 AVRational sample_aspect_ratio;\
01051 \
01052 \
01057 int width, height;\
01058 \
01059 \
01066 int format;\
01067
01068
01069 #define FF_QSCALE_TYPE_MPEG1 0
01070 #define FF_QSCALE_TYPE_MPEG2 1
01071 #define FF_QSCALE_TYPE_H264 2
01072 #define FF_QSCALE_TYPE_VP56 3
01073
01074 #define FF_BUFFER_TYPE_INTERNAL 1
01075 #define FF_BUFFER_TYPE_USER 2
01076 #define FF_BUFFER_TYPE_SHARED 4
01077 #define FF_BUFFER_TYPE_COPY 8
01078
01079 #if FF_API_OLD_FF_PICT_TYPES
01080
01081 #define FF_I_TYPE AV_PICTURE_TYPE_I
01082 #define FF_P_TYPE AV_PICTURE_TYPE_P
01083 #define FF_B_TYPE AV_PICTURE_TYPE_B
01084 #define FF_S_TYPE AV_PICTURE_TYPE_S
01085 #define FF_SI_TYPE AV_PICTURE_TYPE_SI
01086 #define FF_SP_TYPE AV_PICTURE_TYPE_SP
01087 #define FF_BI_TYPE AV_PICTURE_TYPE_BI
01088 #endif
01089
01090 #define FF_BUFFER_HINTS_VALID 0x01 // Buffer hints value is meaningful (if 0 ignore).
01091 #define FF_BUFFER_HINTS_READABLE 0x02 // Codec will read from buffer.
01092 #define FF_BUFFER_HINTS_PRESERVE 0x04 // User must not alter buffer content.
01093 #define FF_BUFFER_HINTS_REUSABLE 0x08 // Codec will reuse the buffer (update).
01094
01095 typedef struct AVPacket {
01105 int64_t pts;
01111 int64_t dts;
01112 uint8_t *data;
01113 int size;
01114 int stream_index;
01115 int flags;
01120 int duration;
01121 void (*destruct)(struct AVPacket *);
01122 void *priv;
01123 int64_t pos;
01124
01142 int64_t convergence_duration;
01143 } AVPacket;
01144 #define AV_PKT_FLAG_KEY 0x0001
01145 #if LIBAVCODEC_VERSION_MAJOR < 53
01146 #define PKT_FLAG_KEY AV_PKT_FLAG_KEY
01147 #endif
01148
01158 typedef struct AVFrame {
01159 FF_COMMON_FRAME
01160 } AVFrame;
01161
01169 typedef struct AVCodecContext {
01174 const AVClass *av_class;
01180 int bit_rate;
01181
01188 int bit_rate_tolerance;
01189
01195 int flags;
01196
01205 int sub_id;
01206
01214 int me_method;
01215
01227 uint8_t *extradata;
01228 int extradata_size;
01229
01238 AVRational time_base;
01239
01240
01248 int width, height;
01249
01250 #define FF_ASPECT_EXTENDED 15
01251
01257 int gop_size;
01258
01266 enum PixelFormat pix_fmt;
01267
01268 #if FF_API_RATE_EMU
01269
01275 attribute_deprecated int rate_emu;
01276 #endif
01277
01301 void (*draw_horiz_band)(struct AVCodecContext *s,
01302 const AVFrame *src, int offset[4],
01303 int y, int type, int height);
01304
01305
01306 int sample_rate;
01307 int channels;
01308
01314 enum AVSampleFormat sample_fmt;
01315
01316
01320 int frame_size;
01321 int frame_number;
01322 #if LIBAVCODEC_VERSION_MAJOR < 53
01323 int real_pict_num;
01324 #endif
01325
01332 int delay;
01333
01334
01335 float qcompress;
01336 float qblur;
01337
01343 int qmin;
01344
01350 int qmax;
01351
01357 int max_qdiff;
01358
01365 int max_b_frames;
01366
01374 float b_quant_factor;
01375
01377 int rc_strategy;
01378 #define FF_RC_STRATEGY_XVID 1
01379
01380 int b_frame_strategy;
01381
01382 #if FF_API_HURRY_UP
01383
01389 attribute_deprecated int hurry_up;
01390 #endif
01391
01392 struct AVCodec *codec;
01393
01394 void *priv_data;
01395
01396 int rtp_payload_size;
01397
01398
01399
01400
01401
01402
01403
01404
01405
01406
01407
01408
01409
01410 void (*rtp_callback)(struct AVCodecContext *avctx, void *data, int size, int mb_nb);
01411
01412
01413 int mv_bits;
01414 int header_bits;
01415 int i_tex_bits;
01416 int p_tex_bits;
01417 int i_count;
01418 int p_count;
01419 int skip_count;
01420 int misc_bits;
01421
01427 int frame_bits;
01428
01434 void *opaque;
01435
01436 char codec_name[32];
01437 enum AVMediaType codec_type;
01438 enum CodecID codec_id;
01439
01453 unsigned int codec_tag;
01454
01460 int workaround_bugs;
01461 #define FF_BUG_AUTODETECT 1
01462 #define FF_BUG_OLD_MSMPEG4 2
01463 #define FF_BUG_XVID_ILACE 4
01464 #define FF_BUG_UMP4 8
01465 #define FF_BUG_NO_PADDING 16
01466 #define FF_BUG_AMV 32
01467 #define FF_BUG_AC_VLC 0
01468 #define FF_BUG_QPEL_CHROMA 64
01469 #define FF_BUG_STD_QPEL 128
01470 #define FF_BUG_QPEL_CHROMA2 256
01471 #define FF_BUG_DIRECT_BLOCKSIZE 512
01472 #define FF_BUG_EDGE 1024
01473 #define FF_BUG_HPEL_CHROMA 2048
01474 #define FF_BUG_DC_CLIP 4096
01475 #define FF_BUG_MS 8192
01476 #define FF_BUG_TRUNCATED 16384
01477
01478
01484 int luma_elim_threshold;
01485
01491 int chroma_elim_threshold;
01492
01505 int strict_std_compliance;
01506 #define FF_COMPLIANCE_VERY_STRICT 2
01507 #define FF_COMPLIANCE_STRICT 1
01508 #define FF_COMPLIANCE_NORMAL 0
01509 #if FF_API_INOFFICIAL
01510 #define FF_COMPLIANCE_INOFFICIAL -1
01511 #endif
01512 #define FF_COMPLIANCE_UNOFFICIAL -1
01513 #define FF_COMPLIANCE_EXPERIMENTAL -2
01514
01515
01520 float b_quant_offset;
01521
01528 int error_recognition;
01529 #define FF_ER_CAREFUL 1
01530 #define FF_ER_COMPLIANT 2
01531 #define FF_ER_AGGRESSIVE 3
01532 #define FF_ER_VERY_AGGRESSIVE 4
01533
01548 int (*get_buffer)(struct AVCodecContext *c, AVFrame *pic);
01549
01559 void (*release_buffer)(struct AVCodecContext *c, AVFrame *pic);
01560
01567 int has_b_frames;
01568
01573 int block_align;
01574
01575 int parse_only;
01576
01577
01578
01584 int mpeg_quant;
01585
01591 char *stats_out;
01592
01599 char *stats_in;
01600
01607 float rc_qsquish;
01608
01609 float rc_qmod_amp;
01610 int rc_qmod_freq;
01611
01617 RcOverride *rc_override;
01618 int rc_override_count;
01619
01625 const char *rc_eq;
01626
01632 int rc_max_rate;
01633
01639 int rc_min_rate;
01640
01646 int rc_buffer_size;
01647 float rc_buffer_aggressivity;
01648
01656 float i_quant_factor;
01657
01663 float i_quant_offset;
01664
01670 float rc_initial_cplx;
01671
01677 int dct_algo;
01678 #define FF_DCT_AUTO 0
01679 #define FF_DCT_FASTINT 1
01680 #define FF_DCT_INT 2
01681 #define FF_DCT_MMX 3
01682 #define FF_DCT_MLIB 4
01683 #define FF_DCT_ALTIVEC 5
01684 #define FF_DCT_FAAN 6
01685
01691 float lumi_masking;
01692
01698 float temporal_cplx_masking;
01699
01705 float spatial_cplx_masking;
01706
01712 float p_masking;
01713
01719 float dark_masking;
01720
01726 int idct_algo;
01727 #define FF_IDCT_AUTO 0
01728 #define FF_IDCT_INT 1
01729 #define FF_IDCT_SIMPLE 2
01730 #define FF_IDCT_SIMPLEMMX 3
01731 #define FF_IDCT_LIBMPEG2MMX 4
01732 #define FF_IDCT_PS2 5
01733 #define FF_IDCT_MLIB 6
01734 #define FF_IDCT_ARM 7
01735 #define FF_IDCT_ALTIVEC 8
01736 #define FF_IDCT_SH4 9
01737 #define FF_IDCT_SIMPLEARM 10
01738 #define FF_IDCT_H264 11
01739 #define FF_IDCT_VP3 12
01740 #define FF_IDCT_IPP 13
01741 #define FF_IDCT_XVIDMMX 14
01742 #define FF_IDCT_CAVS 15
01743 #define FF_IDCT_SIMPLEARMV5TE 16
01744 #define FF_IDCT_SIMPLEARMV6 17
01745 #define FF_IDCT_SIMPLEVIS 18
01746 #define FF_IDCT_WMV2 19
01747 #define FF_IDCT_FAAN 20
01748 #define FF_IDCT_EA 21
01749 #define FF_IDCT_SIMPLENEON 22
01750 #define FF_IDCT_SIMPLEALPHA 23
01751 #define FF_IDCT_BINK 24
01752
01758 int slice_count;
01764 int *slice_offset;
01765
01771 int error_concealment;
01772 #define FF_EC_GUESS_MVS 1
01773 #define FF_EC_DEBLOCK 2
01774
01783 unsigned dsp_mask;
01784
01785 #if FF_API_MM_FLAGS
01786 #define FF_MM_FORCE AV_CPU_FLAG_FORCE
01787 #define FF_MM_MMX AV_CPU_FLAG_MMX
01788 #define FF_MM_3DNOW AV_CPU_FLAG_3DNOW
01789 #define FF_MM_MMXEXT AV_CPU_FLAG_MMX2
01790 #define FF_MM_MMX2 AV_CPU_FLAG_MMX2
01791 #define FF_MM_SSE AV_CPU_FLAG_SSE
01792 #define FF_MM_SSE2 AV_CPU_FLAG_SSE2
01793 #define FF_MM_SSE2SLOW AV_CPU_FLAG_SSE2SLOW
01794 #define FF_MM_3DNOWEXT AV_CPU_FLAG_3DNOWEXT
01795 #define FF_MM_SSE3 AV_CPU_FLAG_SSE3
01796 #define FF_MM_SSE3SLOW AV_CPU_FLAG_SSE3SLOW
01797 #define FF_MM_SSSE3 AV_CPU_FLAG_SSSE3
01798 #define FF_MM_SSE4 AV_CPU_FLAG_SSE4
01799 #define FF_MM_SSE42 AV_CPU_FLAG_SSE42
01800 #define FF_MM_IWMMXT AV_CPU_FLAG_IWMMXT
01801 #define FF_MM_ALTIVEC AV_CPU_FLAG_ALTIVEC
01802 #endif
01803
01809 int bits_per_coded_sample;
01810
01816 int prediction_method;
01817 #define FF_PRED_LEFT 0
01818 #define FF_PRED_PLANE 1
01819 #define FF_PRED_MEDIAN 2
01820
01828 AVRational sample_aspect_ratio;
01829
01835 AVFrame *coded_frame;
01836
01842 int debug;
01843 #define FF_DEBUG_PICT_INFO 1
01844 #define FF_DEBUG_RC 2
01845 #define FF_DEBUG_BITSTREAM 4
01846 #define FF_DEBUG_MB_TYPE 8
01847 #define FF_DEBUG_QP 16
01848 #define FF_DEBUG_MV 32
01849 #define FF_DEBUG_DCT_COEFF 0x00000040
01850 #define FF_DEBUG_SKIP 0x00000080
01851 #define FF_DEBUG_STARTCODE 0x00000100
01852 #define FF_DEBUG_PTS 0x00000200
01853 #define FF_DEBUG_ER 0x00000400
01854 #define FF_DEBUG_MMCO 0x00000800
01855 #define FF_DEBUG_BUGS 0x00001000
01856 #define FF_DEBUG_VIS_QP 0x00002000
01857 #define FF_DEBUG_VIS_MB_TYPE 0x00004000
01858 #define FF_DEBUG_BUFFERS 0x00008000
01859 #define FF_DEBUG_THREADS 0x00010000
01860
01866 int debug_mv;
01867 #define FF_DEBUG_VIS_MV_P_FOR 0x00000001 //visualize forward predicted MVs of P frames
01868 #define FF_DEBUG_VIS_MV_B_FOR 0x00000002 //visualize forward predicted MVs of B frames
01869 #define FF_DEBUG_VIS_MV_B_BACK 0x00000004 //visualize backward predicted MVs of B frames
01870
01876 uint64_t error[4];
01877
01878 #if FF_API_MB_Q
01879
01884 attribute_deprecated int mb_qmin;
01885
01891 attribute_deprecated int mb_qmax;
01892 #endif
01893
01899 int me_cmp;
01905 int me_sub_cmp;
01911 int mb_cmp;
01917 int ildct_cmp;
01918 #define FF_CMP_SAD 0
01919 #define FF_CMP_SSE 1
01920 #define FF_CMP_SATD 2
01921 #define FF_CMP_DCT 3
01922 #define FF_CMP_PSNR 4
01923 #define FF_CMP_BIT 5
01924 #define FF_CMP_RD 6
01925 #define FF_CMP_ZERO 7
01926 #define FF_CMP_VSAD 8
01927 #define FF_CMP_VSSE 9
01928 #define FF_CMP_NSSE 10
01929 #define FF_CMP_W53 11
01930 #define FF_CMP_W97 12
01931 #define FF_CMP_DCTMAX 13
01932 #define FF_CMP_DCT264 14
01933 #define FF_CMP_CHROMA 256
01934
01940 int dia_size;
01941
01947 int last_predictor_count;
01948
01954 int pre_me;
01955
01961 int me_pre_cmp;
01962
01968 int pre_dia_size;
01969
01975 int me_subpel_quality;
01976
01986 enum PixelFormat (*get_format)(struct AVCodecContext *s, const enum PixelFormat * fmt);
01987
01996 int dtg_active_format;
01997 #define FF_DTG_AFD_SAME 8
01998 #define FF_DTG_AFD_4_3 9
01999 #define FF_DTG_AFD_16_9 10
02000 #define FF_DTG_AFD_14_9 11
02001 #define FF_DTG_AFD_4_3_SP_14_9 13
02002 #define FF_DTG_AFD_16_9_SP_14_9 14
02003 #define FF_DTG_AFD_SP_4_3 15
02004
02012 int me_range;
02013
02019 int intra_quant_bias;
02020 #define FF_DEFAULT_QUANT_BIAS 999999
02021
02027 int inter_quant_bias;
02028
02035 int color_table_id;
02036
02041 int internal_buffer_count;
02042
02047 void *internal_buffer;
02048
02055 int global_quality;
02056
02057 #define FF_CODER_TYPE_VLC 0
02058 #define FF_CODER_TYPE_AC 1
02059 #define FF_CODER_TYPE_RAW 2
02060 #define FF_CODER_TYPE_RLE 3
02061 #define FF_CODER_TYPE_DEFLATE 4
02062
02067 int coder_type;
02068
02074 int context_model;
02075 #if 0
02076
02081 uint8_t * (*realloc)(struct AVCodecContext *s, uint8_t *buf, int buf_size);
02082 #endif
02083
02089 int slice_flags;
02090 #define SLICE_FLAG_CODED_ORDER 0x0001
02091 #define SLICE_FLAG_ALLOW_FIELD 0x0002
02092 #define SLICE_FLAG_ALLOW_PLANE 0x0004
02093
02094
02099 int xvmc_acceleration;
02100
02106 int mb_decision;
02107 #define FF_MB_DECISION_SIMPLE 0
02108 #define FF_MB_DECISION_BITS 1
02109 #define FF_MB_DECISION_RD 2
02110
02111
02116 uint16_t *intra_matrix;
02117
02123 uint16_t *inter_matrix;
02124
02131 unsigned int stream_codec_tag;
02132
02139 int scenechange_threshold;
02140
02146 int lmin;
02147
02153 int lmax;
02154
02155 #if FF_API_PALETTE_CONTROL
02156
02161 struct AVPaletteControl *palctrl;
02162 #endif
02163
02169 int noise_reduction;
02170
02183 int (*reget_buffer)(struct AVCodecContext *c, AVFrame *pic);
02184
02190 int rc_initial_buffer_occupancy;
02191
02197 int inter_threshold;
02198
02204 int flags2;
02205
02211 int error_rate;
02212
02213 #if FF_API_ANTIALIAS_ALGO
02214
02219 attribute_deprecated int antialias_algo;
02220 #define FF_AA_AUTO 0
02221 #define FF_AA_FASTINT 1 //not implemented yet
02222 #define FF_AA_INT 2
02223 #define FF_AA_FLOAT 3
02224 #endif
02225
02231 int quantizer_noise_shaping;
02232
02239 int thread_count;
02240
02250 int (*execute)(struct AVCodecContext *c, int (*func)(struct AVCodecContext *c2, void *arg), void *arg2, int *ret, int count, int size);
02251
02258 void *thread_opaque;
02259
02267 int me_threshold;
02268
02274 int mb_threshold;
02275
02281 int intra_dc_precision;
02282
02288 int nsse_weight;
02289
02295 int skip_top;
02296
02302 int skip_bottom;
02303
02309 int profile;
02310 #define FF_PROFILE_UNKNOWN -99
02311 #define FF_PROFILE_RESERVED -100
02312
02313 #define FF_PROFILE_AAC_MAIN 0
02314 #define FF_PROFILE_AAC_LOW 1
02315 #define FF_PROFILE_AAC_SSR 2
02316 #define FF_PROFILE_AAC_LTP 3
02317
02318 #define FF_PROFILE_DTS 20
02319 #define FF_PROFILE_DTS_ES 30
02320 #define FF_PROFILE_DTS_96_24 40
02321 #define FF_PROFILE_DTS_HD_HRA 50
02322 #define FF_PROFILE_DTS_HD_MA 60
02323
02324 #define FF_PROFILE_MPEG2_422 0
02325 #define FF_PROFILE_MPEG2_HIGH 1
02326 #define FF_PROFILE_MPEG2_SS 2
02327 #define FF_PROFILE_MPEG2_SNR_SCALABLE 3
02328 #define FF_PROFILE_MPEG2_MAIN 4
02329 #define FF_PROFILE_MPEG2_SIMPLE 5
02330
02331 #define FF_PROFILE_H264_CONSTRAINED (1<<9) // 8+1; constraint_set1_flag
02332 #define FF_PROFILE_H264_INTRA (1<<11) // 8+3; constraint_set3_flag
02333
02334 #define FF_PROFILE_H264_BASELINE 66
02335 #define FF_PROFILE_H264_CONSTRAINED_BASELINE (66|FF_PROFILE_H264_CONSTRAINED)
02336 #define FF_PROFILE_H264_MAIN 77
02337 #define FF_PROFILE_H264_EXTENDED 88
02338 #define FF_PROFILE_H264_HIGH 100
02339 #define FF_PROFILE_H264_HIGH_10 110
02340 #define FF_PROFILE_H264_HIGH_10_INTRA (110|FF_PROFILE_H264_INTRA)
02341 #define FF_PROFILE_H264_HIGH_422 122
02342 #define FF_PROFILE_H264_HIGH_422_INTRA (122|FF_PROFILE_H264_INTRA)
02343 #define FF_PROFILE_H264_HIGH_444 144
02344 #define FF_PROFILE_H264_HIGH_444_PREDICTIVE 244
02345 #define FF_PROFILE_H264_HIGH_444_INTRA (244|FF_PROFILE_H264_INTRA)
02346 #define FF_PROFILE_H264_CAVLC_444 44
02347
02348 #define FF_PROFILE_VC1_SIMPLE 0
02349 #define FF_PROFILE_VC1_MAIN 1
02350 #define FF_PROFILE_VC1_COMPLEX 2
02351 #define FF_PROFILE_VC1_ADVANCED 3
02352
02358 int level;
02359 #define FF_LEVEL_UNKNOWN -99
02360
02366 int lowres;
02367
02374 int coded_width, coded_height;
02375
02381 int frame_skip_threshold;
02382
02388 int frame_skip_factor;
02389
02395 int frame_skip_exp;
02396
02402 int frame_skip_cmp;
02403
02410 float border_masking;
02411
02417 int mb_lmin;
02418
02424 int mb_lmax;
02425
02431 int me_penalty_compensation;
02432
02438 enum AVDiscard skip_loop_filter;
02439
02445 enum AVDiscard skip_idct;
02446
02452 enum AVDiscard skip_frame;
02453
02459 int bidir_refine;
02460
02466 int brd_scale;
02467
02473 float crf;
02474
02480 int cqp;
02481
02487 int keyint_min;
02488
02494 int refs;
02495
02501 int chromaoffset;
02502
02508 int bframebias;
02509
02515 int trellis;
02516
02522 float complexityblur;
02523
02530 int deblockalpha;
02531
02538 int deblockbeta;
02539
02545 int partitions;
02546 #define X264_PART_I4X4 0x001
02547 #define X264_PART_I8X8 0x002
02548 #define X264_PART_P8X8 0x010
02549 #define X264_PART_P4X4 0x020
02550 #define X264_PART_B8X8 0x100
02551
02557 int directpred;
02558
02564 int cutoff;
02565
02571 int scenechange_factor;
02572
02579 int mv0_threshold;
02580
02586 int b_sensitivity;
02587
02592 int compression_level;
02593 #define FF_COMPRESSION_DEFAULT -1
02594
02595 #if FF_API_USE_LPC
02596
02602 int use_lpc;
02603
02609 int lpc_coeff_precision;
02610 #endif
02611
02616 int min_prediction_order;
02617
02622 int max_prediction_order;
02623
02624 #if FF_API_FLAC_GLOBAL_OPTS
02625
02636 attribute_deprecated int prediction_order_method;
02637
02642 attribute_deprecated int min_partition_order;
02643
02648 attribute_deprecated int max_partition_order;
02652 #endif
02653
02659 int64_t timecode_frame_start;
02660
02661 #if FF_API_REQUEST_CHANNELS
02662
02668 int request_channels;
02669 #endif
02670
02677 float drc_scale;
02678
02686 int64_t reordered_opaque;
02687
02693 int bits_per_raw_sample;
02694
02700 int64_t channel_layout;
02701
02707 int64_t request_channel_layout;
02708
02714 float rc_max_available_vbv_use;
02715
02721 float rc_min_vbv_overflow_use;
02722
02728 struct AVHWAccel *hwaccel;
02729
02737 int ticks_per_frame;
02738
02749 void *hwaccel_context;
02750
02756 enum AVColorPrimaries color_primaries;
02757
02763 enum AVColorTransferCharacteristic color_trc;
02764
02770 enum AVColorSpace colorspace;
02771
02777 enum AVColorRange color_range;
02778
02784 enum AVChromaLocation chroma_sample_location;
02785
02804 int (*execute2)(struct AVCodecContext *c, int (*func)(struct AVCodecContext *c2, void *arg, int jobnr, int threadnr), void *arg2, int *ret, int count);
02805
02814 int weighted_p_pred;
02815
02824 int aq_mode;
02825
02832 float aq_strength;
02833
02840 float psy_rd;
02841
02848 float psy_trellis;
02849
02856 int rc_lookahead;
02857
02865 float crf_max;
02866
02867 int log_level_offset;
02868
02869 #if FF_API_FLAC_GLOBAL_OPTS
02870
02875 attribute_deprecated enum AVLPCType lpc_type;
02876
02882 attribute_deprecated int lpc_passes;
02883 #endif
02884
02892 int slices;
02893
02902 uint8_t *subtitle_header;
02903 int subtitle_header_size;
02904
02912 AVPacket *pkt;
02913
02921 int is_copy;
02922
02931 int thread_type;
02932 #define FF_THREAD_FRAME 1 //< Decode more than one frame at once
02933 #define FF_THREAD_SLICE 2 //< Decode more than one part of a single frame at once
02934
02940 int active_thread_type;
02941
02950 int thread_safe_callbacks;
02951
02958 uint64_t vbv_delay;
02959
02965 enum AVAudioServiceType audio_service_type;
02966
02973 enum AVSampleFormat request_sample_fmt;
02974
02980 int64_t pts_correction_num_faulty_pts;
02981 int64_t pts_correction_num_faulty_dts;
02982 int64_t pts_correction_last_pts;
02983 int64_t pts_correction_last_dts;
02984
02985
02986 } AVCodecContext;
02987
02991 typedef struct AVProfile {
02992 int profile;
02993 const char *name;
02994 } AVProfile;
02995
02999 typedef struct AVCodec {
03006 const char *name;
03007 enum AVMediaType type;
03008 enum CodecID id;
03009 int priv_data_size;
03010 int (*init)(AVCodecContext *);
03011 int (*encode)(AVCodecContext *, uint8_t *buf, int buf_size, void *data);
03012 int (*close)(AVCodecContext *);
03013 int (*decode)(AVCodecContext *, void *outdata, int *outdata_size, AVPacket *avpkt);
03018 int capabilities;
03019 struct AVCodec *next;
03024 void (*flush)(AVCodecContext *);
03025 const AVRational *supported_framerates;
03026 const enum PixelFormat *pix_fmts;
03027
03031 const char *long_name;
03032 const int *supported_samplerates;
03033 const enum AVSampleFormat *sample_fmts;
03034 const int64_t *channel_layouts;
03035 uint8_t max_lowres;
03036 const AVClass *priv_class;
03037 const AVProfile *profiles;
03038
03048 int (*init_thread_copy)(AVCodecContext *);
03056 int (*update_thread_context)(AVCodecContext *dst, const AVCodecContext *src);
03058 } AVCodec;
03059
03063 typedef struct AVHWAccel {
03069 const char *name;
03070
03076 enum AVMediaType type;
03077
03083 enum CodecID id;
03084
03090 enum PixelFormat pix_fmt;
03091
03096 int capabilities;
03097
03098 struct AVHWAccel *next;
03099
03114 int (*start_frame)(AVCodecContext *avctx, const uint8_t *buf, uint32_t buf_size);
03115
03127 int (*decode_slice)(AVCodecContext *avctx, const uint8_t *buf, uint32_t buf_size);
03128
03138 int (*end_frame)(AVCodecContext *avctx);
03139
03147 int priv_data_size;
03148 } AVHWAccel;
03149
03154 typedef struct AVPicture {
03155 uint8_t *data[4];
03156 int linesize[4];
03157 } AVPicture;
03158
03159 #if FF_API_PALETTE_CONTROL
03160
03168 #define AVPALETTE_SIZE 1024
03169 #define AVPALETTE_COUNT 256
03170 typedef struct AVPaletteControl {
03171
03172
03173
03174 int palette_changed;
03175
03176
03177
03178
03179
03180 unsigned int palette[AVPALETTE_COUNT];
03181
03182 } AVPaletteControl attribute_deprecated;
03183 #endif
03184
03185 enum AVSubtitleType {
03186 SUBTITLE_NONE,
03187
03188 SUBTITLE_BITMAP,
03189
03194 SUBTITLE_TEXT,
03195
03200 SUBTITLE_ASS,
03201 };
03202
03203 typedef struct AVSubtitleRect {
03204 int x;
03205 int y;
03206 int w;
03207 int h;
03208 int nb_colors;
03209
03214 AVPicture pict;
03215 enum AVSubtitleType type;
03216
03217 char *text;
03218
03224 char *ass;
03225 } AVSubtitleRect;
03226
03227 typedef struct AVSubtitle {
03228 uint16_t format;
03229 uint32_t start_display_time;
03230 uint32_t end_display_time;
03231 unsigned num_rects;
03232 AVSubtitleRect **rects;
03233 int64_t pts;
03234 } AVSubtitle;
03235
03236
03237
03241 attribute_deprecated void av_destruct_packet_nofree(AVPacket *pkt);
03242
03246 void av_destruct_packet(AVPacket *pkt);
03247
03253 void av_init_packet(AVPacket *pkt);
03254
03263 int av_new_packet(AVPacket *pkt, int size);
03264
03271 void av_shrink_packet(AVPacket *pkt, int size);
03272
03279 int av_grow_packet(AVPacket *pkt, int grow_by);
03280
03285 int av_dup_packet(AVPacket *pkt);
03286
03292 void av_free_packet(AVPacket *pkt);
03293
03294
03295
03296 struct ReSampleContext;
03297 struct AVResampleContext;
03298
03299 typedef struct ReSampleContext ReSampleContext;
03300
03301 #if FF_API_AUDIO_OLD
03302
03305 attribute_deprecated ReSampleContext *audio_resample_init(int output_channels, int input_channels,
03306 int output_rate, int input_rate);
03307 #endif
03308
03325 ReSampleContext *av_audio_resample_init(int output_channels, int input_channels,
03326 int output_rate, int input_rate,
03327 enum AVSampleFormat sample_fmt_out,
03328 enum AVSampleFormat sample_fmt_in,
03329 int filter_length, int log2_phase_count,
03330 int linear, double cutoff);
03331
03332 int audio_resample(ReSampleContext *s, short *output, short *input, int nb_samples);
03333
03340 void audio_resample_close(ReSampleContext *s);
03341
03342
03352 struct AVResampleContext *av_resample_init(int out_rate, int in_rate, int filter_length, int log2_phase_count, int linear, double cutoff);
03353
03363 int av_resample(struct AVResampleContext *c, short *dst, short *src, int *consumed, int src_size, int dst_size, int update_ctx);
03364
03365
03378 void av_resample_compensate(struct AVResampleContext *c, int sample_delta, int compensation_distance);
03379 void av_resample_close(struct AVResampleContext *c);
03380
03392 int avpicture_alloc(AVPicture *picture, enum PixelFormat pix_fmt, int width, int height);
03393
03401 void avpicture_free(AVPicture *picture);
03402
03423 int avpicture_fill(AVPicture *picture, uint8_t *ptr,
03424 enum PixelFormat pix_fmt, int width, int height);
03425
03441 int avpicture_layout(const AVPicture* src, enum PixelFormat pix_fmt, int width, int height,
03442 unsigned char *dest, int dest_size);
03443
03456 int avpicture_get_size(enum PixelFormat pix_fmt, int width, int height);
03457 void avcodec_get_chroma_sub_sample(enum PixelFormat pix_fmt, int *h_shift, int *v_shift);
03458
03459 #if FF_API_GET_PIX_FMT_NAME
03460
03466 attribute_deprecated
03467 const char *avcodec_get_pix_fmt_name(enum PixelFormat pix_fmt);
03468 #endif
03469
03470 void avcodec_set_dimensions(AVCodecContext *s, int width, int height);
03471
03472 #if LIBAVCODEC_VERSION_MAJOR < 53
03473
03486 attribute_deprecated enum PixelFormat avcodec_get_pix_fmt(const char* name);
03487 #endif
03488
03494 unsigned int avcodec_pix_fmt_to_codec_tag(enum PixelFormat pix_fmt);
03495
03503 size_t av_get_codec_tag_string(char *buf, size_t buf_size, unsigned int codec_tag);
03504
03505 #define FF_LOSS_RESOLUTION 0x0001
03506 #define FF_LOSS_DEPTH 0x0002
03507 #define FF_LOSS_COLORSPACE 0x0004
03508 #define FF_LOSS_ALPHA 0x0008
03509 #define FF_LOSS_COLORQUANT 0x0010
03510 #define FF_LOSS_CHROMA 0x0020
03529 int avcodec_get_pix_fmt_loss(enum PixelFormat dst_pix_fmt, enum PixelFormat src_pix_fmt,
03530 int has_alpha);
03531
03554 enum PixelFormat avcodec_find_best_pix_fmt(int64_t pix_fmt_mask, enum PixelFormat src_pix_fmt,
03555 int has_alpha, int *loss_ptr);
03556
03557 #if LIBAVCODEC_VERSION_MAJOR < 53
03558
03561 attribute_deprecated
03562 void avcodec_pix_fmt_string (char *buf, int buf_size, enum PixelFormat pix_fmt);
03563 #endif
03564
03565 #define FF_ALPHA_TRANSP 0x0001
03566 #define FF_ALPHA_SEMI_TRANSP 0x0002
03567
03572 int img_get_alpha_info(const AVPicture *src,
03573 enum PixelFormat pix_fmt, int width, int height);
03574
03575
03576
03577 int avpicture_deinterlace(AVPicture *dst, const AVPicture *src,
03578 enum PixelFormat pix_fmt, int width, int height);
03579
03580
03581
03587 AVCodec *av_codec_next(AVCodec *c);
03588
03592 unsigned avcodec_version(void);
03593
03597 const char *avcodec_configuration(void);
03598
03602 const char *avcodec_license(void);
03603
03613 void avcodec_init(void);
03614
03615 #if LIBAVCODEC_VERSION_MAJOR < 53
03616
03619 attribute_deprecated void register_avcodec(AVCodec *codec);
03620 #endif
03621
03627 void avcodec_register(AVCodec *codec);
03628
03635 AVCodec *avcodec_find_encoder(enum CodecID id);
03636
03643 AVCodec *avcodec_find_encoder_by_name(const char *name);
03644
03651 AVCodec *avcodec_find_decoder(enum CodecID id);
03652
03659 AVCodec *avcodec_find_decoder_by_name(const char *name);
03660 void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode);
03661
03669 const char *av_get_profile_name(const AVCodec *codec, int profile);
03670
03676 void avcodec_get_context_defaults(AVCodecContext *s);
03677
03680 void avcodec_get_context_defaults2(AVCodecContext *s, enum AVMediaType);
03681
03684 int avcodec_get_context_defaults3(AVCodecContext *s, AVCodec *codec);
03685
03693 AVCodecContext *avcodec_alloc_context(void);
03694
03697 AVCodecContext *avcodec_alloc_context2(enum AVMediaType);
03698
03701 AVCodecContext *avcodec_alloc_context3(AVCodec *codec);
03702
03714 int avcodec_copy_context(AVCodecContext *dest, const AVCodecContext *src);
03715
03721 void avcodec_get_frame_defaults(AVFrame *pic);
03722
03730 AVFrame *avcodec_alloc_frame(void);
03731
03732 int avcodec_default_get_buffer(AVCodecContext *s, AVFrame *pic);
03733 void avcodec_default_release_buffer(AVCodecContext *s, AVFrame *pic);
03734 int avcodec_default_reget_buffer(AVCodecContext *s, AVFrame *pic);
03735
03743 unsigned avcodec_get_edge_width(void);
03753 void avcodec_align_dimensions(AVCodecContext *s, int *width, int *height);
03763 void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height,
03764 int linesize_align[4]);
03765
03766 #if LIBAVCODEC_VERSION_MAJOR < 53
03767
03770 attribute_deprecated
03771 int avcodec_check_dimensions(void *av_log_ctx, unsigned int w, unsigned int h);
03772 #endif
03773
03774 enum PixelFormat avcodec_default_get_format(struct AVCodecContext *s, const enum PixelFormat * fmt);
03775
03776 #if FF_API_THREAD_INIT
03777
03780 attribute_deprecated
03781 int avcodec_thread_init(AVCodecContext *s, int thread_count);
03782 void avcodec_thread_free(AVCodecContext *s);
03783 #endif
03784 int avcodec_default_execute(AVCodecContext *c, int (*func)(AVCodecContext *c2, void *arg2),void *arg, int *ret, int count, int size);
03785 int avcodec_default_execute2(AVCodecContext *c, int (*func)(AVCodecContext *c2, void *arg2, int, int),void *arg, int *ret, int count);
03786
03787
03788 #if FF_API_AVCODEC_OPEN
03789
03818 int avcodec_open(AVCodecContext *avctx, AVCodec *codec);
03819 #endif
03820
03852 int avcodec_open2(AVCodecContext *avctx, AVCodec *codec, AVDictionary **options);
03853
03854 #if FF_API_AUDIO_OLD
03855
03868 attribute_deprecated int avcodec_decode_audio2(AVCodecContext *avctx, int16_t *samples,
03869 int *frame_size_ptr,
03870 const uint8_t *buf, int buf_size);
03871 #endif
03872
03912 int avcodec_decode_audio3(AVCodecContext *avctx, int16_t *samples,
03913 int *frame_size_ptr,
03914 AVPacket *avpkt);
03915
03916 #if FF_API_VIDEO_OLD
03917
03930 attribute_deprecated int avcodec_decode_video(AVCodecContext *avctx, AVFrame *picture,
03931 int *got_picture_ptr,
03932 const uint8_t *buf, int buf_size);
03933 #endif
03934
03975 int avcodec_decode_video2(AVCodecContext *avctx, AVFrame *picture,
03976 int *got_picture_ptr,
03977 AVPacket *avpkt);
03978
03979 #if FF_API_SUBTITLE_OLD
03980
03981
03982
03983 attribute_deprecated int avcodec_decode_subtitle(AVCodecContext *avctx, AVSubtitle *sub,
03984 int *got_sub_ptr,
03985 const uint8_t *buf, int buf_size);
03986 #endif
03987
04004 int avcodec_decode_subtitle2(AVCodecContext *avctx, AVSubtitle *sub,
04005 int *got_sub_ptr,
04006 AVPacket *avpkt);
04007
04013 void avsubtitle_free(AVSubtitle *sub);
04014
04015 int avcodec_parse_frame(AVCodecContext *avctx, uint8_t **pdata,
04016 int *data_size_ptr,
04017 uint8_t *buf, int buf_size);
04018
04038 int avcodec_encode_audio(AVCodecContext *avctx, uint8_t *buf, int buf_size,
04039 const short *samples);
04040
04053 int avcodec_encode_video(AVCodecContext *avctx, uint8_t *buf, int buf_size,
04054 const AVFrame *pict);
04055 int avcodec_encode_subtitle(AVCodecContext *avctx, uint8_t *buf, int buf_size,
04056 const AVSubtitle *sub);
04057
04058 int avcodec_close(AVCodecContext *avctx);
04059
04070 void avcodec_register_all(void);
04071
04075 void avcodec_flush_buffers(AVCodecContext *avctx);
04076
04077 void avcodec_default_free_buffers(AVCodecContext *s);
04078
04079
04080
04081 #if FF_API_OLD_FF_PICT_TYPES
04082
04089 attribute_deprecated
04090 char av_get_pict_type_char(int pict_type);
04091 #endif
04092
04099 int av_get_bits_per_sample(enum CodecID codec_id);
04100
04101 #if FF_API_OLD_SAMPLE_FMT
04102
04105 attribute_deprecated
04106 int av_get_bits_per_sample_format(enum AVSampleFormat sample_fmt);
04107 #endif
04108
04109
04110 typedef struct AVCodecParserContext {
04111 void *priv_data;
04112 struct AVCodecParser *parser;
04113 int64_t frame_offset;
04114 int64_t cur_offset;
04115
04116 int64_t next_frame_offset;
04117
04118 int pict_type;
04128 int repeat_pict;
04129 int64_t pts;
04130 int64_t dts;
04131
04132
04133 int64_t last_pts;
04134 int64_t last_dts;
04135 int fetch_timestamp;
04136
04137 #define AV_PARSER_PTS_NB 4
04138 int cur_frame_start_index;
04139 int64_t cur_frame_offset[AV_PARSER_PTS_NB];
04140 int64_t cur_frame_pts[AV_PARSER_PTS_NB];
04141 int64_t cur_frame_dts[AV_PARSER_PTS_NB];
04142
04143 int flags;
04144 #define PARSER_FLAG_COMPLETE_FRAMES 0x0001
04145 #define PARSER_FLAG_ONCE 0x0002
04147 #define PARSER_FLAG_FETCHED_OFFSET 0x0004
04148
04149 int64_t offset;
04150 int64_t cur_frame_end[AV_PARSER_PTS_NB];
04151
04158 int key_frame;
04159
04177 int64_t convergence_duration;
04178
04179
04189 int dts_sync_point;
04190
04204 int dts_ref_dts_delta;
04205
04218 int pts_dts_delta;
04219
04225 int64_t cur_frame_pos[AV_PARSER_PTS_NB];
04226
04230 int64_t pos;
04231
04235 int64_t last_pos;
04236 } AVCodecParserContext;
04237
04238 typedef struct AVCodecParser {
04239 int codec_ids[5];
04240 int priv_data_size;
04241 int (*parser_init)(AVCodecParserContext *s);
04242 int (*parser_parse)(AVCodecParserContext *s,
04243 AVCodecContext *avctx,
04244 const uint8_t **poutbuf, int *poutbuf_size,
04245 const uint8_t *buf, int buf_size);
04246 void (*parser_close)(AVCodecParserContext *s);
04247 int (*split)(AVCodecContext *avctx, const uint8_t *buf, int buf_size);
04248 struct AVCodecParser *next;
04249 } AVCodecParser;
04250
04251 AVCodecParser *av_parser_next(AVCodecParser *c);
04252
04253 void av_register_codec_parser(AVCodecParser *parser);
04254 AVCodecParserContext *av_parser_init(int codec_id);
04255
04256 #if LIBAVCODEC_VERSION_MAJOR < 53
04257 attribute_deprecated
04258 int av_parser_parse(AVCodecParserContext *s,
04259 AVCodecContext *avctx,
04260 uint8_t **poutbuf, int *poutbuf_size,
04261 const uint8_t *buf, int buf_size,
04262 int64_t pts, int64_t dts);
04263 #endif
04264
04293 int av_parser_parse2(AVCodecParserContext *s,
04294 AVCodecContext *avctx,
04295 uint8_t **poutbuf, int *poutbuf_size,
04296 const uint8_t *buf, int buf_size,
04297 int64_t pts, int64_t dts,
04298 int64_t pos);
04299
04300 int av_parser_change(AVCodecParserContext *s,
04301 AVCodecContext *avctx,
04302 uint8_t **poutbuf, int *poutbuf_size,
04303 const uint8_t *buf, int buf_size, int keyframe);
04304 void av_parser_close(AVCodecParserContext *s);
04305
04306
04307 typedef struct AVBitStreamFilterContext {
04308 void *priv_data;
04309 struct AVBitStreamFilter *filter;
04310 AVCodecParserContext *parser;
04311 struct AVBitStreamFilterContext *next;
04312 } AVBitStreamFilterContext;
04313
04314
04315 typedef struct AVBitStreamFilter {
04316 const char *name;
04317 int priv_data_size;
04318 int (*filter)(AVBitStreamFilterContext *bsfc,
04319 AVCodecContext *avctx, const char *args,
04320 uint8_t **poutbuf, int *poutbuf_size,
04321 const uint8_t *buf, int buf_size, int keyframe);
04322 void (*close)(AVBitStreamFilterContext *bsfc);
04323 struct AVBitStreamFilter *next;
04324 } AVBitStreamFilter;
04325
04326 void av_register_bitstream_filter(AVBitStreamFilter *bsf);
04327 AVBitStreamFilterContext *av_bitstream_filter_init(const char *name);
04328 int av_bitstream_filter_filter(AVBitStreamFilterContext *bsfc,
04329 AVCodecContext *avctx, const char *args,
04330 uint8_t **poutbuf, int *poutbuf_size,
04331 const uint8_t *buf, int buf_size, int keyframe);
04332 void av_bitstream_filter_close(AVBitStreamFilterContext *bsf);
04333
04334 AVBitStreamFilter *av_bitstream_filter_next(AVBitStreamFilter *f);
04335
04336
04337
04343 void *av_fast_realloc(void *ptr, unsigned int *size, FF_INTERNALC_MEM_TYPE min_size);
04344
04357 void av_fast_malloc(void *ptr, unsigned int *size, FF_INTERNALC_MEM_TYPE min_size);
04358
04359 #if LIBAVCODEC_VERSION_MAJOR < 53
04360
04363 attribute_deprecated
04364 void av_picture_data_copy(uint8_t *dst_data[4], int dst_linesize[4],
04365 uint8_t *src_data[4], int src_linesize[4],
04366 enum PixelFormat pix_fmt, int width, int height);
04367 #endif
04368
04372 void av_picture_copy(AVPicture *dst, const AVPicture *src,
04373 enum PixelFormat pix_fmt, int width, int height);
04374
04378 int av_picture_crop(AVPicture *dst, const AVPicture *src,
04379 enum PixelFormat pix_fmt, int top_band, int left_band);
04380
04384 int av_picture_pad(AVPicture *dst, const AVPicture *src, int height, int width, enum PixelFormat pix_fmt,
04385 int padtop, int padbottom, int padleft, int padright, int *color);
04386
04394 unsigned int av_xiphlacing(unsigned char *s, unsigned int v);
04395
04396 #if LIBAVCODEC_VERSION_MAJOR < 53
04397
04402 attribute_deprecated int av_parse_video_frame_size(int *width_ptr, int *height_ptr, const char *str);
04403
04409 attribute_deprecated int av_parse_video_frame_rate(AVRational *frame_rate, const char *str);
04410 #endif
04411
04424 void av_log_missing_feature(void *avc, const char *feature, int want_sample);
04425
04434 void av_log_ask_for_sample(void *avc, const char *msg, ...);
04435
04439 void av_register_hwaccel(AVHWAccel *hwaccel);
04440
04446 AVHWAccel *av_hwaccel_next(AVHWAccel *hwaccel);
04447
04448
04452 enum AVLockOp {
04453 AV_LOCK_CREATE,
04454 AV_LOCK_OBTAIN,
04455 AV_LOCK_RELEASE,
04456 AV_LOCK_DESTROY,
04457 };
04458
04472 int av_lockmgr_register(int (*cb)(void **mutex, enum AVLockOp op));
04473
04474 #endif