avcodec.h
Go to the documentation of this file.
1 /*
2  * copyright (c) 2001 Fabrice Bellard
3  *
4  * This file is part of Libav.
5  *
6  * Libav 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  * Libav 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 Libav; 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 
29 #include <errno.h>
30 #include "libavutil/samplefmt.h"
31 #include "libavutil/avutil.h"
32 #include "libavutil/cpu.h"
33 #include "libavutil/dict.h"
34 #include "libavutil/log.h"
35 #include "libavutil/pixfmt.h"
36 #include "libavutil/rational.h"
37 
38 #include "libavcodec/version.h"
83 enum CodecID {
85 
86  /* video codecs */
186 #if LIBAVCODEC_VERSION_MAJOR == 53
187  CODEC_ID_FFH264,
188 #endif
206 #if LIBAVCODEC_VERSION_MAJOR == 53
207  CODEC_ID_8SVX_EXP,
208  CODEC_ID_8SVX_FIB,
209 #endif
248 #if LIBAVCODEC_VERSION_MAJOR == 53
249  CODEC_ID_G723_1,
250  CODEC_ID_G729,
251 #endif
257 
258  /* various PCM "codecs" */
288 
289  /* various ADPCM codecs */
319 
320  /* AMR */
321  CODEC_ID_AMR_NB = 0x12000,
323 
324  /* RealAudio codecs*/
325  CODEC_ID_RA_144 = 0x13000,
327 
328  /* various DPCM codecs */
329  CODEC_ID_ROQ_DPCM = 0x14000,
333 
334  /* audio codecs */
335  CODEC_ID_MP2 = 0x15000,
347 #if LIBAVCODEC_VERSION_MAJOR == 53
348  CODEC_ID_SONIC,
349  CODEC_ID_SONIC_LS,
350 #endif
369  CODEC_ID_GSM_MS, /* as found in WAV */
392 #if LIBAVCODEC_VERSION_MAJOR > 53
393  CODEC_ID_G723_1,
394  CODEC_ID_G729,
395  CODEC_ID_8SVX_EXP,
396  CODEC_ID_8SVX_FIB,
397 #endif
399 
400  /* subtitle codecs */
411 
412  /* other specific kind of codecs (generally used for attachments) */
414  CODEC_ID_TTF = 0x18000,
415 
416  CODEC_ID_PROBE = 0x19000,
417 
418  CODEC_ID_MPEG2TS = 0x20000,
423 };
424 
425 #if FF_API_OLD_SAMPLE_FMT
426 #define SampleFormat AVSampleFormat
427 
428 #define SAMPLE_FMT_NONE AV_SAMPLE_FMT_NONE
429 #define SAMPLE_FMT_U8 AV_SAMPLE_FMT_U8
430 #define SAMPLE_FMT_S16 AV_SAMPLE_FMT_S16
431 #define SAMPLE_FMT_S32 AV_SAMPLE_FMT_S32
432 #define SAMPLE_FMT_FLT AV_SAMPLE_FMT_FLT
433 #define SAMPLE_FMT_DBL AV_SAMPLE_FMT_DBL
434 #define SAMPLE_FMT_NB AV_SAMPLE_FMT_NB
435 #endif
436 
437 #if FF_API_OLD_AUDIOCONVERT
438 #include "libavutil/audioconvert.h"
439 
440 /* Audio channel masks */
441 #define CH_FRONT_LEFT AV_CH_FRONT_LEFT
442 #define CH_FRONT_RIGHT AV_CH_FRONT_RIGHT
443 #define CH_FRONT_CENTER AV_CH_FRONT_CENTER
444 #define CH_LOW_FREQUENCY AV_CH_LOW_FREQUENCY
445 #define CH_BACK_LEFT AV_CH_BACK_LEFT
446 #define CH_BACK_RIGHT AV_CH_BACK_RIGHT
447 #define CH_FRONT_LEFT_OF_CENTER AV_CH_FRONT_LEFT_OF_CENTER
448 #define CH_FRONT_RIGHT_OF_CENTER AV_CH_FRONT_RIGHT_OF_CENTER
449 #define CH_BACK_CENTER AV_CH_BACK_CENTER
450 #define CH_SIDE_LEFT AV_CH_SIDE_LEFT
451 #define CH_SIDE_RIGHT AV_CH_SIDE_RIGHT
452 #define CH_TOP_CENTER AV_CH_TOP_CENTER
453 #define CH_TOP_FRONT_LEFT AV_CH_TOP_FRONT_LEFT
454 #define CH_TOP_FRONT_CENTER AV_CH_TOP_FRONT_CENTER
455 #define CH_TOP_FRONT_RIGHT AV_CH_TOP_FRONT_RIGHT
456 #define CH_TOP_BACK_LEFT AV_CH_TOP_BACK_LEFT
457 #define CH_TOP_BACK_CENTER AV_CH_TOP_BACK_CENTER
458 #define CH_TOP_BACK_RIGHT AV_CH_TOP_BACK_RIGHT
459 #define CH_STEREO_LEFT AV_CH_STEREO_LEFT
460 #define CH_STEREO_RIGHT AV_CH_STEREO_RIGHT
461 
465 #define CH_LAYOUT_NATIVE AV_CH_LAYOUT_NATIVE
466 
467 /* Audio channel convenience macros */
468 #define CH_LAYOUT_MONO AV_CH_LAYOUT_MONO
469 #define CH_LAYOUT_STEREO AV_CH_LAYOUT_STEREO
470 #define CH_LAYOUT_2_1 AV_CH_LAYOUT_2_1
471 #define CH_LAYOUT_SURROUND AV_CH_LAYOUT_SURROUND
472 #define CH_LAYOUT_4POINT0 AV_CH_LAYOUT_4POINT0
473 #define CH_LAYOUT_2_2 AV_CH_LAYOUT_2_2
474 #define CH_LAYOUT_QUAD AV_CH_LAYOUT_QUAD
475 #define CH_LAYOUT_5POINT0 AV_CH_LAYOUT_5POINT0
476 #define CH_LAYOUT_5POINT1 AV_CH_LAYOUT_5POINT1
477 #define CH_LAYOUT_5POINT0_BACK AV_CH_LAYOUT_5POINT0_BACK
478 #define CH_LAYOUT_5POINT1_BACK AV_CH_LAYOUT_5POINT1_BACK
479 #define CH_LAYOUT_7POINT0 AV_CH_LAYOUT_7POINT0
480 #define CH_LAYOUT_7POINT1 AV_CH_LAYOUT_7POINT1
481 #define CH_LAYOUT_7POINT1_WIDE AV_CH_LAYOUT_7POINT1_WIDE
482 #define CH_LAYOUT_STEREO_DOWNMIX AV_CH_LAYOUT_STEREO_DOWNMIX
483 #endif
484 
485 #if FF_API_OLD_DECODE_AUDIO
486 /* in bytes */
487 #define AVCODEC_MAX_AUDIO_FRAME_SIZE 192000 // 1 second of 48khz 32bit audio
488 #endif
489 
497 #define FF_INPUT_BUFFER_PADDING_SIZE 8
498 
503 #define FF_MIN_BUFFER_SIZE 16384
504 
505 
510  ME_ZERO = 1,
520 };
521 
523  /* We leave some space between them for extensions (drop some
524  * keyframes for intra-only or drop just some bidir frames). */
531 };
532 
542 };
543 
550 };
551 
561 };
562 
568 };
569 
584 };
585 
586 #if FF_API_FLAC_GLOBAL_OPTS
587 
590 enum AVLPCType {
591  AV_LPC_TYPE_DEFAULT = -1,
592  AV_LPC_TYPE_NONE = 0,
593  AV_LPC_TYPE_FIXED = 1,
594  AV_LPC_TYPE_LEVINSON = 2,
595  AV_LPC_TYPE_CHOLESKY = 3,
596  AV_LPC_TYPE_NB ,
597 };
598 #endif
599 
611 };
612 
613 typedef struct RcOverride{
616  int qscale; // If this is 0 then quality_factor will be used instead.
618 } RcOverride;
619 
620 #define FF_MAX_B_FRAMES 16
621 
622 /* encoding support
623  These flags can be passed in AVCodecContext.flags before initialization.
624  Note: Not everything is supported yet.
625 */
626 
627 #define CODEC_FLAG_QSCALE 0x0002
628 #define CODEC_FLAG_4MV 0x0004
629 #define CODEC_FLAG_QPEL 0x0010
630 #define CODEC_FLAG_GMC 0x0020
631 #define CODEC_FLAG_MV0 0x0040
632 
637 #define CODEC_FLAG_INPUT_PRESERVED 0x0100
638 #define CODEC_FLAG_PASS1 0x0200
639 #define CODEC_FLAG_PASS2 0x0400
640 #define CODEC_FLAG_GRAY 0x2000
641 #define CODEC_FLAG_EMU_EDGE 0x4000
642 #define CODEC_FLAG_PSNR 0x8000
643 #define CODEC_FLAG_TRUNCATED 0x00010000
645 #define CODEC_FLAG_NORMALIZE_AQP 0x00020000
646 #define CODEC_FLAG_INTERLACED_DCT 0x00040000
647 #define CODEC_FLAG_LOW_DELAY 0x00080000
648 #define CODEC_FLAG_GLOBAL_HEADER 0x00400000
649 #define CODEC_FLAG_BITEXACT 0x00800000
650 /* Fx : Flag for h263+ extra options */
651 #define CODEC_FLAG_AC_PRED 0x01000000
652 #define CODEC_FLAG_CBP_RD 0x04000000
653 #define CODEC_FLAG_QP_RD 0x08000000
654 #define CODEC_FLAG_LOOP_FILTER 0x00000800
655 #define CODEC_FLAG_INTERLACED_ME 0x20000000
656 #define CODEC_FLAG_CLOSED_GOP 0x80000000
657 #define CODEC_FLAG2_FAST 0x00000001
658 #define CODEC_FLAG2_STRICT_GOP 0x00000002
659 #define CODEC_FLAG2_NO_OUTPUT 0x00000004
660 #define CODEC_FLAG2_LOCAL_HEADER 0x00000008
661 #define CODEC_FLAG2_SKIP_RD 0x00004000
662 #define CODEC_FLAG2_CHUNKS 0x00008000
663 
668 #if FF_API_MPEGVIDEO_GLOBAL_OPTS
669 #define CODEC_FLAG_OBMC 0x00000001
670 #define CODEC_FLAG_H263P_AIV 0x00000008
671 #define CODEC_FLAG_PART 0x0080
672 #define CODEC_FLAG_ALT_SCAN 0x00100000
673 #define CODEC_FLAG_H263P_UMV 0x02000000
674 #define CODEC_FLAG_H263P_SLICE_STRUCT 0x10000000
675 #define CODEC_FLAG_SVCD_SCAN_OFFSET 0x40000000
676 #define CODEC_FLAG2_INTRA_VLC 0x00000800
677 #define CODEC_FLAG2_DROP_FRAME_TIMECODE 0x00002000
678 #define CODEC_FLAG2_NON_LINEAR_QUANT 0x00010000
679 #endif
680 #if FF_API_MJPEG_GLOBAL_OPTS
681 #define CODEC_FLAG_EXTERN_HUFF 0x1000
682 #endif
683 #if FF_API_X264_GLOBAL_OPTS
684 #define CODEC_FLAG2_BPYRAMID 0x00000010
685 #define CODEC_FLAG2_WPRED 0x00000020
686 #define CODEC_FLAG2_MIXED_REFS 0x00000040
687 #define CODEC_FLAG2_8X8DCT 0x00000080
688 #define CODEC_FLAG2_FASTPSKIP 0x00000100
689 #define CODEC_FLAG2_AUD 0x00000200
690 #define CODEC_FLAG2_BRDO 0x00000400
691 #define CODEC_FLAG2_MBTREE 0x00040000
692 #define CODEC_FLAG2_PSY 0x00080000
693 #define CODEC_FLAG2_SSIM 0x00100000
694 #define CODEC_FLAG2_INTRA_REFRESH 0x00200000
695 #endif
696 #if FF_API_SNOW_GLOBAL_OPTS
697 #define CODEC_FLAG2_MEMC_ONLY 0x00001000
698 #endif
699 #if FF_API_LAME_GLOBAL_OPTS
700 #define CODEC_FLAG2_BIT_RESERVOIR 0x00020000
701 #endif
702 
706 /* Unsupported options :
707  * Syntax Arithmetic coding (SAC)
708  * Reference Picture Selection
709  * Independent Segment Decoding */
710 /* /Fx */
711 /* codec capabilities */
712 
713 #define CODEC_CAP_DRAW_HORIZ_BAND 0x0001
714 
719 #define CODEC_CAP_DR1 0x0002
720 #if FF_API_PARSE_FRAME
721 /* If 'parse_only' field is true, then avcodec_parse_frame() can be used. */
722 #define CODEC_CAP_PARSE_ONLY 0x0004
723 #endif
724 #define CODEC_CAP_TRUNCATED 0x0008
725 /* Codec can export data for HW decoding (XvMC). */
726 #define CODEC_CAP_HWACCEL 0x0010
727 
750 #define CODEC_CAP_DELAY 0x0020
751 
755 #define CODEC_CAP_SMALL_LAST_FRAME 0x0040
756 
759 #define CODEC_CAP_HWACCEL_VDPAU 0x0080
760 
771 #define CODEC_CAP_SUBFRAMES 0x0100
772 
776 #define CODEC_CAP_EXPERIMENTAL 0x0200
777 
780 #define CODEC_CAP_CHANNEL_CONF 0x0400
781 
784 #define CODEC_CAP_NEG_LINESIZES 0x0800
785 
788 #define CODEC_CAP_FRAME_THREADS 0x1000
789 
792 #define CODEC_CAP_SLICE_THREADS 0x2000
793 
796 #define CODEC_CAP_PARAM_CHANGE 0x4000
797 
800 #define CODEC_CAP_AUTO_THREADS 0x8000
801 
804 #define CODEC_CAP_VARIABLE_FRAME_SIZE 0x10000
805 
806 //The following defines may change, don't expect compatibility if you use them.
807 #define MB_TYPE_INTRA4x4 0x0001
808 #define MB_TYPE_INTRA16x16 0x0002 //FIXME H.264-specific
809 #define MB_TYPE_INTRA_PCM 0x0004 //FIXME H.264-specific
810 #define MB_TYPE_16x16 0x0008
811 #define MB_TYPE_16x8 0x0010
812 #define MB_TYPE_8x16 0x0020
813 #define MB_TYPE_8x8 0x0040
814 #define MB_TYPE_INTERLACED 0x0080
815 #define MB_TYPE_DIRECT2 0x0100 //FIXME
816 #define MB_TYPE_ACPRED 0x0200
817 #define MB_TYPE_GMC 0x0400
818 #define MB_TYPE_SKIP 0x0800
819 #define MB_TYPE_P0L0 0x1000
820 #define MB_TYPE_P1L0 0x2000
821 #define MB_TYPE_P0L1 0x4000
822 #define MB_TYPE_P1L1 0x8000
823 #define MB_TYPE_L0 (MB_TYPE_P0L0 | MB_TYPE_P1L0)
824 #define MB_TYPE_L1 (MB_TYPE_P0L1 | MB_TYPE_P1L1)
825 #define MB_TYPE_L0L1 (MB_TYPE_L0 | MB_TYPE_L1)
826 #define MB_TYPE_QUANT 0x00010000
827 #define MB_TYPE_CBP 0x00020000
828 //Note bits 24-31 are reserved for codec specific use (h264 ref0, mpeg1 0mv, ...)
829 
835 typedef struct AVPanScan{
841  int id;
842 
848  int width;
849  int height;
850 
856  int16_t position[3][2];
857 }AVPanScan;
858 
859 #define FF_QSCALE_TYPE_MPEG1 0
860 #define FF_QSCALE_TYPE_MPEG2 1
861 #define FF_QSCALE_TYPE_H264 2
862 #define FF_QSCALE_TYPE_VP56 3
863 
864 #define FF_BUFFER_TYPE_INTERNAL 1
865 #define FF_BUFFER_TYPE_USER 2
866 #define FF_BUFFER_TYPE_SHARED 4
867 #define FF_BUFFER_TYPE_COPY 8
868 
869 #if FF_API_OLD_FF_PICT_TYPES
870 /* DEPRECATED, directly use the AV_PICTURE_TYPE_* enum values */
871 #define FF_I_TYPE AV_PICTURE_TYPE_I
872 #define FF_P_TYPE AV_PICTURE_TYPE_P
873 #define FF_B_TYPE AV_PICTURE_TYPE_B
874 #define FF_S_TYPE AV_PICTURE_TYPE_S
875 #define FF_SI_TYPE AV_PICTURE_TYPE_SI
876 #define FF_SP_TYPE AV_PICTURE_TYPE_SP
877 #define FF_BI_TYPE AV_PICTURE_TYPE_BI
878 #endif
879 
880 #define FF_BUFFER_HINTS_VALID 0x01 // Buffer hints value is meaningful (if 0 ignore).
881 #define FF_BUFFER_HINTS_READABLE 0x02 // Codec will read from buffer.
882 #define FF_BUFFER_HINTS_PRESERVE 0x04 // User must not alter buffer content.
883 #define FF_BUFFER_HINTS_REUSABLE 0x08 // Codec will reuse the buffer (update).
884 
889 };
890 
891 typedef struct AVPacket {
901  int64_t pts;
907  int64_t dts;
908  uint8_t *data;
909  int size;
914  int flags;
919  struct {
920  uint8_t *data;
921  int size;
923  } *side_data;
925 
930  int duration;
931  void (*destruct)(struct AVPacket *);
932  void *priv;
933  int64_t pos;
934 
953 } AVPacket;
954 #define AV_PKT_FLAG_KEY 0x0001
955 #define AV_PKT_FLAG_CORRUPT 0x0002
956 
957 
976 };
977 
985 typedef struct AVFrame {
986 #if FF_API_DATA_POINTERS
987 #define AV_NUM_DATA_POINTERS 4
988 #else
989 #define AV_NUM_DATA_POINTERS 8
990 #endif
991 
998 
1009 
1023 
1030 
1037  int64_t pts;
1038 
1051 
1057  int quality;
1058 
1059 #if FF_API_AVFRAME_AGE
1060 
1063  attribute_deprecated int age;
1064 #endif
1065 
1075 
1081  int8_t *qscale_table;
1087  int qstride;
1088 
1095  uint8_t *mbskip_table;
1096 
1109  int16_t (*motion_val[2])[2];
1110 
1117  uint32_t *mb_type;
1118 
1126 
1132  void *opaque;
1133 
1140 
1147  int type;
1148 
1156 
1161 
1168 
1175 
1182 
1189 
1196 
1202  short *dct_coeff;
1203 
1210  int8_t *ref_index[2];
1211 
1224 
1231 
1237  int64_t pkt_pts;
1238 
1244  int64_t pkt_dts;
1245 
1252 
1259 
1266 
1285  uint8_t **extended_data;
1286 
1293 
1300 
1308  int format;
1309 } AVFrame;
1310 
1311 struct AVCodecInternal;
1312 
1316  AV_FIELD_TT, //< Top coded_first, top displayed first
1317  AV_FIELD_BB, //< Bottom coded first, bottom displayed first
1318  AV_FIELD_TB, //< Top coded first, bottom displayed first
1319  AV_FIELD_BT, //< Bottom coded first, top displayed first
1320 };
1321 
1329 typedef struct AVCodecContext {
1341 
1349 
1355  int flags;
1356 
1365  int sub_id;
1366 
1375 
1387  uint8_t *extradata;
1389 
1399 
1400  /* video only */
1409 
1410 #define FF_ASPECT_EXTENDED 15
1411 
1418 
1427 
1452  const AVFrame *src, int offset[AV_NUM_DATA_POINTERS],
1453  int y, int type, int height);
1454 
1455  /* audio only */
1457  int channels;
1458 
1465 
1466  /* The following data should not be initialized. */
1472 
1479  int delay;
1480 
1481  /* - encoding parameters */
1482  float qcompress;
1483  float qblur;
1484 
1490  int qmin;
1491 
1497  int qmax;
1498 
1505 
1513 
1522 
1525 #define FF_RC_STRATEGY_XVID 1
1526 
1528 
1529  struct AVCodec *codec;
1530 
1531  void *priv_data;
1532 
1533  int rtp_payload_size; /* The size of the RTP payload: the coder will */
1534  /* do its best to deliver a chunk with size */
1535  /* below rtp_payload_size, the chunk will start */
1536  /* with a start code on some codecs like H.263. */
1537  /* This doesn't take account of any particular */
1538  /* headers inside the transmitted RTP payload. */
1539 
1540 
1541  /* The RTP callback: This function is called */
1542  /* every time the encoder has a packet to send. */
1543  /* It depends on the encoder if the data starts */
1544  /* with a Start Code (it should). H.263 does. */
1545  /* mb_nb contains the number of macroblocks */
1546  /* encoded in the RTP payload. */
1547  void (*rtp_callback)(struct AVCodecContext *avctx, void *data, int size, int mb_nb);
1548 
1549  /* statistics, used for 2-pass encoding */
1550  int mv_bits;
1554  int i_count;
1555  int p_count;
1558 
1565 
1571  void *opaque;
1572 
1573  char codec_name[32];
1574  enum AVMediaType codec_type; /* see AVMEDIA_TYPE_xxx */
1575  enum CodecID codec_id; /* see CODEC_ID_xxx */
1576 
1590  unsigned int codec_tag;
1591 
1598 #define FF_BUG_AUTODETECT 1
1599 #define FF_BUG_OLD_MSMPEG4 2
1600 #define FF_BUG_XVID_ILACE 4
1601 #define FF_BUG_UMP4 8
1602 #define FF_BUG_NO_PADDING 16
1603 #define FF_BUG_AMV 32
1604 #define FF_BUG_AC_VLC 0
1605 #define FF_BUG_QPEL_CHROMA 64
1606 #define FF_BUG_STD_QPEL 128
1607 #define FF_BUG_QPEL_CHROMA2 256
1608 #define FF_BUG_DIRECT_BLOCKSIZE 512
1609 #define FF_BUG_EDGE 1024
1610 #define FF_BUG_HPEL_CHROMA 2048
1611 #define FF_BUG_DC_CLIP 4096
1612 #define FF_BUG_MS 8192
1613 #define FF_BUG_TRUNCATED 16384
1614 //#define FF_BUG_FAKE_SCALABILITY 16 //Autodetection should work 100%.
1615 
1622 
1629 
1643 #define FF_COMPLIANCE_VERY_STRICT 2
1644 #define FF_COMPLIANCE_STRICT 1
1645 #define FF_COMPLIANCE_NORMAL 0
1646 #define FF_COMPLIANCE_UNOFFICIAL -1
1647 #define FF_COMPLIANCE_EXPERIMENTAL -2
1648 
1649 
1655 
1656 #if FF_API_ER
1657 
1664 #define FF_ER_CAREFUL 1
1665 #define FF_ER_COMPLIANT 2
1666 #define FF_ER_AGGRESSIVE 3
1667 #define FF_ER_VERY_AGGRESSIVE 4
1668 #define FF_ER_EXPLODE 5
1669 #endif /* FF_API_ER */
1670 
1726  int (*get_buffer)(struct AVCodecContext *c, AVFrame *pic);
1727 
1738 
1746 
1752 
1753 #if FF_API_PARSE_FRAME
1754 
1760  attribute_deprecated int parse_only;
1761 #endif
1762 
1769 
1775  char *stats_out;
1776 
1783  char *stats_in;
1784 
1791  float rc_qsquish;
1792 
1795 
1803 
1809  const char *rc_eq;
1810 
1817 
1824 
1832 
1841 
1848 
1855 
1862 #define FF_DCT_AUTO 0
1863 #define FF_DCT_FASTINT 1
1864 #define FF_DCT_INT 2
1865 #define FF_DCT_MMX 3
1866 #define FF_DCT_MLIB 4
1867 #define FF_DCT_ALTIVEC 5
1868 #define FF_DCT_FAAN 6
1869 
1876 
1883 
1890 
1896  float p_masking;
1897 
1904 
1911 #define FF_IDCT_AUTO 0
1912 #define FF_IDCT_INT 1
1913 #define FF_IDCT_SIMPLE 2
1914 #define FF_IDCT_SIMPLEMMX 3
1915 #define FF_IDCT_LIBMPEG2MMX 4
1916 #define FF_IDCT_PS2 5
1917 #define FF_IDCT_MLIB 6
1918 #define FF_IDCT_ARM 7
1919 #define FF_IDCT_ALTIVEC 8
1920 #define FF_IDCT_SH4 9
1921 #define FF_IDCT_SIMPLEARM 10
1922 #define FF_IDCT_H264 11
1923 #define FF_IDCT_VP3 12
1924 #define FF_IDCT_IPP 13
1925 #define FF_IDCT_XVIDMMX 14
1926 #define FF_IDCT_CAVS 15
1927 #define FF_IDCT_SIMPLEARMV5TE 16
1928 #define FF_IDCT_SIMPLEARMV6 17
1929 #define FF_IDCT_SIMPLEVIS 18
1930 #define FF_IDCT_WMV2 19
1931 #define FF_IDCT_FAAN 20
1932 #define FF_IDCT_EA 21
1933 #define FF_IDCT_SIMPLENEON 22
1934 #define FF_IDCT_SIMPLEALPHA 23
1935 #define FF_IDCT_BINK 24
1936 
1949 
1956 #define FF_EC_GUESS_MVS 1
1957 #define FF_EC_DEBLOCK 2
1958 
1967  unsigned dsp_mask;
1968 
1975 
1982 #define FF_PRED_LEFT 0
1983 #define FF_PRED_PLANE 1
1984 #define FF_PRED_MEDIAN 2
1985 
1994 
2001 
2007  int debug;
2008 #define FF_DEBUG_PICT_INFO 1
2009 #define FF_DEBUG_RC 2
2010 #define FF_DEBUG_BITSTREAM 4
2011 #define FF_DEBUG_MB_TYPE 8
2012 #define FF_DEBUG_QP 16
2013 #define FF_DEBUG_MV 32
2014 #define FF_DEBUG_DCT_COEFF 0x00000040
2015 #define FF_DEBUG_SKIP 0x00000080
2016 #define FF_DEBUG_STARTCODE 0x00000100
2017 #define FF_DEBUG_PTS 0x00000200
2018 #define FF_DEBUG_ER 0x00000400
2019 #define FF_DEBUG_MMCO 0x00000800
2020 #define FF_DEBUG_BUGS 0x00001000
2021 #define FF_DEBUG_VIS_QP 0x00002000
2022 #define FF_DEBUG_VIS_MB_TYPE 0x00004000
2023 #define FF_DEBUG_BUFFERS 0x00008000
2024 #define FF_DEBUG_THREADS 0x00010000
2025 
2032 #define FF_DEBUG_VIS_MV_P_FOR 0x00000001 //visualize forward predicted MVs of P frames
2033 #define FF_DEBUG_VIS_MV_B_FOR 0x00000002 //visualize forward predicted MVs of B frames
2034 #define FF_DEBUG_VIS_MV_B_BACK 0x00000004 //visualize backward predicted MVs of B frames
2035 
2042 
2048  int me_cmp;
2060  int mb_cmp;
2067 #define FF_CMP_SAD 0
2068 #define FF_CMP_SSE 1
2069 #define FF_CMP_SATD 2
2070 #define FF_CMP_DCT 3
2071 #define FF_CMP_PSNR 4
2072 #define FF_CMP_BIT 5
2073 #define FF_CMP_RD 6
2074 #define FF_CMP_ZERO 7
2075 #define FF_CMP_VSAD 8
2076 #define FF_CMP_VSSE 9
2077 #define FF_CMP_NSSE 10
2078 #define FF_CMP_W53 11
2079 #define FF_CMP_W97 12
2080 #define FF_CMP_DCTMAX 13
2081 #define FF_CMP_DCT264 14
2082 #define FF_CMP_CHROMA 256
2083 
2090 
2097 
2103  int pre_me;
2104 
2111 
2118 
2125 
2135  enum PixelFormat (*get_format)(struct AVCodecContext *s, const enum PixelFormat * fmt);
2136 
2146 #define FF_DTG_AFD_SAME 8
2147 #define FF_DTG_AFD_4_3 9
2148 #define FF_DTG_AFD_16_9 10
2149 #define FF_DTG_AFD_14_9 11
2150 #define FF_DTG_AFD_4_3_SP_14_9 13
2151 #define FF_DTG_AFD_16_9_SP_14_9 14
2152 #define FF_DTG_AFD_SP_4_3 15
2153 
2162 
2169 #define FF_DEFAULT_QUANT_BIAS 999999
2170 
2177 
2185 
2186 #if FF_API_INTERNAL_CONTEXT
2187 
2192  attribute_deprecated int internal_buffer_count;
2193 
2199  attribute_deprecated void *internal_buffer;
2200 #endif
2201 
2209 
2210 #define FF_CODER_TYPE_VLC 0
2211 #define FF_CODER_TYPE_AC 1
2212 #define FF_CODER_TYPE_RAW 2
2213 #define FF_CODER_TYPE_RLE 3
2214 #define FF_CODER_TYPE_DEFLATE 4
2215 
2221 
2228 #if 0
2229 
2234  uint8_t * (*realloc)(struct AVCodecContext *s, uint8_t *buf, int buf_size);
2235 #endif
2236 
2243 #define SLICE_FLAG_CODED_ORDER 0x0001
2244 #define SLICE_FLAG_ALLOW_FIELD 0x0002
2245 #define SLICE_FLAG_ALLOW_PLANE 0x0004
2246 
2247 
2253 
2260 #define FF_MB_DECISION_SIMPLE 0
2261 #define FF_MB_DECISION_BITS 1
2262 #define FF_MB_DECISION_RD 2
2263 
2264 
2269  uint16_t *intra_matrix;
2270 
2276  uint16_t *inter_matrix;
2277 
2284  unsigned int stream_codec_tag;
2285 
2293 
2299  int lmin;
2300 
2306  int lmax;
2307 
2308 #if FF_API_PALETTE_CONTROL
2309 
2314  struct AVPaletteControl *palctrl;
2315 #endif
2316 
2323 
2336  int (*reget_buffer)(struct AVCodecContext *c, AVFrame *pic);
2337 
2344 
2351 
2357  int flags2;
2358 
2365 
2366 #if FF_API_ANTIALIAS_ALGO
2367 
2372  attribute_deprecated int antialias_algo;
2373 #define FF_AA_AUTO 0
2374 #define FF_AA_FASTINT 1 //not implemented yet
2375 #define FF_AA_INT 2
2376 #define FF_AA_FLOAT 3
2377 #endif
2378 
2385 
2393 
2403  int (*execute)(struct AVCodecContext *c, int (*func)(struct AVCodecContext *c2, void *arg), void *arg2, int *ret, int count, int size);
2404 
2412 
2421 
2428 
2435 
2442 
2449 
2456 
2462  int profile;
2463 #define FF_PROFILE_UNKNOWN -99
2464 #define FF_PROFILE_RESERVED -100
2465 
2466 #define FF_PROFILE_AAC_MAIN 0
2467 #define FF_PROFILE_AAC_LOW 1
2468 #define FF_PROFILE_AAC_SSR 2
2469 #define FF_PROFILE_AAC_LTP 3
2470 
2471 #define FF_PROFILE_DTS 20
2472 #define FF_PROFILE_DTS_ES 30
2473 #define FF_PROFILE_DTS_96_24 40
2474 #define FF_PROFILE_DTS_HD_HRA 50
2475 #define FF_PROFILE_DTS_HD_MA 60
2476 
2477 #define FF_PROFILE_MPEG2_422 0
2478 #define FF_PROFILE_MPEG2_HIGH 1
2479 #define FF_PROFILE_MPEG2_SS 2
2480 #define FF_PROFILE_MPEG2_SNR_SCALABLE 3
2481 #define FF_PROFILE_MPEG2_MAIN 4
2482 #define FF_PROFILE_MPEG2_SIMPLE 5
2483 
2484 #define FF_PROFILE_H264_CONSTRAINED (1<<9) // 8+1; constraint_set1_flag
2485 #define FF_PROFILE_H264_INTRA (1<<11) // 8+3; constraint_set3_flag
2486 
2487 #define FF_PROFILE_H264_BASELINE 66
2488 #define FF_PROFILE_H264_CONSTRAINED_BASELINE (66|FF_PROFILE_H264_CONSTRAINED)
2489 #define FF_PROFILE_H264_MAIN 77
2490 #define FF_PROFILE_H264_EXTENDED 88
2491 #define FF_PROFILE_H264_HIGH 100
2492 #define FF_PROFILE_H264_HIGH_10 110
2493 #define FF_PROFILE_H264_HIGH_10_INTRA (110|FF_PROFILE_H264_INTRA)
2494 #define FF_PROFILE_H264_HIGH_422 122
2495 #define FF_PROFILE_H264_HIGH_422_INTRA (122|FF_PROFILE_H264_INTRA)
2496 #define FF_PROFILE_H264_HIGH_444 144
2497 #define FF_PROFILE_H264_HIGH_444_PREDICTIVE 244
2498 #define FF_PROFILE_H264_HIGH_444_INTRA (244|FF_PROFILE_H264_INTRA)
2499 #define FF_PROFILE_H264_CAVLC_444 44
2500 
2501 #define FF_PROFILE_VC1_SIMPLE 0
2502 #define FF_PROFILE_VC1_MAIN 1
2503 #define FF_PROFILE_VC1_COMPLEX 2
2504 #define FF_PROFILE_VC1_ADVANCED 3
2505 
2506 #define FF_PROFILE_MPEG4_SIMPLE 0
2507 #define FF_PROFILE_MPEG4_SIMPLE_SCALABLE 1
2508 #define FF_PROFILE_MPEG4_CORE 2
2509 #define FF_PROFILE_MPEG4_MAIN 3
2510 #define FF_PROFILE_MPEG4_N_BIT 4
2511 #define FF_PROFILE_MPEG4_SCALABLE_TEXTURE 5
2512 #define FF_PROFILE_MPEG4_SIMPLE_FACE_ANIMATION 6
2513 #define FF_PROFILE_MPEG4_BASIC_ANIMATED_TEXTURE 7
2514 #define FF_PROFILE_MPEG4_HYBRID 8
2515 #define FF_PROFILE_MPEG4_ADVANCED_REAL_TIME 9
2516 #define FF_PROFILE_MPEG4_CORE_SCALABLE 10
2517 #define FF_PROFILE_MPEG4_ADVANCED_CODING 11
2518 #define FF_PROFILE_MPEG4_ADVANCED_CORE 12
2519 #define FF_PROFILE_MPEG4_ADVANCED_SCALABLE_TEXTURE 13
2520 #define FF_PROFILE_MPEG4_SIMPLE_STUDIO 14
2521 #define FF_PROFILE_MPEG4_ADVANCED_SIMPLE 15
2522 
2528  int level;
2529 #define FF_LEVEL_UNKNOWN -99
2530 
2536  int lowres;
2537 
2544 
2551 
2558 
2565 
2572 
2580 
2586  int mb_lmin;
2587 
2593  int mb_lmax;
2594 
2601 
2608 
2615 
2622 
2629 
2636 
2637 #if FF_API_X264_GLOBAL_OPTS
2638 
2644  attribute_deprecated float crf;
2645 
2652  attribute_deprecated int cqp;
2653 #endif
2654 
2661 
2667  int refs;
2668 
2675 
2676 #if FF_API_X264_GLOBAL_OPTS
2677 
2682  attribute_deprecated int bframebias;
2683 #endif
2684 
2690  int trellis;
2691 
2692 #if FF_API_X264_GLOBAL_OPTS
2693 
2698  attribute_deprecated float complexityblur;
2699 
2706  attribute_deprecated int deblockalpha;
2707 
2714  attribute_deprecated int deblockbeta;
2715 
2721  attribute_deprecated int partitions;
2722 #define X264_PART_I4X4 0x001 /* Analyze i4x4 */
2723 #define X264_PART_I8X8 0x002 /* Analyze i8x8 (requires 8x8 transform) */
2724 #define X264_PART_P8X8 0x010 /* Analyze p16x8, p8x16 and p8x8 */
2725 #define X264_PART_P4X4 0x020 /* Analyze p8x4, p4x8, p4x4 */
2726 #define X264_PART_B8X8 0x100 /* Analyze b16x8, b8x16 and b8x8 */
2727 
2733  attribute_deprecated int directpred;
2734 #endif
2735 
2741  int cutoff;
2742 
2749 
2757 
2764 
2770 #define FF_COMPRESSION_DEFAULT -1
2771 
2777 
2783 
2784 #if FF_API_FLAC_GLOBAL_OPTS
2785 
2796  attribute_deprecated int lpc_coeff_precision;
2797 
2803  attribute_deprecated int prediction_order_method;
2804 
2809  attribute_deprecated int min_partition_order;
2810 
2815  attribute_deprecated int max_partition_order;
2819 #endif
2820 
2827 
2828 #if FF_API_REQUEST_CHANNELS
2829 
2835  int request_channels;
2836 #endif
2837 
2838 #if FF_API_DRC_SCALE
2839 
2846  attribute_deprecated float drc_scale;
2847 #endif
2848 
2857 
2864 
2870  uint64_t channel_layout;
2871 
2878 
2885 
2892 
2899 
2908 
2920 
2927 
2934 
2941 
2948 
2955 
2974  int (*execute2)(struct AVCodecContext *c, int (*func)(struct AVCodecContext *c2, void *arg, int jobnr, int threadnr), void *arg2, int *ret, int count);
2975 
2976 #if FF_API_X264_GLOBAL_OPTS
2977 
2985  attribute_deprecated int weighted_p_pred;
2986 
2995  attribute_deprecated int aq_mode;
2996 
3003  attribute_deprecated float aq_strength;
3004 
3011  attribute_deprecated float psy_rd;
3012 
3019  attribute_deprecated float psy_trellis;
3020 
3027  attribute_deprecated int rc_lookahead;
3028 
3036  attribute_deprecated float crf_max;
3037 #endif
3038 
3040 
3041 #if FF_API_FLAC_GLOBAL_OPTS
3042 
3047  attribute_deprecated enum AVLPCType lpc_type;
3048 
3054  attribute_deprecated int lpc_passes;
3055 #endif
3056 
3064  int slices;
3065 
3076 
3085 
3086 #if FF_API_INTERNAL_CONTEXT
3087 
3096  attribute_deprecated int is_copy;
3097 #endif
3098 
3108 #define FF_THREAD_FRAME 1
3109 #define FF_THREAD_SLICE 2
3110 
3111 
3117 
3127 
3134  uint64_t vbv_delay;
3135 
3142 
3149 
3156 #define AV_EF_CRCCHECK (1<<0)
3157 #define AV_EF_BITSTREAM (1<<1)
3158 #define AV_EF_BUFFER (1<<2)
3159 #define AV_EF_EXPLODE (1<<3)
3160 
3167  struct AVCodecInternal *internal;
3168 
3174 } AVCodecContext;
3175 
3179 typedef struct AVProfile {
3180  int profile;
3181  const char *name;
3182 } AVProfile;
3183 
3185 
3189 typedef struct AVCodec {
3196  const char *name;
3198  enum CodecID id;
3201  int (*encode)(AVCodecContext *, uint8_t *buf, int buf_size, void *data);
3203  int (*decode)(AVCodecContext *, void *outdata, int *outdata_size, AVPacket *avpkt);
3209  struct AVCodec *next;
3216  const enum PixelFormat *pix_fmts;
3217 
3221  const char *long_name;
3224  const uint64_t *channel_layouts;
3225  uint8_t max_lowres;
3228 
3253 
3257  void (*init_static_data)(struct AVCodec *codec);
3258 
3269  int (*encode2)(AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame,
3270  int *got_packet_ptr);
3271 } AVCodec;
3272 
3276 typedef struct AVHWAccel {
3282  const char *name;
3283 
3290 
3296  enum CodecID id;
3297 
3304 
3310 
3311  struct AVHWAccel *next;
3312 
3327  int (*start_frame)(AVCodecContext *avctx, const uint8_t *buf, uint32_t buf_size);
3328 
3340  int (*decode_slice)(AVCodecContext *avctx, const uint8_t *buf, uint32_t buf_size);
3341 
3351  int (*end_frame)(AVCodecContext *avctx);
3352 
3361 } AVHWAccel;
3362 
3367 typedef struct AVPicture {
3370 } AVPicture;
3371 
3372 #define AVPALETTE_SIZE 1024
3373 #define AVPALETTE_COUNT 256
3374 #if FF_API_PALETTE_CONTROL
3375 
3383 typedef struct AVPaletteControl {
3384 
3385  /* Demuxer sets this to 1 to indicate the palette has changed;
3386  * decoder resets to 0. */
3387  int palette_changed;
3388 
3389  /* 4-byte ARGB palette entries, stored in native byte order; note that
3390  * the individual palette components should be on a 8-bit scale; if
3391  * the palette data comes from an IBM VGA native format, the component
3392  * data is probably 6 bits in size and needs to be scaled. */
3393  unsigned int palette[AVPALETTE_COUNT];
3394 
3395 } AVPaletteControl attribute_deprecated;
3396 #endif
3397 
3400 
3402 
3408 
3414 };
3415 
3416 typedef struct AVSubtitleRect {
3417  int x;
3418  int y;
3419  int w;
3420  int h;
3422 
3429 
3430  char *text;
3431 
3437  char *ass;
3438 } AVSubtitleRect;
3439 
3440 typedef struct AVSubtitle {
3441  uint16_t format; /* 0 = graphics */
3442  uint32_t start_display_time; /* relative to packet pts, in ms */
3443  uint32_t end_display_time; /* relative to packet pts, in ms */
3444  unsigned num_rects;
3446  int64_t pts;
3447 } AVSubtitle;
3448 
3449 /* packet functions */
3450 
3454 attribute_deprecated void av_destruct_packet_nofree(AVPacket *pkt);
3455 
3459 void av_destruct_packet(AVPacket *pkt);
3460 
3466 void av_init_packet(AVPacket *pkt);
3467 
3476 int av_new_packet(AVPacket *pkt, int size);
3477 
3484 void av_shrink_packet(AVPacket *pkt, int size);
3485 
3492 int av_grow_packet(AVPacket *pkt, int grow_by);
3493 
3498 int av_dup_packet(AVPacket *pkt);
3499 
3505 void av_free_packet(AVPacket *pkt);
3506 
3515 uint8_t* av_packet_new_side_data(AVPacket *pkt, enum AVPacketSideDataType type,
3516  int size);
3517 
3526 uint8_t* av_packet_get_side_data(AVPacket *pkt, enum AVPacketSideDataType type,
3527  int *size);
3528 
3529 /* resample.c */
3530 
3531 struct ReSampleContext;
3532 struct AVResampleContext;
3533 
3535 
3553  int output_rate, int input_rate,
3554  enum AVSampleFormat sample_fmt_out,
3555  enum AVSampleFormat sample_fmt_in,
3556  int filter_length, int log2_phase_count,
3557  int linear, double cutoff);
3558 
3559 int audio_resample(ReSampleContext *s, short *output, short *input, int nb_samples);
3560 
3568 
3569 
3579 struct AVResampleContext *av_resample_init(int out_rate, int in_rate, int filter_length, int log2_phase_count, int linear, double cutoff);
3580 
3590 int av_resample(struct AVResampleContext *c, short *dst, short *src, int *consumed, int src_size, int dst_size, int update_ctx);
3591 
3592 
3605 void av_resample_compensate(struct AVResampleContext *c, int sample_delta, int compensation_distance);
3606 void av_resample_close(struct AVResampleContext *c);
3607 
3620 
3629 
3650 int avpicture_fill(AVPicture *picture, uint8_t *ptr,
3651  enum PixelFormat pix_fmt, int width, int height);
3652 
3668 int avpicture_layout(const AVPicture* src, enum PixelFormat pix_fmt, int width, int height,
3669  unsigned char *dest, int dest_size);
3670 
3683 int avpicture_get_size(enum PixelFormat pix_fmt, int width, int height);
3684 void avcodec_get_chroma_sub_sample(enum PixelFormat pix_fmt, int *h_shift, int *v_shift);
3685 
3686 #if FF_API_GET_PIX_FMT_NAME
3687 
3690 attribute_deprecated
3691 const char *avcodec_get_pix_fmt_name(enum PixelFormat pix_fmt);
3692 #endif
3693 
3695 
3702 
3710 size_t av_get_codec_tag_string(char *buf, size_t buf_size, unsigned int codec_tag);
3711 
3712 #define FF_LOSS_RESOLUTION 0x0001
3713 #define FF_LOSS_DEPTH 0x0002
3714 #define FF_LOSS_COLORSPACE 0x0004
3715 #define FF_LOSS_ALPHA 0x0008
3716 #define FF_LOSS_COLORQUANT 0x0010
3717 #define FF_LOSS_CHROMA 0x0020
3736 int avcodec_get_pix_fmt_loss(enum PixelFormat dst_pix_fmt, enum PixelFormat src_pix_fmt,
3737  int has_alpha);
3738 
3761 enum PixelFormat avcodec_find_best_pix_fmt(int64_t pix_fmt_mask, enum PixelFormat src_pix_fmt,
3762  int has_alpha, int *loss_ptr);
3763 
3764 #if FF_API_GET_ALPHA_INFO
3765 #define FF_ALPHA_TRANSP 0x0001 /* image has some totally transparent pixels */
3766 #define FF_ALPHA_SEMI_TRANSP 0x0002 /* image has some transparent pixels */
3767 
3772 attribute_deprecated
3773 int img_get_alpha_info(const AVPicture *src,
3774  enum PixelFormat pix_fmt, int width, int height);
3775 #endif
3776 
3777 /* deinterlace a picture */
3778 /* deinterlace - if not supported return -1 */
3779 int avpicture_deinterlace(AVPicture *dst, const AVPicture *src,
3780  enum PixelFormat pix_fmt, int width, int height);
3781 
3782 /* external high level API */
3783 
3790 
3794 unsigned avcodec_version(void);
3795 
3799 const char *avcodec_configuration(void);
3800 
3804 const char *avcodec_license(void);
3805 
3806 #if FF_API_AVCODEC_INIT
3807 
3811 attribute_deprecated
3812 void avcodec_init(void);
3813 #endif
3814 
3823 void avcodec_register(AVCodec *codec);
3824 
3832 
3840 
3848 
3856 void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode);
3857 
3865 const char *av_get_profile_name(const AVCodec *codec, int profile);
3866 
3867 #if FF_API_ALLOC_CONTEXT
3868 
3874 attribute_deprecated
3875 void avcodec_get_context_defaults(AVCodecContext *s);
3876 
3879 attribute_deprecated
3880 void avcodec_get_context_defaults2(AVCodecContext *s, enum AVMediaType);
3881 #endif
3882 
3893 
3894 #if FF_API_ALLOC_CONTEXT
3895 
3904 attribute_deprecated
3905 AVCodecContext *avcodec_alloc_context(void);
3906 
3909 attribute_deprecated
3910 AVCodecContext *avcodec_alloc_context2(enum AVMediaType);
3911 #endif
3912 
3926 
3938 int avcodec_copy_context(AVCodecContext *dest, const AVCodecContext *src);
3939 
3946 
3955 
3959 
3967 unsigned avcodec_get_edge_width(void);
3988  int linesize_align[AV_NUM_DATA_POINTERS]);
3989 
3990 enum PixelFormat avcodec_default_get_format(struct AVCodecContext *s, const enum PixelFormat * fmt);
3991 
3992 #if FF_API_THREAD_INIT
3993 
3996 attribute_deprecated
3997 int avcodec_thread_init(AVCodecContext *s, int thread_count);
3998 #endif
3999 
4000 int avcodec_default_execute(AVCodecContext *c, int (*func)(AVCodecContext *c2, void *arg2),void *arg, int *ret, int count, int size);
4001 int avcodec_default_execute2(AVCodecContext *c, int (*func)(AVCodecContext *c2, void *arg2, int, int),void *arg, int *ret, int count);
4002 //FIXME func typedef
4003 
4004 #if FF_API_AVCODEC_OPEN
4005 
4034 attribute_deprecated
4035 int avcodec_open(AVCodecContext *avctx, AVCodec *codec);
4036 #endif
4037 
4075 
4076 #if FF_API_OLD_DECODE_AUDIO
4077 
4131 attribute_deprecated int avcodec_decode_audio3(AVCodecContext *avctx, int16_t *samples,
4132  int *frame_size_ptr,
4133  AVPacket *avpkt);
4134 #endif
4135 
4169 int avcodec_decode_audio4(AVCodecContext *avctx, AVFrame *frame,
4170  int *got_frame_ptr, AVPacket *avpkt);
4171 
4214  int *got_picture_ptr,
4215  AVPacket *avpkt);
4216 
4234  int *got_sub_ptr,
4235  AVPacket *avpkt);
4236 
4242 void avsubtitle_free(AVSubtitle *sub);
4243 
4244 #if FF_API_OLD_ENCODE_AUDIO
4245 
4269 int attribute_deprecated avcodec_encode_audio(AVCodecContext *avctx,
4270  uint8_t *buf, int buf_size,
4271  const short *samples);
4272 #endif
4273 
4312 int avcodec_encode_audio2(AVCodecContext *avctx, AVPacket *avpkt,
4313  const AVFrame *frame, int *got_packet_ptr);
4314 
4332  enum AVSampleFormat sample_fmt, const uint8_t *buf,
4333  int buf_size, int align);
4334 
4347 int avcodec_encode_video(AVCodecContext *avctx, uint8_t *buf, int buf_size,
4348  const AVFrame *pict);
4349 int avcodec_encode_subtitle(AVCodecContext *avctx, uint8_t *buf, int buf_size,
4350  const AVSubtitle *sub);
4351 
4361 int avcodec_close(AVCodecContext *avctx);
4362 
4373 void avcodec_register_all(void);
4374 
4379 
4381 
4382 /* misc useful functions */
4383 
4384 #if FF_API_OLD_FF_PICT_TYPES
4385 
4392 attribute_deprecated
4393 char av_get_pict_type_char(int pict_type);
4394 #endif
4395 
4403 
4404 #if FF_API_OLD_SAMPLE_FMT
4405 
4408 attribute_deprecated
4409 int av_get_bits_per_sample_format(enum AVSampleFormat sample_fmt);
4410 #endif
4411 
4412 /* frame parsing */
4413 typedef struct AVCodecParserContext {
4414  void *priv_data;
4416  int64_t frame_offset; /* offset of the current frame */
4417  int64_t cur_offset; /* current offset
4418  (incremented by each av_parser_parse()) */
4419  int64_t next_frame_offset; /* offset of the next frame */
4420  /* video info */
4421  int pict_type; /* XXX: Put it back in AVCodecContext. */
4431  int repeat_pict; /* XXX: Put it back in AVCodecContext. */
4432  int64_t pts; /* pts of the current frame */
4433  int64_t dts; /* dts of the current frame */
4434 
4435  /* private data */
4436  int64_t last_pts;
4437  int64_t last_dts;
4439 
4440 #define AV_PARSER_PTS_NB 4
4445 
4446  int flags;
4447 #define PARSER_FLAG_COMPLETE_FRAMES 0x0001
4448 #define PARSER_FLAG_ONCE 0x0002
4449 #define PARSER_FLAG_FETCHED_OFFSET 0x0004
4451 
4452  int64_t offset;
4454 
4462 
4481 
4482  // Timestamp generation support:
4493 
4508 
4522 
4529 
4533  int64_t pos;
4534 
4538  int64_t last_pos;
4540 
4541 typedef struct AVCodecParser {
4542  int codec_ids[5]; /* several codec IDs are permitted */
4546  AVCodecContext *avctx,
4547  const uint8_t **poutbuf, int *poutbuf_size,
4548  const uint8_t *buf, int buf_size);
4550  int (*split)(AVCodecContext *avctx, const uint8_t *buf, int buf_size);
4552 } AVCodecParser;
4553 
4555 
4558 
4588  AVCodecContext *avctx,
4589  uint8_t **poutbuf, int *poutbuf_size,
4590  const uint8_t *buf, int buf_size,
4591  int64_t pts, int64_t dts,
4592  int64_t pos);
4593 
4595  AVCodecContext *avctx,
4596  uint8_t **poutbuf, int *poutbuf_size,
4597  const uint8_t *buf, int buf_size, int keyframe);
4599 
4600 
4602  void *priv_data;
4607 
4608 
4609 typedef struct AVBitStreamFilter {
4610  const char *name;
4613  AVCodecContext *avctx, const char *args,
4614  uint8_t **poutbuf, int *poutbuf_size,
4615  const uint8_t *buf, int buf_size, int keyframe);
4619 
4623  AVCodecContext *avctx, const char *args,
4624  uint8_t **poutbuf, int *poutbuf_size,
4625  const uint8_t *buf, int buf_size, int keyframe);
4627 
4629 
4630 /* memory */
4631 
4637 void *av_fast_realloc(void *ptr, unsigned int *size, size_t min_size);
4638 
4651 void av_fast_malloc(void *ptr, unsigned int *size, size_t min_size);
4652 
4656 void av_picture_copy(AVPicture *dst, const AVPicture *src,
4657  enum PixelFormat pix_fmt, int width, int height);
4658 
4662 int av_picture_crop(AVPicture *dst, const AVPicture *src,
4663  enum PixelFormat pix_fmt, int top_band, int left_band);
4664 
4668 int av_picture_pad(AVPicture *dst, const AVPicture *src, int height, int width, enum PixelFormat pix_fmt,
4669  int padtop, int padbottom, int padleft, int padright, int *color);
4670 
4678 unsigned int av_xiphlacing(unsigned char *s, unsigned int v);
4679 
4692 void av_log_missing_feature(void *avc, const char *feature, int want_sample);
4693 
4702 void av_log_ask_for_sample(void *avc, const char *msg, ...) av_printf_format(2, 3);
4703 
4707 void av_register_hwaccel(AVHWAccel *hwaccel);
4708 
4715 
4716 
4720 enum AVLockOp {
4725 };
4726 
4740 int av_lockmgr_register(int (*cb)(void **mutex, enum AVLockOp op));
4741 
4746 
4753 const AVClass *avcodec_get_class(void);
4754 
4760 
4761 #endif /* AVCODEC_AVCODEC_H */
void avsubtitle_free(AVSubtitle *sub)
Free all allocated data in the given subtitle struct.
Definition: utils.c:1265
int(* parser_init)(AVCodecParserContext *s)
Definition: avcodec.h:4544
int(* get_buffer)(struct AVCodecContext *c, AVFrame *pic)
Called at the beginning of each frame to get a buffer for it.
Definition: avcodec.h:1726
also ITU-R BT601-6 625 / ITU-R BT1358 625 / ITU-R BT1700 625 PAL & SECAM / IEC 61966-2-4 xvYCC601 ...
Definition: avcodec.h:557
enum PixelFormat pix_fmt
Pixel format, see PIX_FMT_xxx.
Definition: avcodec.h:1426
AVAudioServiceType
Definition: avcodec.h:600
unsigned int stream_codec_tag
fourcc from the AVI stream header (LSB first, so "ABCD" -> ('D'<<24) + ('C'<<16) + ('B'<<8) + 'A')...
Definition: avcodec.h:2284
int(* start_frame)(AVCodecContext *avctx, const uint8_t *buf, uint32_t buf_size)
Called at the beginning of each frame or field picture.
Definition: avcodec.h:3327
Unlock the mutex.
Definition: avcodec.h:4723
also ITU-R BT1361
Definition: avcodec.h:545
int size
int linesize[AV_NUM_DATA_POINTERS]
number of bytes per line
Definition: avcodec.h:3369
enum PixelFormat pix_fmt
Supported pixel format.
Definition: avcodec.h:3303
Audio Video Frame.
Definition: avcodec.h:985
int qstride
QP store stride.
Definition: avcodec.h:1087
AVPanScan * pan_scan
Pan scan.
Definition: avcodec.h:1181
#define c2
Definition: idct_sh4.c:28
struct AVPacket AVPacket
static short * samples
Definition: ffmpeg.c:233
int x
top left corner of pict, undefined when pict is not set
Definition: avcodec.h:3417
int mpeg_quant
0-> h263 quant 1-> mpeg quant
Definition: avcodec.h:1768
int dct_algo
DCT algorithm, see FF_DCT_* below.
Definition: avcodec.h:1861
Plain text, the text field must be set by the decoder and is authoritative.
Definition: avcodec.h:3407
AVColorPrimaries
Definition: avcodec.h:533
Motion_Est_ID
motion estimation type.
Definition: avcodec.h:509
uint64_t error[AV_NUM_DATA_POINTERS]
error
Definition: avcodec.h:2041
AVCodec * avcodec_find_encoder(enum CodecID id)
Find a registered encoder with a matching codec ID.
Definition: utils.c:1327
int coded_width
Bitstream width / height, may be different from width/height if lowres enabled.
Definition: avcodec.h:2543
int buffer_hints
codec suggestion on buffer type if != 0
Definition: avcodec.h:1195
int capabilities
Hardware accelerated codec capabilities.
Definition: avcodec.h:3309
void(* flush)(AVCodecContext *)
Flush buffers.
Definition: avcodec.h:3214
struct AVCodecParser AVCodecParser
attribute_deprecated void av_destruct_packet_nofree(AVPacket *pkt)
Definition: avpacket.c:26
Create a mutex.
Definition: avcodec.h:4721
void(* release_buffer)(struct AVCodecContext *c, AVFrame *pic)
Called to release buffers which were allocated with get_buffer.
Definition: avcodec.h:1737
float qblur
amount of qscale smoothing over time (0.0-1.0)
Definition: avcodec.h:1483
float border_masking
Border processing masking, raises the quantizer for mbs on the borders of the picture.
Definition: avcodec.h:2579
int64_t pos
byte position in stream, -1 if unknown
Definition: avcodec.h:933
int avcodec_decode_video2(AVCodecContext *avctx, AVFrame *picture, int *got_picture_ptr, AVPacket *avpkt)
Decode the video frame of size avpkt->size from avpkt->data into picture.
Definition: utils.c:1137
int64_t next_frame_offset
Definition: avcodec.h:4419
AVFrame * coded_frame
the picture in the bitstream
Definition: avcodec.h:2000
int avcodec_decode_audio4(AVCodecContext *avctx, AVFrame *frame, int *got_frame_ptr, AVPacket *avpkt)
Decode the audio frame of size avpkt->size from avpkt->data into frame.
Definition: utils.c:1221
int id
id
Definition: avcodec.h:841
int av_new_packet(AVPacket *pkt, int size)
Allocate the payload of a packet and initialize its fields with default values.
Definition: avpacket.c:60
int chroma_elim_threshold
chroma single coeff elimination threshold
Definition: avcodec.h:1628
int qscale_type
Definition: avcodec.h:1160
enum PixelFormat(* get_format)(struct AVCodecContext *s, const enum PixelFormat *fmt)
callback to negotiate the pixelFormat
Definition: avcodec.h:2135
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:1512
int avpicture_deinterlace(AVPicture *dst, const AVPicture *src, enum PixelFormat pix_fmt, int width, int height)
Definition: imgconvert.c:1023
int rc_initial_buffer_occupancy
Number of bits which should be loaded into the rc buffer before decoding starts.
Definition: avcodec.h:2343
AVCodecParserContext * av_parser_init(int codec_id)
Definition: parser.c:38
void avcodec_register(AVCodec *codec)
Register the codec codec and initialize libavcodec.
Definition: utils.c:115
void * hwaccel_picture_private
hardware accelerator private data (Libav-allocated)
Definition: avcodec.h:1230
int height
Definition: avcodec.h:849
enum PixelFormat pix_fmt
Definition: v4l.c:65
void * opaque
for some private data of the user
Definition: avcodec.h:1132
enum AVColorRange color_range
MPEG vs JPEG YUV range.
Definition: avcodec.h:2947
int qscale
Definition: avcodec.h:616
struct AVBitStreamFilter * next
Definition: avcodec.h:4617
int repeat_pict
When decoding, this signals how much the picture must be delayed.
Definition: avcodec.h:1155
struct AVCodecContext * owner
the AVCodecContext which ff_thread_get_buffer() was last called on
Definition: avcodec.h:1251
void(* rtp_callback)(struct AVCodecContext *avctx, void *data, int size, int mb_nb)
Definition: avcodec.h:1547
int nb_colors
number of colors in pict, undefined when pict is not set
Definition: avcodec.h:3421
int size
Definition: avcodec.h:909
char codec_name[32]
Definition: avcodec.h:1573
int mb_lmin
minimum MB lagrange multipler
Definition: avcodec.h:2586
int width
Definition: rotozoom.c:164
int codec_ids[5]
Definition: avcodec.h:4542
the normal 2^n-1 "JPEG" YUV ranges
Definition: avcodec.h:566
void * thread_opaque
used by multithreading to store frame-specific info
Definition: avcodec.h:1258
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:1993
AVCodec * avcodec_find_decoder(enum CodecID id)
Find a registered decoder with a matching codec ID.
Definition: utils.c:1357
external API header
enum CodecID id
Definition: avcodec.h:3198
enum PixelFormat avcodec_find_best_pix_fmt(int64_t pix_fmt_mask, enum PixelFormat 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:631
struct AVResampleContext * av_resample_init(int out_rate, int in_rate, int filter_length, int log2_phase_count, int linear, double cutoff)
Initialize an audio resampler.
Definition: resample2.c:189
discard all bidirectional frames
Definition: avcodec.h:528
AVChromaLocation
X X 3 4 X X are luma samples, 1 2 1-6 are possible chroma positions X X 5 6 X 0 is undefined/unknown ...
Definition: avcodec.h:575
unsigned num_rects
Definition: avcodec.h:3444
enum AVMediaType type
Type of codec implemented by the hardware accelerator.
Definition: avcodec.h:3289
enum PixelFormat avcodec_default_get_format(struct AVCodecContext *s, const enum PixelFormat *fmt)
Definition: utils.c:603
void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode)
Definition: utils.c:1421
char * stats_in
pass2 encoding statistics input buffer Concatenated stuff from stats_out of pass1 should be placed he...
Definition: avcodec.h:1783
int ildct_cmp
interlaced DCT comparison function
Definition: avcodec.h:2066
AVHWAccel * av_hwaccel_next(AVHWAccel *hwaccel)
If hwaccel is NULL, returns the first registered hardware accelerator, if hwaccel is non-NULL...
Definition: utils.c:1750
enum AVMediaType type
Definition: avcodec.h:3197
int rtp_payload_size
Definition: avcodec.h:1533
int(* decode)(AVCodecContext *, void *outdata, int *outdata_size, AVPacket *avpkt)
Definition: avcodec.h:3203
int intra_quant_bias
intra quantizer bias
Definition: avcodec.h:2168
int64_t cur_frame_pos[AV_PARSER_PTS_NB]
Position of the packet in file.
Definition: avcodec.h:4528
int bits_per_raw_sample
Bits per sample/pixel of internal libavcodec pixel/sample format.
Definition: avcodec.h:2863
int avcodec_is_open(AVCodecContext *s)
Definition: utils.c:1862
struct AVCodec * codec
Definition: avcodec.h:1529
int dts_ref_dts_delta
Offset of the current timestamp against last timestamp sync point in units of AVCodecContext.time_base.
Definition: avcodec.h:4507
four components are given, that's all.
Definition: avcodec.h:3367
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:173
int profile
profile
Definition: avcodec.h:2462
int lmax
maximum Lagrange multipler
Definition: avcodec.h:2306
int frame_skip_cmp
frame skip comparison function
Definition: avcodec.h:2571
AVCodec.
Definition: avcodec.h:3189
AVPacketSideDataType
Definition: avcodec.h:885
int block_align
number of bytes per packet if constant and known or 0 Used by some WAV based audio codecs...
Definition: avcodec.h:1751
void av_fast_malloc(void *ptr, unsigned int *size, size_t min_size)
Allocate a buffer, reusing the given one if large enough.
Definition: utils.c:71
float i_quant_offset
qscale offset between P and I-frames
Definition: avcodec.h:1847
struct AVSubtitle AVSubtitle
A dummy ID pointing at the start of various fake codecs.
Definition: avcodec.h:413
uint64_t vbv_delay
VBV delay coded in the last frame (in periods of a 27 MHz clock).
Definition: avcodec.h:3134
#define v(n)
Definition: regs.h:34
void avcodec_flush_buffers(AVCodecContext *avctx)
Flush buffers, should be called when seeking or when switching to a different stream.
Definition: utils.c:1566
char * text
0 terminated plain UTF-8 text
Definition: avcodec.h:3430
int scenechange_threshold
scene change detection threshold 0 is default, larger means fewer detected scene changes.
Definition: avcodec.h:2292
int audio_resample(ReSampleContext *s, short *output, short *input, int nb_samples)
Definition: resample.c:228
struct AVBitStreamFilter AVBitStreamFilter
int(* reget_buffer)(struct AVCodecContext *c, AVFrame *pic)
Called at the beginning of a frame to get cr buffer for it.
Definition: avcodec.h:2336
void av_resample_close(struct AVResampleContext *c)
Definition: resample2.c:221
AVRational time_base
This is the fundamental unit of time (in seconds) in terms of which frame timestamps are represented...
Definition: avcodec.h:1398
AVSubtitleRect ** rects
Definition: avcodec.h:3445
void av_shrink_packet(AVPacket *pkt, int size)
Reduce packet size, correctly zeroing padding.
Definition: avpacket.c:79
enum AVAudioServiceType audio_service_type
Type of service that the audio stream conveys.
Definition: avcodec.h:3141
AVColorSpace
Definition: avcodec.h:552
unsigned dsp_mask
dsp_mask could be add used to disable unwanted CPU features CPU features (i.e.
Definition: avcodec.h:1967
enum AVDiscard skip_frame
Definition: avcodec.h:2621
also ITU-R BT1361 / IEC 61966-2-4 / SMPTE RP177 Annex B
Definition: avcodec.h:534
void av_picture_copy(AVPicture *dst, const AVPicture *src, enum PixelFormat pix_fmt, int width, int height)
Copy image src to dst.
Definition: imgconvert.c:664
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)
void av_init_packet(AVPacket *pkt)
Initialize optional fields of a packet with default values.
Definition: avpacket.c:46
int w
width of pict, undefined when pict is not set
Definition: avcodec.h:3419
struct AVHWAccel * hwaccel
Hardware accelerator in use.
Definition: avcodec.h:2898
void audio_resample_close(ReSampleContext *s)
Free resample context.
Definition: resample.c:359
float p_masking
p block masking (0-> disabled)
Definition: avcodec.h:1896
int context_model
context model
Definition: avcodec.h:2227
AVCodecParserContext * parser
Definition: avcodec.h:4604
Public dictionary API.
int(* init_thread_copy)(AVCodecContext *)
If defined, called on thread contexts when they are created.
Definition: avcodec.h:3238
static int thread_count
Definition: ffmpeg.c:214
int bit_rate_tolerance
number of bits the bitstream is allowed to diverge from the reference.
Definition: avcodec.h:1348
int mb_lmax
maximum MB lagrange multipler
Definition: avcodec.h:2593
void av_parser_close(AVCodecParserContext *s)
Definition: parser.c:206
enum AVSampleFormat sample_fmt
audio sample format
Definition: avcodec.h:1464
AVBitStreamFilter * av_bitstream_filter_next(AVBitStreamFilter *f)
void * hwaccel_context
Hardware accelerator context.
Definition: avcodec.h:2919
reserved for experiments
Definition: avcodec.h:515
int subtitle_header_size
Definition: avcodec.h:3075
int me_range
maximum motion estimation search range in subpel units If 0 then no limit.
Definition: avcodec.h:2161
uint8_t * data[AV_NUM_DATA_POINTERS]
Definition: avcodec.h:3368
int avcodec_open2(AVCodecContext *avctx, AVCodec *codec, AVDictionary **options)
Initialize the AVCodecContext to use the given AVCodec.
Definition: utils.c:635
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:1767
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:1521
Not part of ABI.
Definition: avcodec.h:549
int pre_dia_size
ME prepass diamond size & shape.
Definition: avcodec.h:2117
int64_t pts
presentation timestamp in time_base units (time when frame should be shown to user) If AV_NOPTS_VALUE...
Definition: avcodec.h:1037
uint8_t motion_subsample_log2
log2 of the size of the block which a single vector in motion_val represents: (4->16x16, 3->8x8, 2-> 4x4, 1-> 2x2)
Definition: avcodec.h:1125
uint8_t * extradata
some codecs need / can use extradata like Huffman tables.
Definition: avcodec.h:1387
const AVClass * av_class
information on struct for av_log
Definition: avcodec.h:1334
void av_resample_compensate(struct AVResampleContext *c, int sample_delta, int compensation_distance)
Compensate samplerate/timestamp drift.
Definition: resample2.c:226
int scenechange_factor
Multiplied by qscale for each frame and added to scene_change_score.
Definition: avcodec.h:2748
int me_cmp
motion estimation comparison function
Definition: avcodec.h:2048
int av_resample(struct AVResampleContext *c, short *dst, short *src, int *consumed, int src_size, int dst_size, int update_ctx)
Resample an array of samples using a previously configured context.
Definition: resample2.c:232
struct AVCodecParser * next
Definition: avcodec.h:4551
int rc_strategy
obsolete FIXME remove
Definition: avcodec.h:1524
const char data[16]
Definition: mxf.c:60
const char * name
Definition: avcodec.h:4610
Not part of ABI.
Definition: avcodec.h:541
enhanced predictive zonal search
Definition: avcodec.h:514
int coder_type
coder type
Definition: avcodec.h:2220
uint8_t * data
Definition: avcodec.h:908
int mb_threshold
Macroblock threshold below which the user specified macroblock types will be used.
Definition: avcodec.h:2427
void av_free_packet(AVPacket *pkt)
Free a packet.
Definition: avpacket.c:151
AVCodecContext * avcodec_alloc_context3(AVCodec *codec)
Allocate an AVCodecContext and set its fields to default values.
Definition: options.c:601
int interlaced_frame
The content of the picture is interlaced.
Definition: avcodec.h:1167
int(* parser_parse)(AVCodecParserContext *s, AVCodecContext *avctx, const uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size)
Definition: avcodec.h:4545
void av_destruct_packet(AVPacket *pkt)
Default packet destructor.
Definition: avpacket.c:33
int lowres
low resolution decoding, 1-> 1/2 size, 2->1/4 size
Definition: avcodec.h:2536
int h
height of pict, undefined when pict is not set
Definition: avcodec.h:3420
int bits_per_coded_sample
bits per sample/pixel from the demuxer (needed for huffyuv).
Definition: avcodec.h:1974
int min_prediction_order
Definition: avcodec.h:2776
float lumi_masking
luminance masking (0-> disabled)
Definition: avcodec.h:1875
char * stats_out
pass1 encoding statistics output buffer
Definition: avcodec.h:1775
int av_get_bits_per_sample(enum CodecID codec_id)
Return codec bits per sample.
Definition: utils.c:1634
int avpicture_get_size(enum PixelFormat pix_fmt, int width, int height)
Calculate the size in bytes that a picture of the given width and height would occupy if stored in th...
Definition: imgconvert.c:476
the normal 219*2^(n-8) "MPEG" YUV ranges
Definition: avcodec.h:565
int duration
Duration of this packet in AVStream->time_base units, 0 if unknown.
Definition: avcodec.h:930
struct AVBitStreamFilterContext * next
Definition: avcodec.h:4605
enum AVChromaLocation chroma_sample_location
This defines the location of chroma samples.
Definition: avcodec.h:2954
float rc_qmod_amp
Definition: avcodec.h:1793
void avcodec_set_dimensions(AVCodecContext *s, int width, int height)
Definition: utils.c:133
float quality_factor
Definition: avcodec.h:617
void av_register_codec_parser(AVCodecParser *parser)
Definition: parser.c:32
struct AVBitStreamFilterContext AVBitStreamFilterContext
int chromaoffset
chroma qp offset from luma
Definition: avcodec.h:2674
preferred ID for MPEG-1/2 video decoding
Definition: avcodec.h:88
audio conversion routines
void(* destruct)(struct AVPacket *)
Definition: avcodec.h:931
AVSideDataParamChangeFlags
An AV_PKT_DATA_PARAM_CHANGE side data packet is laid out as follows: u32le param_flags if (param_flag...
Definition: avcodec.h:971
int slice_count
slice count
Definition: avcodec.h:1942
A dummy ID pointing at the start of subtitle codecs.
Definition: avcodec.h:401
int(* close)(AVCodecContext *)
Definition: avcodec.h:3202
int nb_channels
Definition: audioconvert.c:62
Dummy codec for streams containing only metadata information.
Definition: avcodec.h:422
const uint64_t * channel_layouts
array of support channel layouts, or NULL if unknown. array is terminated by 0
Definition: avcodec.h:3224
enum CodecID codec_id
Definition: mov_chan.c:417
discard all
Definition: avcodec.h:530
const AVCodecDefault * defaults
Private codec-specific defaults.
Definition: avcodec.h:3252
int width
width and height of the video frame
Definition: avcodec.h:1299
int has_b_frames
Size of the frame reordering buffer in the decoder.
Definition: avcodec.h:1745
int64_t pos
Byte position of currently parsed frame in stream.
Definition: avcodec.h:4533
int sub_id
Some codecs need additional format info.
Definition: avcodec.h:1365
int priv_data_size
Definition: avcodec.h:4543
also ITU-R BT601-6 525 / ITU-R BT1358 525 / ITU-R BT1700 NTSC
Definition: avcodec.h:538
struct AVCodecParser * parser
Definition: avcodec.h:4415
int reference
is this picture used as reference The values for this are the same as the MpegEncContext.picture_structure variable, that is 1->top field, 2->bottom field, 3->frame/both fields.
Definition: avcodec.h:1074
int y
top left corner of pict, undefined when pict is not set
Definition: avcodec.h:3418
void void av_register_hwaccel(AVHWAccel *hwaccel)
Register the hardware accelerator hwaccel.
Definition: utils.c:1741
short * dct_coeff
DCT coefficients.
Definition: avcodec.h:1202
int color_table_id
color table ID
Definition: avcodec.h:2184
int frame_skip_threshold
frame skip threshold
Definition: avcodec.h:2550
int me_sub_cmp
subpixel motion estimation comparison function
Definition: avcodec.h:2054
int qmax
maximum quantizer
Definition: avcodec.h:1497
enum AVSampleFormat request_sample_fmt
Used to request a sample format from the decoder.
Definition: avcodec.h:3148
int active_thread_type
Which multithreading methods are in use by the codec.
Definition: avcodec.h:3116
int error_concealment
error concealment flags
Definition: avcodec.h:1955
int64_t convergence_duration
Time difference in AVStream->time_base units from the pts of this packet to the point at which the ou...
Definition: avcodec.h:952
int capabilities
Codec capabilities.
Definition: avcodec.h:3208
Not part of ABI.
Definition: avcodec.h:560
uint8_t * base[AV_NUM_DATA_POINTERS]
pointer to the first allocated byte of the picture.
Definition: avcodec.h:1016
int flags
CODEC_FLAG_*.
Definition: avcodec.h:1355
int rc_max_rate
maximum bitrate
Definition: avcodec.h:1816
int log_level_offset
Definition: avcodec.h:3039
const char * name
Name of the codec implementation.
Definition: avcodec.h:3196
int64_t cur_frame_dts[AV_PARSER_PTS_NB]
Definition: avcodec.h:4444
float i_quant_factor
qscale factor between P and I-frames If > 0 then the last p frame quantizer will be used (q= lastp_q*...
Definition: avcodec.h:1840
int side_data_elems
Definition: avcodec.h:924
int(* encode)(AVCodecContext *, uint8_t *buf, int buf_size, void *data)
Definition: avcodec.h:3201
const char * rc_eq
rate control equation
Definition: avcodec.h:1809
int width
width and height in 1/16 pel
Definition: avcodec.h:848
void avcodec_register_all(void)
Register all the codecs, parsers and bitstream filters which were enabled at configuration time...
Definition: allcodecs.c:48
also ITU-R BT470M / ITU-R BT1700 625 PAL & SECAM
Definition: avcodec.h:547
AVBitStreamFilterContext * av_bitstream_filter_init(const char *name)
void * thread_opaque
thread opaque Can be used by execute() to store some per AVCodecContext stuff.
Definition: avcodec.h:2411
AVDiscard
Definition: avcodec.h:522
#define AV_NUM_DATA_POINTERS
Definition: avcodec.h:989
AVFieldOrder
Definition: avcodec.h:1313
int compensation_distance
Definition: resample2.c:68
#define av_printf_format(fmtpos, attrpos)
Definition: attributes.h:133
int priv_data_size
Size of HW accelerator private data.
Definition: avcodec.h:3360
int flags
A combination of AV_PKT_FLAG values.
Definition: avcodec.h:914
uint64_t channel_layout
Audio channel layout.
Definition: avcodec.h:2870
uint32_t end_display_time
Definition: avcodec.h:3443
int64_t pts
Same as packet pts, in AV_TIME_BASE.
Definition: avcodec.h:3446
int rc_buffer_size
decoder bitstream buffer size
Definition: avcodec.h:1830
functionally identical to above
Definition: avcodec.h:539
const char * av_get_profile_name(const AVCodec *codec, int profile)
Return a name for the specified profile, if available.
Definition: utils.c:1537
int intra_dc_precision
precision of the intra DC coefficient - 8
Definition: avcodec.h:2434
int me_penalty_compensation
Definition: avcodec.h:2600
Not part of ABI.
Definition: avcodec.h:567
void avcodec_default_free_buffers(AVCodecContext *s)
Definition: utils.c:1614
int dtg_active_format
DTG active format information (additional aspect ratio information only used in DVB MPEG-2 transport ...
Definition: avcodec.h:2145
AVFrame * avcodec_alloc_frame(void)
Allocate an AVFrame and set its fields to default values.
Definition: utils.c:618
int refs
number of reference frames
Definition: avcodec.h:2667
struct AVCodecContext AVCodecContext
main external API structure.
const char * avcodec_license(void)
Return the libavcodec license.
Definition: utils.c:1560
int rc_override_count
Definition: avcodec.h:1802
void(* draw_horiz_band)(struct AVCodecContext *s, const AVFrame *src, int offset[AV_NUM_DATA_POINTERS], int y, int type, int height)
If non NULL, 'draw_horiz_band' is called by the libavcodec decoder to draw a horizontal band...
Definition: avcodec.h:1451
int bit_rate
the average bitrate
Definition: avcodec.h:1340
static AVFrame * picture
int avcodec_fill_audio_frame(AVFrame *frame, int nb_channels, enum AVSampleFormat sample_fmt, const uint8_t *buf, int buf_size, int align)
Fill audio frame data and linesize.
Definition: utils.c:253
int64_t timecode_frame_start
GOP timecode frame start number, in non drop frame format.
Definition: avcodec.h:2826
enum AVPictureType pict_type
Picture type of the frame, see ?_TYPE below.
Definition: avcodec.h:1029
const AVClass * avcodec_get_class(void)
Get the AVClass for AVCodecContext.
Definition: options.c:691
int err_recognition
Error recognition; may misdetect some more or less valid parts as errors.
Definition: avcodec.h:3155
AVPicture pict
data+linesize for the bitmap of this subtitle.
Definition: avcodec.h:3427
const char * name
Name of the hardware accelerated codec.
Definition: avcodec.h:3282
struct AVCodec AVCodec
AVCodec.
int display_picture_number
picture number in display order
Definition: avcodec.h:1050
#define f(n)
Definition: regs.h:33
AVLockOp
Lock operation used by lockmgr.
Definition: avcodec.h:4720
int width
picture width / height.
Definition: avcodec.h:1408
uint8_t * av_packet_new_side_data(AVPacket *pkt, enum AVPacketSideDataType type, int size)
Allocate new information of a packet.
Definition: avpacket.c:161
void(* parser_close)(AVCodecParserContext *s)
Definition: avcodec.h:4549
struct AVFrame AVFrame
Audio Video Frame.
int idct_algo
IDCT algorithm, see FF_IDCT_* below.
Definition: avcodec.h:1910
int avcodec_copy_context(AVCodecContext *dest, const AVCodecContext *src)
Copy the settings of the source AVCodecContext into the destination AVCodecContext.
Definition: options.c:634
also ITU-R BT1361 / IEC 61966-2-4 xvYCC709 / SMPTE RP177 Annex B
Definition: avcodec.h:554
int type
type of the buffer (to keep track of who has to deallocate data[*])
Definition: avcodec.h:1147
int64_t offset
byte offset from starting packet start
Definition: avcodec.h:4452
struct AVHWAccel AVHWAccel
AVHWAccel.
int priv_data_size
Definition: avcodec.h:3199
int profile
Definition: avcodec.h:3180
void * priv
Definition: avcodec.h:932
Lock the mutex.
Definition: avcodec.h:4722
float rc_max_available_vbv_use
Ratecontrol attempt to use, at maximum, of what can be used without an underflow. ...
Definition: avcodec.h:2884
float rc_min_vbv_overflow_use
Ratecontrol attempt to use, at least, times the amount needed to prevent a vbv overflow.
Definition: avcodec.h:2891
unsigned avcodec_version(void)
Return the LIBAVCODEC_VERSION_INT constant.
Definition: utils.c:1550
int64_t convergence_duration
Time difference in stream time base units from the pts of this packet to the point at which the outpu...
Definition: avcodec.h:4480
void avpicture_free(AVPicture *picture)
Free a picture previously allocated by avpicture_alloc().
Definition: imgconvert.c:771
iterative search
Definition: avcodec.h:518
int b_frame_strategy
Definition: avcodec.h:1527
enum AVColorPrimaries color_primaries
Chromaticity coordinates of the source primaries.
Definition: avcodec.h:2926
float rc_qsquish
ratecontrol qmin qmax limiting method 0-> clipping, 1-> use a nice continous function to limit qscale...
Definition: avcodec.h:1791
int start_frame
Definition: avcodec.h:614
uint16_t format
Definition: avcodec.h:3441
int level
level
Definition: avcodec.h:2528
int quality
quality (between 1 (good) and FF_LAMBDA_MAX (bad))
Definition: avcodec.h:1057
const AVProfile * profiles
array of recognized profiles, or NULL if unknown, array is terminated by {FF_PROFILE_UNKNOWN} ...
Definition: avcodec.h:3227
int64_t reordered_opaque
opaque 64bit number (generally a PTS) that will be reordered and output in AVFrame.reordered_opaque
Definition: avcodec.h:2856
int ticks_per_frame
For some codecs, the time base is closer to the field rate than the frame rate.
Definition: avcodec.h:2907
int skip_top
Number of macroblock rows at the top which are skipped.
Definition: avcodec.h:2448
int mb_decision
macroblock decision mode
Definition: avcodec.h:2259
AVCodec * avcodec_find_encoder_by_name(const char *name)
Find a registered encoder with the specified name.
Definition: utils.c:1343
int last_predictor_count
amount of previous MV predictors (2a+1 x 2a+1 square)
Definition: avcodec.h:2096
int max_qdiff
maximum quantizer difference between frames
Definition: avcodec.h:1504
AVSubtitleType
Definition: avcodec.h:3398
as in Berlin toast format
Definition: avcodec.h:357
int64_t cur_frame_end[AV_PARSER_PTS_NB]
Definition: avcodec.h:4453
static pthread_mutex_t * mutex
Definition: w32pthreads.h:64
int lmin
minimum Lagrange multipler
Definition: avcodec.h:2299
int64_t cur_frame_pts[AV_PARSER_PTS_NB]
Definition: avcodec.h:4443
int avcodec_default_execute2(AVCodecContext *c, int(*func)(AVCodecContext *c2, void *arg2, int, int), void *arg, int *ret, int count)
RcOverride * rc_override
ratecontrol override, see RcOverride
Definition: avcodec.h:1801
FAKE codec to indicate a MPEG-4 Systems stream (only used by libavformat)
Definition: avcodec.h:420
discard nothing
Definition: avcodec.h:525
int64_t last_pos
Previous frame byte position.
Definition: avcodec.h:4538
int thread_count
thread count is used to decide how many independent tasks should be passed to execute() ...
Definition: avcodec.h:2392
int xvmc_acceleration
XVideo Motion Acceleration.
Definition: avcodec.h:2252
int inter_quant_bias
inter quantizer bias
Definition: avcodec.h:2176
uint8_t * av_packet_get_side_data(AVPacket *pkt, enum AVPacketSideDataType type, int *size)
Get side information from packet.
Definition: avpacket.c:185
codec_id is not known (like CODEC_ID_NONE) but lavf should attempt to identify it ...
Definition: avcodec.h:416
int format
format of the frame, -1 if unknown or unset Values correspond to enum PixelFormat for video frames...
Definition: avcodec.h:1308
uint32_t * mb_type
macroblock type table mb_type_base + mb_width + 2
Definition: avcodec.h:1117
AVCodec * avcodec_find_decoder_by_name(const char *name)
Find a registered decoder with the specified name.
Definition: utils.c:1369
int frame_skip_factor
frame skip factor
Definition: avcodec.h:2557
int frame_size
Samples per packet, initialized when calling 'init'.
Definition: avcodec.h:1470
int avcodec_encode_audio2(AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame, int *got_packet_ptr)
Encode a frame of audio.
Definition: utils.c:868
int pts_dts_delta
Presentation delay of current frame in units of AVCodecContext.time_base.
Definition: avcodec.h:4521
const char * long_name
Descriptive name for the codec, meant to be more human readable than name.
Definition: avcodec.h:3221
enum CodecID id
Codec implemented by the hardware accelerator.
Definition: avcodec.h:3296
float rc_initial_cplx
initial complexity for pass1 ratecontrol
Definition: avcodec.h:1854
int bidir_refine
Definition: avcodec.h:2628
void avcodec_get_chroma_sub_sample(enum PixelFormat pix_fmt, int *h_shift, int *v_shift)
Definition: imgconvert.c:411
int coded_picture_number
picture number in bitstream order
Definition: avcodec.h:1044
uint64_t error[AV_NUM_DATA_POINTERS]
error
Definition: avcodec.h:1139
enum AVMediaType codec_type
Definition: avcodec.h:1574
void(* init_static_data)(struct AVCodec *codec)
Initialize codec static data, called from avcodec_register().
Definition: avcodec.h:3257
int me_threshold
Motion estimation threshold below which no motion estimation is performed, but instead the user speci...
Definition: avcodec.h:2420
const AVRational * supported_framerates
array of supported framerates, or NULL if any, array is terminated by {0,0}
Definition: avcodec.h:3215
Formatted text, the ass field must be set by the decoder and is authoritative.
Definition: avcodec.h:3413
AVHWAccel.
Definition: avcodec.h:3276
int compression_level
Definition: avcodec.h:2769
int av_dup_packet(AVPacket *pkt)
Definition: avpacket.c:121
int sample_rate
samples per second
Definition: avcodec.h:1456
enum AVDiscard skip_idct
Definition: avcodec.h:2614
int linesize[AV_NUM_DATA_POINTERS]
Size, in bytes, of the data for each picture/channel plane.
Definition: avcodec.h:1008
raw UTF-8 text
Definition: avcodec.h:404
int frame_bits
number of bits used for the previously encoded frame
Definition: avcodec.h:1564
discard all non reference
Definition: avcodec.h:527
int debug
debug
Definition: avcodec.h:2007
AVCodecParser * av_parser_next(AVCodecParser *c)
Definition: parser.c:27
static const OptionDef options[]
Definition: avconv.c:105
void av_log_ask_for_sample(void *avc, const char *msg,...) av_printf_format(2
Log a generic warning message asking for a sample.
unsigned avcodec_get_edge_width(void)
Return the amount of padding in pixels which the get_buffer callback must provide around the edge of ...
Definition: utils.c:128
main external API structure.
Definition: avcodec.h:1329
static void(WINAPI *cond_broadcast)(pthread_cond_t *cond)
void avcodec_default_release_buffer(AVCodecContext *s, AVFrame *pic)
Definition: utils.c:509
int output_channels
Definition: resample.c:52
int avcodec_default_reget_buffer(AVCodecContext *s, AVFrame *pic)
Definition: utils.c:545
int pre_me
prepass for motion estimation
Definition: avcodec.h:2103
int qmin
minimum quantizer
Definition: avcodec.h:1490
AVRational sample_aspect_ratio
sample aspect ratio for the video frame, 0/1 if unknown
Definition: avcodec.h:1292
int avcodec_default_execute(AVCodecContext *c, int(*func)(AVCodecContext *c2, void *arg2), void *arg, int *ret, int count, int size)
Definition: utils.c:583
struct AVPicture AVPicture
four components are given, that's all.
unsigned int codec_tag
fourcc (LSB first, so "ABCD" -> ('D'<<24) + ('C'<<16) + ('B'<<8) + 'A').
Definition: avcodec.h:1590
int16_t(*[2] motion_val)[2]
motion vector table
Definition: avcodec.h:1109
A bitmap, pict will be set.
Definition: avcodec.h:3401
int av_grow_packet(AVPacket *pkt, int grow_by)
Increase packet size, correctly zeroing padding.
Definition: avpacket.c:86
float spatial_cplx_masking
spatial complexity masking (0-> disabled)
Definition: avcodec.h:1889
static int error_recognition
Definition: avplay.c:253
int extradata_size
Definition: avcodec.h:1388
struct AVCodec * next
Definition: avcodec.h:3209
struct AVBitStreamFilter * filter
Definition: avcodec.h:4603
uint16_t * intra_matrix
custom intra quantization matrix
Definition: avcodec.h:2269
int slice_flags
slice flags
Definition: avcodec.h:2242
int coded_height
Definition: avcodec.h:2543
int64_t reordered_opaque
reordered opaque 64bit (generally an integer or a double precision float PTS but can be anything)...
Definition: avcodec.h:1223
Describe the class of an AVClass context structure.
Definition: log.h:33
struct AVCodecParserContext AVCodecParserContext
ReSampleContext * av_audio_resample_init(int output_channels, int input_channels, int output_rate, int input_rate, enum AVSampleFormat sample_fmt_out, enum AVSampleFormat sample_fmt_in, int filter_length, int log2_phase_count, int linear, double cutoff)
Initialize audio resampling context.
Definition: resample.c:150
int avcodec_get_context_defaults3(AVCodecContext *s, AVCodec *codec)
Set the fields of the given AVCodecContext to default values corresponding to the given codec (defaul...
Definition: options.c:556
float rc_buffer_aggressivity
Definition: avcodec.h:1831
enum AVColorSpace colorspace
YUV colorspace type.
Definition: avcodec.h:2940
rational number numerator/denominator
Definition: rational.h:43
enum AVColorTransferCharacteristic color_trc
Color Transfer Characteristic.
Definition: avcodec.h:2933
int avpicture_fill(AVPicture *picture, uint8_t *ptr, enum PixelFormat pix_fmt, int width, int height)
Fill in the AVPicture fields.
Definition: imgconvert.c:429
const char * name
short name for the profile
Definition: avcodec.h:3181
struct AVPanScan AVPanScan
Pan Scan area.
FAKE codec to indicate a raw MPEG-2 TS stream (only used by libavformat)
Definition: avcodec.h:418
int palette_has_changed
Tell user application that palette has changed from previous frame.
Definition: avcodec.h:1188
AVColorRange
Definition: avcodec.h:563
transformed exhaustive search algorithm
Definition: avcodec.h:519
struct AVSubtitleRect AVSubtitleRect
AVMediaType
Definition: avutil.h:228
int8_t * ref_index[2]
motion reference frame index the order in which these are stored can depend on the codec...
Definition: avcodec.h:1210
AVPictureType
Definition: avutil.h:295
unsigned int av_xiphlacing(unsigned char *s, unsigned int v)
Encode extradata length to a buffer.
Definition: utils.c:1694
float b_quant_offset
qscale offset between IP and B-frames
Definition: avcodec.h:1654
int avcodec_encode_video(AVCodecContext *avctx, uint8_t *buf, int buf_size, const AVFrame *pict)
Encode a video frame from pict into buf.
Definition: utils.c:1061
int frame_skip_exp
frame skip exponent
Definition: avcodec.h:2564
#define AVPALETTE_COUNT
Definition: avcodec.h:3373
#define AV_PARSER_PTS_NB
Definition: avcodec.h:4440
float qcompress
amount of qscale change between easy & hard scenes (0.0-1.0)
Definition: avcodec.h:1482
uint16_t * inter_matrix
custom inter quantization matrix
Definition: avcodec.h:2276
int end_frame
Definition: avcodec.h:615
void(* close)(AVBitStreamFilterContext *bsfc)
Definition: avcodec.h:4616
int64_t pkt_pts
reordered pts from the last AVPacket that has been input into the decoder
Definition: avcodec.h:1237
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:1285
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:2208
int skip_bottom
Number of macroblock rows at the bottom which are skipped.
Definition: avcodec.h:2455
void av_bitstream_filter_close(AVBitStreamFilterContext *bsf)
float temporal_cplx_masking
temporary complexity masking (0-> disabled)
Definition: avcodec.h:1882
int input_channels
Definition: resample.c:52
discard useless packets like 0 size packets in avi
Definition: avcodec.h:526
also ITU-R BT601-6 625 / ITU-R BT1358 625 / ITU-R BT1700 625 PAL & SECAM
Definition: avcodec.h:537
Pan Scan area.
Definition: avcodec.h:835
const AVClass * priv_class
AVClass for the private context.
Definition: avcodec.h:3226
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
Definition: avcodec.h:997
enum PixelFormat * pix_fmts
array of supported pixel formats, or NULL if unknown, array is terminated by -1
Definition: avcodec.h:3216
int8_t * qscale_table
QP table.
Definition: avcodec.h:1081
A dummy id pointing at the start of audio codecs.
Definition: avcodec.h:259
#define attribute_deprecated
Definition: attributes.h:87
int rc_qmod_freq
Definition: avcodec.h:1794
const char * name
Definition: audioconvert.c:61
int noise_reduction
noise reduction strength
Definition: avcodec.h:2322
also ITU-R BT470BG
Definition: avcodec.h:548
int height
Definition: gxfenc.c:73
int(* filter)(AVBitStreamFilterContext *bsfc, AVCodecContext *avctx, const char *args, uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size, int keyframe)
Definition: avcodec.h:4612
struct AVPacket::@10 * side_data
Additional packet data that can be provided by the container.
int gop_size
the number of pictures in a group of pictures, or 0 for intra_only
Definition: avcodec.h:1417
uint8_t max_lowres
maximum value for lowres supported by the decoder
Definition: avcodec.h:3225
int64_t pkt_dts
dts from the last AVPacket that has been input into the decoder
Definition: avcodec.h:1244
AVPacket * pkt
Current packet as passed into the decoder, to avoid having to pass the packet into every function...
Definition: avcodec.h:3084
int palette
Definition: v4l.c:63
PixelFormat
Pixel format.
Definition: pixfmt.h:62
int mb_cmp
macroblock comparison function (not supported yet)
Definition: avcodec.h:2060
int(* split)(AVCodecContext *avctx, const uint8_t *buf, int buf_size)
Definition: avcodec.h:4550
mpeg2/4, h264 default
Definition: avcodec.h:577
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:142
rational numbers
enum AVMediaType avcodec_get_type(enum CodecID codec_id)
Get the type of the given codec.
Definition: utils.c:1848
struct AVHWAccel * next
Definition: avcodec.h:3311
int avpicture_alloc(AVPicture *picture, enum PixelFormat pix_fmt, int width, int height)
Allocate memory for a picture.
Definition: imgconvert.c:758
int nsse_weight
noise vs.
Definition: avcodec.h:2441
no search, that is use 0,0 vector whenever one is needed
Definition: avcodec.h:510
static void avcodec_init(void)
Definition: utils.c:94
int av_picture_crop(AVPicture *dst, const AVPicture *src, enum PixelFormat pix_fmt, int top_band, int left_band)
Crop image top and left side.
Definition: imgconvert.c:784
uneven multi-hexagon search
Definition: avcodec.h:517
uint32_t start_display_time
Definition: avcodec.h:3442
int prediction_method
prediction method (needed for huffyuv)
Definition: avcodec.h:1981
AVSampleFormat
all in native-endian format
Definition: samplefmt.h:27
AVProfile.
Definition: avcodec.h:3179
int workaround_bugs
Work around bugs in encoders which sometimes cannot be detected automatically.
Definition: avcodec.h:1597
int avcodec_default_get_buffer(AVCodecContext *s, AVFrame *pic)
Definition: utils.c:497
int64_t cur_frame_offset[AV_PARSER_PTS_NB]
Definition: avcodec.h:4442
mpeg1, jpeg, h263
Definition: avcodec.h:578
AVCodec * av_codec_next(AVCodec *c)
If c is NULL, returns the first registered codec, if c is non-NULL, returns the next registered codec...
Definition: utils.c:86
enum AVDiscard skip_loop_filter
Definition: avcodec.h:2607
int thread_safe_callbacks
Set by the client if its custom get_buffer() callback can be called from another thread, which allows faster multithreaded decoding.
Definition: avcodec.h:3126
static const uint8_t color[]
Definition: log.c:44
also ITU-R BT601-6 525 / ITU-R BT1358 525 / ITU-R BT1700 NTSC / functionally identical to above ...
Definition: avcodec.h:558
int trellis
trellis RD quantization
Definition: avcodec.h:2690
AVColorTransferCharacteristic
Definition: avcodec.h:544
Not part of ABI.
Definition: avcodec.h:583
CodecID
Identify the syntax and semantics of the bitstream.
Definition: avcodec.h:83
int slices
Number of slices.
Definition: avcodec.h:3064
int16_t position[3][2]
position of the top left corner in 1/16 pel for up to 3 fields/frames
Definition: avcodec.h:856
void * priv_data
Definition: avcodec.h:1531
void av_register_bitstream_filter(AVBitStreamFilter *bsf)
int cutoff
Audio cutoff bandwidth (0 means "automatic")
Definition: avcodec.h:2741
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:3246
unsigned int avcodec_pix_fmt_to_codec_tag(enum PixelFormat 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:150
int64_t frame_offset
Definition: avcodec.h:4416
int quantizer_noise_shaping
quantizer noise shaping
Definition: avcodec.h:2384
pixel format definitions
int dia_size
ME diamond size & shape.
Definition: avcodec.h:2089
int b_sensitivity
Adjust sensitivity of b_frame_strategy 1.
Definition: avcodec.h:2763
int(* execute)(struct AVCodecContext *c, int(*func)(struct AVCodecContext *c2, void *arg), void *arg2, int *ret, int count, int size)
The codec may call this to execute several independent things.
Definition: avcodec.h:2403
int top_field_first
If the content is interlaced, is top field displayed first.
Definition: avcodec.h:1174
void * av_fast_realloc(void *ptr, unsigned int *size, size_t min_size)
Reallocate the given block if it is not large enough, otherwise do nothing.
Definition: utils.c:55
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:2974
int channels
number of audio channels
Definition: avcodec.h:1457
const char * avcodec_configuration(void)
Return the libavcodec build-time configuration.
Definition: utils.c:1555
int error_rate
Simulates errors in the bitstream to test error concealment.
Definition: avcodec.h:2364
const int * supported_samplerates
array of supported audio samplerates, or NULL if unknown, array is terminated by 0 ...
Definition: avcodec.h:3222
char * ass
0 terminated ASS/SSA compatible event line.
Definition: avcodec.h:3437
int key_frame
1 -> keyframe, 0-> not
Definition: avcodec.h:1022
uint8_t * mbskip_table
mbskip_table[mb]>=1 if MB didn't change stride= mb_width = (width+15)>>4
Definition: avcodec.h:1095
int mv0_threshold
Note: Value depends upon the compare function used for fullpel ME.
Definition: avcodec.h:2756
Free mutex resources.
Definition: avcodec.h:4724
int flags2
CODEC_FLAG2_*.
Definition: avcodec.h:2357
int64_t dts
Decompression timestamp in AVStream->time_base units; the time at which the packet is decompressed...
Definition: avcodec.h:907
int * slice_offset
slice offsets in the frame in bytes
Definition: avcodec.h:1948
int frame_number
audio or video frame number
Definition: avcodec.h:1471
int repeat_pict
This field is used for proper frame duration computation in lavf.
Definition: avcodec.h:4431
int height
Definition: avcodec.h:1299
int max_prediction_order
Definition: avcodec.h:2782
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:110
static int op(uint8_t **dst, const uint8_t *dst_end, const uint8_t **buf, const uint8_t *buf_end, int pixel, int count, int *x, int width, int linesize)
Perform decode operation.
Definition: anm.c:74
enum AVFieldOrder field_order
Field order.
Definition: avcodec.h:3173
void avcodec_get_frame_defaults(AVFrame *pic)
Set the fields of the given AVFrame to default values.
Definition: utils.c:609
enum AVPacketSideDataType type
Definition: avcodec.h:922
enum AVSampleFormat * sample_fmts
array of supported sample formats, or NULL if unknown, array is terminated by -1
Definition: avcodec.h:3223
discard all frames except keyframes
Definition: avcodec.h:529
int me_method
Motion estimation algorithm used for video coding.
Definition: avcodec.h:1374
hexagon based search
Definition: avcodec.h:516
int debug_mv
debug
Definition: avcodec.h:2031
int stream_index
Definition: avcodec.h:910
int(* decode_slice)(AVCodecContext *avctx, const uint8_t *buf, uint32_t buf_size)
Callback for each slice.
Definition: avcodec.h:3340
int rc_min_rate
minimum bitrate
Definition: avcodec.h:1823
void av_log_missing_feature(void *avc, const char *feature, int want_sample)
Log a generic warning message about a missing feature.
Definition: utils.c:1714
int(* init)(AVCodecContext *)
Definition: avcodec.h:3200
enum AVSubtitleType type
Definition: avcodec.h:3428
uint8_t ** extended_data
pointers to the data planes/channels.
Definition: avcodec.h:1285
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:241
int av_picture_pad(AVPicture *dst, const AVPicture *src, int height, int width, enum PixelFormat pix_fmt, int padtop, int padbottom, int padleft, int padright, int *color)
Pad image.
Definition: imgconvert.c:806
int(* end_frame)(AVCodecContext *avctx)
Called at the end of each frame or field picture.
Definition: avcodec.h:3351
uint64_t request_channel_layout
Request decoder to use this channel layout if it can (0 for default)
Definition: avcodec.h:2877
int avpicture_layout(const AVPicture *src, enum PixelFormat pix_fmt, int width, int height, unsigned char *dest, int dest_size)
Copy pixel data from an AVPicture into a buffer.
Definition: imgconvert.c:443
int me_pre_cmp
motion estimation prepass comparison function
Definition: avcodec.h:2110
int(* encode2)(AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame, int *got_packet_ptr)
Encode data to an AVPacket.
Definition: avcodec.h:3269
int key_frame
Set by parser to 1 for key frames and 0 for non-key frames.
Definition: avcodec.h:4461
struct AVProfile AVProfile
AVProfile.
int delay
Number of frames the decoded output will be delayed relative to the encoded input.
Definition: avcodec.h:1479
int me_subpel_quality
subpel ME quality
Definition: avcodec.h:2124
int nb_samples
number of audio samples (per channel) described by this frame
Definition: avcodec.h:1265
int strict_std_compliance
strictly follow the standard (MPEG4, ...).
Definition: avcodec.h:1642
int dts_sync_point
Synchronization point for start of timestamp generation.
Definition: avcodec.h:4492
int inter_threshold
Definition: avcodec.h:2350
int64_t pts
Presentation timestamp in AVStream->time_base units; the time at which the decompressed packet will b...
Definition: avcodec.h:901
void * opaque
Private data of the user, can be used to carry app specific stuff.
Definition: avcodec.h:1571
int avcodec_decode_subtitle2(AVCodecContext *avctx, AVSubtitle *sub, int *got_sub_ptr, AVPacket *avpkt)
Decode a subtitle message.
Definition: utils.c:1251
Not part of ABI.
Definition: avcodec.h:610
int avcodec_encode_subtitle(AVCodecContext *avctx, uint8_t *buf, int buf_size, const AVSubtitle *sub)
Definition: utils.c:1080
int thread_type
Which multithreading methods to use.
Definition: avcodec.h:3107
struct RcOverride RcOverride
preferred ID for decoding MPEG audio layer 1, 2 or 3
Definition: avcodec.h:336
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:1406
int luma_elim_threshold
luma single coefficient elimination threshold
Definition: avcodec.h:1621
enum CodecID codec_id
Definition: avcodec.h:1575
uint8_t * subtitle_header
Header containing style information for text subtitles.
Definition: avcodec.h:3074
int keyint_min
minimum GOP size
Definition: avcodec.h:2660