Libav
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 
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"
36 #include "libavutil/dict.h"
37 #include "libavutil/frame.h"
38 #include "libavutil/log.h"
39 #include "libavutil/pixfmt.h"
40 #include "libavutil/rational.h"
41 
42 #include "version.h"
43 
44 #if FF_API_FAST_MALLOC
45 // to provide fast_*alloc
46 #include "libavutil/mem.h"
47 #endif
48 
193 enum AVCodecID {
195 
196  /* video codecs */
199 #if FF_API_XVMC
200  AV_CODEC_ID_MPEG2VIDEO_XVMC,
201 #endif /* FF_API_XVMC */
395 
396  /* various PCM "codecs" */
429 
430  /* various ADPCM codecs */
462 
463  /* AMR */
466 
467  /* RealAudio codecs*/
470 
471  /* various DPCM codecs */
476 
477  /* audio codecs */
478  AV_CODEC_ID_MP2 = 0x15000,
508  AV_CODEC_ID_GSM_MS, /* as found in WAV */
510 #if FF_API_VOXWARE
512 #endif
548 
549  /* subtitle codecs */
560 
561  /* other specific kind of codecs (generally used for attachments) */
563  AV_CODEC_ID_TTF = 0x18000,
564 
565  AV_CODEC_ID_PROBE = 0x19000,
566 
573 };
574 
580 typedef struct AVCodecDescriptor {
581  enum AVCodecID id;
588  const char *name;
592  const char *long_name;
596  int props;
601  const struct AVProfile *profiles;
603 
608 #define AV_CODEC_PROP_INTRA_ONLY (1 << 0)
609 
614 #define AV_CODEC_PROP_LOSSY (1 << 1)
615 
618 #define AV_CODEC_PROP_LOSSLESS (1 << 2)
619 
628 #define AV_CODEC_PROP_REORDER (1 << 3)
629 
638 #define AV_INPUT_BUFFER_PADDING_SIZE 8
639 
645 #define AV_INPUT_BUFFER_MIN_SIZE 16384
646 
647 #if FF_API_WITHOUT_PREFIX
648 
651 #define FF_INPUT_BUFFER_PADDING_SIZE 8
652 
656 #define FF_MIN_BUFFER_SIZE 16384
657 #endif /* FF_API_WITHOUT_PREFIX */
658 
664 #if FF_API_MOTION_EST
666  ME_ZERO = 1,
675 };
676 #endif
677 
682  /* We leave some space between them for extensions (drop some
683  * keyframes for intra-only or drop just some bidir frames). */
690 };
691 
703 };
704 
708 typedef struct RcOverride{
711  int qscale; // If this is 0 then quality_factor will be used instead.
713 } RcOverride;
714 
715 #if FF_API_MAX_BFRAMES
716 
719 #define FF_MAX_B_FRAMES 16
720 #endif
721 
722 /* encoding support
723  These flags can be passed in AVCodecContext.flags before initialization.
724  Note: Not everything is supported yet.
725 */
726 
731 #define AV_CODEC_FLAG_UNALIGNED (1 << 0)
732 
735 #define AV_CODEC_FLAG_QSCALE (1 << 1)
736 
739 #define AV_CODEC_FLAG_4MV (1 << 2)
740 
743 #define AV_CODEC_FLAG_OUTPUT_CORRUPT (1 << 3)
744 
747 #define AV_CODEC_FLAG_QPEL (1 << 4)
748 
751 #define AV_CODEC_FLAG_PASS1 (1 << 9)
752 
755 #define AV_CODEC_FLAG_PASS2 (1 << 10)
756 
759 #define AV_CODEC_FLAG_LOOP_FILTER (1 << 11)
760 
763 #define AV_CODEC_FLAG_GRAY (1 << 13)
764 
767 #define AV_CODEC_FLAG_PSNR (1 << 15)
768 
772 #define AV_CODEC_FLAG_TRUNCATED (1 << 16)
773 
776 #define AV_CODEC_FLAG_INTERLACED_DCT (1 << 18)
777 
780 #define AV_CODEC_FLAG_LOW_DELAY (1 << 19)
781 
784 #define AV_CODEC_FLAG_GLOBAL_HEADER (1 << 22)
785 
788 #define AV_CODEC_FLAG_BITEXACT (1 << 23)
789 /* Fx : Flag for H.263+ extra options */
793 #define AV_CODEC_FLAG_AC_PRED (1 << 24)
794 
797 #define AV_CODEC_FLAG_INTERLACED_ME (1 << 29)
798 #define AV_CODEC_FLAG_CLOSED_GOP (1 << 31)
799 
803 #define AV_CODEC_FLAG2_FAST (1 << 0)
804 
807 #define AV_CODEC_FLAG2_NO_OUTPUT (1 << 2)
808 
811 #define AV_CODEC_FLAG2_LOCAL_HEADER (1 << 3)
812 
816 #define AV_CODEC_FLAG2_CHUNKS (1 << 15)
817 
820 #define AV_CODEC_FLAG2_IGNORE_CROP (1 << 16)
821 
822 /* Unsupported options :
823  * Syntax Arithmetic coding (SAC)
824  * Reference Picture Selection
825  * Independent Segment Decoding */
826 /* /Fx */
827 /* codec capabilities */
828 
832 #define AV_CODEC_CAP_DRAW_HORIZ_BAND (1 << 0)
833 
838 #define AV_CODEC_CAP_DR1 (1 << 1)
839 #define AV_CODEC_CAP_TRUNCATED (1 << 3)
840 
863 #define AV_CODEC_CAP_DELAY (1 << 5)
864 
868 #define AV_CODEC_CAP_SMALL_LAST_FRAME (1 << 6)
869 
880 #define AV_CODEC_CAP_SUBFRAMES (1 << 8)
881 
885 #define AV_CODEC_CAP_EXPERIMENTAL (1 << 9)
886 
889 #define AV_CODEC_CAP_CHANNEL_CONF (1 << 10)
890 
893 #define AV_CODEC_CAP_FRAME_THREADS (1 << 12)
894 
897 #define AV_CODEC_CAP_SLICE_THREADS (1 << 13)
898 
901 #define AV_CODEC_CAP_PARAM_CHANGE (1 << 14)
902 
905 #define AV_CODEC_CAP_AUTO_THREADS (1 << 15)
906 
909 #define AV_CODEC_CAP_VARIABLE_FRAME_SIZE (1 << 16)
910 
911 #if FF_API_WITHOUT_PREFIX
912 
916 #define CODEC_FLAG_UNALIGNED 0x0001
917 #define CODEC_FLAG_QSCALE 0x0002
918 #define CODEC_FLAG_4MV 0x0004
919 #define CODEC_FLAG_OUTPUT_CORRUPT 0x0008
920 #define CODEC_FLAG_QPEL 0x0010
921 #if FF_API_GMC
922 
925 #define CODEC_FLAG_GMC 0x0020
926 #endif
927 #if FF_API_MV0
928 
932 #define CODEC_FLAG_MV0 0x0040
933 #endif
934 #if FF_API_INPUT_PRESERVED
935 
939 #define CODEC_FLAG_INPUT_PRESERVED 0x0100
940 #endif
941 #define CODEC_FLAG_PASS1 0x0200
942 #define CODEC_FLAG_PASS2 0x0400
943 #define CODEC_FLAG_GRAY 0x2000
944 #if FF_API_EMU_EDGE
945 
949 #define CODEC_FLAG_EMU_EDGE 0x4000
950 #endif
951 #define CODEC_FLAG_PSNR 0x8000
952 #define CODEC_FLAG_TRUNCATED 0x00010000
954 #if FF_API_NORMALIZE_AQP
955 
959 #define CODEC_FLAG_NORMALIZE_AQP 0x00020000
960 #endif
961 #define CODEC_FLAG_INTERLACED_DCT 0x00040000
962 #define CODEC_FLAG_LOW_DELAY 0x00080000
963 #define CODEC_FLAG_GLOBAL_HEADER 0x00400000
964 #define CODEC_FLAG_BITEXACT 0x00800000
965 /* Fx : Flag for H.263+ extra options */
966 #define CODEC_FLAG_AC_PRED 0x01000000
967 #define CODEC_FLAG_LOOP_FILTER 0x00000800
968 #define CODEC_FLAG_INTERLACED_ME 0x20000000
969 #define CODEC_FLAG_CLOSED_GOP 0x80000000
970 #define CODEC_FLAG2_FAST 0x00000001
971 #define CODEC_FLAG2_NO_OUTPUT 0x00000004
972 #define CODEC_FLAG2_LOCAL_HEADER 0x00000008
973 #define CODEC_FLAG2_IGNORE_CROP 0x00010000
974 
975 #define CODEC_FLAG2_CHUNKS 0x00008000
976 
977 /* Unsupported options :
978  * Syntax Arithmetic coding (SAC)
979  * Reference Picture Selection
980  * Independent Segment Decoding */
981 /* /Fx */
982 /* codec capabilities */
983 
984 #define CODEC_CAP_DRAW_HORIZ_BAND 0x0001
985 
990 #define CODEC_CAP_DR1 0x0002
991 #define CODEC_CAP_TRUNCATED 0x0008
992 #if FF_API_XVMC
993 /* Codec can export data for HW decoding (XvMC). */
994 #define CODEC_CAP_HWACCEL 0x0010
995 #endif /* FF_API_XVMC */
996 
1019 #define CODEC_CAP_DELAY 0x0020
1020 
1024 #define CODEC_CAP_SMALL_LAST_FRAME 0x0040
1025 #if FF_API_CAP_VDPAU
1026 
1029 #define CODEC_CAP_HWACCEL_VDPAU 0x0080
1030 #endif
1031 
1042 #define CODEC_CAP_SUBFRAMES 0x0100
1043 
1047 #define CODEC_CAP_EXPERIMENTAL 0x0200
1048 
1051 #define CODEC_CAP_CHANNEL_CONF 0x0400
1052 #if FF_API_NEG_LINESIZES
1053 
1056 #define CODEC_CAP_NEG_LINESIZES 0x0800
1057 #endif
1058 
1061 #define CODEC_CAP_FRAME_THREADS 0x1000
1062 
1065 #define CODEC_CAP_SLICE_THREADS 0x2000
1066 
1069 #define CODEC_CAP_PARAM_CHANGE 0x4000
1070 
1073 #define CODEC_CAP_AUTO_THREADS 0x8000
1074 
1077 #define CODEC_CAP_VARIABLE_FRAME_SIZE 0x10000
1078 #endif /* FF_API_WITHOUT_PREFIX */
1079 
1080 #if FF_API_MB_TYPE
1081 //The following defines may change, don't expect compatibility if you use them.
1082 #define MB_TYPE_INTRA4x4 0x0001
1083 #define MB_TYPE_INTRA16x16 0x0002 //FIXME H.264-specific
1084 #define MB_TYPE_INTRA_PCM 0x0004 //FIXME H.264-specific
1085 #define MB_TYPE_16x16 0x0008
1086 #define MB_TYPE_16x8 0x0010
1087 #define MB_TYPE_8x16 0x0020
1088 #define MB_TYPE_8x8 0x0040
1089 #define MB_TYPE_INTERLACED 0x0080
1090 #define MB_TYPE_DIRECT2 0x0100 //FIXME
1091 #define MB_TYPE_ACPRED 0x0200
1092 #define MB_TYPE_GMC 0x0400
1093 #define MB_TYPE_SKIP 0x0800
1094 #define MB_TYPE_P0L0 0x1000
1095 #define MB_TYPE_P1L0 0x2000
1096 #define MB_TYPE_P0L1 0x4000
1097 #define MB_TYPE_P1L1 0x8000
1098 #define MB_TYPE_L0 (MB_TYPE_P0L0 | MB_TYPE_P1L0)
1099 #define MB_TYPE_L1 (MB_TYPE_P0L1 | MB_TYPE_P1L1)
1100 #define MB_TYPE_L0L1 (MB_TYPE_L0 | MB_TYPE_L1)
1101 #define MB_TYPE_QUANT 0x00010000
1102 #define MB_TYPE_CBP 0x00020000
1103 // Note bits 24-31 are reserved for codec specific use (H.264 ref0, MPEG-1 0mv, ...)
1104 #endif
1105 
1111 typedef struct AVPanScan{
1117  int id;
1118 
1124  int width;
1125  int height;
1126 
1132  int16_t position[3][2];
1133 }AVPanScan;
1134 
1140 typedef struct AVCPBProperties {
1156 
1162 
1170  uint64_t vbv_delay;
1171 } AVCPBProperties;
1172 
1173 #if FF_API_QSCALE_TYPE
1174 #define FF_QSCALE_TYPE_MPEG1 0
1175 #define FF_QSCALE_TYPE_MPEG2 1
1176 #define FF_QSCALE_TYPE_H264 2
1177 #define FF_QSCALE_TYPE_VP56 3
1178 #endif
1179 
1183 #define AV_GET_BUFFER_FLAG_REF (1 << 0)
1184 
1193 
1202 
1219 
1240 
1246 
1255 
1261 
1267 
1274 
1282 
1287 };
1288 
1289 typedef struct AVPacketSideData {
1291  int size;
1294 
1323 typedef struct AVPacket {
1339  int64_t pts;
1345  int64_t dts;
1347  int size;
1352  int flags;
1359 
1364  int64_t duration;
1365 
1366  int64_t pos;
1367 
1368 #if FF_API_CONVERGENCE_DURATION
1369 
1376 #endif
1377 } AVPacket;
1378 #define AV_PKT_FLAG_KEY 0x0001
1379 #define AV_PKT_FLAG_CORRUPT 0x0002
1380 
1386 };
1391 struct AVCodecInternal;
1392 
1396  AV_FIELD_TT, //< Top coded_first, top displayed first
1397  AV_FIELD_BB, //< Bottom coded first, bottom displayed first
1398  AV_FIELD_TB, //< Top coded first, bottom displayed first
1399  AV_FIELD_BT, //< Bottom coded first, top displayed first
1400 };
1401 
1409 typedef struct AVCodecContext {
1416 
1417  enum AVMediaType codec_type; /* see AVMEDIA_TYPE_xxx */
1418  const struct AVCodec *codec;
1419 #if FF_API_CODEC_NAME
1420 
1424  char codec_name[32];
1425 #endif
1426  enum AVCodecID codec_id; /* see AV_CODEC_ID_xxx */
1427 
1441  unsigned int codec_tag;
1442 
1443 #if FF_API_STREAM_CODEC_TAG
1444 
1448  unsigned int stream_codec_tag;
1449 #endif
1450 
1451  void *priv_data;
1452 
1459  struct AVCodecInternal *internal;
1460 
1466  void *opaque;
1467 
1474 
1482 
1490 
1496 #define FF_COMPRESSION_DEFAULT -1
1497 
1503  int flags;
1504 
1510  int flags2;
1511 
1525 
1536 
1545 
1563  int delay;
1564 
1565 
1566  /* video only */
1581 
1595  int coded_width, coded_height;
1596 
1597 #if FF_API_ASPECT_EXTENDED
1598 #define FF_ASPECT_EXTENDED 15
1599 #endif
1600 
1607 
1622 
1623 #if FF_API_MOTION_EST
1624 
1629 #endif
1630 
1654  void (*draw_horiz_band)(struct AVCodecContext *s,
1655  const AVFrame *src, int offset[AV_NUM_DATA_POINTERS],
1656  int y, int type, int height);
1657 
1671  enum AVPixelFormat (*get_format)(struct AVCodecContext *s, const enum AVPixelFormat * fmt);
1672 
1680 
1689 
1690 #if FF_API_RC_STRATEGY
1691 
1693 #define FF_RC_STRATEGY_XVID 1
1694 #endif
1695 
1696 #if FF_API_PRIVATE_OPT
1697 
1700 #endif
1701 
1708 
1716 
1717 #if FF_API_PRIVATE_OPT
1718 
1721 #endif
1722 
1731 
1738 
1745 
1752 
1759 
1765  float p_masking;
1766 
1773 
1780 
1781 #if FF_API_PRIVATE_OPT
1782 
1785 #define FF_PRED_LEFT 0
1786 #define FF_PRED_PLANE 1
1787 #define FF_PRED_MEDIAN 2
1788 #endif
1789 
1796 
1805 
1811  int me_cmp;
1823  int mb_cmp;
1830 #define FF_CMP_SAD 0
1831 #define FF_CMP_SSE 1
1832 #define FF_CMP_SATD 2
1833 #define FF_CMP_DCT 3
1834 #define FF_CMP_PSNR 4
1835 #define FF_CMP_BIT 5
1836 #define FF_CMP_RD 6
1837 #define FF_CMP_ZERO 7
1838 #define FF_CMP_VSAD 8
1839 #define FF_CMP_VSSE 9
1840 #define FF_CMP_NSSE 10
1841 #define FF_CMP_DCTMAX 13
1842 #define FF_CMP_DCT264 14
1843 #define FF_CMP_CHROMA 256
1844 
1851 
1858 
1859 #if FF_API_PRIVATE_OPT
1860 
1862  int pre_me;
1863 #endif
1864 
1871 
1878 
1885 
1886 #if FF_API_AFD
1887 
1897 #define FF_DTG_AFD_SAME 8
1898 #define FF_DTG_AFD_4_3 9
1899 #define FF_DTG_AFD_16_9 10
1900 #define FF_DTG_AFD_14_9 11
1901 #define FF_DTG_AFD_4_3_SP_14_9 13
1902 #define FF_DTG_AFD_16_9_SP_14_9 14
1903 #define FF_DTG_AFD_SP_4_3 15
1904 #endif /* FF_API_AFD */
1905 
1914 
1915 #if FF_API_QUANT_BIAS
1916 
1920 #define FF_DEFAULT_QUANT_BIAS 999999
1921 
1926 #endif
1927 
1934 #define SLICE_FLAG_CODED_ORDER 0x0001
1935 #define SLICE_FLAG_ALLOW_FIELD 0x0002
1936 #define SLICE_FLAG_ALLOW_PLANE 0x0004
1937 
1938 #if FF_API_XVMC
1939 
1945  attribute_deprecated int xvmc_acceleration;
1946 #endif /* FF_API_XVMC */
1947 
1954 #define FF_MB_DECISION_SIMPLE 0
1955 #define FF_MB_DECISION_BITS 1
1956 #define FF_MB_DECISION_RD 2
1957 
1958 
1963  uint16_t *intra_matrix;
1964 
1970  uint16_t *inter_matrix;
1971 
1972 #if FF_API_PRIVATE_OPT
1973 
1976 
1980 #endif
1981 
1982 #if FF_API_MPV_OPT
1983 
1988 
1994 #endif
1995 
2002 
2009 
2016 
2017 #if FF_API_MPV_OPT
2018 
2023 #endif
2024 
2030  int mb_lmin;
2031 
2037  int mb_lmax;
2038 
2039 #if FF_API_PRIVATE_OPT
2040 
2045 #endif
2046 
2052 
2053 #if FF_API_PRIVATE_OPT
2054 
2057 #endif
2058 
2065 
2071  int refs;
2072 
2073 #if FF_API_PRIVATE_OPT
2074 
2077 #endif
2078 
2079 #if FF_API_UNUSED_MEMBERS
2080 
2086 #endif
2087 
2094 
2095 #if FF_API_PRIVATE_OPT
2096 
2099 #endif
2100 
2107 
2114 
2121 
2128 
2135 
2143  int slices;
2144 
2150 
2151  /* audio only */
2153  int channels;
2154 
2161 
2162  /* The following data should not be initialized. */
2173 
2184 
2190 
2196  int cutoff;
2197 
2203  uint64_t channel_layout;
2204 
2211 
2218 
2225 
2304  int (*get_buffer2)(struct AVCodecContext *s, AVFrame *frame, int flags);
2305 
2320 
2321  /* - encoding parameters */
2322  float qcompress;
2323  float qblur;
2324 
2330  int qmin;
2331 
2337  int qmax;
2338 
2345 
2346 #if FF_API_MPV_OPT
2347 
2351  float rc_qsquish;
2352 
2357 #endif
2358 
2365 
2373 
2374 #if FF_API_MPV_OPT
2375 
2379  const char *rc_eq;
2380 #endif
2381 
2388 
2395 
2396 #if FF_API_MPV_OPT
2397 
2402 
2405 #endif
2406 
2413 
2420 
2427 
2428 #if FF_API_CODER_TYPE
2429 #define FF_CODER_TYPE_VLC 0
2430 #define FF_CODER_TYPE_AC 1
2431 #define FF_CODER_TYPE_RAW 2
2432 #define FF_CODER_TYPE_RLE 3
2433 #if FF_API_UNUSED_MEMBERS
2434 #define FF_CODER_TYPE_DEFLATE 4
2435 #endif /* FF_API_UNUSED_MEMBERS */
2436 
2441 #endif /* FF_API_CODER_TYPE */
2442 
2443 #if FF_API_PRIVATE_OPT
2444 
2447 #endif
2448 
2449 #if FF_API_MPV_OPT
2450 
2454  int lmin;
2455 
2460  int lmax;
2461 #endif
2462 
2463 #if FF_API_PRIVATE_OPT
2464 
2467 
2471 
2475 
2479 #endif /* FF_API_PRIVATE_OPT */
2480 
2486  int trellis;
2487 
2488 #if FF_API_PRIVATE_OPT
2489 
2492 
2496 
2500 #endif
2501 
2502 #if FF_API_RTP_CALLBACK
2503 
2506  /* The RTP callback: This function is called */
2507  /* every time the encoder has a packet to send. */
2508  /* It depends on the encoder if the data starts */
2509  /* with a Start Code (it should). H.263 does. */
2510  /* mb_nb contains the number of macroblocks */
2511  /* encoded in the RTP payload. */
2513  void (*rtp_callback)(struct AVCodecContext *avctx, void *data, int size, int mb_nb);
2514 #endif
2515 
2516 #if FF_API_PRIVATE_OPT
2517 
2519  int rtp_payload_size; /* The size of the RTP payload: the coder will */
2520  /* do its best to deliver a chunk with size */
2521  /* below rtp_payload_size, the chunk will start */
2522  /* with a start code on some codecs like H.263. */
2523  /* This doesn't take account of any particular */
2524  /* headers inside the transmitted RTP payload. */
2525 #endif
2526 
2527 #if FF_API_STAT_BITS
2528  /* statistics, used for 2-pass encoding */
2530  int mv_bits;
2538  int i_count;
2540  int p_count;
2545 
2549 #endif
2550 
2556  char *stats_out;
2557 
2564  char *stats_in;
2565 
2572 #define FF_BUG_AUTODETECT 1
2573 #if FF_API_OLD_MSMPEG4
2574 #define FF_BUG_OLD_MSMPEG4 2
2575 #endif
2576 #define FF_BUG_XVID_ILACE 4
2577 #define FF_BUG_UMP4 8
2578 #define FF_BUG_NO_PADDING 16
2579 #define FF_BUG_AMV 32
2580 #if FF_API_AC_VLC
2581 #define FF_BUG_AC_VLC 0
2582 #endif
2583 #define FF_BUG_QPEL_CHROMA 64
2584 #define FF_BUG_STD_QPEL 128
2585 #define FF_BUG_QPEL_CHROMA2 256
2586 #define FF_BUG_DIRECT_BLOCKSIZE 512
2587 #define FF_BUG_EDGE 1024
2588 #define FF_BUG_HPEL_CHROMA 2048
2589 #define FF_BUG_DC_CLIP 4096
2590 #define FF_BUG_MS 8192
2591 #define FF_BUG_TRUNCATED 16384
2592 
2606 #define FF_COMPLIANCE_VERY_STRICT 2
2607 #define FF_COMPLIANCE_STRICT 1
2608 #define FF_COMPLIANCE_NORMAL 0
2609 #define FF_COMPLIANCE_UNOFFICIAL -1
2610 #define FF_COMPLIANCE_EXPERIMENTAL -2
2611 
2612 
2618 #define FF_EC_GUESS_MVS 1
2619 #define FF_EC_DEBLOCK 2
2620 
2626  int debug;
2627 #define FF_DEBUG_PICT_INFO 1
2628 #define FF_DEBUG_RC 2
2629 #define FF_DEBUG_BITSTREAM 4
2630 #define FF_DEBUG_MB_TYPE 8
2631 #define FF_DEBUG_QP 16
2632 #if FF_API_DEBUG_MV
2633 
2636 #define FF_DEBUG_MV 32
2637 #endif
2638 #define FF_DEBUG_DCT_COEFF 0x00000040
2639 #define FF_DEBUG_SKIP 0x00000080
2640 #define FF_DEBUG_STARTCODE 0x00000100
2641 #if FF_API_UNUSED_MEMBERS
2642 #define FF_DEBUG_PTS 0x00000200
2643 #endif /* FF_API_UNUSED_MEMBERS */
2644 #define FF_DEBUG_ER 0x00000400
2645 #define FF_DEBUG_MMCO 0x00000800
2646 #define FF_DEBUG_BUGS 0x00001000
2647 #if FF_API_DEBUG_MV
2648 #define FF_DEBUG_VIS_QP 0x00002000
2649 #define FF_DEBUG_VIS_MB_TYPE 0x00004000
2650 #endif
2651 #define FF_DEBUG_BUFFERS 0x00008000
2652 #define FF_DEBUG_THREADS 0x00010000
2653 
2654 #if FF_API_DEBUG_MV
2655 
2660 #define FF_DEBUG_VIS_MV_P_FOR 0x00000001 // visualize forward predicted MVs of P-frames
2661 #define FF_DEBUG_VIS_MV_B_FOR 0x00000002 // visualize forward predicted MVs of B-frames
2662 #define FF_DEBUG_VIS_MV_B_BACK 0x00000004 // visualize backward predicted MVs of B-frames
2663 #endif
2664 
2671 
2678 #define AV_EF_CRCCHECK (1<<0)
2679 #define AV_EF_BITSTREAM (1<<1)
2680 #define AV_EF_BUFFER (1<<2)
2681 #define AV_EF_EXPLODE (1<<3)
2682 
2690 
2697 
2709 
2715  uint64_t error[AV_NUM_DATA_POINTERS];
2716 
2723 #define FF_DCT_AUTO 0
2724 #define FF_DCT_FASTINT 1
2725 #define FF_DCT_INT 2
2726 #define FF_DCT_MMX 3
2727 #define FF_DCT_ALTIVEC 5
2728 #define FF_DCT_FAAN 6
2729 
2736 #define FF_IDCT_AUTO 0
2737 #define FF_IDCT_INT 1
2738 #define FF_IDCT_SIMPLE 2
2739 #define FF_IDCT_SIMPLEMMX 3
2740 #define FF_IDCT_ARM 7
2741 #define FF_IDCT_ALTIVEC 8
2742 #if FF_API_ARCH_SH4
2743 #define FF_IDCT_SH4 9
2744 #endif
2745 #define FF_IDCT_SIMPLEARM 10
2746 #if FF_API_UNUSED_MEMBERS
2747 #define FF_IDCT_IPP 13
2748 #endif /* FF_API_UNUSED_MEMBERS */
2749 #define FF_IDCT_XVID 14
2750 #if FF_API_IDCT_XVIDMMX
2751 #define FF_IDCT_XVIDMMX 14
2752 #endif /* FF_API_IDCT_XVIDMMX */
2753 #define FF_IDCT_SIMPLEARMV5TE 16
2754 #define FF_IDCT_SIMPLEARMV6 17
2755 #if FF_API_ARCH_SPARC
2756 #define FF_IDCT_SIMPLEVIS 18
2757 #endif
2758 #define FF_IDCT_FAAN 20
2759 #define FF_IDCT_SIMPLENEON 22
2760 #if FF_API_ARCH_ALPHA
2761 #define FF_IDCT_SIMPLEALPHA 23
2762 #endif
2763 
2770 
2777 
2778 #if FF_API_LOWRES
2779 
2787 #endif
2788 
2789 #if FF_API_CODED_FRAME
2790 
2798 #endif
2799 
2807 
2817 #define FF_THREAD_FRAME 1
2818 #define FF_THREAD_SLICE 2
2819 
2820 
2826 
2836 
2846  int (*execute)(struct AVCodecContext *c, int (*func)(struct AVCodecContext *c2, void *arg), void *arg2, int *ret, int count, int size);
2847 
2866  int (*execute2)(struct AVCodecContext *c, int (*func)(struct AVCodecContext *c2, void *arg, int jobnr, int threadnr), void *arg2, int *ret, int count);
2867 
2874 
2880  int profile;
2881 #define FF_PROFILE_UNKNOWN -99
2882 #define FF_PROFILE_RESERVED -100
2883 
2884 #define FF_PROFILE_AAC_MAIN 0
2885 #define FF_PROFILE_AAC_LOW 1
2886 #define FF_PROFILE_AAC_SSR 2
2887 #define FF_PROFILE_AAC_LTP 3
2888 #define FF_PROFILE_AAC_HE 4
2889 #define FF_PROFILE_AAC_HE_V2 28
2890 #define FF_PROFILE_AAC_LD 22
2891 #define FF_PROFILE_AAC_ELD 38
2892 #define FF_PROFILE_MPEG2_AAC_LOW 128
2893 #define FF_PROFILE_MPEG2_AAC_HE 131
2894 
2895 #define FF_PROFILE_DTS 20
2896 #define FF_PROFILE_DTS_ES 30
2897 #define FF_PROFILE_DTS_96_24 40
2898 #define FF_PROFILE_DTS_HD_HRA 50
2899 #define FF_PROFILE_DTS_HD_MA 60
2900 #define FF_PROFILE_DTS_EXPRESS 70
2901 
2902 #define FF_PROFILE_MPEG2_422 0
2903 #define FF_PROFILE_MPEG2_HIGH 1
2904 #define FF_PROFILE_MPEG2_SS 2
2905 #define FF_PROFILE_MPEG2_SNR_SCALABLE 3
2906 #define FF_PROFILE_MPEG2_MAIN 4
2907 #define FF_PROFILE_MPEG2_SIMPLE 5
2908 
2909 #define FF_PROFILE_H264_CONSTRAINED (1<<9) // 8+1; constraint_set1_flag
2910 #define FF_PROFILE_H264_INTRA (1<<11) // 8+3; constraint_set3_flag
2911 
2912 #define FF_PROFILE_H264_BASELINE 66
2913 #define FF_PROFILE_H264_CONSTRAINED_BASELINE (66|FF_PROFILE_H264_CONSTRAINED)
2914 #define FF_PROFILE_H264_MAIN 77
2915 #define FF_PROFILE_H264_EXTENDED 88
2916 #define FF_PROFILE_H264_HIGH 100
2917 #define FF_PROFILE_H264_HIGH_10 110
2918 #define FF_PROFILE_H264_HIGH_10_INTRA (110|FF_PROFILE_H264_INTRA)
2919 #define FF_PROFILE_H264_MULTIVIEW_HIGH 118
2920 #define FF_PROFILE_H264_HIGH_422 122
2921 #define FF_PROFILE_H264_HIGH_422_INTRA (122|FF_PROFILE_H264_INTRA)
2922 #define FF_PROFILE_H264_STEREO_HIGH 128
2923 #define FF_PROFILE_H264_HIGH_444 144
2924 #define FF_PROFILE_H264_HIGH_444_PREDICTIVE 244
2925 #define FF_PROFILE_H264_HIGH_444_INTRA (244|FF_PROFILE_H264_INTRA)
2926 #define FF_PROFILE_H264_CAVLC_444 44
2927 
2928 #define FF_PROFILE_VC1_SIMPLE 0
2929 #define FF_PROFILE_VC1_MAIN 1
2930 #define FF_PROFILE_VC1_COMPLEX 2
2931 #define FF_PROFILE_VC1_ADVANCED 3
2932 
2933 #define FF_PROFILE_MPEG4_SIMPLE 0
2934 #define FF_PROFILE_MPEG4_SIMPLE_SCALABLE 1
2935 #define FF_PROFILE_MPEG4_CORE 2
2936 #define FF_PROFILE_MPEG4_MAIN 3
2937 #define FF_PROFILE_MPEG4_N_BIT 4
2938 #define FF_PROFILE_MPEG4_SCALABLE_TEXTURE 5
2939 #define FF_PROFILE_MPEG4_SIMPLE_FACE_ANIMATION 6
2940 #define FF_PROFILE_MPEG4_BASIC_ANIMATED_TEXTURE 7
2941 #define FF_PROFILE_MPEG4_HYBRID 8
2942 #define FF_PROFILE_MPEG4_ADVANCED_REAL_TIME 9
2943 #define FF_PROFILE_MPEG4_CORE_SCALABLE 10
2944 #define FF_PROFILE_MPEG4_ADVANCED_CODING 11
2945 #define FF_PROFILE_MPEG4_ADVANCED_CORE 12
2946 #define FF_PROFILE_MPEG4_ADVANCED_SCALABLE_TEXTURE 13
2947 #define FF_PROFILE_MPEG4_SIMPLE_STUDIO 14
2948 #define FF_PROFILE_MPEG4_ADVANCED_SIMPLE 15
2949 
2950 #define FF_PROFILE_JPEG2000_CSTREAM_RESTRICTION_0 1
2951 #define FF_PROFILE_JPEG2000_CSTREAM_RESTRICTION_1 2
2952 #define FF_PROFILE_JPEG2000_CSTREAM_NO_RESTRICTION 32768
2953 #define FF_PROFILE_JPEG2000_DCINEMA_2K 3
2954 #define FF_PROFILE_JPEG2000_DCINEMA_4K 4
2955 
2956 #define FF_PROFILE_VP9_0 0
2957 #define FF_PROFILE_VP9_1 1
2958 #define FF_PROFILE_VP9_2 2
2959 #define FF_PROFILE_VP9_3 3
2960 
2961 #define FF_PROFILE_HEVC_MAIN 1
2962 #define FF_PROFILE_HEVC_MAIN_10 2
2963 #define FF_PROFILE_HEVC_MAIN_STILL_PICTURE 3
2964 
2970  int level;
2971 #define FF_LEVEL_UNKNOWN -99
2972 
2978 
2984 
2990 
3001 
3002 #if FF_API_ERROR_RATE
3003 
3009 #endif
3010 
3011 #if FF_API_VBV_DELAY
3012 
3021  uint64_t vbv_delay;
3022 #endif
3023 
3024 #if FF_API_SIDEDATA_ONLY_PKT
3025 
3037 #endif
3038 
3055 
3056  /*
3057  * - decoding: For codecs that store a framerate value in the compressed
3058  * bitstream, the decoder may export it here. { 0, 1} when
3059  * unknown.
3060  * - encoding: May be used to signal the framerate of CFR content to an
3061  * encoder.
3062  */
3064 
3071 
3080 
3103 } AVCodecContext;
3104 
3108 typedef struct AVProfile {
3109  int profile;
3110  const char *name;
3111 } AVProfile;
3112 
3113 typedef struct AVCodecDefault AVCodecDefault;
3114 
3115 struct AVSubtitle;
3116 
3120 typedef struct AVCodec {
3127  const char *name;
3132  const char *long_name;
3141  const enum AVPixelFormat *pix_fmts;
3144  const uint64_t *channel_layouts;
3145 #if FF_API_LOWRES
3147 #endif
3150 
3151  /*****************************************************************
3152  * No fields below this line are part of the public API. They
3153  * may not be used outside of libavcodec and can be changed and
3154  * removed at will.
3155  * New public fields should be added right above.
3156  *****************************************************************
3157  */
3159  struct AVCodec *next;
3184 
3188  void (*init_static_data)(struct AVCodec *codec);
3189 
3191  int (*encode_sub)(AVCodecContext *, uint8_t *buf, int buf_size,
3192  const struct AVSubtitle *sub);
3203  int (*encode2)(AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame,
3204  int *got_packet_ptr);
3205  int (*decode)(AVCodecContext *, void *outdata, int *outdata_size, AVPacket *avpkt);
3206  int (*close)(AVCodecContext *);
3218  int (*send_frame)(AVCodecContext *avctx, const AVFrame *frame);
3219  int (*send_packet)(AVCodecContext *avctx, const AVPacket *avpkt);
3220  int (*receive_frame)(AVCodecContext *avctx, AVFrame *frame);
3221  int (*receive_packet)(AVCodecContext *avctx, AVPacket *avpkt);
3232 } AVCodec;
3233 
3238 typedef struct AVHWAccel {
3244  const char *name;
3245 
3252 
3259 
3266 
3272 
3273  /*****************************************************************
3274  * No fields below this line are part of the public API. They
3275  * may not be used outside of libavcodec and can be changed and
3276  * removed at will.
3277  * New public fields should be added right above.
3278  *****************************************************************
3279  */
3280  struct AVHWAccel *next;
3281 
3285  int (*alloc_frame)(AVCodecContext *avctx, AVFrame *frame);
3286 
3301  int (*start_frame)(AVCodecContext *avctx, const uint8_t *buf, uint32_t buf_size);
3302 
3314  int (*decode_slice)(AVCodecContext *avctx, const uint8_t *buf, uint32_t buf_size);
3315 
3325  int (*end_frame)(AVCodecContext *avctx);
3326 
3335 
3343  int (*init)(AVCodecContext *avctx);
3344 
3351  int (*uninit)(AVCodecContext *avctx);
3352 
3358 } AVHWAccel;
3359 
3365 #define AV_HWACCEL_FLAG_IGNORE_LEVEL (1 << 0)
3366 
3371 #define AV_HWACCEL_FLAG_ALLOW_HIGH_DEPTH (1 << 1)
3372 
3377 #if FF_API_AVPICTURE
3378 
3390 typedef struct AVPicture {
3394  int linesize[AV_NUM_DATA_POINTERS];
3395 } AVPicture;
3396 
3400 #endif
3401 
3402 #define AVPALETTE_SIZE 1024
3403 #define AVPALETTE_COUNT 256
3404 
3407 
3409 
3415 
3421 };
3422 
3423 #define AV_SUBTITLE_FLAG_FORCED 0x00000001
3424 
3425 typedef struct AVSubtitleRect {
3426  int x;
3427  int y;
3428  int w;
3429  int h;
3431 
3432 #if FF_API_AVPICTURE
3433 
3438 #endif
3439 
3444  int linesize[4];
3445 
3447 
3448  char *text;
3449 
3455  char *ass;
3456  int flags;
3457 } AVSubtitleRect;
3458 
3459 typedef struct AVSubtitle {
3460  uint16_t format; /* 0 = graphics */
3461  uint32_t start_display_time; /* relative to packet pts, in ms */
3462  uint32_t end_display_time; /* relative to packet pts, in ms */
3463  unsigned num_rects;
3465  int64_t pts;
3466 } AVSubtitle;
3467 
3475 typedef struct AVCodecParameters {
3487  uint32_t codec_tag;
3488 
3502 
3507  int format;
3508 
3513 
3515 
3519  int profile;
3520  int level;
3521 
3525  int width;
3526  int height;
3527 
3536 
3540  enum AVFieldOrder field_order;
3541 
3545  enum AVColorRange color_range;
3546  enum AVColorPrimaries color_primaries;
3548  enum AVColorSpace color_space;
3549  enum AVChromaLocation chroma_location;
3550 
3556  uint64_t channel_layout;
3572 
3588 
3594 AVCodec *av_codec_next(const AVCodec *c);
3595 
3599 unsigned avcodec_version(void);
3600 
3604 const char *avcodec_configuration(void);
3605 
3609 const char *avcodec_license(void);
3610 
3619 void avcodec_register(AVCodec *codec);
3620 
3631 void avcodec_register_all(void);
3632 
3647 
3652 void avcodec_free_context(AVCodecContext **avctx);
3653 
3654 #if FF_API_GET_CONTEXT_DEFAULTS
3655 
3661 #endif
3662 
3669 const AVClass *avcodec_get_class(void);
3670 
3671 #if FF_API_COPY_CONTEXT
3672 
3691 #endif
3692 
3699 
3705 
3713 
3722  const AVCodecContext *codec);
3723 
3733  const AVCodecParameters *par);
3734 
3773 int avcodec_open2(AVCodecContext *avctx, const AVCodec *codec, AVDictionary **options);
3774 
3788 int avcodec_close(AVCodecContext *avctx);
3789 
3795 void avsubtitle_free(AVSubtitle *sub);
3796 
3817 AVPacket *av_packet_alloc(void);
3818 
3830 
3838 void av_packet_free(AVPacket **pkt);
3839 
3848 void av_init_packet(AVPacket *pkt);
3849 
3858 int av_new_packet(AVPacket *pkt, int size);
3859 
3866 void av_shrink_packet(AVPacket *pkt, int size);
3867 
3874 int av_grow_packet(AVPacket *pkt, int grow_by);
3875 
3889 int av_packet_from_data(AVPacket *pkt, uint8_t *data, int size);
3890 
3891 #if FF_API_AVPACKET_OLD_API
3892 
3899 int av_dup_packet(AVPacket *pkt);
3908 void av_free_packet(AVPacket *pkt);
3909 #endif
3910 
3919  int size);
3920 
3935  uint8_t *data, size_t size);
3936 
3946  int size);
3947 
3957  int *size);
3958 
3966 
3983 int av_packet_ref(AVPacket *dst, AVPacket *src);
3984 
3993 void av_packet_unref(AVPacket *pkt);
3994 
4004 
4016 int av_packet_copy_props(AVPacket *dst, const AVPacket *src);
4017 
4029 void av_packet_rescale_ts(AVPacket *pkt, AVRational tb_src, AVRational tb_dst);
4030 
4047 
4055 
4062 
4063 #if FF_API_EMU_EDGE
4064 
4075 unsigned avcodec_get_edge_width(void);
4076 #endif
4077 
4086 
4095  int linesize_align[AV_NUM_DATA_POINTERS]);
4096 
4151 int avcodec_decode_audio4(AVCodecContext *avctx, AVFrame *frame,
4152  int *got_frame_ptr, AVPacket *avpkt);
4153 
4200 int avcodec_decode_video2(AVCodecContext *avctx, AVFrame *picture,
4201  int *got_picture_ptr,
4202  AVPacket *avpkt);
4203 
4224  int *got_sub_ptr,
4225  AVPacket *avpkt);
4226 
4275 int avcodec_send_packet(AVCodecContext *avctx, const AVPacket *avpkt);
4276 
4295 int avcodec_receive_frame(AVCodecContext *avctx, AVFrame *frame);
4296 
4330 int avcodec_send_frame(AVCodecContext *avctx, const AVFrame *frame);
4331 
4347 int avcodec_receive_packet(AVCodecContext *avctx, AVPacket *avpkt);
4348 
4349 
4357  AV_PICTURE_STRUCTURE_TOP_FIELD, //< coded as top field
4358  AV_PICTURE_STRUCTURE_BOTTOM_FIELD, //< coded as bottom field
4359  AV_PICTURE_STRUCTURE_FRAME, //< coded as frame
4360 };
4361 
4362 typedef struct AVCodecParserContext {
4363  void *priv_data;
4365  int64_t frame_offset; /* offset of the current frame */
4366  int64_t cur_offset; /* current offset
4367  (incremented by each av_parser_parse()) */
4368  int64_t next_frame_offset; /* offset of the next frame */
4369  /* video info */
4370  int pict_type; /* XXX: Put it back in AVCodecContext. */
4380  int repeat_pict; /* XXX: Put it back in AVCodecContext. */
4381  int64_t pts; /* pts of the current frame */
4382  int64_t dts; /* dts of the current frame */
4383 
4384  /* private data */
4385  int64_t last_pts;
4386  int64_t last_dts;
4388 
4389 #define AV_PARSER_PTS_NB 4
4391  int64_t cur_frame_offset[AV_PARSER_PTS_NB];
4392  int64_t cur_frame_pts[AV_PARSER_PTS_NB];
4393  int64_t cur_frame_dts[AV_PARSER_PTS_NB];
4394 
4395  int flags;
4396 #define PARSER_FLAG_COMPLETE_FRAMES 0x0001
4397 #define PARSER_FLAG_ONCE 0x0002
4398 #define PARSER_FLAG_FETCHED_OFFSET 0x0004
4400 
4401  int64_t offset;
4402  int64_t cur_frame_end[AV_PARSER_PTS_NB];
4403 
4411 
4412 #if FF_API_CONVERGENCE_DURATION
4413 
4418 #endif
4419 
4420  // Timestamp generation support:
4431 
4446 
4460 
4466  int64_t cur_frame_pos[AV_PARSER_PTS_NB];
4467 
4471  int64_t pos;
4472 
4476  int64_t last_pos;
4477 
4484 
4485  enum AVFieldOrder field_order;
4486 
4495  enum AVPictureStructure picture_structure;
4496 
4504 
4508  int width;
4509  int height;
4510 
4516 
4525  int format;
4527 
4528 typedef struct AVCodecParser {
4529  int codec_ids[5]; /* several codec IDs are permitted */
4531  int (*parser_init)(AVCodecParserContext *s);
4532  /* This callback never returns an error, a negative value means that
4533  * the frame start was in a previous packet. */
4534  int (*parser_parse)(AVCodecParserContext *s,
4535  AVCodecContext *avctx,
4536  const uint8_t **poutbuf, int *poutbuf_size,
4537  const uint8_t *buf, int buf_size);
4538  void (*parser_close)(AVCodecParserContext *s);
4539  int (*split)(AVCodecContext *avctx, const uint8_t *buf, int buf_size);
4541 } AVCodecParser;
4542 
4544 
4547 
4577  AVCodecContext *avctx,
4578  uint8_t **poutbuf, int *poutbuf_size,
4579  const uint8_t *buf, int buf_size,
4580  int64_t pts, int64_t dts,
4581  int64_t pos);
4582 
4588  AVCodecContext *avctx,
4589  uint8_t **poutbuf, int *poutbuf_size,
4590  const uint8_t *buf, int buf_size, int keyframe);
4592 
4610 
4618 
4659 int avcodec_encode_audio2(AVCodecContext *avctx, AVPacket *avpkt,
4660  const AVFrame *frame, int *got_packet_ptr);
4661 
4698 int avcodec_encode_video2(AVCodecContext *avctx, AVPacket *avpkt,
4699  const AVFrame *frame, int *got_packet_ptr);
4700 
4701 int avcodec_encode_subtitle(AVCodecContext *avctx, uint8_t *buf, int buf_size,
4702  const AVSubtitle *sub);
4703 
4704 
4709 #if FF_API_AVPICTURE
4710 
4719 int avpicture_alloc(AVPicture *picture, enum AVPixelFormat pix_fmt, int width, int height);
4720 
4725 void avpicture_free(AVPicture *picture);
4726 
4731 int avpicture_fill(AVPicture *picture, uint8_t *ptr,
4732  enum AVPixelFormat pix_fmt, int width, int height);
4733 
4739  int width, int height,
4740  unsigned char *dest, int dest_size);
4741 
4747 
4752 void av_picture_copy(AVPicture *dst, const AVPicture *src,
4753  enum AVPixelFormat pix_fmt, int width, int height);
4754 
4759 int av_picture_crop(AVPicture *dst, const AVPicture *src,
4760  enum AVPixelFormat pix_fmt, int top_band, int left_band);
4761 
4766 int av_picture_pad(AVPicture *dst, const AVPicture *src, int height, int width, enum AVPixelFormat pix_fmt,
4767  int padtop, int padbottom, int padleft, int padright, int *color);
4768 
4772 #endif
4773 
4794 void attribute_deprecated avcodec_get_chroma_sub_sample(enum AVPixelFormat pix_fmt, int *h_shift, int *v_shift);
4795 
4802 
4803 #define FF_LOSS_RESOLUTION 0x0001
4804 #define FF_LOSS_DEPTH 0x0002
4805 #define FF_LOSS_COLORSPACE 0x0004
4806 #define FF_LOSS_ALPHA 0x0008
4807 #define FF_LOSS_COLORQUANT 0x0010
4808 #define FF_LOSS_CHROMA 0x0020
4827 int avcodec_get_pix_fmt_loss(enum AVPixelFormat dst_pix_fmt, enum AVPixelFormat src_pix_fmt,
4828  int has_alpha);
4829 
4848  enum AVPixelFormat src_pix_fmt,
4849  int has_alpha, int *loss_ptr);
4850 
4851 enum AVPixelFormat avcodec_default_get_format(struct AVCodecContext *s, const enum AVPixelFormat * fmt);
4852 
4857 #if FF_API_SET_DIMENSIONS
4858 
4863 #endif
4864 
4874 size_t av_get_codec_tag_string(char *buf, size_t buf_size, unsigned int codec_tag);
4875 
4876 void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode);
4877 
4885 const char *av_get_profile_name(const AVCodec *codec, int profile);
4886 
4898 const char *avcodec_profile_name(enum AVCodecID codec_id, int profile);
4899 
4900 int avcodec_default_execute(AVCodecContext *c, int (*func)(AVCodecContext *c2, void *arg2),void *arg, int *ret, int count, int size);
4901 int avcodec_default_execute2(AVCodecContext *c, int (*func)(AVCodecContext *c2, void *arg2, int, int),void *arg, int *ret, int count);
4902 //FIXME func typedef
4903 
4921  enum AVSampleFormat sample_fmt, const uint8_t *buf,
4922  int buf_size, int align);
4923 
4934 
4942 
4952 
4961 int av_get_audio_frame_duration(AVCodecContext *avctx, int frame_bytes);
4962 
4967 int av_get_audio_frame_duration2(AVCodecParameters *par, int frame_bytes);
4968 
4969 #if FF_API_OLD_BSF
4971  void *priv_data;
4976 #endif
4977 
4978 typedef struct AVBSFInternal AVBSFInternal;
4979 
4990 typedef struct AVBSFContext {
4995 
4999  const struct AVBitStreamFilter *filter;
5000 
5005  AVBSFInternal *internal;
5006 
5011  void *priv_data;
5012 
5017 
5022 
5028 
5034 } AVBSFContext;
5035 
5036 typedef struct AVBitStreamFilter {
5037  const char *name;
5038 
5044  const enum AVCodecID *codec_ids;
5045 
5056 
5057  /*****************************************************************
5058  * No fields below this line are part of the public API. They
5059  * may not be used outside of libavcodec and can be changed and
5060  * removed at will.
5061  * New public fields should be added right above.
5062  *****************************************************************
5063  */
5064 
5068  void (*close)(AVBSFContext *ctx);
5070 
5071 #if FF_API_OLD_BSF
5072 
5082  AVCodecContext *avctx, const char *args,
5083  uint8_t **poutbuf, int *poutbuf_size,
5084  const uint8_t *buf, int buf_size, int keyframe);
5089 #endif
5090 
5095 const AVBitStreamFilter *av_bsf_get_by_name(const char *name);
5096 
5106 const AVBitStreamFilter *av_bsf_next(void **opaque);
5107 
5121 
5127 
5144 
5170 
5175 void av_bsf_free(AVBSFContext **ctx);
5176 
5183 const AVClass *av_bsf_get_class(void);
5184 
5185 /* memory */
5186 
5193 void av_fast_padded_malloc(void *ptr, unsigned int *size, size_t min_size);
5194 
5202 unsigned int av_xiphlacing(unsigned char *s, unsigned int v);
5203 
5204 #if FF_API_MISSING_SAMPLE
5205 
5219 void av_log_missing_feature(void *avc, const char *feature, int want_sample);
5220 
5231 void av_log_ask_for_sample(void *avc, const char *msg, ...) av_printf_format(2, 3);
5232 #endif /* FF_API_MISSING_SAMPLE */
5233 
5237 void av_register_hwaccel(AVHWAccel *hwaccel);
5238 
5244 AVHWAccel *av_hwaccel_next(const AVHWAccel *hwaccel);
5245 
5246 
5250 enum AVLockOp {
5255 };
5256 
5280 int av_lockmgr_register(int (*cb)(void **mutex, enum AVLockOp op));
5281 
5286 
5292 
5296 int av_codec_is_encoder(const AVCodec *codec);
5297 
5301 int av_codec_is_decoder(const AVCodec *codec);
5302 
5307 
5316 
5322 
5333 
5338 #endif /* AVCODEC_AVCODEC_H */
codec_id is not known (like AV_CODEC_ID_NONE) but lavf should attempt to identify it ...
Definition: avcodec.h:565
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:33
const struct AVCodec * codec
Definition: avcodec.h:1418
AVRational framerate
Definition: avcodec.h:3063
discard all frames except keyframes
Definition: avcodec.h:688
AVSideDataParamChangeFlags
Definition: avcodec.h:1381
attribute_deprecated int lowres
low resolution decoding, 1-> 1/2 size, 2->1/4 size
Definition: avcodec.h:2786
attribute_deprecated int intra_quant_bias
Definition: avcodec.h:1919
const AVClass * priv_class
A class for the private data, used to declare bitstream filter private AVOptions. ...
Definition: avcodec.h:5055
AVCodecParameters * par_out
Parameters of the output stream.
Definition: avcodec.h:5021
#define AV_NUM_DATA_POINTERS
Definition: frame.h:141
AVPacketSideDataType
Definition: avcodec.h:1191
int size
This structure describes decoded (raw) audio or video data.
Definition: frame.h:140
int avcodec_default_execute2(AVCodecContext *c, int(*func)(AVCodecContext *c2, void *arg2, int, int), void *arg, int *ret, int count)
AVCodec * avcodec_find_encoder(enum AVCodecID id)
Find a registered encoder with a matching codec ID.
Definition: utils.c:2010
int x
top left corner of pict, undefined when pict is not set
Definition: avcodec.h:3426
int dct_algo
DCT algorithm, see FF_DCT_* below.
Definition: avcodec.h:2722
A dummy id pointing at the start of audio codecs.
Definition: avcodec.h:397
int coded_width
Bitstream width / height, may be different from width/height e.g.
Definition: avcodec.h:1595
int capabilities
Hardware accelerated codec capabilities.
Definition: avcodec.h:3271
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:2597
float qblur
amount of qscale smoothing over time (0.0-1.0)
Definition: avcodec.h:2323
Unlock the mutex.
Definition: avcodec.h:5253
attribute_deprecated int rc_qmod_freq
Definition: avcodec.h:2356
memory handling functions
int64_t pos
byte position in stream, -1 if unknown
Definition: avcodec.h:1366
void av_shrink_packet(AVPacket *pkt, int size)
Reduce packet size, correctly zeroing padding.
Definition: avpacket.c:99
int64_t next_frame_offset
Definition: avcodec.h:4368
int id
id
Definition: avcodec.h:1117
static int decode_slice(AVCodecContext *c, void *arg)
Definition: ffv1dec.c:337
int max_bitrate
Maximum bitrate of the stream, in bits per second.
Definition: avcodec.h:1145
attribute_deprecated 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:1624
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:1679
AVRational sample_aspect_ratio
Video only.
Definition: avcodec.h:3535
int rc_initial_buffer_occupancy
Number of bits which should be loaded into the rc buffer before decoding starts.
Definition: avcodec.h:2426
Dummy codec for streams containing only metadata information.
Definition: avcodec.h:571
int height
Definition: avcodec.h:1125
int width
Dimensions of the decoded video intended for presentation.
Definition: avcodec.h:4508
int avcodec_receive_packet(AVCodecContext *avctx, AVPacket *avpkt)
Read encoded data from the encoder.
Definition: utils.c:1911
static av_cold void uninit(AVFilterContext *ctx)
Definition: af_amix.c:514
attribute_deprecated int frame_skip_cmp
Definition: avcodec.h:2478
This side data should be associated with a video stream and contains Stereoscopic 3D information in f...
Definition: avcodec.h:1260
const char * avcodec_configuration(void)
Return the libavcodec build-time configuration.
Definition: utils.c:2274
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)
enum AVColorRange color_range
MPEG vs JPEG YUV range.
Definition: avcodec.h:2127
attribute_deprecated unsigned int stream_codec_tag
Definition: avcodec.h:1448
const struct AVBitStreamFilter * filter
The bitstream filter this context is an instance of.
Definition: avcodec.h:4999
int qscale
Definition: avcodec.h:711
attribute_deprecated int av_picture_crop(AVPicture *dst, const AVPicture *src, enum AVPixelFormat pix_fmt, int top_band, int left_band)
Definition: imgconvert.c:167
The bitstream filter state.
Definition: avcodec.h:4990
int nb_colors
number of colors in pict, undefined when pict is not set
Definition: avcodec.h:3430
int size
Definition: avcodec.h:1347
attribute_deprecated int lmax
Definition: avcodec.h:2460
int mb_lmin
minimum MB Lagrange multiplier
Definition: avcodec.h:2030
const char * avcodec_license(void)
Return the libavcodec license.
Definition: utils.c:2279
enhanced predictive zonal search
Definition: avcodec.h:670
const AVBitStreamFilter * av_bsf_get_by_name(const char *name)
int coded_width
Dimensions of the coded video.
Definition: avcodec.h:4514
This side data contains an integer value representing the stream index of a "fallback" track...
Definition: avcodec.h:1281
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:1804
attribute_deprecated int avcodec_encode_audio2(AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame, int *got_packet_ptr)
Encode a frame of audio.
Definition: utils.c:1270
enum AVMediaType codec_type
Definition: rtp.c:36
void attribute_deprecated avcodec_get_chroma_sub_sample(enum AVPixelFormat pix_fmt, int *h_shift, int *v_shift)
Definition: imgconvert.c:37
external API header
unsigned num_rects
Definition: avcodec.h:3463
void av_fast_padded_malloc(void *ptr, unsigned int *size, size_t min_size)
Allocate a buffer with padding, reusing the given one if large enough.
Definition: utils.c:60
A dummy ID pointing at the start of various fake codecs.
Definition: avcodec.h:562
char * stats_in
pass2 encoding statistics input buffer Concatenated stuff from stats_out of pass1 should be placed he...
Definition: avcodec.h:2564
int ildct_cmp
interlaced DCT comparison function
Definition: avcodec.h:1829
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:2071
int duration
Duration of the current frame.
Definition: avcodec.h:4483
discard all
Definition: avcodec.h:689
int bits_per_raw_sample
Bits per sample/pixel of internal libavcodec pixel/sample format.
Definition: avcodec.h:2776
void avcodec_register_all(void)
Register all the codecs, parsers and bitstream filters which were enabled at configuration time...
Definition: allcodecs.c:61
int dts_ref_dts_delta
Offset of the current timestamp against last timestamp sync point in units of AVCodecContext.time_base.
Definition: avcodec.h:4445
int avcodec_decode_subtitle2(AVCodecContext *avctx, AVSubtitle *sub, int *got_sub_ptr, AVPacket *avpkt)
Decode a subtitle message.
Definition: utils.c:1673
int trailing_padding
Audio only.
Definition: avcodec.h:3586
void * priv_data
Opaque filter-specific private data.
Definition: avcodec.h:5011
four components are given, that&#39;s all.
Definition: avcodec.h:3390
int profile
profile
Definition: avcodec.h:2880
An AV_PKT_DATA_H263_MB_INFO side data packet contains a number of structures with info about macroblo...
Definition: avcodec.h:1239
AVCodec.
Definition: avcodec.h:3120
int block_align
number of bytes per packet if constant and known or 0 Used by some WAV based audio codecs...
Definition: avcodec.h:2189
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:190
float i_quant_offset
qscale offset between P and I-frames
Definition: avcodec.h:1737
This struct describes the properties of an encoded stream.
Definition: avcodec.h:3475
int av_bsf_init(AVBSFContext *ctx)
Prepare the filter for use, after all the parameters and options have been set.
Definition: bsf.c:132
AVLockOp
Lock operation used by lockmgr.
Definition: avcodec.h:5250
attribute_deprecated AVPicture pict
Definition: avcodec.h:3437
AVColorTransferCharacteristic
Color Transfer Characteristic.
Definition: pixfmt.h:315
int min_bitrate
Minimum bitrate of the stream, in bits per second.
Definition: avcodec.h:1150
char * text
0 terminated plain UTF-8 text
Definition: avcodec.h:3448
attribute_deprecated 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:121
attribute_deprecated int frame_skip_exp
Definition: avcodec.h:2474
attribute_deprecated int avpicture_alloc(AVPicture *picture, enum AVPixelFormat pix_fmt, int width, int height)
Definition: avpicture.c:58
attribute_deprecated int me_method
This option does nothing.
Definition: avcodec.h:1628
Macro definitions for various function/variable attributes.
attribute_deprecated 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:2554
AVRational time_base
This is the fundamental unit of time (in seconds) in terms of which frame timestamps are represented...
Definition: avcodec.h:1535
int av_codec_is_decoder(const AVCodec *codec)
Definition: utils.c:101
AVSubtitleRect ** rects
Definition: avcodec.h:3464
enum AVAudioServiceType audio_service_type
Type of service that the audio stream conveys.
Definition: avcodec.h:2217
const AVCodecDescriptor * avcodec_descriptor_next(const AVCodecDescriptor *prev)
Iterate over all codec descriptors known to libavcodec.
Definition: codec_desc.c:2472
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:300
static HEVCFrame * alloc_frame(HEVCContext *s)
Definition: hevc_refs.c:82
const AVClass * avcodec_get_class(void)
Get the AVClass for AVCodecContext.
Definition: options.c:248
int av_codec_is_encoder(const AVCodec *codec)
Definition: utils.c:96
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:1170
int av_bsf_alloc(const AVBitStreamFilter *filter, AVBSFContext **ctx)
Allocate a context for a given bitstream filter.
Definition: bsf.c:79
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:285
int w
width of pict, undefined when pict is not set
Definition: avcodec.h:3428
attribute_deprecated int mv_bits
Definition: avcodec.h:2530
struct AVHWAccel * hwaccel
Hardware accelerator in use.
Definition: avcodec.h:2696
float p_masking
p block masking (0-> disabled)
Definition: avcodec.h:1765
AVCodecParserContext * parser
Definition: avcodec.h:4973
attribute_deprecated int rc_strategy
Definition: avcodec.h:1692
Public dictionary API.
int av_bsf_receive_packet(AVBSFContext *ctx, AVPacket *pkt)
Retrieve a filtered packet.
Definition: bsf.c:194
attribute_deprecated int side_data_only_packets
Encoding only and set by default.
Definition: avcodec.h:3036
int bit_rate_tolerance
number of bits the bitstream is allowed to diverge from the reference.
Definition: avcodec.h:1481
int mb_lmax
maximum MB Lagrange multiplier
Definition: avcodec.h:2037
void av_packet_free(AVPacket **pkt)
Free the packet, if the packet is reference counted, it will be unreferenced first.
Definition: avpacket.c:60
enum AVPixelFormat avcodec_default_get_format(struct AVCodecContext *s, const enum AVPixelFormat *fmt)
Definition: utils.c:733
attribute_deprecated float rc_buffer_aggressivity
Definition: avcodec.h:2401
attribute_deprecated const char * rc_eq
Definition: avcodec.h:2379
enum AVSampleFormat sample_fmt
audio sample format
Definition: avcodec.h:2160
Lock the mutex.
Definition: avcodec.h:5252
uint8_t
void * hwaccel_context
Hardware accelerator context.
Definition: avcodec.h:2708
int width
Video only.
Definition: avcodec.h:3525
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:182
int subtitle_header_size
Definition: avcodec.h:3000
AVCodecParameters * avcodec_parameters_alloc(void)
Allocate a new AVCodecParameters and set its fields to default values (unknown/invalid/0).
Definition: utils.c:2798
int me_range
maximum motion estimation search range in subpel units If 0 then no limit.
Definition: avcodec.h:1913
attribute_deprecated int i_count
Definition: avcodec.h:2538
AVColorSpace
YUV colorspace type.
Definition: pixfmt.h:343
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:176
int64_t duration
Duration of this packet in AVStream->time_base units, 0 if unknown.
Definition: avcodec.h:1364
This side data contains a 3x3 transformation matrix describing an affine transformation that needs to...
Definition: avcodec.h:1254
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:1688
int pre_dia_size
ME prepass diamond size & shape.
Definition: avcodec.h:1877
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:135
uint8_t * extradata
some codecs need / can use extradata like Huffman tables.
Definition: avcodec.h:1523
const AVClass * av_class
information on struct for av_log
Definition: avcodec.h:1414
int me_cmp
motion estimation comparison function
Definition: avcodec.h:1811
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:2885
struct AVCodecParser * next
Definition: avcodec.h:4540
int initial_padding
Audio only.
Definition: avcodec.h:3579
const char data[16]
Definition: mxf.c:70
const char * name
Definition: avcodec.h:5037
uint8_t * data
Definition: avcodec.h:1346
attribute_deprecated int context_model
Definition: avcodec.h:2446
void av_packet_move_ref(AVPacket *dst, AVPacket *src)
Move every field in src to dst and reset src.
Definition: avpacket.c:401
static int flags
Definition: log.c:50
Motion_Est_ID
motion estimation type.
Definition: avcodec.h:665
uint8_t * data
Definition: avcodec.h:1290
AVColorRange
MPEG vs JPEG YUV range.
Definition: pixfmt.h:362
int buffer_size
The size of the buffer to which the ratecontrol is applied, in bits.
Definition: avcodec.h:1161
int h
height of pict, undefined when pict is not set
Definition: avcodec.h:3429
int bits_per_coded_sample
bits per sample/pixel from the demuxer (needed for huffyuv).
Definition: avcodec.h:2769
float lumi_masking
luminance masking (0-> disabled)
Definition: avcodec.h:1744
char * stats_out
pass1 encoding statistics output buffer
Definition: avcodec.h:2556
AVColorPrimaries
Chromaticity coordinates of the source primaries.
Definition: pixfmt.h:293
AVCPBProperties * av_cpb_properties_alloc(size_t *size)
Allocate a CPB properties structure and initialize its fields to default values.
Definition: utils.c:2740
struct AVBitStreamFilterContext * next
Definition: avcodec.h:4974
enum AVChromaLocation chroma_sample_location
This defines the location of chroma samples.
Definition: avcodec.h:2134
attribute_deprecated int frame_skip_threshold
Definition: avcodec.h:2466
uint64_t channel_layout
Audio only.
Definition: avcodec.h:3556
float quality_factor
Definition: avcodec.h:712
hexagon based search
Definition: avcodec.h:672
AVCodec * avcodec_find_encoder_by_name(const char *name)
Find a registered encoder with the specified name.
Definition: utils.c:2015
const OptionDef options[]
Definition: avconv_opt.c:2447
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:189
attribute_deprecated int skip_count
Definition: avcodec.h:2542
int slice_count
slice count
Definition: avcodec.h:1779
attribute_deprecated void avcodec_set_dimensions(AVCodecContext *s, int width, int height)
Definition: utils.c:128
Libavcodec version macros.
static enum AVPixelFormat get_format(AVCodecContext *s, const enum AVPixelFormat *pix_fmts)
Definition: avconv.c:1612
#define src
Definition: vp8dsp.c:254
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:1943
int av_new_packet(AVPacket *pkt, int size)
Allocate the payload of a packet and initialize its fields with default values.
Definition: avpacket.c:84
no search, that is use 0,0 vector whenever one is needed
Definition: avcodec.h:666
const uint64_t * channel_layouts
array of support channel layouts, or NULL if unknown. array is terminated by 0
Definition: avcodec.h:3144
reserved for experiments
Definition: avcodec.h:671
const AVCodecDefault * defaults
Private codec-specific defaults.
Definition: avcodec.h:3183
AVCodecID
Identify the syntax and semantics of the bitstream.
Definition: avcodec.h:193
int avcodec_parameters_copy(AVCodecParameters *dst, const AVCodecParameters *src)
Copy the contents of src to dst.
Definition: utils.c:2819
int av_get_bits_per_sample(enum AVCodecID codec_id)
Return codec bits per sample.
Definition: utils.c:2348
int has_b_frames
Size of the frame reordering buffer in the decoder.
Definition: avcodec.h:1715
const AVBitStreamFilter * av_bsf_next(void **opaque)
Iterate over all registered bitstream filters.
int64_t pos
Byte position of currently parsed frame in stream.
Definition: avcodec.h:4471
attribute_deprecated float rc_initial_cplx
Definition: avcodec.h:2404
Create a mutex.
Definition: avcodec.h:5251
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:409
int priv_data_size
Definition: avcodec.h:4530
struct AVCodecParser * parser
Definition: avcodec.h:4364
AVAudioServiceType
Definition: avcodec.h:692
int y
top left corner of pict, undefined when pict is not set
Definition: avcodec.h:3427
discard all bidirectional frames
Definition: avcodec.h:687
An AV_PKT_DATA_PARAM_CHANGE side data packet is laid out as follows:
Definition: avcodec.h:1218
enum AVCodecID * codec_ids
A list of codec ids supported by the filter, terminated by AV_CODEC_ID_NONE.
Definition: avcodec.h:5044
int me_sub_cmp
subpixel motion estimation comparison function
Definition: avcodec.h:1817
void av_packet_free_side_data(AVPacket *pkt)
Convenience function to free all the side data stored.
Definition: avpacket.c:215
attribute_deprecated uint64_t vbv_delay
VBV delay coded in the last frame (in periods of a 27 MHz clock).
Definition: avcodec.h:3021
int qmax
maximum quantizer
Definition: avcodec.h:2337
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: utils.c:76
enum AVSampleFormat request_sample_fmt
Used to request a sample format from the decoder.
Definition: avcodec.h:2224
int active_thread_type
Which multithreading methods are in use by the codec.
Definition: avcodec.h:2825
attribute_deprecated int av_dup_packet(AVPacket *pkt)
Definition: avpacket.c:180
int avcodec_is_open(AVCodecContext *s)
Definition: utils.c:2702
int error_concealment
error concealment flags
Definition: avcodec.h:2617
int avcodec_receive_frame(AVCodecContext *avctx, AVFrame *frame)
Return decoded output data from a decoder.
Definition: utils.c:1807
int capabilities
Codec capabilities.
Definition: avcodec.h:3139
int initial_padding
Audio only.
Definition: avcodec.h:3054
preferred ID for decoding MPEG audio layer 1, 2 or 3
Definition: avcodec.h:479
attribute_deprecated AVBitStreamFilterContext * av_bitstream_filter_init(const char *name)
AVBufferRef * buf
A reference to the reference-counted buffer where the packet data is stored.
Definition: avcodec.h:1329
int flags
AV_CODEC_FLAG_*.
Definition: avcodec.h:1503
static enum AVDiscard skip_idct
Definition: avplay.c:253
AVRational time_base_in
The timebase used for the timestamps of the input packets.
Definition: avcodec.h:5027
int rc_max_rate
maximum bitrate
Definition: avcodec.h:2387
int log_level_offset
Definition: avcodec.h:1415
enum AVMediaType avcodec_get_type(enum AVCodecID codec_id)
Get the type of the given codec.
Definition: codec_desc.c:2491
attribute_deprecated int inter_quant_bias
Definition: avcodec.h:1925
const char * name
Name of the codec implementation.
Definition: avcodec.h:3127
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:1730
int side_data_elems
Definition: avcodec.h:1358
int width
width and height in 1/16 pel
Definition: avcodec.h:1124
int av_packet_shrink_side_data(AVPacket *pkt, enum AVPacketSideDataType type, int size)
Shrink the already allocated side data buffer.
Definition: avpacket.c:299
const struct AVProfile * profiles
If non-NULL, an array of profiles recognized for this codec.
Definition: avcodec.h:601
const char * long_name
A more descriptive name for this codec.
Definition: avcodec.h:592
AVCodecParser * av_parser_next(const AVCodecParser *c)
Definition: parser.c:34
transformed exhaustive search algorithm
Definition: avcodec.h:674
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:2808
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:2515
attribute_deprecated int64_t timecode_frame_start
Definition: avcodec.h:2499
#define av_printf_format(fmtpos, attrpos)
Definition: attributes.h:117
attribute_deprecated int b_sensitivity
Definition: avcodec.h:2098
int priv_data_size
Size of the private data to allocate in AVCodecInternal.hwaccel_priv_data.
Definition: avcodec.h:3357
int flags
A combination of AV_PKT_FLAG values.
Definition: avcodec.h:1352
reference-counted frame API
const AVCodecDescriptor * avcodec_descriptor_get(enum AVCodecID id)
Definition: codec_desc.c:2462
uint64_t channel_layout
Audio channel layout.
Definition: avcodec.h:2203
static char * split(char *message, char delim)
Definition: af_channelmap.c:85
int extradata_size
Size of the extradata content in bytes.
Definition: avcodec.h:3501
uint32_t end_display_time
Definition: avcodec.h:3462
int64_t pts
Same as packet pts, in AV_TIME_BASE.
Definition: avcodec.h:3465
int rc_buffer_size
decoder bitstream buffer size
Definition: avcodec.h:2364
int props
Codec properties, a combination of AV_CODEC_PROP_* flags.
Definition: avcodec.h:596
int intra_dc_precision
precision of the intra DC coefficient - 8
Definition: avcodec.h:2001
int bit_rate
The average bitrate of the encoded data (in bits per second).
Definition: avcodec.h:3512
static void filter(MpegAudioContext *s, int ch, const short *samples, int incr)
Definition: mpegaudioenc.c:307
Not part of ABI.
Definition: avcodec.h:702
int refs
number of reference frames
Definition: avcodec.h:2071
attribute_deprecated int scenechange_factor
Multiplied by qscale for each frame and added to scene_change_score.
Definition: avcodec.h:2085
int block_align
Audio only.
Definition: avcodec.h:3571
A bitmap, pict will be set.
Definition: avcodec.h:3408
int av_packet_copy_props(AVPacket *dst, const AVPacket *src)
Copy only "properties" fields from src to dst.
Definition: avpacket.c:315
int rc_override_count
ratecontrol override, see RcOverride
Definition: avcodec.h:2371
int bit_rate
the average bitrate
Definition: avcodec.h:1473
const AVClass * av_bsf_get_class(void)
Get the AVClass for AVBSFContext.
Definition: bsf.c:74
enum AVPixelFormat * pix_fmts
array of supported pixel formats, or NULL if unknown, array is terminated by -1
Definition: avcodec.h:3141
int err_recognition
Error recognition; may misdetect some more or less valid parts as errors.
Definition: avcodec.h:2670
const char * name
Name of the hardware accelerated codec.
Definition: avcodec.h:3244
AVPacketSideData * coded_side_data
Additional data associated with the entire coded stream.
Definition: avcodec.h:3078
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:2302
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:167
AVCodecContext * avcodec_alloc_context3(const AVCodec *codec)
Allocate an AVCodecContext and set its fields to default values.
Definition: options.c:136
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:128
enum AVCodecID codec_id
Definition: avconv_vaapi.c:149
int width
picture width / height.
Definition: avcodec.h:1580
static int decode(AVCodecContext *avctx, AVFrame *frame, int *got_frame, AVPacket *pkt)
Definition: avconv.c:1288
int idct_algo
IDCT algorithm, see FF_IDCT_* below.
Definition: avcodec.h:2735
AVBufferRef * hw_frames_ctx
A reference to the AVHWFramesContext describing the input (for encoding) or output (decoding) frames...
Definition: avcodec.h:3102
int64_t offset
byte offset from starting packet start
Definition: avcodec.h:4401
attribute_deprecated void av_bitstream_filter_close(AVBitStreamFilterContext *bsf)
AVRational time_base_out
The timebase used for the timestamps of the output packets.
Definition: avcodec.h:5033
int priv_data_size
Definition: avcodec.h:3158
int profile
Definition: avcodec.h:3109
attribute_deprecated int noise_reduction
Definition: avcodec.h:1979
int av_bsf_send_packet(AVBSFContext *ctx, AVPacket *pkt)
Submit a packet for filtering.
Definition: bsf.c:173
float rc_max_available_vbv_use
Ratecontrol attempt to use, at maximum, of what can be used without an underflow. ...
Definition: avcodec.h:2412
float rc_min_vbv_overflow_use
Ratecontrol attempt to use, at least, times the amount needed to prevent a vbv overflow.
Definition: avcodec.h:2419
AVFormatContext * ctx
Definition: movenc.c:48
void av_parser_close(AVCodecParserContext *s)
Definition: parser.c:217
attribute_deprecated int avpicture_get_size(enum AVPixelFormat pix_fmt, int width, int height)
Definition: avpicture.c:53
enum AVColorPrimaries color_primaries
Chromaticity coordinates of the source primaries.
Definition: avcodec.h:2106
int start_frame
Definition: avcodec.h:709
attribute_deprecated int frame_skip_factor
Definition: avcodec.h:2470
uint16_t format
Definition: avcodec.h:3460
int level
level
Definition: avcodec.h:2970
const AVClass * av_class
A class for logging and AVOptions.
Definition: avcodec.h:4994
const AVProfile * profiles
array of recognized profiles, or NULL if unknown, array is terminated by {FF_PROFILE_UNKNOWN} ...
Definition: avcodec.h:3149
int64_t reordered_opaque
opaque 64-bit number (generally a PTS) that will be reordered and output in AVFrame.reordered_opaque
Definition: avcodec.h:2689
int refcounted_frames
If non-zero, the decoded audio and video frames returned from avcodec_decode_video2() and avcodec_dec...
Definition: avcodec.h:2319
int ticks_per_frame
For some codecs, the time base is closer to the field rate than the frame rate.
Definition: avcodec.h:1544
int skip_top
Number of macroblock rows at the top which are skipped.
Definition: avcodec.h:2008
int mb_decision
macroblock decision mode
Definition: avcodec.h:1953
int last_predictor_count
amount of previous MV predictors (2a+1 x 2a+1 square)
Definition: avcodec.h:1857
int max_qdiff
maximum quantizer difference between frames
Definition: avcodec.h:2344
attribute_deprecated int mb_threshold
Definition: avcodec.h:1993
enum AVPixelFormat pix_fmt
Definition: movenc.c:853
attribute_deprecated float rc_qsquish
Definition: avcodec.h:2351
Passthrough codec, AVFrames wrapped in AVPacket.
Definition: avcodec.h:572
static pthread_mutex_t * mutex
Definition: w32pthreads.h:245
attribute_deprecated int coder_type
Definition: avcodec.h:2440
preferred ID for MPEG-1/2 video decoding
Definition: avcodec.h:198
const AVCodecDescriptor * avcodec_descriptor_get_by_name(const char *name)
Definition: codec_desc.c:2481
RcOverride * rc_override
Definition: avcodec.h:2372
int64_t last_pos
Previous frame byte position.
Definition: avcodec.h:4476
int thread_count
thread count is used to decide how many independent tasks should be passed to execute() ...
Definition: avcodec.h:2806
attribute_deprecated int max_prediction_order
Definition: avcodec.h:2495
void avcodec_flush_buffers(AVCodecContext *avctx)
Reset the internal decoder state / flush internal buffers.
Definition: utils.c:2285
AVPacket * av_packet_clone(AVPacket *src)
Create a new packet that references the same data as src.
Definition: avpacket.c:388
FAKE codec to indicate a MPEG-4 Systems stream (only used by libavformat)
Definition: avcodec.h:569
attribute_deprecated int i_tex_bits
Definition: avcodec.h:2534
int avcodec_send_packet(AVCodecContext *avctx, const AVPacket *avpkt)
Supply raw packet data as input to a decoder.
Definition: utils.c:1767
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:3177
const char * av_get_profile_name(const AVCodec *codec, int profile)
Return a name for the specified profile, if available.
Definition: utils.c:2241
int frame_size
Number of samples per channel in an audio frame.
Definition: avcodec.h:2172
int pts_dts_delta
Presentation delay of current frame in units of AVCodecContext.time_base.
Definition: avcodec.h:4459
attribute_deprecated int misc_bits
Definition: avcodec.h:2544
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:2866
const char * long_name
Descriptive name for the codec, meant to be more human readable than name.
Definition: avcodec.h:3132
This structure describes the bitrate properties of an encoded bitstream.
Definition: avcodec.h:1140
The AV_PKT_DATA_NEW_EXTRADATA is used to notify the codec or the format that the extradata buffer was...
Definition: avcodec.h:1201
int bidir_refine
Definition: avcodec.h:2051
static int width
Definition: utils.c:156
attribute_deprecated void av_log_ask_for_sample(void *avc, const char *msg,...) av_printf_format(2
Log a generic warning message asking for a sample.
AVCodecParserContext * av_parser_init(int codec_id)
Definition: parser.c:48
int avcodec_default_get_buffer2(AVCodecContext *s, AVFrame *frame, int flags)
The default callback for AVCodecContext.get_buffer2().
Definition: utils.c:514
attribute_deprecated int mpeg_quant
Definition: avcodec.h:1720
const AVRational * supported_framerates
array of supported framerates, or NULL if any, array is terminated by {0,0}
Definition: avcodec.h:3140
AVSampleFormat
Audio Sample Formats.
Definition: samplefmt.h:60
attribute_deprecated int scenechange_threshold
Definition: avcodec.h:1975
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:151
int(* end_frame)(AVCodecContext *avctx)
Called at the end of each frame or field picture.
Definition: avcodec.h:3325
int compression_level
Definition: avcodec.h:1495
attribute_deprecated int prediction_method
Definition: avcodec.h:1784
int sample_rate
samples per second
Definition: avcodec.h:2152
void(* func)(void)
Definition: checkasm.c:65
attribute_deprecated int b_frame_strategy
Definition: avcodec.h:1699
Plain text, the text field must be set by the decoder and is authoritative.
Definition: avcodec.h:3414
int debug
debug
Definition: avcodec.h:2626
main external API structure.
Definition: avcodec.h:1409
AVCodec * avcodec_find_decoder(enum AVCodecID id)
Find a registered decoder with a matching codec ID.
Definition: utils.c:2029
static void(WINAPI *cond_broadcast)(pthread_cond_t *cond)
void av_packet_unref(AVPacket *pkt)
Wipe the packet.
Definition: avpacket.c:347
int qmin
minimum quantizer
Definition: avcodec.h:2330
void avsubtitle_free(AVSubtitle *sub)
Free all allocated data in the given subtitle struct.
Definition: utils.c:1687
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:1441
int avcodec_send_frame(AVCodecContext *avctx, const AVFrame *frame)
Supply a raw video or audio frame to the encoder.
Definition: utils.c:1881
float spatial_cplx_masking
spatial complexity masking (0-> disabled)
Definition: avcodec.h:1758
attribute_deprecated int header_bits
Definition: avcodec.h:2532
int extradata_size
Definition: avcodec.h:1524
unsigned int av_xiphlacing(unsigned char *s, unsigned int v)
Encode extradata length to a buffer.
Definition: utils.c:2531
struct AVCodec * next
Definition: avcodec.h:3159
struct AVBitStreamFilter * filter
Definition: avcodec.h:4972
uint16_t * intra_matrix
custom intra quantization matrix
Definition: avcodec.h:1963
int nb_coded_side_data
Definition: avcodec.h:3079
int slice_flags
slice flags
Definition: avcodec.h:1933
Describe the class of an AVClass context structure.
Definition: log.h:34
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:2304
static const uint8_t color[NB_LEVELS]
Definition: log.c:62
enum AVColorSpace colorspace
YUV colorspace type.
Definition: avcodec.h:2120
rational number numerator/denominator
Definition: rational.h:43
attribute_deprecated int avcodec_encode_video2(AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame, int *got_packet_ptr)
Encode a frame of video.
Definition: utils.c:1384
enum AVColorTransferCharacteristic color_trc
Color Transfer Characteristic.
Definition: avcodec.h:2113
const char * name
short name for the profile
Definition: avcodec.h:3110
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:2837
void av_register_codec_parser(AVCodecParser *parser)
Definition: parser.c:42
AVFieldOrder
Definition: avcodec.h:1393
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:240
int(* init_thread_copy)(AVCodecContext *)
If defined, called on thread contexts when they are created.
Definition: avcodec.h:3169
attribute_deprecated int debug_mv
Definition: avcodec.h:2659
AVMediaType
Definition: avutil.h:192
discard useless packets like 0 size packets in avi
Definition: avcodec.h:685
refcounted data buffer API
attribute_deprecated int brd_scale
Definition: avcodec.h:2056
const char * name
Name of the codec described by this descriptor.
Definition: avcodec.h:588
int avcodec_open2(AVCodecContext *avctx, const AVCodec *codec, AVDictionary **options)
Initialize the AVCodecContext to use the given AVCodec.
Definition: utils.c:850
attribute_deprecated int chromaoffset
Definition: avcodec.h:2076
float b_quant_offset
qscale offset between IP and B-frames
Definition: avcodec.h:1707
attribute_deprecated int dtg_active_format
DTG active format information (additional aspect ratio information only used in DVB MPEG-2 transport ...
Definition: avcodec.h:1896
#define AV_PARSER_PTS_NB
Definition: avcodec.h:4389
int av_get_audio_frame_duration(AVCodecContext *avctx, int frame_bytes)
Return audio frame duration.
Definition: utils.c:2507
float qcompress
amount of qscale change between easy & hard scenes (0.0-1.0)
Definition: avcodec.h:2322
attribute_deprecated int me_threshold
Definition: avcodec.h:1987
attribute_deprecated int p_tex_bits
Definition: avcodec.h:2536
uint16_t * inter_matrix
custom inter quantization matrix
Definition: avcodec.h:1970
int end_frame
Definition: avcodec.h:710
mfxU16 profile
Definition: qsvenc.c:43
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:2592
attribute_deprecated int64_t convergence_duration
Definition: avcodec.h:4417
This struct describes the properties of a single codec described by an AVCodecID. ...
Definition: avcodec.h:580
This side data contains an integer value representing the quality factor of the compressed frame...
Definition: avcodec.h:1273
float dark_masking
darkness masking (0-> disabled)
Definition: avcodec.h:1772
int global_quality
Global quality for codecs which cannot change it per frame.
Definition: avcodec.h:1489
static int64_t pts
Global timestamp for the audio frames.
int skip_bottom
Number of macroblock rows at the bottom which are skipped.
Definition: avcodec.h:2015
AVCodec * avcodec_find_decoder_by_name(const char *name)
Find a registered decoder with the specified name.
Definition: utils.c:2034
This side data should be associated with an audio stream and contains ReplayGain information in form ...
Definition: avcodec.h:1245
int output_picture_number
Picture number incremented in presentation or output order.
Definition: avcodec.h:4503
float temporal_cplx_masking
temporary complexity masking (0-> disabled)
Definition: avcodec.h:1751
Pan Scan area.
Definition: avcodec.h:1111
const AVClass * priv_class
AVClass for the private context.
Definition: avcodec.h:3148
#define attribute_deprecated
Definition: attributes.h:80
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:3301
int height
Definition: gxfenc.c:72
int gop_size
the number of pictures in a group of pictures, or 0 for intra_only
Definition: avcodec.h:1606
int sample_rate
Audio only.
Definition: avcodec.h:3564
enum AVMediaType type
Definition: avcodec.h:582
A reference to a data buffer.
Definition: buffer.h:81
discard all non reference
Definition: avcodec.h:686
static int op(uint8_t **dst, const uint8_t *dst_end, GetByteContext *gb, int pixel, int count, int *x, int width, int linesize)
Perform decode operation.
Definition: anm.c:76
AVPacketSideData * side_data
Additional packet data that can be provided by the container.
Definition: avcodec.h:1357
attribute_deprecated int64_t convergence_duration
Definition: avcodec.h:1375
int mb_cmp
macroblock comparison function (not supported yet)
Definition: avcodec.h:1823
Free mutex resources.
Definition: avcodec.h:5254
rational numbers
attribute_deprecated void void av_register_hwaccel(AVHWAccel *hwaccel)
Register the hardware accelerator hwaccel.
Definition: utils.c:2583
attribute_deprecated void avpicture_free(AVPicture *picture)
Definition: avpicture.c:71
raw UTF-8 text
Definition: avcodec.h:553
struct AVHWAccel * next
Definition: avcodec.h:3280
attribute_deprecated int rtp_payload_size
Definition: avcodec.h:2519
int nsse_weight
noise vs.
Definition: avcodec.h:2873
static av_cold void flush(AVCodecContext *avctx)
Flush (reset) the frame ID after seeking.
Definition: alsdec.c:1797
int profile
Codec-specific bitstream restrictions that the stream conforms to.
Definition: avcodec.h:3519
static enum AVCodecID codec_ids[]
attribute_deprecated float border_masking
Definition: avcodec.h:2022
uint32_t start_display_time
Definition: avcodec.h:3461
int(* encode_sub)(AVCodecContext *, uint8_t *buf, int buf_size, const struct AVSubtitle *sub)
Definition: avcodec.h:3191
AVProfile.
Definition: avcodec.h:3108
attribute_deprecated AVFrame * coded_frame
the picture in the bitstream
Definition: avcodec.h:2797
int workaround_bugs
Work around bugs in encoders which sometimes cannot be detected automatically.
Definition: avcodec.h:2571
attribute_deprecated AVBitStreamFilter * av_bitstream_filter_next(const AVBitStreamFilter *f)
int av_grow_packet(AVPacket *pkt, int grow_by)
Increase packet size, correctly zeroing padding.
Definition: avpacket.c:107
int caps_internal
Internal codec capabilities.
Definition: avcodec.h:3231
void av_init_packet(AVPacket *pkt)
Initialize optional fields of a packet with default values.
Definition: avpacket.c:31
int thread_safe_callbacks
Set by the client if its custom get_buffer() callback can be called synchronously from another thread...
Definition: avcodec.h:2835
int avcodec_get_context_defaults3(AVCodecContext *s, const AVCodec *codec)
Definition: options.c:130
attribute_deprecated float rc_qmod_amp
Definition: avcodec.h:2354
AVPictureStructure
Definition: avcodec.h:4355
static av_cold int init(AVCodecParserContext *s)
Definition: h264_parser.c:582
attribute_deprecated void av_picture_copy(AVPicture *dst, const AVPicture *src, enum AVPixelFormat pix_fmt, int width, int height)
Definition: avpicture.c:76
int trellis
trellis RD quantization
Definition: avcodec.h:2486
void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode)
Definition: utils.c:2091
int av_packet_ref(AVPacket *dst, AVPacket *src)
Setup a new reference to the data described by a given packet.
Definition: avpacket.c:356
int slices
Number of slices.
Definition: avcodec.h:2143
void * priv_data
Definition: avcodec.h:1451
int cutoff
Audio cutoff bandwidth (0 means "automatic")
Definition: avcodec.h:2196
FAKE codec to indicate a raw MPEG-2 TS stream (only used by libavformat)
Definition: avcodec.h:567
Formatted text, the ass field must be set by the decoder and is authoritative.
Definition: avcodec.h:3420
int64_t frame_offset
Definition: avcodec.h:4365
enum AVCodecID id
Definition: avcodec.h:581
pixel format definitions
int dia_size
ME diamond size & shape.
Definition: avcodec.h:1850
attribute_deprecated int frame_bits
Definition: avcodec.h:2548
uneven multi-hexagon search
Definition: avcodec.h:673
attribute_deprecated int me_penalty_compensation
Definition: avcodec.h:2044
attribute_deprecated int min_prediction_order
Definition: avcodec.h:2491
as in Berlin toast format
Definition: avcodec.h:496
int avg_bitrate
Average bitrate of the stream, in bits per second.
Definition: avcodec.h:1155
int channels
number of audio channels
Definition: avcodec.h:2153
int frame_priv_data_size
Size of per-frame hardware accelerator private data.
Definition: avcodec.h:3334
const int * supported_samplerates
array of supported audio samplerates, or NULL if unknown, array is terminated by 0 ...
Definition: avcodec.h:3142
int format
The format of the coded data, corresponds to enum AVPixelFormat for video and for enum AVSampleFormat...
Definition: avcodec.h:4525
unsigned avcodec_version(void)
Return the LIBAVCODEC_VERSION_INT constant.
Definition: utils.c:2269
AVPacket * av_packet_alloc(void)
Allocate an AVPacket and set its fields to default values.
Definition: avpacket.c:49
char * ass
0 terminated ASS/SSA compatible event line.
Definition: avcodec.h:3455
This side data corresponds to the AVCPBProperties struct.
Definition: avcodec.h:1286
attribute_deprecated int p_count
Definition: avcodec.h:2540
attribute_deprecated int error_rate
Definition: avcodec.h:3008
attribute_deprecated void(* rtp_callback)(struct AVCodecContext *avctx, void *data, int size, int mb_nb)
Definition: avcodec.h:2513
int mv0_threshold
Note: Value depends upon the compare function used for fullpel ME.
Definition: avcodec.h:2093
int flags2
AV_CODEC_FLAG2_*.
Definition: avcodec.h:1510
int bits_per_coded_sample
Definition: avcodec.h:3514
uint8_t * extradata
Extra binary data needed for initializing the decoder, codec-dependent.
Definition: avcodec.h:3497
AVDiscard
Definition: avcodec.h:681
attribute_deprecated void av_register_bitstream_filter(AVBitStreamFilter *bsf)
int channels
Audio only.
Definition: avcodec.h:3560
enum AVPixelFormat avcodec_find_best_pix_fmt2(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:124
int64_t dts
Decompression timestamp in AVStream->time_base units; the time at which the packet is decompressed...
Definition: avcodec.h:1345
void avcodec_register(AVCodec *codec)
Register the codec codec and initialize libavcodec.
Definition: utils.c:106
int * slice_offset
slice offsets in the frame in bytes
Definition: avcodec.h:1795
int frame_number
Frame counter, set by libavcodec.
Definition: avcodec.h:2183
attribute_deprecated void av_free_packet(AVPacket *pkt)
Free a packet.
Definition: avpacket.c:226
int repeat_pict
This field is used for proper frame duration computation in lavf.
Definition: avcodec.h:4380
enum AVFieldOrder field_order
Field order.
Definition: avcodec.h:2149
void(* init_static_data)(struct AVCodec *codec)
Initialize codec static data, called from avcodec_register().
Definition: avcodec.h:3188
AVChromaLocation
Location of chroma samples.
Definition: pixfmt.h:376
uint8_t * av_packet_get_side_data(AVPacket *pkt, enum AVPacketSideDataType type, int *size)
Get side information from packet.
Definition: avpacket.c:284
enum AVSampleFormat * sample_fmts
array of supported sample formats, or NULL if unknown, array is terminated by -1
Definition: avcodec.h:3143
uint32_t codec_tag
Additional information about the codec (corresponds to the AVI FOURCC).
Definition: avcodec.h:3487
attribute_deprecated uint8_t max_lowres
maximum value for lowres supported by the decoder
Definition: avcodec.h:3146
attribute_deprecated int lmin
Definition: avcodec.h:2454
int nb_channels
uint8_t * av_packet_new_side_data(AVPacket *pkt, enum AVPacketSideDataType type, int size)
Allocate new information of a packet.
Definition: avpacket.c:263
int stream_index
Definition: avcodec.h:1348
static enum AVDiscard skip_loop_filter
Definition: avplay.c:254
int rc_min_rate
minimum bitrate
Definition: avcodec.h:2394
attribute_deprecated 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:1559
uint64_t request_channel_layout
Request decoder to use this channel layout if it can (0 for default)
Definition: avcodec.h:2210
int me_pre_cmp
motion estimation prepass comparison function
Definition: avcodec.h:1870
AVPixelFormat
Pixel format.
Definition: pixfmt.h:57
This structure stores compressed data.
Definition: avcodec.h:1323
const char * avcodec_profile_name(enum AVCodecID codec_id, int profile)
Return a name for the specified profile, if available.
Definition: utils.c:2254
AVCodecParameters * par_in
Parameters of the input stream.
Definition: avcodec.h:5016
int avcodec_encode_subtitle(AVCodecContext *avctx, uint8_t *buf, int buf_size, const AVSubtitle *sub)
Definition: utils.c:1434
int key_frame
Set by parser to 1 for key frames and 0 for non-key frames.
Definition: avcodec.h:4410
int delay
Codec delay.
Definition: avcodec.h:1563
int me_subpel_quality
subpel ME quality
Definition: avcodec.h:1884
int strict_std_compliance
strictly follow the standard (MPEG-4, ...).
Definition: avcodec.h:2605
int dts_sync_point
Synchronization point for start of timestamp generation.
Definition: avcodec.h:4430
int64_t pts
Presentation timestamp in AVStream->time_base units; the time at which the decompressed packet will b...
Definition: avcodec.h:1339
enum AVPixelFormat sw_pix_fmt
Nominal unaccelerated pixel format, see AV_PIX_FMT_xxx.
Definition: avcodec.h:3070
A dummy ID pointing at the start of subtitle codecs.
Definition: avcodec.h:550
void * opaque
Private data of the user, can be used to carry app specific stuff.
Definition: avcodec.h:1466
int thread_type
Which multithreading methods to use.
Definition: avcodec.h:2816
static enum AVDiscard skip_frame
Definition: avplay.c:252
AVSubtitleType
Definition: avcodec.h:3405
int avcodec_default_execute(AVCodecContext *c, int(*func)(AVCodecContext *c2, void *arg2), void *arg, int *ret, int count, int size)
Definition: utils.c:703
discard nothing
Definition: avcodec.h:684
attribute_deprecated int avpicture_fill(AVPicture *picture, uint8_t *ptr, enum AVPixelFormat pix_fmt, int width, int height)
Definition: avpicture.c:37
attribute_deprecated int pre_me
Definition: avcodec.h:1862
This side data should be associated with an audio stream and corresponds to enum AVAudioServiceType.
Definition: avcodec.h:1266
uint8_t * subtitle_header
Header containing style information for text subtitles.
Definition: avcodec.h:2999
int keyint_min
minimum GOP size
Definition: avcodec.h:2064