OpenFFmpeg
avcodec.h
Go to the documentation of this file.
1 /*
2  * copyright (c) 2001 Fabrice Bellard
3  *
4  * This file is part of FFmpeg.
5  *
6  * FFmpeg is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * FFmpeg is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with FFmpeg; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19  */
20 
21 #ifndef AVCODEC_AVCODEC_H
22 #define AVCODEC_AVCODEC_H
23 
30 #include <errno.h>
31 #include "libavutil/samplefmt.h"
32 #include "libavutil/attributes.h"
33 #include "libavutil/avutil.h"
34 #include "libavutil/buffer.h"
35 #include "libavutil/cpu.h"
37 #include "libavutil/dict.h"
38 #include "libavutil/frame.h"
39 #include "libavutil/hwcontext.h"
40 #include "libavutil/log.h"
41 #include "libavutil/pixfmt.h"
42 #include "libavutil/rational.h"
43 
44 #include "version.h"
45 
215 enum AVCodecID {
216  AV_CODEC_ID_NONE,
217 
218  /* video codecs */
219  AV_CODEC_ID_MPEG1VIDEO,
221  AV_CODEC_ID_H261,
222  AV_CODEC_ID_H263,
223  AV_CODEC_ID_RV10,
224  AV_CODEC_ID_RV20,
225  AV_CODEC_ID_MJPEG,
226  AV_CODEC_ID_MJPEGB,
227  AV_CODEC_ID_LJPEG,
228  AV_CODEC_ID_SP5X,
229  AV_CODEC_ID_JPEGLS,
230  AV_CODEC_ID_MPEG4,
231  AV_CODEC_ID_RAWVIDEO,
232  AV_CODEC_ID_MSMPEG4V1,
233  AV_CODEC_ID_MSMPEG4V2,
234  AV_CODEC_ID_MSMPEG4V3,
235  AV_CODEC_ID_WMV1,
236  AV_CODEC_ID_WMV2,
237  AV_CODEC_ID_H263P,
238  AV_CODEC_ID_H263I,
239  AV_CODEC_ID_FLV1,
240  AV_CODEC_ID_SVQ1,
241  AV_CODEC_ID_SVQ3,
242  AV_CODEC_ID_DVVIDEO,
243  AV_CODEC_ID_HUFFYUV,
244  AV_CODEC_ID_CYUV,
245  AV_CODEC_ID_H264,
246  AV_CODEC_ID_INDEO3,
247  AV_CODEC_ID_VP3,
248  AV_CODEC_ID_THEORA,
249  AV_CODEC_ID_ASV1,
250  AV_CODEC_ID_ASV2,
251  AV_CODEC_ID_FFV1,
252  AV_CODEC_ID_4XM,
253  AV_CODEC_ID_VCR1,
254  AV_CODEC_ID_CLJR,
255  AV_CODEC_ID_MDEC,
256  AV_CODEC_ID_ROQ,
257  AV_CODEC_ID_INTERPLAY_VIDEO,
258  AV_CODEC_ID_XAN_WC3,
259  AV_CODEC_ID_XAN_WC4,
260  AV_CODEC_ID_RPZA,
261  AV_CODEC_ID_CINEPAK,
262  AV_CODEC_ID_WS_VQA,
263  AV_CODEC_ID_MSRLE,
264  AV_CODEC_ID_MSVIDEO1,
265  AV_CODEC_ID_IDCIN,
266  AV_CODEC_ID_8BPS,
267  AV_CODEC_ID_SMC,
268  AV_CODEC_ID_FLIC,
269  AV_CODEC_ID_TRUEMOTION1,
270  AV_CODEC_ID_VMDVIDEO,
271  AV_CODEC_ID_MSZH,
272  AV_CODEC_ID_ZLIB,
273  AV_CODEC_ID_QTRLE,
274  AV_CODEC_ID_TSCC,
275  AV_CODEC_ID_ULTI,
276  AV_CODEC_ID_QDRAW,
277  AV_CODEC_ID_VIXL,
278  AV_CODEC_ID_QPEG,
279  AV_CODEC_ID_PNG,
280  AV_CODEC_ID_PPM,
281  AV_CODEC_ID_PBM,
282  AV_CODEC_ID_PGM,
283  AV_CODEC_ID_PGMYUV,
284  AV_CODEC_ID_PAM,
285  AV_CODEC_ID_FFVHUFF,
286  AV_CODEC_ID_RV30,
287  AV_CODEC_ID_RV40,
288  AV_CODEC_ID_VC1,
289  AV_CODEC_ID_WMV3,
290  AV_CODEC_ID_LOCO,
291  AV_CODEC_ID_WNV1,
292  AV_CODEC_ID_AASC,
293  AV_CODEC_ID_INDEO2,
294  AV_CODEC_ID_FRAPS,
295  AV_CODEC_ID_TRUEMOTION2,
296  AV_CODEC_ID_BMP,
297  AV_CODEC_ID_CSCD,
298  AV_CODEC_ID_MMVIDEO,
299  AV_CODEC_ID_ZMBV,
300  AV_CODEC_ID_AVS,
301  AV_CODEC_ID_SMACKVIDEO,
302  AV_CODEC_ID_NUV,
303  AV_CODEC_ID_KMVC,
304  AV_CODEC_ID_FLASHSV,
305  AV_CODEC_ID_CAVS,
306  AV_CODEC_ID_JPEG2000,
307  AV_CODEC_ID_VMNC,
308  AV_CODEC_ID_VP5,
309  AV_CODEC_ID_VP6,
310  AV_CODEC_ID_VP6F,
311  AV_CODEC_ID_TARGA,
312  AV_CODEC_ID_DSICINVIDEO,
313  AV_CODEC_ID_TIERTEXSEQVIDEO,
314  AV_CODEC_ID_TIFF,
315  AV_CODEC_ID_GIF,
316  AV_CODEC_ID_DXA,
317  AV_CODEC_ID_DNXHD,
318  AV_CODEC_ID_THP,
319  AV_CODEC_ID_SGI,
320  AV_CODEC_ID_C93,
321  AV_CODEC_ID_BETHSOFTVID,
322  AV_CODEC_ID_PTX,
323  AV_CODEC_ID_TXD,
324  AV_CODEC_ID_VP6A,
325  AV_CODEC_ID_AMV,
326  AV_CODEC_ID_VB,
327  AV_CODEC_ID_PCX,
328  AV_CODEC_ID_SUNRAST,
329  AV_CODEC_ID_INDEO4,
330  AV_CODEC_ID_INDEO5,
331  AV_CODEC_ID_MIMIC,
332  AV_CODEC_ID_RL2,
333  AV_CODEC_ID_ESCAPE124,
334  AV_CODEC_ID_DIRAC,
335  AV_CODEC_ID_BFI,
336  AV_CODEC_ID_CMV,
337  AV_CODEC_ID_MOTIONPIXELS,
338  AV_CODEC_ID_TGV,
339  AV_CODEC_ID_TGQ,
340  AV_CODEC_ID_TQI,
341  AV_CODEC_ID_AURA,
342  AV_CODEC_ID_AURA2,
343  AV_CODEC_ID_V210X,
344  AV_CODEC_ID_TMV,
345  AV_CODEC_ID_V210,
346  AV_CODEC_ID_DPX,
347  AV_CODEC_ID_MAD,
348  AV_CODEC_ID_FRWU,
349  AV_CODEC_ID_FLASHSV2,
350  AV_CODEC_ID_CDGRAPHICS,
351  AV_CODEC_ID_R210,
352  AV_CODEC_ID_ANM,
353  AV_CODEC_ID_BINKVIDEO,
354  AV_CODEC_ID_IFF_ILBM,
355 #define AV_CODEC_ID_IFF_BYTERUN1 AV_CODEC_ID_IFF_ILBM
356  AV_CODEC_ID_KGV1,
357  AV_CODEC_ID_YOP,
358  AV_CODEC_ID_VP8,
359  AV_CODEC_ID_PICTOR,
360  AV_CODEC_ID_ANSI,
361  AV_CODEC_ID_A64_MULTI,
362  AV_CODEC_ID_A64_MULTI5,
363  AV_CODEC_ID_R10K,
364  AV_CODEC_ID_MXPEG,
365  AV_CODEC_ID_LAGARITH,
366  AV_CODEC_ID_PRORES,
367  AV_CODEC_ID_JV,
368  AV_CODEC_ID_DFA,
369  AV_CODEC_ID_WMV3IMAGE,
370  AV_CODEC_ID_VC1IMAGE,
371  AV_CODEC_ID_UTVIDEO,
372  AV_CODEC_ID_BMV_VIDEO,
373  AV_CODEC_ID_VBLE,
374  AV_CODEC_ID_DXTORY,
375  AV_CODEC_ID_V410,
376  AV_CODEC_ID_XWD,
377  AV_CODEC_ID_CDXL,
378  AV_CODEC_ID_XBM,
379  AV_CODEC_ID_ZEROCODEC,
380  AV_CODEC_ID_MSS1,
381  AV_CODEC_ID_MSA1,
382  AV_CODEC_ID_TSCC2,
383  AV_CODEC_ID_MTS2,
384  AV_CODEC_ID_CLLC,
385  AV_CODEC_ID_MSS2,
386  AV_CODEC_ID_VP9,
387  AV_CODEC_ID_AIC,
388  AV_CODEC_ID_ESCAPE130,
389  AV_CODEC_ID_G2M,
390  AV_CODEC_ID_WEBP,
391  AV_CODEC_ID_HNM4_VIDEO,
392  AV_CODEC_ID_HEVC,
393 #define AV_CODEC_ID_H265 AV_CODEC_ID_HEVC
394  AV_CODEC_ID_FIC,
395  AV_CODEC_ID_ALIAS_PIX,
396  AV_CODEC_ID_BRENDER_PIX,
397  AV_CODEC_ID_PAF_VIDEO,
398  AV_CODEC_ID_EXR,
399  AV_CODEC_ID_VP7,
400  AV_CODEC_ID_SANM,
401  AV_CODEC_ID_SGIRLE,
402  AV_CODEC_ID_MVC1,
403  AV_CODEC_ID_MVC2,
404  AV_CODEC_ID_HQX,
405  AV_CODEC_ID_TDSC,
406  AV_CODEC_ID_HQ_HQA,
407  AV_CODEC_ID_HAP,
408  AV_CODEC_ID_DDS,
409  AV_CODEC_ID_DXV,
410  AV_CODEC_ID_SCREENPRESSO,
411  AV_CODEC_ID_RSCC,
412  AV_CODEC_ID_AVS2,
413 
414  AV_CODEC_ID_Y41P = 0x8000,
415  AV_CODEC_ID_AVRP,
416  AV_CODEC_ID_012V,
417  AV_CODEC_ID_AVUI,
418  AV_CODEC_ID_AYUV,
419  AV_CODEC_ID_TARGA_Y216,
420  AV_CODEC_ID_V308,
421  AV_CODEC_ID_V408,
422  AV_CODEC_ID_YUV4,
423  AV_CODEC_ID_AVRN,
424  AV_CODEC_ID_CPIA,
425  AV_CODEC_ID_XFACE,
426  AV_CODEC_ID_SNOW,
427  AV_CODEC_ID_SMVJPEG,
428  AV_CODEC_ID_APNG,
429  AV_CODEC_ID_DAALA,
430  AV_CODEC_ID_CFHD,
431  AV_CODEC_ID_TRUEMOTION2RT,
432  AV_CODEC_ID_M101,
433  AV_CODEC_ID_MAGICYUV,
434  AV_CODEC_ID_SHEERVIDEO,
435  AV_CODEC_ID_YLC,
436  AV_CODEC_ID_PSD,
437  AV_CODEC_ID_PIXLET,
438  AV_CODEC_ID_SPEEDHQ,
439  AV_CODEC_ID_FMVC,
440  AV_CODEC_ID_SCPR,
441  AV_CODEC_ID_CLEARVIDEO,
442  AV_CODEC_ID_XPM,
443  AV_CODEC_ID_AV1,
444  AV_CODEC_ID_BITPACKED,
445  AV_CODEC_ID_MSCC,
446  AV_CODEC_ID_SRGC,
447  AV_CODEC_ID_SVG,
448  AV_CODEC_ID_GDV,
449  AV_CODEC_ID_FITS,
450  AV_CODEC_ID_IMM4,
451  AV_CODEC_ID_PROSUMER,
452  AV_CODEC_ID_MWSC,
453  AV_CODEC_ID_WCMV,
454  AV_CODEC_ID_RASC,
455  AV_CODEC_ID_HYMT,
456  AV_CODEC_ID_ARBC,
457 
458  /* various PCM "codecs" */
460  AV_CODEC_ID_PCM_S16LE = 0x10000,
461  AV_CODEC_ID_PCM_S16BE,
462  AV_CODEC_ID_PCM_U16LE,
463  AV_CODEC_ID_PCM_U16BE,
464  AV_CODEC_ID_PCM_S8,
465  AV_CODEC_ID_PCM_U8,
466  AV_CODEC_ID_PCM_MULAW,
467  AV_CODEC_ID_PCM_ALAW,
468  AV_CODEC_ID_PCM_S32LE,
469  AV_CODEC_ID_PCM_S32BE,
470  AV_CODEC_ID_PCM_U32LE,
471  AV_CODEC_ID_PCM_U32BE,
472  AV_CODEC_ID_PCM_S24LE,
473  AV_CODEC_ID_PCM_S24BE,
474  AV_CODEC_ID_PCM_U24LE,
475  AV_CODEC_ID_PCM_U24BE,
476  AV_CODEC_ID_PCM_S24DAUD,
477  AV_CODEC_ID_PCM_ZORK,
478  AV_CODEC_ID_PCM_S16LE_PLANAR,
479  AV_CODEC_ID_PCM_DVD,
480  AV_CODEC_ID_PCM_F32BE,
481  AV_CODEC_ID_PCM_F32LE,
482  AV_CODEC_ID_PCM_F64BE,
483  AV_CODEC_ID_PCM_F64LE,
484  AV_CODEC_ID_PCM_BLURAY,
485  AV_CODEC_ID_PCM_LXF,
486  AV_CODEC_ID_S302M,
487  AV_CODEC_ID_PCM_S8_PLANAR,
488  AV_CODEC_ID_PCM_S24LE_PLANAR,
489  AV_CODEC_ID_PCM_S32LE_PLANAR,
490  AV_CODEC_ID_PCM_S16BE_PLANAR,
491 
492  AV_CODEC_ID_PCM_S64LE = 0x10800,
493  AV_CODEC_ID_PCM_S64BE,
494  AV_CODEC_ID_PCM_F16LE,
495  AV_CODEC_ID_PCM_F24LE,
496  AV_CODEC_ID_PCM_VIDC,
497 
498  /* various ADPCM codecs */
499  AV_CODEC_ID_ADPCM_IMA_QT = 0x11000,
500  AV_CODEC_ID_ADPCM_IMA_WAV,
501  AV_CODEC_ID_ADPCM_IMA_DK3,
502  AV_CODEC_ID_ADPCM_IMA_DK4,
503  AV_CODEC_ID_ADPCM_IMA_WS,
504  AV_CODEC_ID_ADPCM_IMA_SMJPEG,
505  AV_CODEC_ID_ADPCM_MS,
506  AV_CODEC_ID_ADPCM_4XM,
507  AV_CODEC_ID_ADPCM_XA,
508  AV_CODEC_ID_ADPCM_ADX,
509  AV_CODEC_ID_ADPCM_EA,
510  AV_CODEC_ID_ADPCM_G726,
511  AV_CODEC_ID_ADPCM_CT,
512  AV_CODEC_ID_ADPCM_SWF,
513  AV_CODEC_ID_ADPCM_YAMAHA,
514  AV_CODEC_ID_ADPCM_SBPRO_4,
515  AV_CODEC_ID_ADPCM_SBPRO_3,
516  AV_CODEC_ID_ADPCM_SBPRO_2,
517  AV_CODEC_ID_ADPCM_THP,
518  AV_CODEC_ID_ADPCM_IMA_AMV,
519  AV_CODEC_ID_ADPCM_EA_R1,
520  AV_CODEC_ID_ADPCM_EA_R3,
521  AV_CODEC_ID_ADPCM_EA_R2,
522  AV_CODEC_ID_ADPCM_IMA_EA_SEAD,
523  AV_CODEC_ID_ADPCM_IMA_EA_EACS,
524  AV_CODEC_ID_ADPCM_EA_XAS,
525  AV_CODEC_ID_ADPCM_EA_MAXIS_XA,
526  AV_CODEC_ID_ADPCM_IMA_ISS,
527  AV_CODEC_ID_ADPCM_G722,
528  AV_CODEC_ID_ADPCM_IMA_APC,
529  AV_CODEC_ID_ADPCM_VIMA,
530 
531  AV_CODEC_ID_ADPCM_AFC = 0x11800,
532  AV_CODEC_ID_ADPCM_IMA_OKI,
533  AV_CODEC_ID_ADPCM_DTK,
534  AV_CODEC_ID_ADPCM_IMA_RAD,
535  AV_CODEC_ID_ADPCM_G726LE,
536  AV_CODEC_ID_ADPCM_THP_LE,
537  AV_CODEC_ID_ADPCM_PSX,
538  AV_CODEC_ID_ADPCM_AICA,
539  AV_CODEC_ID_ADPCM_IMA_DAT4,
540  AV_CODEC_ID_ADPCM_MTAF,
541 
542  /* AMR */
543  AV_CODEC_ID_AMR_NB = 0x12000,
544  AV_CODEC_ID_AMR_WB,
545 
546  /* RealAudio codecs*/
547  AV_CODEC_ID_RA_144 = 0x13000,
548  AV_CODEC_ID_RA_288,
549 
550  /* various DPCM codecs */
551  AV_CODEC_ID_ROQ_DPCM = 0x14000,
552  AV_CODEC_ID_INTERPLAY_DPCM,
553  AV_CODEC_ID_XAN_DPCM,
554  AV_CODEC_ID_SOL_DPCM,
555 
556  AV_CODEC_ID_SDX2_DPCM = 0x14800,
557  AV_CODEC_ID_GREMLIN_DPCM,
558 
559  /* audio codecs */
560  AV_CODEC_ID_MP2 = 0x15000,
562  AV_CODEC_ID_AAC,
563  AV_CODEC_ID_AC3,
564  AV_CODEC_ID_DTS,
565  AV_CODEC_ID_VORBIS,
566  AV_CODEC_ID_DVAUDIO,
567  AV_CODEC_ID_WMAV1,
568  AV_CODEC_ID_WMAV2,
569  AV_CODEC_ID_MACE3,
570  AV_CODEC_ID_MACE6,
571  AV_CODEC_ID_VMDAUDIO,
572  AV_CODEC_ID_FLAC,
573  AV_CODEC_ID_MP3ADU,
574  AV_CODEC_ID_MP3ON4,
575  AV_CODEC_ID_SHORTEN,
576  AV_CODEC_ID_ALAC,
577  AV_CODEC_ID_WESTWOOD_SND1,
579  AV_CODEC_ID_QDM2,
580  AV_CODEC_ID_COOK,
581  AV_CODEC_ID_TRUESPEECH,
582  AV_CODEC_ID_TTA,
583  AV_CODEC_ID_SMACKAUDIO,
584  AV_CODEC_ID_QCELP,
585  AV_CODEC_ID_WAVPACK,
586  AV_CODEC_ID_DSICINAUDIO,
587  AV_CODEC_ID_IMC,
588  AV_CODEC_ID_MUSEPACK7,
589  AV_CODEC_ID_MLP,
590  AV_CODEC_ID_GSM_MS, /* as found in WAV */
591  AV_CODEC_ID_ATRAC3,
592  AV_CODEC_ID_APE,
593  AV_CODEC_ID_NELLYMOSER,
594  AV_CODEC_ID_MUSEPACK8,
595  AV_CODEC_ID_SPEEX,
596  AV_CODEC_ID_WMAVOICE,
597  AV_CODEC_ID_WMAPRO,
598  AV_CODEC_ID_WMALOSSLESS,
599  AV_CODEC_ID_ATRAC3P,
600  AV_CODEC_ID_EAC3,
601  AV_CODEC_ID_SIPR,
602  AV_CODEC_ID_MP1,
603  AV_CODEC_ID_TWINVQ,
604  AV_CODEC_ID_TRUEHD,
605  AV_CODEC_ID_MP4ALS,
606  AV_CODEC_ID_ATRAC1,
607  AV_CODEC_ID_BINKAUDIO_RDFT,
608  AV_CODEC_ID_BINKAUDIO_DCT,
609  AV_CODEC_ID_AAC_LATM,
610  AV_CODEC_ID_QDMC,
611  AV_CODEC_ID_CELT,
612  AV_CODEC_ID_G723_1,
613  AV_CODEC_ID_G729,
614  AV_CODEC_ID_8SVX_EXP,
615  AV_CODEC_ID_8SVX_FIB,
616  AV_CODEC_ID_BMV_AUDIO,
617  AV_CODEC_ID_RALF,
618  AV_CODEC_ID_IAC,
619  AV_CODEC_ID_ILBC,
620  AV_CODEC_ID_OPUS,
621  AV_CODEC_ID_COMFORT_NOISE,
622  AV_CODEC_ID_TAK,
623  AV_CODEC_ID_METASOUND,
624  AV_CODEC_ID_PAF_AUDIO,
625  AV_CODEC_ID_ON2AVC,
626  AV_CODEC_ID_DSS_SP,
627  AV_CODEC_ID_CODEC2,
628 
629  AV_CODEC_ID_FFWAVESYNTH = 0x15800,
630  AV_CODEC_ID_SONIC,
631  AV_CODEC_ID_SONIC_LS,
632  AV_CODEC_ID_EVRC,
633  AV_CODEC_ID_SMV,
634  AV_CODEC_ID_DSD_LSBF,
635  AV_CODEC_ID_DSD_MSBF,
636  AV_CODEC_ID_DSD_LSBF_PLANAR,
637  AV_CODEC_ID_DSD_MSBF_PLANAR,
638  AV_CODEC_ID_4GV,
639  AV_CODEC_ID_INTERPLAY_ACM,
640  AV_CODEC_ID_XMA1,
641  AV_CODEC_ID_XMA2,
642  AV_CODEC_ID_DST,
643  AV_CODEC_ID_ATRAC3AL,
644  AV_CODEC_ID_ATRAC3PAL,
645  AV_CODEC_ID_DOLBY_E,
646  AV_CODEC_ID_APTX,
647  AV_CODEC_ID_APTX_HD,
648  AV_CODEC_ID_SBC,
649  AV_CODEC_ID_ATRAC9,
650  AV_CODEC_ID_HCOM,
651 
652  /* subtitle codecs */
654  AV_CODEC_ID_DVD_SUBTITLE = 0x17000,
655  AV_CODEC_ID_DVB_SUBTITLE,
657  AV_CODEC_ID_XSUB,
658  AV_CODEC_ID_SSA,
659  AV_CODEC_ID_MOV_TEXT,
660  AV_CODEC_ID_HDMV_PGS_SUBTITLE,
661  AV_CODEC_ID_DVB_TELETEXT,
662  AV_CODEC_ID_SRT,
663 
664  AV_CODEC_ID_MICRODVD = 0x17800,
665  AV_CODEC_ID_EIA_608,
666  AV_CODEC_ID_JACOSUB,
667  AV_CODEC_ID_SAMI,
668  AV_CODEC_ID_REALTEXT,
669  AV_CODEC_ID_STL,
670  AV_CODEC_ID_SUBVIEWER1,
671  AV_CODEC_ID_SUBVIEWER,
672  AV_CODEC_ID_SUBRIP,
673  AV_CODEC_ID_WEBVTT,
674  AV_CODEC_ID_MPL2,
675  AV_CODEC_ID_VPLAYER,
676  AV_CODEC_ID_PJS,
677  AV_CODEC_ID_ASS,
678  AV_CODEC_ID_HDMV_TEXT_SUBTITLE,
679  AV_CODEC_ID_TTML,
680  AV_CODEC_ID_ARIB_CAPTION,
681 
682  /* other specific kind of codecs (generally used for attachments) */
684  AV_CODEC_ID_TTF = 0x18000,
685 
687  AV_CODEC_ID_BINTEXT = 0x18800,
688  AV_CODEC_ID_XBIN,
689  AV_CODEC_ID_IDF,
690  AV_CODEC_ID_OTF,
691  AV_CODEC_ID_SMPTE_KLV,
692  AV_CODEC_ID_DVD_NAV,
693  AV_CODEC_ID_TIMED_ID3,
694  AV_CODEC_ID_BIN_DATA,
695 
696 
697  AV_CODEC_ID_PROBE = 0x19000,
698 
705 };
706 
712 typedef struct AVCodecDescriptor {
713  enum AVCodecID id;
714  enum AVMediaType type;
720  const char *name;
724  const char *long_name;
728  int props;
734  const char *const *mime_types;
739  const struct AVProfile *profiles;
741 
746 #define AV_CODEC_PROP_INTRA_ONLY (1 << 0)
747 
752 #define AV_CODEC_PROP_LOSSY (1 << 1)
753 
756 #define AV_CODEC_PROP_LOSSLESS (1 << 2)
757 
766 #define AV_CODEC_PROP_REORDER (1 << 3)
767 
771 #define AV_CODEC_PROP_BITMAP_SUB (1 << 16)
772 
776 #define AV_CODEC_PROP_TEXT_SUB (1 << 17)
777 
786 #define AV_INPUT_BUFFER_PADDING_SIZE 64
787 
793 #define AV_INPUT_BUFFER_MIN_SIZE 16384
794 
799  /* We leave some space between them for extensions (drop some
800  * keyframes for intra-only or drop just some bidir frames). */
808 };
809 
811  AV_AUDIO_SERVICE_TYPE_MAIN = 0,
812  AV_AUDIO_SERVICE_TYPE_EFFECTS = 1,
813  AV_AUDIO_SERVICE_TYPE_VISUALLY_IMPAIRED = 2,
814  AV_AUDIO_SERVICE_TYPE_HEARING_IMPAIRED = 3,
815  AV_AUDIO_SERVICE_TYPE_DIALOGUE = 4,
816  AV_AUDIO_SERVICE_TYPE_COMMENTARY = 5,
817  AV_AUDIO_SERVICE_TYPE_EMERGENCY = 6,
818  AV_AUDIO_SERVICE_TYPE_VOICE_OVER = 7,
819  AV_AUDIO_SERVICE_TYPE_KARAOKE = 8,
821 };
822 
826 typedef struct RcOverride{
827  int start_frame;
828  int end_frame;
829  int qscale; // If this is 0 then quality_factor will be used instead.
830  float quality_factor;
831 } RcOverride;
832 
833 /* encoding support
834  These flags can be passed in AVCodecContext.flags before initialization.
835  Note: Not everything is supported yet.
836 */
837 
842 #define AV_CODEC_FLAG_UNALIGNED (1 << 0)
843 
846 #define AV_CODEC_FLAG_QSCALE (1 << 1)
847 
850 #define AV_CODEC_FLAG_4MV (1 << 2)
851 
854 #define AV_CODEC_FLAG_OUTPUT_CORRUPT (1 << 3)
855 
858 #define AV_CODEC_FLAG_QPEL (1 << 4)
859 
862 #define AV_CODEC_FLAG_PASS1 (1 << 9)
863 
866 #define AV_CODEC_FLAG_PASS2 (1 << 10)
867 
870 #define AV_CODEC_FLAG_LOOP_FILTER (1 << 11)
871 
874 #define AV_CODEC_FLAG_GRAY (1 << 13)
875 
878 #define AV_CODEC_FLAG_PSNR (1 << 15)
879 
883 #define AV_CODEC_FLAG_TRUNCATED (1 << 16)
884 
887 #define AV_CODEC_FLAG_INTERLACED_DCT (1 << 18)
888 
891 #define AV_CODEC_FLAG_LOW_DELAY (1 << 19)
892 
895 #define AV_CODEC_FLAG_GLOBAL_HEADER (1 << 22)
896 
899 #define AV_CODEC_FLAG_BITEXACT (1 << 23)
900 /* Fx : Flag for H.263+ extra options */
904 #define AV_CODEC_FLAG_AC_PRED (1 << 24)
905 
908 #define AV_CODEC_FLAG_INTERLACED_ME (1 << 29)
909 #define AV_CODEC_FLAG_CLOSED_GOP (1U << 31)
910 
914 #define AV_CODEC_FLAG2_FAST (1 << 0)
915 
918 #define AV_CODEC_FLAG2_NO_OUTPUT (1 << 2)
919 
922 #define AV_CODEC_FLAG2_LOCAL_HEADER (1 << 3)
923 
927 #define AV_CODEC_FLAG2_DROP_FRAME_TIMECODE (1 << 13)
928 
933 #define AV_CODEC_FLAG2_CHUNKS (1 << 15)
934 
937 #define AV_CODEC_FLAG2_IGNORE_CROP (1 << 16)
938 
942 #define AV_CODEC_FLAG2_SHOW_ALL (1 << 22)
943 
946 #define AV_CODEC_FLAG2_EXPORT_MVS (1 << 28)
947 
950 #define AV_CODEC_FLAG2_SKIP_MANUAL (1 << 29)
951 
954 #define AV_CODEC_FLAG2_RO_FLUSH_NOOP (1 << 30)
955 
956 /* Unsupported options :
957  * Syntax Arithmetic coding (SAC)
958  * Reference Picture Selection
959  * Independent Segment Decoding */
960 /* /Fx */
961 /* codec capabilities */
962 
966 #define AV_CODEC_CAP_DRAW_HORIZ_BAND (1 << 0)
967 
972 #define AV_CODEC_CAP_DR1 (1 << 1)
973 #define AV_CODEC_CAP_TRUNCATED (1 << 3)
974 
997 #define AV_CODEC_CAP_DELAY (1 << 5)
998 
1002 #define AV_CODEC_CAP_SMALL_LAST_FRAME (1 << 6)
1003 
1015 #define AV_CODEC_CAP_SUBFRAMES (1 << 8)
1016 
1020 #define AV_CODEC_CAP_EXPERIMENTAL (1 << 9)
1021 
1024 #define AV_CODEC_CAP_CHANNEL_CONF (1 << 10)
1025 
1028 #define AV_CODEC_CAP_FRAME_THREADS (1 << 12)
1029 
1032 #define AV_CODEC_CAP_SLICE_THREADS (1 << 13)
1033 
1036 #define AV_CODEC_CAP_PARAM_CHANGE (1 << 14)
1037 
1040 #define AV_CODEC_CAP_AUTO_THREADS (1 << 15)
1041 
1044 #define AV_CODEC_CAP_VARIABLE_FRAME_SIZE (1 << 16)
1045 
1054 #define AV_CODEC_CAP_AVOID_PROBING (1 << 17)
1055 
1058 #define AV_CODEC_CAP_INTRA_ONLY 0x40000000
1059 
1062 #define AV_CODEC_CAP_LOSSLESS 0x80000000
1063 
1069 #define AV_CODEC_CAP_HARDWARE (1 << 18)
1070 
1076 #define AV_CODEC_CAP_HYBRID (1 << 19)
1077 
1083 #define AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE (1 << 20)
1084 
1090 typedef struct AVPanScan {
1096  int id;
1097 
1103  int width;
1104  int height;
1105 
1111  int16_t position[3][2];
1112 } AVPanScan;
1113 
1119 typedef struct AVCPBProperties {
1124 #if FF_API_UNSANITIZED_BITRATES
1126 #else
1127  int64_t max_bitrate;
1128 #endif
1129 
1133 #if FF_API_UNSANITIZED_BITRATES
1135 #else
1136  int64_t min_bitrate;
1137 #endif
1138 
1142 #if FF_API_UNSANITIZED_BITRATES
1144 #else
1145  int64_t avg_bitrate;
1146 #endif
1147 
1153 
1161  uint64_t vbv_delay;
1162 } AVCPBProperties;
1163 
1167 #define AV_GET_BUFFER_FLAG_REF (1 << 0)
1168 
1182 
1191 
1208 
1229 
1235 
1244 
1250 
1256 
1268 
1276 
1281 
1292 
1302 
1308 
1319 
1327 
1332 
1338 
1345 
1351 
1358 
1364 
1371 
1378 
1385 
1391 
1397 
1407 };
1408 
1409 #define AV_PKT_DATA_QUALITY_FACTOR AV_PKT_DATA_QUALITY_STATS //DEPRECATED
1410 
1411 typedef struct AVPacketSideData {
1412  uint8_t *data;
1413  int size;
1414  enum AVPacketSideDataType type;
1416 
1445 typedef struct AVPacket {
1461  int64_t pts;
1467  int64_t dts;
1468  uint8_t *data;
1469  int size;
1470  int stream_index;
1474  int flags;
1480  int side_data_elems;
1481 
1486  int64_t duration;
1487 
1488  int64_t pos;
1489 
1490 #if FF_API_CONVERGENCE_DURATION
1491 
1496  attribute_deprecated
1498 #endif
1499 } AVPacket;
1500 #define AV_PKT_FLAG_KEY 0x0001
1501 #define AV_PKT_FLAG_CORRUPT 0x0002
1502 
1507 #define AV_PKT_FLAG_DISCARD 0x0004
1508 
1514 #define AV_PKT_FLAG_TRUSTED 0x0008
1515 
1519 #define AV_PKT_FLAG_DISPOSABLE 0x0010
1520 
1521 
1522 enum AVSideDataParamChangeFlags {
1523  AV_SIDE_DATA_PARAM_CHANGE_CHANNEL_COUNT = 0x0001,
1524  AV_SIDE_DATA_PARAM_CHANGE_CHANNEL_LAYOUT = 0x0002,
1525  AV_SIDE_DATA_PARAM_CHANGE_SAMPLE_RATE = 0x0004,
1526  AV_SIDE_DATA_PARAM_CHANGE_DIMENSIONS = 0x0008,
1527 };
1532 struct AVCodecInternal;
1533 
1534 enum AVFieldOrder {
1535  AV_FIELD_UNKNOWN,
1536  AV_FIELD_PROGRESSIVE,
1537  AV_FIELD_TT, //< Top coded_first, top displayed first
1538  AV_FIELD_BB, //< Bottom coded first, bottom displayed first
1539  AV_FIELD_TB, //< Top coded first, bottom displayed first
1540  AV_FIELD_BT, //< Bottom coded first, top displayed first
1541 };
1542 
1556 typedef struct AVCodecContext {
1562  int log_level_offset;
1563 
1564  enum AVMediaType codec_type; /* see AVMEDIA_TYPE_xxx */
1565  const struct AVCodec *codec;
1566  enum AVCodecID codec_id; /* see AV_CODEC_ID_xxx */
1567 
1581  unsigned int codec_tag;
1582 
1583  void *priv_data;
1584 
1591  struct AVCodecInternal *internal;
1592 
1598  void *opaque;
1599 
1606  int64_t bit_rate;
1607 
1615 
1623 
1629 #define FF_COMPRESSION_DEFAULT -1
1630 
1636  int flags;
1637 
1643  int flags2;
1644 
1657  uint8_t *extradata;
1658  int extradata_size;
1659 
1680 
1689 
1712  int delay;
1713 
1714 
1715  /* video only */
1729  int width, height;
1730 
1744  int coded_width, coded_height;
1745 
1752 
1766  enum AVPixelFormat pix_fmt;
1767 
1791  void (*draw_horiz_band)(struct AVCodecContext *s,
1792  const AVFrame *src, int offset[AV_NUM_DATA_POINTERS],
1793  int y, int type, int height);
1794 
1808  enum AVPixelFormat (*get_format)(struct AVCodecContext *s, const enum AVPixelFormat * fmt);
1809 
1817 
1826 
1827 #if FF_API_PRIVATE_OPT
1828 
1829  attribute_deprecated
1831 #endif
1832 
1839 
1847 
1848 #if FF_API_PRIVATE_OPT
1849 
1850  attribute_deprecated
1852 #endif
1853 
1862 
1869 
1876 
1883 
1890 
1896  float p_masking;
1897 
1904 
1911 
1912 #if FF_API_PRIVATE_OPT
1913 
1914  attribute_deprecated
1916 #define FF_PRED_LEFT 0
1917 #define FF_PRED_PLANE 1
1918 #define FF_PRED_MEDIAN 2
1919 #endif
1920 
1927 
1936 
1942  int me_cmp;
1954  int mb_cmp;
1961 #define FF_CMP_SAD 0
1962 #define FF_CMP_SSE 1
1963 #define FF_CMP_SATD 2
1964 #define FF_CMP_DCT 3
1965 #define FF_CMP_PSNR 4
1966 #define FF_CMP_BIT 5
1967 #define FF_CMP_RD 6
1968 #define FF_CMP_ZERO 7
1969 #define FF_CMP_VSAD 8
1970 #define FF_CMP_VSSE 9
1971 #define FF_CMP_NSSE 10
1972 #define FF_CMP_W53 11
1973 #define FF_CMP_W97 12
1974 #define FF_CMP_DCTMAX 13
1975 #define FF_CMP_DCT264 14
1976 #define FF_CMP_MEDIAN_SAD 15
1977 #define FF_CMP_CHROMA 256
1978 
1985 
1992 
1993 #if FF_API_PRIVATE_OPT
1994 
1995  attribute_deprecated
1996  int pre_me;
1997 #endif
1998 
2005 
2012 
2019 
2028 
2035 #define SLICE_FLAG_CODED_ORDER 0x0001
2036 #define SLICE_FLAG_ALLOW_FIELD 0x0002
2037 #define SLICE_FLAG_ALLOW_PLANE 0x0004
2038 
2039 
2045 #define FF_MB_DECISION_SIMPLE 0
2046 #define FF_MB_DECISION_BITS 1
2047 #define FF_MB_DECISION_RD 2
2048 
2049 
2054  uint16_t *intra_matrix;
2055 
2061  uint16_t *inter_matrix;
2062 
2063 #if FF_API_PRIVATE_OPT
2064 
2065  attribute_deprecated
2067 
2069  attribute_deprecated
2071 #endif
2072 
2079 
2086 
2093 
2099  int mb_lmin;
2100 
2106  int mb_lmax;
2107 
2108 #if FF_API_PRIVATE_OPT
2109 
2112  attribute_deprecated
2114 #endif
2115 
2121 
2122 #if FF_API_PRIVATE_OPT
2123 
2124  attribute_deprecated
2126 #endif
2127 
2134 
2140  int refs;
2141 
2142 #if FF_API_PRIVATE_OPT
2143 
2144  attribute_deprecated
2146 #endif
2147 
2154 
2155 #if FF_API_PRIVATE_OPT
2156 
2157  attribute_deprecated
2159 #endif
2160 
2167 
2174 
2181 
2188 
2195 
2203  int slices;
2204 
2209  enum AVFieldOrder field_order;
2210 
2211  /* audio only */
2213  int channels;
2214 
2221 
2222  /* The following data should not be initialized. */
2233 
2244 
2250 
2256  int cutoff;
2257 
2263  uint64_t channel_layout;
2264 
2271 
2278 
2286 
2367  int (*get_buffer2)(struct AVCodecContext *s, AVFrame *frame, int flags);
2368 
2382  attribute_deprecated
2384 
2385  /* - encoding parameters */
2386  float qcompress;
2387  float qblur;
2388 
2394  int qmin;
2395 
2401  int qmax;
2402 
2409 
2416 
2423  RcOverride *rc_override;
2424 
2430  int64_t rc_max_rate;
2431 
2437  int64_t rc_min_rate;
2438 
2445 
2452 
2459 
2460 #if FF_API_CODER_TYPE
2461 #define FF_CODER_TYPE_VLC 0
2462 #define FF_CODER_TYPE_AC 1
2463 #define FF_CODER_TYPE_RAW 2
2464 #define FF_CODER_TYPE_RLE 3
2465 
2468  attribute_deprecated
2470 #endif /* FF_API_CODER_TYPE */
2471 
2472 #if FF_API_PRIVATE_OPT
2473 
2474  attribute_deprecated
2476 #endif
2477 
2478 #if FF_API_PRIVATE_OPT
2479 
2480  attribute_deprecated
2482 
2484  attribute_deprecated
2486 
2488  attribute_deprecated
2490 
2492  attribute_deprecated
2494 #endif /* FF_API_PRIVATE_OPT */
2495 
2501  int trellis;
2502 
2503 #if FF_API_PRIVATE_OPT
2504 
2505  attribute_deprecated
2507 
2509  attribute_deprecated
2511 
2513  attribute_deprecated
2515 #endif
2516 
2517 #if FF_API_RTP_CALLBACK
2518 
2521  /* The RTP callback: This function is called */
2522  /* every time the encoder has a packet to send. */
2523  /* It depends on the encoder if the data starts */
2524  /* with a Start Code (it should). H.263 does. */
2525  /* mb_nb contains the number of macroblocks */
2526  /* encoded in the RTP payload. */
2527  attribute_deprecated
2528  void (*rtp_callback)(struct AVCodecContext *avctx, void *data, int size, int mb_nb);
2529 #endif
2530 
2531 #if FF_API_PRIVATE_OPT
2532 
2533  attribute_deprecated
2534  int rtp_payload_size; /* The size of the RTP payload: the coder will */
2535  /* do its best to deliver a chunk with size */
2536  /* below rtp_payload_size, the chunk will start */
2537  /* with a start code on some codecs like H.263. */
2538  /* This doesn't take account of any particular */
2539  /* headers inside the transmitted RTP payload. */
2540 #endif
2541 
2542 #if FF_API_STAT_BITS
2543  /* statistics, used for 2-pass encoding */
2544  attribute_deprecated
2545  int mv_bits;
2546  attribute_deprecated
2547  int header_bits;
2548  attribute_deprecated
2549  int i_tex_bits;
2550  attribute_deprecated
2551  int p_tex_bits;
2552  attribute_deprecated
2553  int i_count;
2554  attribute_deprecated
2555  int p_count;
2556  attribute_deprecated
2557  int skip_count;
2558  attribute_deprecated
2559  int misc_bits;
2560 
2562  attribute_deprecated
2564 #endif
2565 
2571  char *stats_out;
2572 
2579  char *stats_in;
2580 
2587 #define FF_BUG_AUTODETECT 1
2588 #define FF_BUG_XVID_ILACE 4
2589 #define FF_BUG_UMP4 8
2590 #define FF_BUG_NO_PADDING 16
2591 #define FF_BUG_AMV 32
2592 #define FF_BUG_QPEL_CHROMA 64
2593 #define FF_BUG_STD_QPEL 128
2594 #define FF_BUG_QPEL_CHROMA2 256
2595 #define FF_BUG_DIRECT_BLOCKSIZE 512
2596 #define FF_BUG_EDGE 1024
2597 #define FF_BUG_HPEL_CHROMA 2048
2598 #define FF_BUG_DC_CLIP 4096
2599 #define FF_BUG_MS 8192
2600 #define FF_BUG_TRUNCATED 16384
2601 #define FF_BUG_IEDGE 32768
2602 
2616 #define FF_COMPLIANCE_VERY_STRICT 2
2617 #define FF_COMPLIANCE_STRICT 1
2618 #define FF_COMPLIANCE_NORMAL 0
2619 #define FF_COMPLIANCE_UNOFFICIAL -1
2620 #define FF_COMPLIANCE_EXPERIMENTAL -2
2621 
2622 
2628 #define FF_EC_GUESS_MVS 1
2629 #define FF_EC_DEBLOCK 2
2630 #define FF_EC_FAVOR_INTER 256
2631 
2637  int debug;
2638 #define FF_DEBUG_PICT_INFO 1
2639 #define FF_DEBUG_RC 2
2640 #define FF_DEBUG_BITSTREAM 4
2641 #define FF_DEBUG_MB_TYPE 8
2642 #define FF_DEBUG_QP 16
2643 #if FF_API_DEBUG_MV
2644 
2647 #define FF_DEBUG_MV 32
2648 #endif
2649 #define FF_DEBUG_DCT_COEFF 0x00000040
2650 #define FF_DEBUG_SKIP 0x00000080
2651 #define FF_DEBUG_STARTCODE 0x00000100
2652 #define FF_DEBUG_ER 0x00000400
2653 #define FF_DEBUG_MMCO 0x00000800
2654 #define FF_DEBUG_BUGS 0x00001000
2655 #if FF_API_DEBUG_MV
2656 #define FF_DEBUG_VIS_QP 0x00002000
2657 #define FF_DEBUG_VIS_MB_TYPE 0x00004000
2658 #endif
2659 #define FF_DEBUG_BUFFERS 0x00008000
2660 #define FF_DEBUG_THREADS 0x00010000
2661 #define FF_DEBUG_GREEN_MD 0x00800000
2662 #define FF_DEBUG_NOMC 0x01000000
2663 
2664 #if FF_API_DEBUG_MV
2665 
2670  int debug_mv;
2671 #define FF_DEBUG_VIS_MV_P_FOR 0x00000001 // visualize forward predicted MVs of P-frames
2672 #define FF_DEBUG_VIS_MV_B_FOR 0x00000002 // visualize forward predicted MVs of B-frames
2673 #define FF_DEBUG_VIS_MV_B_BACK 0x00000004 // visualize backward predicted MVs of B-frames
2674 #endif
2675 
2682 
2689 #define AV_EF_CRCCHECK (1<<0)
2690 #define AV_EF_BITSTREAM (1<<1)
2691 #define AV_EF_BUFFER (1<<2)
2692 #define AV_EF_EXPLODE (1<<3)
2693 
2694 #define AV_EF_IGNORE_ERR (1<<15)
2695 #define AV_EF_CAREFUL (1<<16)
2696 #define AV_EF_COMPLIANT (1<<17)
2697 #define AV_EF_AGGRESSIVE (1<<18)
2698 
2699 
2710 
2716  const struct AVHWAccel *hwaccel;
2717 
2729 
2735  uint64_t error[AV_NUM_DATA_POINTERS];
2736 
2743 #define FF_DCT_AUTO 0
2744 #define FF_DCT_FASTINT 1
2745 #define FF_DCT_INT 2
2746 #define FF_DCT_MMX 3
2747 #define FF_DCT_ALTIVEC 5
2748 #define FF_DCT_FAAN 6
2749 
2756 #define FF_IDCT_AUTO 0
2757 #define FF_IDCT_INT 1
2758 #define FF_IDCT_SIMPLE 2
2759 #define FF_IDCT_SIMPLEMMX 3
2760 #define FF_IDCT_ARM 7
2761 #define FF_IDCT_ALTIVEC 8
2762 #define FF_IDCT_SIMPLEARM 10
2763 #define FF_IDCT_XVID 14
2764 #define FF_IDCT_SIMPLEARMV5TE 16
2765 #define FF_IDCT_SIMPLEARMV6 17
2766 #define FF_IDCT_FAAN 20
2767 #define FF_IDCT_SIMPLENEON 22
2768 #define FF_IDCT_NONE 24 /* Used by XvMC to extract IDCT coefficients with FF_IDCT_PERM_NONE */
2769 #define FF_IDCT_SIMPLEAUTO 128
2770 
2777 
2784 
2785 #if FF_API_LOWRES
2786 
2791  int lowres;
2792 #endif
2793 
2794 #if FF_API_CODED_FRAME
2795 
2802  attribute_deprecated AVFrame *coded_frame;
2803 #endif
2804 
2812 
2822 #define FF_THREAD_FRAME 1
2823 #define FF_THREAD_SLICE 2
2824 
2825 
2831 
2841 
2851  int (*execute)(struct AVCodecContext *c, int (*func)(struct AVCodecContext *c2, void *arg), void *arg2, int *ret, int count, int size);
2852 
2871  int (*execute2)(struct AVCodecContext *c, int (*func)(struct AVCodecContext *c2, void *arg, int jobnr, int threadnr), void *arg2, int *ret, int count);
2872 
2879 
2885  int profile;
2886 #define FF_PROFILE_UNKNOWN -99
2887 #define FF_PROFILE_RESERVED -100
2888 
2889 #define FF_PROFILE_AAC_MAIN 0
2890 #define FF_PROFILE_AAC_LOW 1
2891 #define FF_PROFILE_AAC_SSR 2
2892 #define FF_PROFILE_AAC_LTP 3
2893 #define FF_PROFILE_AAC_HE 4
2894 #define FF_PROFILE_AAC_HE_V2 28
2895 #define FF_PROFILE_AAC_LD 22
2896 #define FF_PROFILE_AAC_ELD 38
2897 #define FF_PROFILE_MPEG2_AAC_LOW 128
2898 #define FF_PROFILE_MPEG2_AAC_HE 131
2899 
2900 #define FF_PROFILE_DNXHD 0
2901 #define FF_PROFILE_DNXHR_LB 1
2902 #define FF_PROFILE_DNXHR_SQ 2
2903 #define FF_PROFILE_DNXHR_HQ 3
2904 #define FF_PROFILE_DNXHR_HQX 4
2905 #define FF_PROFILE_DNXHR_444 5
2906 
2907 #define FF_PROFILE_DTS 20
2908 #define FF_PROFILE_DTS_ES 30
2909 #define FF_PROFILE_DTS_96_24 40
2910 #define FF_PROFILE_DTS_HD_HRA 50
2911 #define FF_PROFILE_DTS_HD_MA 60
2912 #define FF_PROFILE_DTS_EXPRESS 70
2913 
2914 #define FF_PROFILE_MPEG2_422 0
2915 #define FF_PROFILE_MPEG2_HIGH 1
2916 #define FF_PROFILE_MPEG2_SS 2
2917 #define FF_PROFILE_MPEG2_SNR_SCALABLE 3
2918 #define FF_PROFILE_MPEG2_MAIN 4
2919 #define FF_PROFILE_MPEG2_SIMPLE 5
2920 
2921 #define FF_PROFILE_H264_CONSTRAINED (1<<9) // 8+1; constraint_set1_flag
2922 #define FF_PROFILE_H264_INTRA (1<<11) // 8+3; constraint_set3_flag
2923 
2924 #define FF_PROFILE_H264_BASELINE 66
2925 #define FF_PROFILE_H264_CONSTRAINED_BASELINE (66|FF_PROFILE_H264_CONSTRAINED)
2926 #define FF_PROFILE_H264_MAIN 77
2927 #define FF_PROFILE_H264_EXTENDED 88
2928 #define FF_PROFILE_H264_HIGH 100
2929 #define FF_PROFILE_H264_HIGH_10 110
2930 #define FF_PROFILE_H264_HIGH_10_INTRA (110|FF_PROFILE_H264_INTRA)
2931 #define FF_PROFILE_H264_MULTIVIEW_HIGH 118
2932 #define FF_PROFILE_H264_HIGH_422 122
2933 #define FF_PROFILE_H264_HIGH_422_INTRA (122|FF_PROFILE_H264_INTRA)
2934 #define FF_PROFILE_H264_STEREO_HIGH 128
2935 #define FF_PROFILE_H264_HIGH_444 144
2936 #define FF_PROFILE_H264_HIGH_444_PREDICTIVE 244
2937 #define FF_PROFILE_H264_HIGH_444_INTRA (244|FF_PROFILE_H264_INTRA)
2938 #define FF_PROFILE_H264_CAVLC_444 44
2939 
2940 #define FF_PROFILE_VC1_SIMPLE 0
2941 #define FF_PROFILE_VC1_MAIN 1
2942 #define FF_PROFILE_VC1_COMPLEX 2
2943 #define FF_PROFILE_VC1_ADVANCED 3
2944 
2945 #define FF_PROFILE_MPEG4_SIMPLE 0
2946 #define FF_PROFILE_MPEG4_SIMPLE_SCALABLE 1
2947 #define FF_PROFILE_MPEG4_CORE 2
2948 #define FF_PROFILE_MPEG4_MAIN 3
2949 #define FF_PROFILE_MPEG4_N_BIT 4
2950 #define FF_PROFILE_MPEG4_SCALABLE_TEXTURE 5
2951 #define FF_PROFILE_MPEG4_SIMPLE_FACE_ANIMATION 6
2952 #define FF_PROFILE_MPEG4_BASIC_ANIMATED_TEXTURE 7
2953 #define FF_PROFILE_MPEG4_HYBRID 8
2954 #define FF_PROFILE_MPEG4_ADVANCED_REAL_TIME 9
2955 #define FF_PROFILE_MPEG4_CORE_SCALABLE 10
2956 #define FF_PROFILE_MPEG4_ADVANCED_CODING 11
2957 #define FF_PROFILE_MPEG4_ADVANCED_CORE 12
2958 #define FF_PROFILE_MPEG4_ADVANCED_SCALABLE_TEXTURE 13
2959 #define FF_PROFILE_MPEG4_SIMPLE_STUDIO 14
2960 #define FF_PROFILE_MPEG4_ADVANCED_SIMPLE 15
2961 
2962 #define FF_PROFILE_JPEG2000_CSTREAM_RESTRICTION_0 1
2963 #define FF_PROFILE_JPEG2000_CSTREAM_RESTRICTION_1 2
2964 #define FF_PROFILE_JPEG2000_CSTREAM_NO_RESTRICTION 32768
2965 #define FF_PROFILE_JPEG2000_DCINEMA_2K 3
2966 #define FF_PROFILE_JPEG2000_DCINEMA_4K 4
2967 
2968 #define FF_PROFILE_VP9_0 0
2969 #define FF_PROFILE_VP9_1 1
2970 #define FF_PROFILE_VP9_2 2
2971 #define FF_PROFILE_VP9_3 3
2972 
2973 #define FF_PROFILE_HEVC_MAIN 1
2974 #define FF_PROFILE_HEVC_MAIN_10 2
2975 #define FF_PROFILE_HEVC_MAIN_STILL_PICTURE 3
2976 #define FF_PROFILE_HEVC_REXT 4
2977 
2978 #define FF_PROFILE_AV1_MAIN 0
2979 #define FF_PROFILE_AV1_HIGH 1
2980 #define FF_PROFILE_AV1_PROFESSIONAL 2
2981 
2982 #define FF_PROFILE_MJPEG_HUFFMAN_BASELINE_DCT 0xc0
2983 #define FF_PROFILE_MJPEG_HUFFMAN_EXTENDED_SEQUENTIAL_DCT 0xc1
2984 #define FF_PROFILE_MJPEG_HUFFMAN_PROGRESSIVE_DCT 0xc2
2985 #define FF_PROFILE_MJPEG_HUFFMAN_LOSSLESS 0xc3
2986 #define FF_PROFILE_MJPEG_JPEG_LS 0xf7
2987 
2988 #define FF_PROFILE_SBC_MSBC 1
2989 
2990 #define FF_PROFILE_PRORES_PROXY 0
2991 #define FF_PROFILE_PRORES_LT 1
2992 #define FF_PROFILE_PRORES_STANDARD 2
2993 #define FF_PROFILE_PRORES_HQ 3
2994 #define FF_PROFILE_PRORES_4444 4
2995 #define FF_PROFILE_PRORES_XQ 5
2996 
2997 #define FF_PROFILE_ARIB_PROFILE_A 0
2998 #define FF_PROFILE_ARIB_PROFILE_C 1
2999 
3005  int level;
3006 #define FF_LEVEL_UNKNOWN -99
3007 
3014 
3021 
3028 
3038  int subtitle_header_size;
3039 
3040 #if FF_API_VBV_DELAY
3041 
3049  attribute_deprecated
3050  uint64_t vbv_delay;
3051 #endif
3052 
3053 #if FF_API_SIDEDATA_ONLY_PKT
3054 
3064  attribute_deprecated
3066 #endif
3067 
3084 
3093 
3100 
3107 
3114 
3115 #if !FF_API_LOWRES
3116 
3121  int lowres;
3122 #endif
3123 
3133 
3140 
3148 #define FF_SUB_CHARENC_MODE_DO_NOTHING -1
3149 #define FF_SUB_CHARENC_MODE_AUTOMATIC 0
3150 #define FF_SUB_CHARENC_MODE_PRE_DECODER 1
3151 #define FF_SUB_CHARENC_MODE_IGNORE 2
3152 
3153 
3166 
3173 
3174 #if !FF_API_DEBUG_MV
3175 
3181 #define FF_DEBUG_VIS_MV_P_FOR 0x00000001 //visualize forward predicted MVs of P frames
3182 #define FF_DEBUG_VIS_MV_B_FOR 0x00000002 //visualize forward predicted MVs of B frames
3183 #define FF_DEBUG_VIS_MV_B_BACK 0x00000004 //visualize backward predicted MVs of B frames
3184 #endif
3185 
3192 
3199  uint8_t *dump_separator;
3200 
3208 
3214  unsigned properties;
3215 #define FF_CODEC_PROPERTY_LOSSLESS 0x00000001
3216 #define FF_CODEC_PROPERTY_CLOSED_CAPTIONS 0x00000002
3217 
3225  int nb_coded_side_data;
3226 
3250 
3257 #define FF_SUB_TEXT_FMT_ASS 0
3258 #if FF_API_ASS_TIMING
3259 #define FF_SUB_TEXT_FMT_ASS_WITH_TIMINGS 1
3260 #endif
3261 
3272 
3279  int64_t max_pixels;
3280 
3302 
3311 
3338 
3339  /*
3340  * Video decoding only. Sets the number of extra hardware frames which
3341  * the decoder will allocate for use by the caller. This must be set
3342  * before avcodec_open2() is called.
3343  *
3344  * Some hardware decoders require all frames that they will use for
3345  * output to be defined in advance before decoding starts. For such
3346  * decoders, the hardware frame pool must therefore be of a fixed size.
3347  * The extra frames set here are on top of any number that the decoder
3348  * needs internally in order to operate normally (for example, frames
3349  * used as reference pictures).
3350  */
3351  int extra_hw_frames;
3352 
3360 } AVCodecContext;
3361 
3362 #if FF_API_CODEC_GET_SET
3363 
3367 attribute_deprecated
3369 attribute_deprecated
3370 void av_codec_set_pkt_timebase (AVCodecContext *avctx, AVRational val);
3371 
3372 attribute_deprecated
3373 const AVCodecDescriptor *av_codec_get_codec_descriptor(const AVCodecContext *avctx);
3374 attribute_deprecated
3375 void av_codec_set_codec_descriptor(AVCodecContext *avctx, const AVCodecDescriptor *desc);
3376 
3377 attribute_deprecated
3378 unsigned av_codec_get_codec_properties(const AVCodecContext *avctx);
3379 
3380 #if FF_API_LOWRES
3381 attribute_deprecated
3382 int av_codec_get_lowres(const AVCodecContext *avctx);
3383 attribute_deprecated
3384 void av_codec_set_lowres(AVCodecContext *avctx, int val);
3385 #endif
3386 
3387 attribute_deprecated
3388 int av_codec_get_seek_preroll(const AVCodecContext *avctx);
3389 attribute_deprecated
3390 void av_codec_set_seek_preroll(AVCodecContext *avctx, int val);
3391 
3392 attribute_deprecated
3393 uint16_t *av_codec_get_chroma_intra_matrix(const AVCodecContext *avctx);
3394 attribute_deprecated
3395 void av_codec_set_chroma_intra_matrix(AVCodecContext *avctx, uint16_t *val);
3396 #endif
3397 
3401 typedef struct AVProfile {
3402  int profile;
3403  const char *name;
3404 } AVProfile;
3405 
3406 enum {
3440 };
3441 
3442 typedef struct AVCodecHWConfig {
3446  enum AVPixelFormat pix_fmt;
3451  int methods;
3458  enum AVHWDeviceType device_type;
3459 } AVCodecHWConfig;
3460 
3461 typedef struct AVCodecDefault AVCodecDefault;
3462 
3463 struct AVSubtitle;
3464 
3468 typedef struct AVCodec {
3475  const char *name;
3480  const char *long_name;
3481  enum AVMediaType type;
3482  enum AVCodecID id;
3489  const enum AVPixelFormat *pix_fmts;
3492  const uint64_t *channel_layouts;
3493  uint8_t max_lowres;
3496 
3507  const char *wrapper_name;
3508 
3509  /*****************************************************************
3510  * No fields below this line are part of the public API. They
3511  * may not be used outside of libavcodec and can be changed and
3512  * removed at will.
3513  * New public fields should be added right above.
3514  *****************************************************************
3515  */
3516  int priv_data_size;
3517  struct AVCodec *next;
3542 
3549  void (*init_static_data)(struct AVCodec *codec);
3550 
3551  int (*init)(AVCodecContext *);
3552  int (*encode_sub)(AVCodecContext *, uint8_t *buf, int buf_size,
3553  const struct AVSubtitle *sub);
3564  int (*encode2)(AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame,
3565  int *got_packet_ptr);
3566  int (*decode)(AVCodecContext *, void *outdata, int *outdata_size, AVPacket *avpkt);
3567  int (*close)(AVCodecContext *);
3576  int (*send_frame)(AVCodecContext *avctx, const AVFrame *frame);
3577  int (*receive_packet)(AVCodecContext *avctx, AVPacket *avpkt);
3578 
3584  int (*receive_frame)(AVCodecContext *avctx, AVFrame *frame);
3589  void (*flush)(AVCodecContext *);
3595 
3600  const char *bsfs;
3601 
3610 } AVCodec;
3611 
3612 #if FF_API_CODEC_GET_SET
3613 attribute_deprecated
3614 int av_codec_get_max_lowres(const AVCodec *codec);
3615 #endif
3616 
3617 struct MpegEncContext;
3618 
3626 const AVCodecHWConfig *avcodec_get_hw_config(const AVCodec *codec, int index);
3627 
3636 typedef struct AVHWAccel {
3642  const char *name;
3643 
3649  enum AVMediaType type;
3650 
3656  enum AVCodecID id;
3657 
3663  enum AVPixelFormat pix_fmt;
3664 
3670 
3671  /*****************************************************************
3672  * No fields below this line are part of the public API. They
3673  * may not be used outside of libavcodec and can be changed and
3674  * removed at will.
3675  * New public fields should be added right above.
3676  *****************************************************************
3677  */
3678 
3682  int (*alloc_frame)(AVCodecContext *avctx, AVFrame *frame);
3683 
3698  int (*start_frame)(AVCodecContext *avctx, const uint8_t *buf, uint32_t buf_size);
3699 
3712  int (*decode_params)(AVCodecContext *avctx, int type, const uint8_t *buf, uint32_t buf_size);
3713 
3726  int (*decode_slice)(AVCodecContext *avctx, const uint8_t *buf, uint32_t buf_size);
3727 
3737  int (*end_frame)(AVCodecContext *avctx);
3738 
3747 
3757  void (*decode_mb)(struct MpegEncContext *s);
3758 
3766  int (*init)(AVCodecContext *avctx);
3767 
3774  int (*uninit)(AVCodecContext *avctx);
3775 
3781 
3786 
3795  int (*frame_params)(AVCodecContext *avctx, AVBufferRef *hw_frames_ctx);
3796 } AVHWAccel;
3797 
3802 #define AV_HWACCEL_CODEC_CAP_EXPERIMENTAL 0x0200
3803 
3812 #define AV_HWACCEL_FLAG_IGNORE_LEVEL (1 << 0)
3813 
3818 #define AV_HWACCEL_FLAG_ALLOW_HIGH_DEPTH (1 << 1)
3819 
3832 #define AV_HWACCEL_FLAG_ALLOW_PROFILE_MISMATCH (1 << 2)
3833 
3838 #if FF_API_AVPICTURE
3839 
3853 typedef struct AVPicture {
3854  attribute_deprecated
3855  uint8_t *data[AV_NUM_DATA_POINTERS];
3856  attribute_deprecated
3857  int linesize[AV_NUM_DATA_POINTERS];
3858 } AVPicture;
3859 
3863 #endif
3864 
3866  SUBTITLE_NONE,
3867 
3869 
3875 
3881 };
3882 
3883 #define AV_SUBTITLE_FLAG_FORCED 0x00000001
3884 
3885 typedef struct AVSubtitleRect {
3886  int x;
3887  int y;
3888  int w;
3889  int h;
3891 
3892 #if FF_API_AVPICTURE
3893 
3896  attribute_deprecated
3898 #endif
3899 
3903  uint8_t *data[4];
3904  int linesize[4];
3905 
3906  enum AVSubtitleType type;
3907 
3908  char *text;
3909 
3915  char *ass;
3916 
3917  int flags;
3918 } AVSubtitleRect;
3919 
3920 typedef struct AVSubtitle {
3921  uint16_t format; /* 0 = graphics */
3922  uint32_t start_display_time; /* relative to packet pts, in ms */
3923  uint32_t end_display_time; /* relative to packet pts, in ms */
3924  unsigned num_rects;
3925  AVSubtitleRect **rects;
3926  int64_t pts;
3927 } AVSubtitle;
3928 
3936 typedef struct AVCodecParameters {
3940  enum AVMediaType codec_type;
3944  enum AVCodecID codec_id;
3948  uint32_t codec_tag;
3949 
3958  uint8_t *extradata;
3963 
3968  int format;
3969 
3973  int64_t bit_rate;
3974 
3987 
4000 
4004  int profile;
4005  int level;
4006 
4010  int width;
4011  int height;
4012 
4021 
4025  enum AVFieldOrder field_order;
4026 
4030  enum AVColorRange color_range;
4031  enum AVColorPrimaries color_primaries;
4032  enum AVColorTransferCharacteristic color_trc;
4033  enum AVColorSpace color_space;
4034  enum AVChromaLocation chroma_location;
4035 
4040 
4046  uint64_t channel_layout;
4066 
4086 
4096 const AVCodec *av_codec_iterate(void **opaque);
4097 
4098 #if FF_API_NEXT
4099 
4104 attribute_deprecated
4105 AVCodec *av_codec_next(const AVCodec *c);
4106 #endif
4107 
4111 unsigned avcodec_version(void);
4112 
4116 const char *avcodec_configuration(void);
4117 
4121 const char *avcodec_license(void);
4122 
4123 #if FF_API_NEXT
4124 
4132 attribute_deprecated
4133 void avcodec_register(AVCodec *codec);
4134 
4145 attribute_deprecated
4146 void avcodec_register_all(void);
4147 #endif
4148 
4163 
4168 void avcodec_free_context(AVCodecContext **avctx);
4169 
4170 #if FF_API_GET_CONTEXT_DEFAULTS
4171 
4177 #endif
4178 
4185 const AVClass *avcodec_get_class(void);
4186 
4187 #if FF_API_COPY_CONTEXT
4188 
4194 const AVClass *avcodec_get_frame_class(void);
4195 
4203 
4221 attribute_deprecated
4222 int avcodec_copy_context(AVCodecContext *dest, const AVCodecContext *src);
4223 #endif
4224 
4231 
4237 
4245 
4254  const AVCodecContext *codec);
4255 
4265  const AVCodecParameters *par);
4266 
4305 int avcodec_open2(AVCodecContext *avctx, const AVCodec *codec, AVDictionary **options);
4306 
4320 int avcodec_close(AVCodecContext *avctx);
4321 
4327 void avsubtitle_free(AVSubtitle *sub);
4328 
4349 AVPacket *av_packet_alloc(void);
4350 
4361 AVPacket *av_packet_clone(const AVPacket *src);
4362 
4370 void av_packet_free(AVPacket **pkt);
4371 
4380 void av_init_packet(AVPacket *pkt);
4381 
4390 int av_new_packet(AVPacket *pkt, int size);
4391 
4398 void av_shrink_packet(AVPacket *pkt, int size);
4399 
4406 int av_grow_packet(AVPacket *pkt, int grow_by);
4407 
4421 int av_packet_from_data(AVPacket *pkt, uint8_t *data, int size);
4422 
4423 #if FF_API_AVPACKET_OLD_API
4424 
4430 attribute_deprecated
4431 int av_dup_packet(AVPacket *pkt);
4439 attribute_deprecated
4440 int av_copy_packet(AVPacket *dst, const AVPacket *src);
4441 
4449 attribute_deprecated
4450 int av_copy_packet_side_data(AVPacket *dst, const AVPacket *src);
4451 
4459 attribute_deprecated
4460 void av_free_packet(AVPacket *pkt);
4461 #endif
4462 
4470 uint8_t* av_packet_new_side_data(AVPacket *pkt, enum AVPacketSideDataType type,
4471  int size);
4472 
4487  uint8_t *data, size_t size);
4488 
4498  int size);
4499 
4508 uint8_t* av_packet_get_side_data(const AVPacket *pkt, enum AVPacketSideDataType type,
4509  int *size);
4510 
4511 #if FF_API_MERGE_SD_API
4512 attribute_deprecated
4513 int av_packet_merge_side_data(AVPacket *pkt);
4514 
4515 attribute_deprecated
4516 int av_packet_split_side_data(AVPacket *pkt);
4517 #endif
4518 
4519 const char *av_packet_side_data_name(enum AVPacketSideDataType type);
4520 
4528 uint8_t *av_packet_pack_dictionary(AVDictionary *dict, int *size);
4537 int av_packet_unpack_dictionary(const uint8_t *data, int size, AVDictionary **dict);
4538 
4539 
4547 
4564 int av_packet_ref(AVPacket *dst, const AVPacket *src);
4565 
4574 void av_packet_unref(AVPacket *pkt);
4575 
4584 void av_packet_move_ref(AVPacket *dst, AVPacket *src);
4585 
4597 int av_packet_copy_props(AVPacket *dst, const AVPacket *src);
4598 
4614 
4625 
4637 void av_packet_rescale_ts(AVPacket *pkt, AVRational tb_src, AVRational tb_dst);
4638 
4655 
4663 
4669 int avcodec_default_get_buffer2(AVCodecContext *s, AVFrame *frame, int flags);
4670 
4678 void avcodec_align_dimensions(AVCodecContext *s, int *width, int *height);
4679 
4687 void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height,
4688  int linesize_align[AV_NUM_DATA_POINTERS]);
4689 
4699 int avcodec_enum_to_chroma_pos(int *xpos, int *ypos, enum AVChromaLocation pos);
4700 
4710 enum AVChromaLocation avcodec_chroma_pos_to_enum(int xpos, int ypos);
4711 
4765 attribute_deprecated
4766 int avcodec_decode_audio4(AVCodecContext *avctx, AVFrame *frame,
4767  int *got_frame_ptr, const AVPacket *avpkt);
4768 
4814 attribute_deprecated
4815 int avcodec_decode_video2(AVCodecContext *avctx, AVFrame *picture,
4816  int *got_picture_ptr,
4817  const AVPacket *avpkt);
4818 
4847  int *got_sub_ptr,
4848  AVPacket *avpkt);
4849 
4900 int avcodec_send_packet(AVCodecContext *avctx, const AVPacket *avpkt);
4901 
4920 int avcodec_receive_frame(AVCodecContext *avctx, AVFrame *frame);
4921 
4957 int avcodec_send_frame(AVCodecContext *avctx, const AVFrame *frame);
4958 
4974 int avcodec_receive_packet(AVCodecContext *avctx, AVPacket *avpkt);
4975 
5074  AVBufferRef *device_ref,
5075  enum AVPixelFormat hw_pix_fmt,
5076  AVBufferRef **out_frames_ref);
5077 
5078 
5079 
5085 enum AVPictureStructure {
5086  AV_PICTURE_STRUCTURE_UNKNOWN, //< unknown
5087  AV_PICTURE_STRUCTURE_TOP_FIELD, //< coded as top field
5088  AV_PICTURE_STRUCTURE_BOTTOM_FIELD, //< coded as bottom field
5089  AV_PICTURE_STRUCTURE_FRAME, //< coded as frame
5090 };
5091 
5092 typedef struct AVCodecParserContext {
5093  void *priv_data;
5094  struct AVCodecParser *parser;
5095  int64_t frame_offset; /* offset of the current frame */
5096  int64_t cur_offset; /* current offset
5097  (incremented by each av_parser_parse()) */
5098  int64_t next_frame_offset; /* offset of the next frame */
5099  /* video info */
5100  int pict_type; /* XXX: Put it back in AVCodecContext. */
5110  int repeat_pict; /* XXX: Put it back in AVCodecContext. */
5111  int64_t pts; /* pts of the current frame */
5112  int64_t dts; /* dts of the current frame */
5113 
5114  /* private data */
5115  int64_t last_pts;
5116  int64_t last_dts;
5117  int fetch_timestamp;
5118 
5119 #define AV_PARSER_PTS_NB 4
5120  int cur_frame_start_index;
5121  int64_t cur_frame_offset[AV_PARSER_PTS_NB];
5122  int64_t cur_frame_pts[AV_PARSER_PTS_NB];
5123  int64_t cur_frame_dts[AV_PARSER_PTS_NB];
5124 
5125  int flags;
5126 #define PARSER_FLAG_COMPLETE_FRAMES 0x0001
5127 #define PARSER_FLAG_ONCE 0x0002
5128 #define PARSER_FLAG_FETCHED_OFFSET 0x0004
5130 #define PARSER_FLAG_USE_CODEC_TS 0x1000
5131 
5132  int64_t offset;
5133  int64_t cur_frame_end[AV_PARSER_PTS_NB];
5134 
5142 
5143 #if FF_API_CONVERGENCE_DURATION
5144 
5147  attribute_deprecated
5149 #endif
5150 
5151  // Timestamp generation support:
5162 
5177 
5191 
5197  int64_t cur_frame_pos[AV_PARSER_PTS_NB];
5198 
5202  int64_t pos;
5203 
5207  int64_t last_pos;
5208 
5215 
5216  enum AVFieldOrder field_order;
5217 
5226  enum AVPictureStructure picture_structure;
5227 
5235 
5239  int width;
5240  int height;
5241 
5246  int coded_height;
5247 
5256  int format;
5258 
5259 typedef struct AVCodecParser {
5260  int codec_ids[5]; /* several codec IDs are permitted */
5261  int priv_data_size;
5262  int (*parser_init)(AVCodecParserContext *s);
5263  /* This callback never returns an error, a negative value means that
5264  * the frame start was in a previous packet. */
5265  int (*parser_parse)(AVCodecParserContext *s,
5266  AVCodecContext *avctx,
5267  const uint8_t **poutbuf, int *poutbuf_size,
5268  const uint8_t *buf, int buf_size);
5269  void (*parser_close)(AVCodecParserContext *s);
5270  int (*split)(AVCodecContext *avctx, const uint8_t *buf, int buf_size);
5271  struct AVCodecParser *next;
5272 } AVCodecParser;
5273 
5283 const AVCodecParser *av_parser_iterate(void **opaque);
5284 
5285 attribute_deprecated
5286 AVCodecParser *av_parser_next(const AVCodecParser *c);
5287 
5288 attribute_deprecated
5289 void av_register_codec_parser(AVCodecParser *parser);
5290 AVCodecParserContext *av_parser_init(int codec_id);
5291 
5324  AVCodecContext *avctx,
5325  uint8_t **poutbuf, int *poutbuf_size,
5326  const uint8_t *buf, int buf_size,
5327  int64_t pts, int64_t dts,
5328  int64_t pos);
5329 
5335  AVCodecContext *avctx,
5336  uint8_t **poutbuf, int *poutbuf_size,
5337  const uint8_t *buf, int buf_size, int keyframe);
5338 void av_parser_close(AVCodecParserContext *s);
5339 
5357 
5365 
5406 attribute_deprecated
5407 int avcodec_encode_audio2(AVCodecContext *avctx, AVPacket *avpkt,
5408  const AVFrame *frame, int *got_packet_ptr);
5409 
5445 attribute_deprecated
5446 int avcodec_encode_video2(AVCodecContext *avctx, AVPacket *avpkt,
5447  const AVFrame *frame, int *got_packet_ptr);
5448 
5449 int avcodec_encode_subtitle(AVCodecContext *avctx, uint8_t *buf, int buf_size,
5450  const AVSubtitle *sub);
5451 
5452 
5457 #if FF_API_AVPICTURE
5458 
5466 attribute_deprecated
5467 int avpicture_alloc(AVPicture *picture, enum AVPixelFormat pix_fmt, int width, int height);
5468 
5472 attribute_deprecated
5473 void avpicture_free(AVPicture *picture);
5474 
5478 attribute_deprecated
5479 int avpicture_fill(AVPicture *picture, const uint8_t *ptr,
5480  enum AVPixelFormat pix_fmt, int width, int height);
5481 
5485 attribute_deprecated
5486 int avpicture_layout(const AVPicture *src, enum AVPixelFormat pix_fmt,
5487  int width, int height,
5488  unsigned char *dest, int dest_size);
5489 
5493 attribute_deprecated
5494 int avpicture_get_size(enum AVPixelFormat pix_fmt, int width, int height);
5495 
5499 attribute_deprecated
5500 void av_picture_copy(AVPicture *dst, const AVPicture *src,
5501  enum AVPixelFormat pix_fmt, int width, int height);
5502 
5506 attribute_deprecated
5507 int av_picture_crop(AVPicture *dst, const AVPicture *src,
5508  enum AVPixelFormat pix_fmt, int top_band, int left_band);
5509 
5513 attribute_deprecated
5514 int av_picture_pad(AVPicture *dst, const AVPicture *src, int height, int width, enum AVPixelFormat pix_fmt,
5515  int padtop, int padbottom, int padleft, int padright, int *color);
5516 
5520 #endif
5521 
5538 #if FF_API_GETCHROMA
5539 
5543 attribute_deprecated
5544 void avcodec_get_chroma_sub_sample(enum AVPixelFormat pix_fmt, int *h_shift, int *v_shift);
5545 #endif
5546 
5552 unsigned int avcodec_pix_fmt_to_codec_tag(enum AVPixelFormat pix_fmt);
5553 
5557 int avcodec_get_pix_fmt_loss(enum AVPixelFormat dst_pix_fmt, enum AVPixelFormat src_pix_fmt,
5558  int has_alpha);
5559 
5577 enum AVPixelFormat avcodec_find_best_pix_fmt_of_list(const enum AVPixelFormat *pix_fmt_list,
5578  enum AVPixelFormat src_pix_fmt,
5579  int has_alpha, int *loss_ptr);
5580 
5584 enum AVPixelFormat avcodec_find_best_pix_fmt_of_2(enum AVPixelFormat dst_pix_fmt1, enum AVPixelFormat dst_pix_fmt2,
5585  enum AVPixelFormat src_pix_fmt, int has_alpha, int *loss_ptr);
5586 
5587 attribute_deprecated
5588 enum AVPixelFormat avcodec_find_best_pix_fmt2(enum AVPixelFormat dst_pix_fmt1, enum AVPixelFormat dst_pix_fmt2,
5589  enum AVPixelFormat src_pix_fmt, int has_alpha, int *loss_ptr);
5590 
5591 enum AVPixelFormat avcodec_default_get_format(struct AVCodecContext *s, const enum AVPixelFormat * fmt);
5592 
5597 #if FF_API_TAG_STRING
5598 
5609 attribute_deprecated
5610 size_t av_get_codec_tag_string(char *buf, size_t buf_size, unsigned int codec_tag);
5611 #endif
5612 
5613 void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode);
5614 
5622 const char *av_get_profile_name(const AVCodec *codec, int profile);
5623 
5635 const char *avcodec_profile_name(enum AVCodecID codec_id, int profile);
5636 
5637 int avcodec_default_execute(AVCodecContext *c, int (*func)(AVCodecContext *c2, void *arg2),void *arg, int *ret, int count, int size);
5638 int avcodec_default_execute2(AVCodecContext *c, int (*func)(AVCodecContext *c2, void *arg2, int, int),void *arg, int *ret, int count);
5639 //FIXME func typedef
5640 
5664 int avcodec_fill_audio_frame(AVFrame *frame, int nb_channels,
5665  enum AVSampleFormat sample_fmt, const uint8_t *buf,
5666  int buf_size, int align);
5667 
5678 
5685 int av_get_bits_per_sample(enum AVCodecID codec_id);
5686 
5693 enum AVCodecID av_get_pcm_codec(enum AVSampleFormat fmt, int be);
5694 
5703 int av_get_exact_bits_per_sample(enum AVCodecID codec_id);
5704 
5713 int av_get_audio_frame_duration(AVCodecContext *avctx, int frame_bytes);
5714 
5719 int av_get_audio_frame_duration2(AVCodecParameters *par, int frame_bytes);
5720 
5721 #if FF_API_OLD_BSF
5723  void *priv_data;
5724  const struct AVBitStreamFilter *filter;
5725  AVCodecParserContext *parser;
5726  struct AVBitStreamFilterContext *next;
5731  char *args;
5733 #endif
5734 
5735 typedef struct AVBSFInternal AVBSFInternal;
5736 
5747 typedef struct AVBSFContext {
5752 
5756  const struct AVBitStreamFilter *filter;
5757 
5762  AVBSFInternal *internal;
5763 
5768  void *priv_data;
5769 
5776 
5782 
5788 
5794 } AVBSFContext;
5795 
5796 typedef struct AVBitStreamFilter {
5797  const char *name;
5798 
5804  const enum AVCodecID *codec_ids;
5805 
5816 
5817  /*****************************************************************
5818  * No fields below this line are part of the public API. They
5819  * may not be used outside of libavcodec and can be changed and
5820  * removed at will.
5821  * New public fields should be added right above.
5822  *****************************************************************
5823  */
5824 
5825  int priv_data_size;
5826  int (*init)(AVBSFContext *ctx);
5827  int (*filter)(AVBSFContext *ctx, AVPacket *pkt);
5828  void (*close)(AVBSFContext *ctx);
5829  void (*flush)(AVBSFContext *ctx);
5831 
5832 #if FF_API_OLD_BSF
5833 
5837 attribute_deprecated
5844 attribute_deprecated
5851 attribute_deprecated
5853  AVCodecContext *avctx, const char *args,
5854  uint8_t **poutbuf, int *poutbuf_size,
5855  const uint8_t *buf, int buf_size, int keyframe);
5861 attribute_deprecated
5868 attribute_deprecated
5870 #endif
5871 
5876 const AVBitStreamFilter *av_bsf_get_by_name(const char *name);
5877 
5887 const AVBitStreamFilter *av_bsf_iterate(void **opaque);
5888 #if FF_API_NEXT
5889 attribute_deprecated
5890 const AVBitStreamFilter *av_bsf_next(void **opaque);
5891 #endif
5892 
5905 int av_bsf_alloc(const AVBitStreamFilter *filter, AVBSFContext **ctx);
5906 
5911 int av_bsf_init(AVBSFContext *ctx);
5912 
5928 int av_bsf_send_packet(AVBSFContext *ctx, AVPacket *pkt);
5929 
5955 
5959 void av_bsf_flush(AVBSFContext *ctx);
5960 
5965 void av_bsf_free(AVBSFContext **ctx);
5966 
5973 const AVClass *av_bsf_get_class(void);
5974 
5979 typedef struct AVBSFList AVBSFList;
5980 
5989 
5995 void av_bsf_list_free(AVBSFList **lst);
5996 
6005 int av_bsf_list_append(AVBSFList *lst, AVBSFContext *bsf);
6006 
6017 int av_bsf_list_append2(AVBSFList *lst, const char * bsf_name, AVDictionary **options);
6034 int av_bsf_list_finalize(AVBSFList **lst, AVBSFContext **bsf);
6035 
6049 int av_bsf_list_parse_str(const char *str, AVBSFContext **bsf);
6050 
6059 
6060 /* memory */
6061 
6069 void av_fast_padded_malloc(void *ptr, unsigned int *size, size_t min_size);
6070 
6075 void av_fast_padded_mallocz(void *ptr, unsigned int *size, size_t min_size);
6076 
6084 unsigned int av_xiphlacing(unsigned char *s, unsigned int v);
6085 
6086 #if FF_API_USER_VISIBLE_AVHWACCEL
6087 
6092 attribute_deprecated
6093 void av_register_hwaccel(AVHWAccel *hwaccel);
6094 
6103 attribute_deprecated
6104 AVHWAccel *av_hwaccel_next(const AVHWAccel *hwaccel);
6105 #endif
6106 
6107 #if FF_API_LOCKMGR
6108 
6113 enum AVLockOp {
6118 };
6119 
6146 attribute_deprecated
6147 int av_lockmgr_register(int (*cb)(void **mutex, enum AVLockOp op));
6148 #endif
6149 
6153 enum AVMediaType avcodec_get_type(enum AVCodecID codec_id);
6154 
6159 const char *avcodec_get_name(enum AVCodecID id);
6160 
6166 
6170 int av_codec_is_encoder(const AVCodec *codec);
6171 
6175 int av_codec_is_decoder(const AVCodec *codec);
6176 
6181 
6190 
6196 
6207 
6212 #endif /* AVCODEC_AVCODEC_H */
enum AVPixelFormat(* get_format)(struct AVCodecContext *s, const enum AVPixelFormat *fmt)
callback to negotiate the pixelFormat
Definition: avcodec.h:1808
codec_id is not known (like AV_CODEC_ID_NONE) but lavf should attempt to identify it ...
Definition: avcodec.h:697
int caps_internal
Internal hwaccel capabilities.
Definition: avcodec.h:3785
void av_bsf_free(AVBSFContext **ctx)
Free a bitstream filter context and everything associated with it; write NULL into the supplied point...
Definition: bsf.c:35
struct AVBSFContext AVBSFContext
The bitstream filter state.
AVRational framerate
Definition: avcodec.h:3092
discard all frames except keyframes
Definition: avcodec.h:806
const AVCodecDescriptor * codec_descriptor
AVCodecDescriptor.
Definition: avcodec.h:3113
const AVClass * priv_class
A class for the private data, used to declare bitstream filter private AVOptions. ...
Definition: avcodec.h:5815
AVCodecParameters * par_out
Parameters of the output stream.
Definition: avcodec.h:5781
AVPacketSideDataType
Definition: avcodec.h:1175
int64_t pts_correction_num_faulty_dts
Number of incorrect PTS values so far.
Definition: avcodec.h:3130
A list of zero terminated key/value strings.
Definition: avcodec.h:1344
This structure describes decoded (raw) audio or video data.
Definition: frame.h:268
The optional first identifier line of a WebVTT cue.
Definition: avcodec.h:1331
AVCodec * avcodec_find_encoder(enum AVCodecID id)
Find a registered encoder with a matching codec ID.
Definition: allcodecs.c:881
int x
top left corner of pict, undefined when pict is not set
Definition: avcodec.h:3886
int dct_algo
DCT algorithm, see FF_DCT_* below.
Definition: avcodec.h:2742
A dummy id pointing at the start of audio codecs.
Definition: avcodec.h:459
int apply_cropping
Video decoding only.
Definition: avcodec.h:3337
const struct AVCodecHWConfigInternal ** hw_configs
Array of pointers to hardware configurations supported by the codec, or NULL if no hardware supported...
Definition: avcodec.h:3609
The codec supports this format by some internal method.
Definition: avcodec.h:3430
int coded_width
Bitstream width / height, may be different from width/height e.g.
Definition: avcodec.h:1744
int capabilities
Hardware accelerated codec capabilities.
Definition: avcodec.h:3669
float qblur
amount of qscale smoothing over time (0.0-1.0)
Definition: avcodec.h:2387
Unlock the mutex.
Definition: avcodec.h:6116
int64_t bit_rate
the average bitrate
Definition: avcodec.h:1606
int64_t pos
byte position in stream, -1 if unknown
Definition: avcodec.h:1488
void av_shrink_packet(AVPacket *pkt, int size)
Reduce packet size, correctly zeroing padding.
Definition: avpacket.c:101
attribute_deprecated AVCodec * av_codec_next(const AVCodec *c)
If c is NULL, returns the first registered codec, if c is non-NULL, returns the next registered codec...
Definition: allcodecs.c:834
Subtitle event position.
Definition: avcodec.h:1318
int id
id
Definition: avcodec.h:1096
int max_bitrate
Maximum bitrate of the stream, in bits per second.
Definition: avcodec.h:1125
int max_b_frames
maximum number of B-frames between non-B-frames Note: The output will be delayed by max_b_frames+1 re...
Definition: avcodec.h:1816
AVRational sample_aspect_ratio
Video only.
Definition: avcodec.h:4020
int rc_initial_buffer_occupancy
Number of bits which should be loaded into the rc buffer before decoding starts.
Definition: avcodec.h:2458
Dummy codec for streams containing only metadata information.
Definition: avcodec.h:703
int width
Dimensions of the decoded video intended for presentation.
Definition: avcodec.h:5239
int avcodec_receive_packet(AVCodecContext *avctx, AVPacket *avpkt)
Read encoded data from the encoder.
Definition: encode.c:417
attribute_deprecated int frame_skip_cmp
Definition: avcodec.h:2493
This side data should be associated with a video stream and contains Stereoscopic 3D information in f...
Definition: avcodec.h:1249
const char * avcodec_configuration(void)
Return the libavcodec build-time configuration.
Definition: utils.c:1412
ATSC A53 Part 4 Closed Captions.
Definition: avcodec.h:1377
attribute_deprecated int av_bitstream_filter_filter(AVBitStreamFilterContext *bsfc, AVCodecContext *avctx, const char *args, uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size, int keyframe)
Definition: bitstream_filter.c:97
enum AVColorRange color_range
MPEG vs JPEG YUV range.
Definition: avcodec.h:2187
const struct AVBitStreamFilter * filter
The bitstream filter this context is an instance of.
Definition: avcodec.h:5756
attribute_deprecated int av_picture_crop(AVPicture *dst, const AVPicture *src, enum AVPixelFormat pix_fmt, int top_band, int left_band)
Definition: imgconvert.c:107
The bitstream filter state.
Definition: avcodec.h:5747
int nb_colors
number of colors in pict, undefined when pict is not set
Definition: avcodec.h:3890
int mb_lmin
minimum MB Lagrange multiplier
Definition: avcodec.h:2099
const char * avcodec_license(void)
Return the libavcodec license.
Definition: utils.c:1417
const AVBitStreamFilter * av_bsf_get_by_name(const char *name)
Definition: bitstream_filters.c:79
int coded_width
Dimensions of the coded video.
Definition: avcodec.h:5245
This side data contains an integer value representing the stream index of a "fallback" track...
Definition: avcodec.h:1275
AVRational sample_aspect_ratio
sample aspect ratio (0 if unknown) That is the width of a pixel divided by the height of the pixel...
Definition: avcodec.h:1935
Definition: bsf.c:414
attribute_deprecated int avcodec_encode_audio2(AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame, int *got_packet_ptr)
Encode a frame of audio.
Definition: encode.c:118
Convenience header that includes libavutil&#39;s core.
attribute_deprecated int avcodec_decode_audio4(AVCodecContext *avctx, AVFrame *frame, int *got_frame_ptr, const AVPacket *avpkt)
Decode the audio frame of size avpkt->size from avpkt->data into frame.
Definition: decode.c:860
Contain timestamp estimated through PCR of program stream.
Definition: avcodec.h:686
void av_fast_padded_malloc(void *ptr, unsigned int *size, size_t min_size)
Same behaviour av_fast_malloc but the buffer has additional AV_INPUT_BUFFER_PADDING_SIZE at the end w...
Definition: utils.c:70
A dummy ID pointing at the start of various fake codecs.
Definition: avcodec.h:683
char * stats_in
pass2 encoding statistics input buffer Concatenated stuff from stats_out of pass1 should be placed he...
Definition: avcodec.h:2579
int ildct_cmp
interlaced DCT comparison function
Definition: avcodec.h:1960
discard all non intra frames
Definition: avcodec.h:805
int duration
Duration of the current frame.
Definition: avcodec.h:5214
discard all
Definition: avcodec.h:807
attribute_deprecated void avcodec_get_chroma_sub_sample(enum AVPixelFormat pix_fmt, int *h_shift, int *v_shift)
Definition: imgconvert.c:38
int bits_per_raw_sample
Bits per sample/pixel of internal libavcodec pixel/sample format.
Definition: avcodec.h:2783
attribute_deprecated int av_lockmgr_register(int(*cb)(void **mutex, enum AVLockOp op))
Register a user provided lock manager supporting the operations specified by AVLockOp.
Definition: utils.c:1780
int avcodec_enum_to_chroma_pos(int *xpos, int *ypos, enum AVChromaLocation pos)
Converts AVChromaLocation to swscale x/y chroma position.
Definition: utils.c:353
int dts_ref_dts_delta
Offset of the current timestamp against last timestamp sync point in units of AVCodecContext.time_base.
Definition: avcodec.h:5176
int avcodec_decode_subtitle2(AVCodecContext *avctx, AVSubtitle *sub, int *got_sub_ptr, AVPacket *avpkt)
Decode a subtitle message.
Definition: decode.c:1025
const struct AVHWAccel * hwaccel
Hardware accelerator in use.
Definition: avcodec.h:2716
int av_bsf_get_null_filter(AVBSFContext **bsf)
Get null/pass-through bitstream filter.
Definition: bsf.c:564
int trailing_padding
Audio only.
Definition: avcodec.h:4080
void * priv_data
Opaque filter-specific private data.
Definition: avcodec.h:5768
Picture data structure.
Definition: avcodec.h:3853
int profile
profile
Definition: avcodec.h:2885
const AVCodec * av_codec_iterate(void **opaque)
Iterate over all registered codecs.
Definition: allcodecs.c:799
An AV_PKT_DATA_H263_MB_INFO side data packet contains a number of structures with info about macroblo...
Definition: avcodec.h:1228
AVCodec.
Definition: avcodec.h:3468
Definition: vf_paletteuse.c:588
int block_align
number of bytes per packet if constant and known or 0 Used by some WAV based audio codecs...
Definition: avcodec.h:2249
attribute_deprecated int av_picture_pad(AVPicture *dst, const AVPicture *src, int height, int width, enum AVPixelFormat pix_fmt, int padtop, int padbottom, int padleft, int padright, int *color)
Definition: imgconvert.c:138
float i_quant_offset
qscale offset between P and I-frames
Definition: avcodec.h:1868
This struct describes the properties of an encoded stream.
Definition: avcodec.h:3936
int av_bsf_init(AVBSFContext *ctx)
Prepare the filter for use, after all the parameters and options have been set.
Definition: bsf.c:134
AVLockOp
Lock operation used by lockmgr.
Definition: avcodec.h:6113
attribute_deprecated AVPicture pict
Definition: avcodec.h:3897
AVColorTransferCharacteristic
Color Transfer Characteristic.
Definition: pixfmt.h:464
int min_bitrate
Minimum bitrate of the stream, in bits per second.
Definition: avcodec.h:1134
char * text
0 terminated plain UTF-8 text
Definition: avcodec.h:3908
attribute_deprecated int frame_skip_exp
Definition: avcodec.h:2489
attribute_deprecated int avpicture_alloc(AVPicture *picture, enum AVPixelFormat pix_fmt, int width, int height)
Definition: avpicture.c:57
Macro definitions for various function/variable attributes.
const AVBitStreamFilter * av_bsf_iterate(void **opaque)
Iterate over all registered bitstream filters.
Definition: bitstream_filters.c:62
int frame_size
Audio only.
Definition: avcodec.h:4065
Mastering display metadata (based on SMPTE-2086:2014).
Definition: avcodec.h:1357
AVRational time_base
This is the fundamental unit of time (in seconds) in terms of which frame timestamps are represented...
Definition: avcodec.h:1679
int avcodec_get_pix_fmt_loss(enum AVPixelFormat dst_pix_fmt, enum AVPixelFormat src_pix_fmt, int has_alpha)
Definition: imgconvert.c:47
int av_codec_is_decoder(const AVCodec *codec)
Definition: utils.c:99
enum AVAudioServiceType audio_service_type
Type of service that the audio stream conveys.
Definition: avcodec.h:2277
const AVCodecDescriptor * avcodec_descriptor_next(const AVCodecDescriptor *prev)
Iterate over all codec descriptors known to libavcodec.
Definition: codec_desc.c:3235
void av_bsf_list_free(AVBSFList **lst)
Free list of bitstream filters.
Definition: bsf.c:424
int avcodec_fill_audio_frame(AVFrame *frame, int nb_channels, enum AVSampleFormat sample_fmt, const uint8_t *buf, int buf_size, int align)
Fill AVFrame audio data and linesize pointers.
Definition: utils.c:376
enum AVDiscard skip_frame
Skip decoding for selected frames.
Definition: avcodec.h:3027
const AVClass * avcodec_get_class(void)
Get the AVClass for AVCodecContext.
Definition: options.c:294
int av_codec_is_encoder(const AVCodec *codec)
Definition: utils.c:94
uint64_t vbv_delay
The delay between the time the packet this structure is associated with is received and the time when...
Definition: avcodec.h:1161
int av_bsf_alloc(const AVBitStreamFilter *filter, AVBSFContext **ctx)
Allocate a context for a given bitstream filter.
Definition: bsf.c:81
void avcodec_align_dimensions(AVCodecContext *s, int *width, int *height)
Modify width and height values so that they will result in a memory buffer that is acceptable for the...
Definition: utils.c:338
int w
width of pict, undefined when pict is not set
Definition: avcodec.h:3888
float p_masking
p block masking (0-> disabled)
Definition: avcodec.h:1896
attribute_deprecated const AVBitStreamFilter * av_bitstream_filter_next(const AVBitStreamFilter *f)
Definition: bitstream_filter.c:31
Public dictionary API.
int av_bsf_receive_packet(AVBSFContext *ctx, AVPacket *pkt)
Retrieve a filtered packet.
Definition: bsf.c:211
attribute_deprecated int side_data_only_packets
Encoding only and set by default.
Definition: avcodec.h:3065
int bit_rate_tolerance
number of bits the bitstream is allowed to diverge from the reference.
Definition: avcodec.h:1614
int mb_lmax
maximum MB Lagrange multiplier
Definition: avcodec.h:2106
void av_packet_free(AVPacket **pkt)
Free the packet, if the packet is reference counted, it will be unreferenced first.
Definition: avpacket.c:62
enum AVSampleFormat sample_fmt
audio sample format
Definition: avcodec.h:2220
Lock the mutex.
Definition: avcodec.h:6115
Definition: avcodec.h:3442
void * hwaccel_context
Hardware accelerator context.
Definition: avcodec.h:2728
int av_packet_unpack_dictionary(const uint8_t *data, int size, AVDictionary **dict)
Unpack a dictionary from side_data.
Definition: avpacket.c:523
int width
Video only.
Definition: avcodec.h:4010
int av_parser_change(AVCodecParserContext *s, AVCodecContext *avctx, uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size, int keyframe)
Definition: parser.c:189
AVCodecParameters * avcodec_parameters_alloc(void)
Allocate a new AVCodecParameters and set its fields to default values (unknown/invalid/0).
Definition: utils.c:1992
int me_range
maximum motion estimation search range in subpel units If 0 then no limit.
Definition: avcodec.h:2027
AVColorSpace
YUV colorspace type.
Definition: pixfmt.h:493
unsigned int avcodec_pix_fmt_to_codec_tag(enum AVPixelFormat pix_fmt)
Return a value representing the fourCC code associated to the pixel format pix_fmt, or 0 if no associated fourCC code can be found.
Definition: raw.c:304
struct AVCodecContext AVCodecContext
main external API structure.
uint16_t * chroma_intra_matrix
custom intra quantization matrix
Definition: avcodec.h:3191
int64_t duration
Duration of this packet in AVStream->time_base units, 0 if unknown.
Definition: avcodec.h:1486
This side data contains a 3x3 transformation matrix describing an affine transformation that needs to...
Definition: avcodec.h:1243
float b_quant_factor
qscale factor between IP and B-frames If > 0 then the last P-frame quantizer will be used (q= lastp_q...
Definition: avcodec.h:1825
int trailing_padding
Audio only.
Definition: avcodec.h:3271
int pre_dia_size
ME prepass diamond size & shape.
Definition: avcodec.h:2011
int av_packet_from_data(AVPacket *pkt, uint8_t *data, int size)
Initialize a reference-counted packet from av_malloc()ed data.
Definition: avpacket.c:152
uint8_t * extradata
some codecs need / can use extradata like Huffman tables.
Definition: avcodec.h:1657
const AVClass * av_class
information on struct for av_log
Definition: avcodec.h:1561
int me_cmp
motion estimation comparison function
Definition: avcodec.h:1942
int avcodec_parameters_to_context(AVCodecContext *codec, const AVCodecParameters *par)
Fill the codec context based on the values from the supplied codec parameters.
Definition: utils.c:2088
int initial_padding
Audio only.
Definition: avcodec.h:4073
This side data is encryption initialization data.
Definition: avcodec.h:1384
attribute_deprecated int context_model
Definition: avcodec.h:2475
void av_packet_move_ref(AVPacket *dst, AVPacket *src)
Move every field in src to dst and reset src.
Definition: avpacket.c:654
attribute_deprecated void avcodec_register(AVCodec *codec)
Register the codec codec and initialize libavcodec.
Definition: allcodecs.c:829
int lowres
low resolution decoding, 1-> 1/2 size, 2->1/4 size
Definition: avcodec.h:2791
AVColorRange
MPEG vs JPEG YUV range.
Definition: pixfmt.h:516
const AVClass * avcodec_get_frame_class(void)
Get the AVClass for AVFrame.
Definition: options.c:321
int buffer_size
The size of the buffer to which the ratecontrol is applied, in bits.
Definition: avcodec.h:1152
int h
height of pict, undefined when pict is not set
Definition: avcodec.h:3889
Definition: bsf.c:30
int bits_per_coded_sample
bits per sample/pixel from the demuxer (needed for huffyuv).
Definition: avcodec.h:2776
Definition: avcodec.h:5796
float lumi_masking
luminance masking (0-> disabled)
Definition: avcodec.h:1875
char * stats_out
pass1 encoding statistics output buffer
Definition: avcodec.h:2571
AVColorPrimaries
Chromaticity coordinates of the source primaries.
Definition: pixfmt.h:440
AVCPBProperties * av_cpb_properties_alloc(size_t *size)
Allocate a CPB properties structure and initialize its fields to default values.
Definition: utils.c:1932
enum AVChromaLocation chroma_sample_location
This defines the location of chroma samples.
Definition: avcodec.h:2194
attribute_deprecated int frame_skip_threshold
Definition: avcodec.h:2481
The codec supports this format via the hw_device_ctx interface.
Definition: avcodec.h:3414
uint64_t channel_layout
Audio only.
Definition: avcodec.h:4046
attribute_deprecated void avcodec_register_all(void)
Register all the codecs, parsers and bitstream filters which were enabled at configuration time...
Definition: allcodecs.c:844
Definition: avcodec.h:3920
int av_packet_ref(AVPacket *dst, const AVPacket *src)
Setup a new reference to the data described by a given packet.
Definition: avpacket.c:607
int64_t bit_rate
The average bitrate of the encoded data (in bits per second).
Definition: avcodec.h:3973
AVCodec * avcodec_find_encoder_by_name(const char *name)
Find a registered encoder with the specified name.
Definition: allcodecs.c:909
attribute_deprecated int av_copy_packet_side_data(AVPacket *dst, const AVPacket *src)
Copy packet side data.
Definition: avpacket.c:226
void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height, int linesize_align[AV_NUM_DATA_POINTERS])
Modify width and height values so that they will result in a memory buffer that is acceptable for the...
Definition: utils.c:154
attribute_deprecated int avpicture_fill(AVPicture *picture, const uint8_t *ptr, enum AVPixelFormat pix_fmt, int width, int height)
Definition: avpicture.c:37
int av_packet_make_writable(AVPacket *pkt)
Create a writable reference for the data described by a given packet, avoiding data copy if possible...
Definition: avpacket.c:681
attribute_deprecated void av_register_hwaccel(AVHWAccel *hwaccel)
Register the hardware accelerator hwaccel.
Definition: utils.c:1774
MPEGTS stream ID as uint8_t, this is required to pass the stream ID information from the demuxer to t...
Definition: avcodec.h:1350
int slice_count
slice count
Definition: avcodec.h:1910
Libavcodec version macros.
int avcodec_close(AVCodecContext *avctx)
Close a given AVCodecContext and free all the data associated with it (but not the AVCodecContext its...
Definition: utils.c:1073
int av_new_packet(AVPacket *pkt, int size)
Allocate the payload of a packet and initialize its fields with default values.
Definition: avpacket.c:86
AVRational pkt_timebase
Timebase in which pkt_dts/pts and AVPacket.dts/pts are.
Definition: avcodec.h:3106
const uint64_t * channel_layouts
array of support channel layouts, or NULL if unknown. array is terminated by 0
Definition: avcodec.h:3492
Definition: dict.c:30
const AVCodecDefault * defaults
Private codec-specific defaults.
Definition: avcodec.h:3541
AVCodecID
Identify the syntax and semantics of the bitstream.
Definition: avcodec.h:215
int avcodec_parameters_copy(AVCodecParameters *dst, const AVCodecParameters *src)
Copy the contents of src to dst.
Definition: utils.c:2013
int av_get_bits_per_sample(enum AVCodecID codec_id)
Return codec bits per sample.
Definition: utils.c:1506
int has_b_frames
Size of the frame reordering buffer in the decoder.
Definition: avcodec.h:1846
An AV_PKT_DATA_PALETTE side data packet contains exactly AVPALETTE_SIZE bytes worth of palette...
Definition: avcodec.h:1181
AVPacket * av_packet_clone(const AVPacket *src)
Create a new packet that references the same data as src.
Definition: avpacket.c:641
int64_t pos
Byte position of currently parsed frame in stream.
Definition: avcodec.h:5202
Create a mutex.
Definition: avcodec.h:6114
void av_packet_rescale_ts(AVPacket *pkt, AVRational tb_src, AVRational tb_dst)
Convert valid timing fields (timestamps / durations) in a packet from one timebase to another...
Definition: avpacket.c:703
AVAudioServiceType
Definition: avcodec.h:810
int y
top left corner of pict, undefined when pict is not set
Definition: avcodec.h:3887
discard all bidirectional frames
Definition: avcodec.h:804
An AV_PKT_DATA_PARAM_CHANGE side data packet is laid out as follows:
Definition: avcodec.h:1207
uint8_t * av_packet_get_side_data(const AVPacket *pkt, enum AVPacketSideDataType type, int *size)
Get side information from packet.
Definition: avpacket.c:350
enum AVCodecID * codec_ids
A list of codec ids supported by the filter, terminated by AV_CODEC_ID_NONE.
Definition: avcodec.h:5804
int me_sub_cmp
subpixel motion estimation comparison function
Definition: avcodec.h:1948
void av_packet_free_side_data(AVPacket *pkt)
Convenience function to free all the side data stored.
Definition: avpacket.c:270
Definition: internal.h:223
attribute_deprecated uint64_t vbv_delay
VBV delay coded in the last frame (in periods of a 27 MHz clock).
Definition: avcodec.h:3050
int qmax
maximum quantizer
Definition: avcodec.h:2401
enum AVSampleFormat request_sample_fmt
desired sample format
Definition: avcodec.h:2285
int skip_alpha
Skip processing alpha if supported by codec.
Definition: avcodec.h:3165
int64_t pts_correction_last_pts
Number of incorrect DTS values so far.
Definition: avcodec.h:3131
int format
Definition: avcodec.h:3968
int active_thread_type
Which multithreading methods are in use by the codec.
Definition: avcodec.h:2830
int methods
Bit set of AV_CODEC_HW_CONFIG_METHOD_* flags, describing the possible setup methods which can be used...
Definition: avcodec.h:3451
attribute_deprecated int av_dup_packet(AVPacket *pkt)
Definition: avpacket.c:251
int avcodec_is_open(AVCodecContext *s)
Definition: utils.c:1871
int error_concealment
error concealment flags
Definition: avcodec.h:2627
int video_delay
Video only.
Definition: avcodec.h:4039
int avcodec_receive_frame(AVCodecContext *avctx, AVFrame *frame)
Return decoded output data from a decoder.
Definition: decode.c:740
int capabilities
Codec capabilities.
Definition: avcodec.h:3487
int initial_padding
Audio only.
Definition: avcodec.h:3083
Definition: hwaccel.h:29
struct AVCodec AVCodec
AVCodec.
preferred ID for decoding MPEG audio layer 1, 2 or 3
Definition: avcodec.h:561
attribute_deprecated AVBitStreamFilterContext * av_bitstream_filter_init(const char *name)
Definition: bitstream_filter.c:51
AVBufferRef * buf
A reference to the reference-counted buffer where the packet data is stored.
Definition: avcodec.h:1451
int flags
AV_CODEC_FLAG_*.
Definition: avcodec.h:1636
enum AVPixelFormat avcodec_find_best_pix_fmt_of_list(const enum AVPixelFormat *pix_fmt_list, enum AVPixelFormat src_pix_fmt, int has_alpha, int *loss_ptr)
Find the best pixel format to convert to given a certain source pixel format.
Definition: imgconvert.c:66
AVRational time_base_in
The timebase used for the timestamps of the input packets.
Definition: avcodec.h:5787
enum AVMediaType avcodec_get_type(enum AVCodecID codec_id)
Get the type of the given codec.
Definition: codec_desc.c:3254
const char * name
Name of the codec implementation.
Definition: avcodec.h:3475
float i_quant_factor
qscale factor between P- and I-frames If > 0 then the last P-frame quantizer will be used (q = lastp_...
Definition: avcodec.h:1861
int width
width and height in 1/16 pel
Definition: avcodec.h:1103
int64_t max_pixels
The number of pixels per image to maximally accept.
Definition: avcodec.h:3279
int av_packet_shrink_side_data(AVPacket *pkt, enum AVPacketSideDataType type, int size)
Shrink the already allocated side data buffer.
Definition: avpacket.c:548
const struct AVProfile * profiles
If non-NULL, an array of profiles recognized for this codec.
Definition: avcodec.h:739
const char * long_name
A more descriptive name for this codec.
Definition: avcodec.h:724
struct AVPicture AVPicture
Picture data structure.
struct AVCPBProperties AVCPBProperties
This structure describes the bitrate properties of an encoded bitstream.
Definition: avcodec.h:5259
void avcodec_parameters_free(AVCodecParameters **par)
Free an AVCodecParameters instance and everything associated with it and write NULL to the supplied p...
Definition: utils.c:2002
int av_get_audio_frame_duration2(AVCodecParameters *par, int frame_bytes)
This function is the same as av_get_audio_frame_duration(), except it works with AVCodecParameters in...
Definition: utils.c:1719
attribute_deprecated int64_t timecode_frame_start
Definition: avcodec.h:2514
attribute_deprecated int b_sensitivity
Definition: avcodec.h:2158
int priv_data_size
Size of the private data to allocate in AVCodecInternal.hwaccel_priv_data.
Definition: avcodec.h:3780
int flags
A combination of AV_PKT_FLAG values.
Definition: avcodec.h:1474
reference-counted frame API
const AVCodecDescriptor * avcodec_descriptor_get(enum AVCodecID id)
Definition: codec_desc.c:3229
uint64_t channel_layout
Audio channel layout.
Definition: avcodec.h:2263
int extradata_size
Size of the extradata content in bytes.
Definition: avcodec.h:3962
int64_t pts
Same as packet pts, in AV_TIME_BASE.
Definition: avcodec.h:3926
int rc_buffer_size
decoder bitstream buffer size
Definition: avcodec.h:2415
attribute_deprecated int av_copy_packet(AVPacket *dst, const AVPacket *src)
Copy packet, including contents.
Definition: avpacket.c:262
int props
Codec properties, a combination of AV_CODEC_PROP_* flags.
Definition: avcodec.h:728
int intra_dc_precision
precision of the intra DC coefficient - 8
Definition: avcodec.h:2078
int64_t rc_min_rate
minimum bitrate
Definition: avcodec.h:2437
Not part of ABI.
Definition: avcodec.h:820
int refs
number of reference frames
Definition: avcodec.h:2140
int av_bsf_list_append(AVBSFList *lst, AVBSFContext *bsf)
Append bitstream filter to the list of bitstream filters.
Definition: bsf.c:437
int block_align
Audio only.
Definition: avcodec.h:4061
A bitmap, pict will be set.
Definition: avcodec.h:3868
int av_packet_copy_props(AVPacket *dst, const AVPacket *src)
Copy only "properties" fields from src to dst.
Definition: avpacket.c:564
int rc_override_count
ratecontrol override, see RcOverride
Definition: avcodec.h:2422
const AVClass * av_bsf_get_class(void)
Get the AVClass for AVBSFContext.
Definition: bsf.c:76
audio channel layout utility functions
enum AVPixelFormat * pix_fmts
array of supported pixel formats, or NULL if unknown, array is terminated by -1
Definition: avcodec.h:3489
int err_recognition
Error recognition; may misdetect some more or less valid parts as errors.
Definition: avcodec.h:2681
const char * name
Name of the hardware accelerated codec.
Definition: avcodec.h:3642
AVPacketSideData * coded_side_data
Additional data associated with the entire coded stream.
Definition: avcodec.h:3224
attribute_deprecated int avpicture_layout(const AVPicture *src, enum AVPixelFormat pix_fmt, int width, int height, unsigned char *dest, int dest_size)
Definition: avpicture.c:44
int av_get_exact_bits_per_sample(enum AVCodecID codec_id)
Return codec bits per sample.
Definition: utils.c:1423
attribute_deprecated int avcodec_copy_context(AVCodecContext *dest, const AVCodecContext *src)
Copy the settings of the source AVCodecContext into the destination AVCodecContext.
Definition: options.c:215
AVCodecContext * avcodec_alloc_context3(const AVCodec *codec)
Allocate an AVCodecContext and set its fields to default values.
Definition: options.c:156
int av_parser_parse2(AVCodecParserContext *s, AVCodecContext *avctx, uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size, int64_t pts, int64_t dts, int64_t pos)
Parse a packet.
Definition: parser.c:120
This side data contains quality related information from the encoder.
Definition: avcodec.h:1267
int av_bsf_list_append2(AVBSFList *lst, const char *bsf_name, AVDictionary **options)
Construct new bitstream filter context given it&#39;s name and options and append it to the list of bitst...
Definition: bsf.c:442
int width
picture width / height.
Definition: avcodec.h:1729
int idct_algo
IDCT algorithm, see FF_IDCT_* below.
Definition: avcodec.h:2755
AVBufferRef * hw_frames_ctx
A reference to the AVHWFramesContext describing the input (for encoding) or output (decoding) frames...
Definition: avcodec.h:3249
int64_t offset
byte offset from starting packet start
Definition: avcodec.h:5132
attribute_deprecated void av_bitstream_filter_close(AVBitStreamFilterContext *bsf)
Definition: bitstream_filter.c:83
AVRational time_base_out
The timebase used for the timestamps of the output packets.
Definition: avcodec.h:5793
int av_packet_make_refcounted(AVPacket *pkt)
Ensure the data described by a given packet is reference counted.
Definition: avpacket.c:662
attribute_deprecated int noise_reduction
Definition: avcodec.h:2070
This side data should be associated with a video stream and corresponds to the AVSphericalMapping str...
Definition: avcodec.h:1363
int av_bsf_send_packet(AVBSFContext *ctx, AVPacket *pkt)
Submit a packet for filtering.
Definition: bsf.c:185
float rc_max_available_vbv_use
Ratecontrol attempt to use, at maximum, of what can be used without an underflow. ...
Definition: avcodec.h:2444
float rc_min_vbv_overflow_use
Ratecontrol attempt to use, at least, times the amount needed to prevent a vbv overflow.
Definition: avcodec.h:2451
Active Format Description data consisting of a single byte as specified in ETSI TS 101 154 using AVAc...
Definition: avcodec.h:1396
attribute_deprecated int avpicture_get_size(enum AVPixelFormat pix_fmt, int width, int height)
Definition: avpicture.c:52
enum AVColorPrimaries color_primaries
Chromaticity coordinates of the source primaries.
Definition: avcodec.h:2166
attribute_deprecated int frame_skip_factor
Definition: avcodec.h:2485
const AVClass * avcodec_get_subtitle_rect_class(void)
Get the AVClass for AVSubtitleRect.
Definition: options.c:346
int level
level
Definition: avcodec.h:3005
const AVClass * av_class
A class for logging and AVOptions.
Definition: avcodec.h:5751
const AVProfile * profiles
array of recognized profiles, or NULL if unknown, array is terminated by {FF_PROFILE_UNKNOWN} ...
Definition: avcodec.h:3495
int64_t reordered_opaque
opaque 64-bit number (generally a PTS) that will be reordered and output in AVFrame.reordered_opaque
Definition: avcodec.h:2709
int ticks_per_frame
For some codecs, the time base is closer to the field rate than the frame rate.
Definition: avcodec.h:1688
const char * bsfs
Decoding only, a comma-separated list of bitstream filters to apply to packets before decoding...
Definition: avcodec.h:3600
int skip_top
Number of macroblock rows at the top which are skipped.
Definition: avcodec.h:2085
int mb_decision
macroblock decision mode
Definition: avcodec.h:2044
int last_predictor_count
amount of previous MV predictors (2a+1 x 2a+1 square)
Definition: avcodec.h:1991
int max_qdiff
maximum quantizer difference between frames
Definition: avcodec.h:2408
Passthrough codec, AVFrames wrapped in AVPacket.
Definition: avcodec.h:704
char * sub_charenc
DTS of the last frame.
Definition: avcodec.h:3139
attribute_deprecated int coder_type
Definition: avcodec.h:2469
preferred ID for MPEG-1/2 video decoding
Definition: avcodec.h:220
const AVCodecDescriptor * avcodec_descriptor_get_by_name(const char *name)
Definition: codec_desc.c:3244
Definition: avcodec.h:5092
int64_t last_pos
Previous frame byte position.
Definition: avcodec.h:5207
const char * avcodec_get_name(enum AVCodecID id)
Get the name of a codec.
Definition: utils.c:1139
int thread_count
thread count is used to decide how many independent tasks should be passed to execute() ...
Definition: avcodec.h:2811
int sub_charenc_mode
Subtitles character encoding mode.
Definition: avcodec.h:3147
attribute_deprecated int max_prediction_order
Definition: avcodec.h:2510
Definition: avcodec.h:5722
void avcodec_flush_buffers(AVCodecContext *avctx)
Reset the internal decoder state / flush internal buffers.
Definition: decode.c:1982
FAKE codec to indicate a MPEG-4 Systems stream (only used by libavformat)
Definition: avcodec.h:701
enum AVPixelFormat avcodec_find_best_pix_fmt_of_2(enum AVPixelFormat dst_pix_fmt1, enum AVPixelFormat dst_pix_fmt2, enum AVPixelFormat src_pix_fmt, int has_alpha, int *loss_ptr)
Definition: imgconvert.c:54
Content light level (based on CTA-861.3).
Definition: avcodec.h:1370
int avcodec_send_packet(AVCodecContext *avctx, const AVPacket *avpkt)
Supply raw packet data as input to a decoder.
Definition: decode.c:677
int(* update_thread_context)(AVCodecContext *dst, const AVCodecContext *src)
Copy necessary context variables from a previous thread context to the current one.
Definition: avcodec.h:3535
const char * av_get_profile_name(const AVCodec *codec, int profile)
Return a name for the specified profile, if available.
Definition: utils.c:1374
int frame_size
Number of samples per channel in an audio frame.
Definition: avcodec.h:2232
int pts_dts_delta
Presentation delay of current frame in units of AVCodecContext.time_base.
Definition: avcodec.h:5190
int(* execute2)(struct AVCodecContext *c, int(*func)(struct AVCodecContext *c2, void *arg, int jobnr, int threadnr), void *arg2, int *ret, int count)
The codec may call this to execute several independent things.
Definition: avcodec.h:2871
const char * long_name
Descriptive name for the codec, meant to be more human readable than name.
Definition: avcodec.h:3480
This structure describes the bitrate properties of an encoded bitstream.
Definition: avcodec.h:1119
AVBSFList * av_bsf_list_alloc(void)
Allocate empty list of bitstream filters.
Definition: bsf.c:419
The AV_PKT_DATA_NEW_EXTRADATA is used to notify the codec or the format that the extradata buffer was...
Definition: avcodec.h:1190
int bidir_refine
Definition: avcodec.h:2120
Definition: avcodec.h:1411
attribute_deprecated AVHWAccel * av_hwaccel_next(const AVHWAccel *hwaccel)
If hwaccel is NULL, returns the first registered hardware accelerator, if hwaccel is non-NULL...
Definition: utils.c:1769
int avcodec_default_get_buffer2(AVCodecContext *s, AVFrame *frame, int flags)
The default callback for AVCodecContext.get_buffer2().
Definition: decode.c:1657
int discard_damaged_percentage
The percentage of damaged samples to discard a frame.
Definition: avcodec.h:3359
const char * wrapper_name
Group name of the codec implementation.
Definition: avcodec.h:3507
attribute_deprecated int mpeg_quant
Definition: avcodec.h:1851
const AVRational * supported_framerates
array of supported framerates, or NULL if any, array is terminated by {0,0}
Definition: avcodec.h:3488
A list of zero terminated key/value strings.
Definition: avcodec.h:1307
attribute_deprecated int avcodec_decode_video2(AVCodecContext *avctx, AVFrame *picture, int *got_picture_ptr, const AVPacket *avpkt)
Decode the video frame of size avpkt->size from avpkt->data into picture.
Definition: decode.c:853
AVSampleFormat
Audio sample formats.
Definition: samplefmt.h:58
attribute_deprecated int scenechange_threshold
Definition: avcodec.h:2066
void avcodec_free_context(AVCodecContext **avctx)
Free the codec context and everything associated with it and write NULL to the provided pointer...
Definition: options.c:171
Definition: internal.h:129
enum AVCodecID av_get_pcm_codec(enum AVSampleFormat fmt, int be)
Return the PCM codec associated with a sample format.
Definition: utils.c:1484
Definition: avcodec.h:3636
int compression_level
Definition: avcodec.h:1628
int seek_preroll
Number of samples to skip after a discontinuity.
Definition: avcodec.h:3172
attribute_deprecated int prediction_method
Definition: avcodec.h:1915
int sample_rate
samples per second
Definition: avcodec.h:2212
enum AVDiscard skip_idct
Skip IDCT/dequantization for selected frames.
Definition: avcodec.h:3020
attribute_deprecated int b_frame_strategy
Definition: avcodec.h:1830
const AVCodecParser * av_parser_iterate(void **opaque)
Iterate over all registered codec parsers.
Definition: parsers.c:96
Plain text, the text field must be set by the decoder and is authoritative.
Definition: avcodec.h:3874
int debug
debug
Definition: avcodec.h:2637
const AVCodecHWConfig * avcodec_get_hw_config(const AVCodec *codec, int index)
Retrieve supported hardware configurations for a codec.
Definition: utils.c:1757
main external API structure.
Definition: avcodec.h:1556
AVCodec * avcodec_find_decoder(enum AVCodecID id)
Find a registered decoder with a matching codec ID.
Definition: allcodecs.c:886
uint8_t * av_packet_pack_dictionary(AVDictionary *dict, int *size)
Pack a dictionary for use in side_data.
Definition: avpacket.c:488
void av_packet_unref(AVPacket *pkt)
Wipe the packet.
Definition: avpacket.c:598
int qmin
minimum quantizer
Definition: avcodec.h:2394
void avsubtitle_free(AVSubtitle *sub)
Free all allocated data in the given subtitle struct.
Definition: utils.c:1054
Definition: avcodec.h:826
unsigned int codec_tag
fourcc (LSB first, so "ABCD" -> (&#39;D&#39;<<24) + (&#39;C&#39;<<16) + (&#39;B&#39;<<8) + &#39;A&#39;).
Definition: avcodec.h:1581
int avcodec_send_frame(AVCodecContext *avctx, const AVFrame *frame)
Supply a raw video or audio frame to the encoder.
Definition: encode.c:387
float spatial_cplx_masking
spatial complexity masking (0-> disabled)
Definition: avcodec.h:1889
Data found in BlockAdditional element of matroska container.
Definition: avcodec.h:1326
unsigned int av_xiphlacing(unsigned char *s, unsigned int v)
Encode extradata length to a buffer.
Definition: utils.c:1736
uint16_t * intra_matrix
custom intra quantization matrix
Definition: avcodec.h:2054
int slice_flags
slice flags
Definition: avcodec.h:2034
Describe the class of an AVClass context structure.
Definition: log.h:67
int(* get_buffer2)(struct AVCodecContext *s, AVFrame *frame, int flags)
This callback is called at the beginning of each frame to get data buffer(s) for it.
Definition: avcodec.h:2367
enum AVColorSpace colorspace
YUV colorspace type.
Definition: avcodec.h:2180
Rational number (pair of numerator and denominator).
Definition: rational.h:58
attribute_deprecated int avcodec_encode_video2(AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame, int *got_packet_ptr)
Encode a frame of video.
Definition: encode.c:258
enum AVColorTransferCharacteristic color_trc
Color Transfer Characteristic.
Definition: avcodec.h:2173
const char * name
short name for the profile
Definition: avcodec.h:3403
int avcodec_parameters_from_context(AVCodecParameters *par, const AVCodecContext *codec)
Fill the parameters struct based on the values from the supplied codec context.
Definition: utils.c:2031
Recommmends skipping the specified number of samples.
Definition: avcodec.h:1291
struct AVCodecDescriptor AVCodecDescriptor
This struct describes the properties of a single codec described by an AVCodecID. ...
int av_packet_add_side_data(AVPacket *pkt, enum AVPacketSideDataType type, uint8_t *data, size_t size)
Wrap an existing array as a packet side data.
Definition: avpacket.c:295
int sub_text_format
Control the form of AVSubtitle.rects[N]->ass.
Definition: avcodec.h:3256
struct AVPacket AVPacket
This structure stores compressed data.
int(* init_thread_copy)(AVCodecContext *)
If defined, called on thread contexts when they are created.
Definition: avcodec.h:3527
AVMediaType
Definition: avutil.h:199
attribute_deprecated AVRational av_codec_get_pkt_timebase(const AVCodecContext *avctx)
Accessors for some AVCodecContext fields.
discard useless packets like 0 size packets in avi
Definition: avcodec.h:802
refcounted data buffer API
attribute_deprecated int brd_scale
Definition: avcodec.h:2125
char * codec_whitelist
&#39;,&#39; separated list of allowed decoders.
Definition: avcodec.h:3207
const char * name
Name of the codec described by this descriptor.
Definition: avcodec.h:720
int avcodec_open2(AVCodecContext *avctx, const AVCodec *codec, AVDictionary **options)
Initialize the AVCodecContext to use the given AVCodec.
Definition: utils.c:542
attribute_deprecated int chromaoffset
Definition: avcodec.h:2145
float b_quant_offset
qscale offset between IP and B-frames
Definition: avcodec.h:1838
This side data contains encryption info for how to decrypt the packet.
Definition: avcodec.h:1390
struct AVCodecParameters AVCodecParameters
This struct describes the properties of an encoded stream.
int av_get_audio_frame_duration(AVCodecContext *avctx, int frame_bytes)
Return audio frame duration.
Definition: utils.c:1710
float qcompress
amount of qscale change between easy & hard scenes (0.0-1.0)
Definition: avcodec.h:2386
attribute_deprecated int refcounted_frames
If non-zero, the decoded audio and video frames returned from avcodec_decode_video2() and avcodec_dec...
Definition: avcodec.h:2383
uint16_t * inter_matrix
custom inter quantization matrix
Definition: avcodec.h:2061
attribute_deprecated int64_t convergence_duration
Definition: avcodec.h:5148
int seek_preroll
Audio only.
Definition: avcodec.h:4084
This struct describes the properties of a single codec described by an AVCodecID. ...
Definition: avcodec.h:712
float dark_masking
darkness masking (0-> disabled)
Definition: avcodec.h:1903
int global_quality
Global quality for codecs which cannot change it per frame.
Definition: avcodec.h:1622
int skip_bottom
Number of macroblock rows at the bottom which are skipped.
Definition: avcodec.h:2092
AVCodec * avcodec_find_decoder_by_name(const char *name)
Find a registered decoder with the specified name.
Definition: allcodecs.c:914
This side data should be associated with an audio stream and contains ReplayGain information in form ...
Definition: avcodec.h:1234
int output_picture_number
Picture number incremented in presentation or output order.
Definition: avcodec.h:5234
float temporal_cplx_masking
temporary complexity masking (0-> disabled)
Definition: avcodec.h:1882
The codec supports this format via the hw_frames_ctx interface.
Definition: avcodec.h:3423
int bits_per_raw_sample
This is the number of valid bits in each output sample.
Definition: avcodec.h:3999
Pan Scan area.
Definition: avcodec.h:1090
const AVClass * priv_class
AVClass for the private context.
Definition: avcodec.h:3494
MpegEncContext.
Definition: mpegvideo.h:81
int gop_size
the number of pictures in a group of pictures, or 0 for intra_only
Definition: avcodec.h:1751
int sample_rate
Audio only.
Definition: avcodec.h:4054
uint8_t max_lowres
maximum value for lowres supported by the decoder
Definition: avcodec.h:3493
A reference to a data buffer.
Definition: buffer.h:81
discard all non reference
Definition: avcodec.h:803
The codec supports this format by some ad-hoc method.
Definition: avcodec.h:3439
An AV_PKT_DATA_JP_DUALMONO side data packet indicates that the packet may contain "dual mono" audio s...
Definition: avcodec.h:1301
AVPacketSideData * side_data
Additional packet data that can be provided by the container.
Definition: avcodec.h:1479
attribute_deprecated int64_t convergence_duration
Definition: avcodec.h:1497
int mb_cmp
macroblock comparison function (not supported yet)
Definition: avcodec.h:1954
int av_bsf_list_parse_str(const char *str, AVBSFContext **bsf)
Parse string describing list of bitstream filters and create single AVBSFContext describing the whole...
Definition: bsf.c:526
int avcodec_get_hw_frames_parameters(AVCodecContext *avctx, AVBufferRef *device_ref, enum AVPixelFormat hw_pix_fmt, AVBufferRef **out_frames_ref)
Create and return a AVHWFramesContext with values adequate for hardware decoding. ...
Definition: decode.c:1228
enum AVChromaLocation avcodec_chroma_pos_to_enum(int xpos, int ypos)
Converts swscale x/y chroma position to AVChromaLocation.
Definition: utils.c:365
Free mutex resources.
Definition: avcodec.h:6117
Utilties for rational number calculation.
attribute_deprecated void avpicture_free(AVPicture *picture)
Definition: avpicture.c:70
raw UTF-8 text
Definition: avcodec.h:656
attribute_deprecated int rtp_payload_size
Definition: avcodec.h:2534
int nsse_weight
noise vs.
Definition: avcodec.h:2878
int profile
Codec-specific bitstream restrictions that the stream conforms to.
Definition: avcodec.h:4004
void av_fast_padded_mallocz(void *ptr, unsigned int *size, size_t min_size)
Same behaviour av_fast_padded_malloc except that buffer will always be 0-initialized after call...
Definition: utils.c:82
AVProfile.
Definition: avcodec.h:3401
int workaround_bugs
Work around bugs in encoders which sometimes cannot be detected automatically.
Definition: avcodec.h:2586
int av_grow_packet(AVPacket *pkt, int grow_by)
Increase packet size, correctly zeroing padding.
Definition: avpacket.c:109
int caps_internal
Internal codec capabilities.
Definition: avcodec.h:3594
unsigned properties
Properties of the stream that gets decoded.
Definition: avcodec.h:3214
void av_init_packet(AVPacket *pkt)
Initialize optional fields of a packet with default values.
Definition: avpacket.c:33
enum AVDiscard skip_loop_filter
Skip loop filtering for selected frames.
Definition: avcodec.h:3013
int thread_safe_callbacks
Set by the client if its custom get_buffer() callback can be called synchronously from another thread...
Definition: avcodec.h:2840
int avcodec_get_context_defaults3(AVCodecContext *s, const AVCodec *codec)
Definition: options.c:150
attribute_deprecated void av_picture_copy(AVPicture *dst, const AVPicture *src, enum AVPixelFormat pix_fmt, int width, int height)
Definition: avpicture.c:75
int trellis
trellis RD quantization
Definition: avcodec.h:2501
The optional settings (rendering instructions) that immediately follow the timestamp specifier of a W...
Definition: avcodec.h:1337
int slices
Number of slices.
Definition: avcodec.h:2203
int cutoff
Audio cutoff bandwidth (0 means "automatic")
Definition: avcodec.h:2256
attribute_deprecated size_t av_get_codec_tag_string(char *buf, size_t buf_size, unsigned int codec_tag)
Put a string representing the codec tag codec_tag in buf.
Definition: utils.c:1159
FAKE codec to indicate a raw MPEG-2 TS stream (only used by libavformat)
Definition: avcodec.h:699
Formatted text, the ass field must be set by the decoder and is authoritative.
Definition: avcodec.h:3880
pixel format definitions
int dia_size
ME diamond size & shape.
Definition: avcodec.h:1984
uint8_t * dump_separator
dump format separator.
Definition: avcodec.h:3199
attribute_deprecated int frame_bits
Definition: avcodec.h:2563
attribute_deprecated int me_penalty_compensation
Definition: avcodec.h:2113
attribute_deprecated int min_prediction_order
Definition: avcodec.h:2506
as in Berlin toast format
Definition: avcodec.h:578
int avg_bitrate
Average bitrate of the stream, in bits per second.
Definition: avcodec.h:1143
char * args
Internal default arguments, used if NULL is passed to av_bitstream_filter_filter().
Definition: avcodec.h:5731
int channels
number of audio channels
Definition: avcodec.h:2213
int frame_priv_data_size
Size of per-frame hardware accelerator private data.
Definition: avcodec.h:3746
const int * supported_samplerates
array of supported audio samplerates, or NULL if unknown, array is terminated by 0 ...
Definition: avcodec.h:3490
int format
The format of the coded data, corresponds to enum AVPixelFormat for video and for enum AVSampleFormat...
Definition: avcodec.h:5256
unsigned avcodec_version(void)
Return the LIBAVCODEC_VERSION_INT constant.
Definition: utils.c:1402
AVPacket * av_packet_alloc(void)
Allocate an AVPacket and set its fields to default values.
Definition: avpacket.c:51
char * ass
0 terminated ASS/SSA compatible event line.
Definition: avcodec.h:3915
This side data corresponds to the AVCPBProperties struct.
Definition: avcodec.h:1280
attribute_deprecated void(* rtp_callback)(struct AVCodecContext *avctx, void *data, int size, int mb_nb)
Definition: avcodec.h:2528
int mv0_threshold
Note: Value depends upon the compare function used for fullpel ME.
Definition: avcodec.h:2153
int flags2
AV_CODEC_FLAG2_*.
Definition: avcodec.h:1643
int bits_per_coded_sample
The number of bits per sample in the codedwords.
Definition: avcodec.h:3986
uint8_t * extradata
Extra binary data needed for initializing the decoder, codec-dependent.
Definition: avcodec.h:3958
AVDiscard
Definition: avcodec.h:798
attribute_deprecated void av_register_bitstream_filter(AVBitStreamFilter *bsf)
Definition: bitstream_filter.c:42
struct AVProfile AVProfile
AVProfile.
int channels
Audio only.
Definition: avcodec.h:4050
int64_t dts
Decompression timestamp in AVStream->time_base units; the time at which the packet is decompressed...
Definition: avcodec.h:1467
int64_t pts_correction_last_dts
PTS of the last frame.
Definition: avcodec.h:3132
int * slice_offset
slice offsets in the frame in bytes
Definition: avcodec.h:1926
int frame_number
Frame counter, set by libavcodec.
Definition: avcodec.h:2243
attribute_deprecated void av_free_packet(AVPacket *pkt)
Free a packet.
Definition: avpacket.c:281
int repeat_pict
This field is used for proper frame duration computation in lavf.
Definition: avcodec.h:5110
void av_bsf_flush(AVBSFContext *ctx)
Reset the internal bitstream filter state / flush internal buffers.
Definition: bsf.c:175
int64_t pts_correction_num_faulty_pts
Current statistics for PTS correction.
Definition: avcodec.h:3129
enum AVFieldOrder field_order
Field order.
Definition: avcodec.h:2209
void(* init_static_data)(struct AVCodec *codec)
Initialize codec static data, called from avcodec_register().
Definition: avcodec.h:3549
AVChromaLocation
Location of chroma samples.
Definition: pixfmt.h:538
int hwaccel_flags
Bit set of AV_HWACCEL_FLAG_* flags, which affect hardware accelerated decoding (if active)...
Definition: avcodec.h:3310
enum AVSampleFormat * sample_fmts
array of supported sample formats, or NULL if unknown, array is terminated by -1
Definition: avcodec.h:3491
uint32_t codec_tag
Additional information about the codec (corresponds to the AVI FOURCC).
Definition: avcodec.h:3948
struct AVPanScan AVPanScan
Pan Scan area.
uint8_t * av_packet_new_side_data(AVPacket *pkt, enum AVPacketSideDataType type, int size)
Allocate new information of a packet.
Definition: avpacket.c:329
int debug_mv
debug motion vectors
Definition: avcodec.h:3180
const char *const * mime_types
MIME type(s) associated with the codec.
Definition: avcodec.h:734
AVBufferRef * hw_device_ctx
A reference to the AVHWDeviceContext describing the device which will be used by a hardware encoder/d...
Definition: avcodec.h:3301
uint64_t request_channel_layout
Request decoder to use this channel layout if it can (0 for default)
Definition: avcodec.h:2270
Definition: avcodec.h:3885
int me_pre_cmp
motion estimation prepass comparison function
Definition: avcodec.h:2004
The number of side data types.
Definition: avcodec.h:1406
AVPixelFormat
Pixel format.
Definition: pixfmt.h:64
This structure stores compressed data.
Definition: avcodec.h:1445
const char * avcodec_profile_name(enum AVCodecID codec_id, int profile)
Return a name for the specified profile, if available.
Definition: utils.c:1387
AVCodecParameters * par_in
Parameters of the input stream.
Definition: avcodec.h:5775
int key_frame
Set by parser to 1 for key frames and 0 for non-key frames.
Definition: avcodec.h:5141
int delay
Codec delay.
Definition: avcodec.h:1712
int me_subpel_quality
subpel ME quality
Definition: avcodec.h:2018
int strict_std_compliance
strictly follow the standard (MPEG-4, ...).
Definition: avcodec.h:2615
int dts_sync_point
Synchronization point for start of timestamp generation.
Definition: avcodec.h:5161
int64_t pts
Presentation timestamp in AVStream->time_base units; the time at which the decompressed packet will b...
Definition: avcodec.h:1461
enum AVPixelFormat sw_pix_fmt
Nominal unaccelerated pixel format, see AV_PIX_FMT_xxx.
Definition: avcodec.h:3099
A dummy ID pointing at the start of subtitle codecs.
Definition: avcodec.h:653
void * opaque
Private data of the user, can be used to carry app specific stuff.
Definition: avcodec.h:1598
int thread_type
Which multithreading methods to use.
Definition: avcodec.h:2821
AVSubtitleType
Definition: avcodec.h:3865
int av_bsf_list_finalize(AVBSFList **lst, AVBSFContext **bsf)
Finalize list of bitstream filters.
Definition: bsf.c:471
discard nothing
Definition: avcodec.h:801
int64_t rc_max_rate
maximum bitrate
Definition: avcodec.h:2430
attribute_deprecated int pre_me
Definition: avcodec.h:1996
This side data should be associated with an audio stream and corresponds to enum AVAudioServiceType.
Definition: avcodec.h:1255
uint8_t * subtitle_header
Header containing style information for text subtitles.
Definition: avcodec.h:3037
int keyint_min
minimum GOP size
Definition: avcodec.h:2133