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 
105 enum AVCodecID {
107 
108  /* video codecs */
111 #if FF_API_XVMC
112  AV_CODEC_ID_MPEG2VIDEO_XVMC,
113 #endif /* FF_API_XVMC */
287 
288  /* various PCM "codecs" */
320 
321  /* various ADPCM codecs */
352 
353  /* AMR */
356 
357  /* RealAudio codecs*/
360 
361  /* various DPCM codecs */
366 
367  /* audio codecs */
368  AV_CODEC_ID_MP2 = 0x15000,
398  AV_CODEC_ID_GSM_MS, /* as found in WAV */
400 #if FF_API_VOXWARE
402 #endif
435 
436  /* subtitle codecs */
447 
448  /* other specific kind of codecs (generally used for attachments) */
450  AV_CODEC_ID_TTF = 0x18000,
451 
452  AV_CODEC_ID_PROBE = 0x19000,
453 
459 };
460 
466 typedef struct AVCodecDescriptor {
467  enum AVCodecID id;
474  const char *name;
478  const char *long_name;
482  int props;
484 
489 #define AV_CODEC_PROP_INTRA_ONLY (1 << 0)
490 
495 #define AV_CODEC_PROP_LOSSY (1 << 1)
496 
499 #define AV_CODEC_PROP_LOSSLESS (1 << 2)
500 
509 #define FF_INPUT_BUFFER_PADDING_SIZE 8
510 
516 #define FF_MIN_BUFFER_SIZE 16384
517 
518 
524  ME_ZERO = 1,
533 };
534 
539  /* We leave some space between them for extensions (drop some
540  * keyframes for intra-only or drop just some bidir frames). */
547 };
548 
559 };
560 
577 };
578 
591 };
592 
598 };
599 
614 };
615 
627 };
628 
632 typedef struct RcOverride{
635  int qscale; // If this is 0 then quality_factor will be used instead.
637 } RcOverride;
638 
639 #if FF_API_MAX_BFRAMES
640 
643 #define FF_MAX_B_FRAMES 16
644 #endif
645 
646 /* encoding support
647  These flags can be passed in AVCodecContext.flags before initialization.
648  Note: Not everything is supported yet.
649 */
650 
655 #define CODEC_FLAG_UNALIGNED 0x0001
656 #define CODEC_FLAG_QSCALE 0x0002
657 #define CODEC_FLAG_4MV 0x0004
658 #define CODEC_FLAG_OUTPUT_CORRUPT 0x0008
659 #define CODEC_FLAG_QPEL 0x0010
660 #define CODEC_FLAG_GMC 0x0020
661 #define CODEC_FLAG_MV0 0x0040
662 
667 #define CODEC_FLAG_INPUT_PRESERVED 0x0100
668 #define CODEC_FLAG_PASS1 0x0200
669 #define CODEC_FLAG_PASS2 0x0400
670 #define CODEC_FLAG_GRAY 0x2000
671 #if FF_API_EMU_EDGE
672 
676 #define CODEC_FLAG_EMU_EDGE 0x4000
677 #endif
678 #define CODEC_FLAG_PSNR 0x8000
679 #define CODEC_FLAG_TRUNCATED 0x00010000
681 #define CODEC_FLAG_NORMALIZE_AQP 0x00020000
682 #define CODEC_FLAG_INTERLACED_DCT 0x00040000
683 #define CODEC_FLAG_LOW_DELAY 0x00080000
684 #define CODEC_FLAG_GLOBAL_HEADER 0x00400000
685 #define CODEC_FLAG_BITEXACT 0x00800000
686 /* Fx : Flag for h263+ extra options */
687 #define CODEC_FLAG_AC_PRED 0x01000000
688 #define CODEC_FLAG_LOOP_FILTER 0x00000800
689 #define CODEC_FLAG_INTERLACED_ME 0x20000000
690 #define CODEC_FLAG_CLOSED_GOP 0x80000000
691 #define CODEC_FLAG2_FAST 0x00000001
692 #define CODEC_FLAG2_NO_OUTPUT 0x00000004
693 #define CODEC_FLAG2_LOCAL_HEADER 0x00000008
694 #define CODEC_FLAG2_IGNORE_CROP 0x00010000
695 
696 #define CODEC_FLAG2_CHUNKS 0x00008000
697 
698 /* Unsupported options :
699  * Syntax Arithmetic coding (SAC)
700  * Reference Picture Selection
701  * Independent Segment Decoding */
702 /* /Fx */
703 /* codec capabilities */
704 
705 #define CODEC_CAP_DRAW_HORIZ_BAND 0x0001
706 
711 #define CODEC_CAP_DR1 0x0002
712 #define CODEC_CAP_TRUNCATED 0x0008
713 #if FF_API_XVMC
714 /* Codec can export data for HW decoding (XvMC). */
715 #define CODEC_CAP_HWACCEL 0x0010
716 #endif /* FF_API_XVMC */
717 
740 #define CODEC_CAP_DELAY 0x0020
741 
745 #define CODEC_CAP_SMALL_LAST_FRAME 0x0040
746 #if FF_API_CAP_VDPAU
747 
750 #define CODEC_CAP_HWACCEL_VDPAU 0x0080
751 #endif
752 
763 #define CODEC_CAP_SUBFRAMES 0x0100
764 
768 #define CODEC_CAP_EXPERIMENTAL 0x0200
769 
772 #define CODEC_CAP_CHANNEL_CONF 0x0400
773 #if FF_API_NEG_LINESIZES
774 
777 #define CODEC_CAP_NEG_LINESIZES 0x0800
778 #endif
779 
782 #define CODEC_CAP_FRAME_THREADS 0x1000
783 
786 #define CODEC_CAP_SLICE_THREADS 0x2000
787 
790 #define CODEC_CAP_PARAM_CHANGE 0x4000
791 
794 #define CODEC_CAP_AUTO_THREADS 0x8000
795 
798 #define CODEC_CAP_VARIABLE_FRAME_SIZE 0x10000
799 
800 #if FF_API_MB_TYPE
801 //The following defines may change, don't expect compatibility if you use them.
802 #define MB_TYPE_INTRA4x4 0x0001
803 #define MB_TYPE_INTRA16x16 0x0002 //FIXME H.264-specific
804 #define MB_TYPE_INTRA_PCM 0x0004 //FIXME H.264-specific
805 #define MB_TYPE_16x16 0x0008
806 #define MB_TYPE_16x8 0x0010
807 #define MB_TYPE_8x16 0x0020
808 #define MB_TYPE_8x8 0x0040
809 #define MB_TYPE_INTERLACED 0x0080
810 #define MB_TYPE_DIRECT2 0x0100 //FIXME
811 #define MB_TYPE_ACPRED 0x0200
812 #define MB_TYPE_GMC 0x0400
813 #define MB_TYPE_SKIP 0x0800
814 #define MB_TYPE_P0L0 0x1000
815 #define MB_TYPE_P1L0 0x2000
816 #define MB_TYPE_P0L1 0x4000
817 #define MB_TYPE_P1L1 0x8000
818 #define MB_TYPE_L0 (MB_TYPE_P0L0 | MB_TYPE_P1L0)
819 #define MB_TYPE_L1 (MB_TYPE_P0L1 | MB_TYPE_P1L1)
820 #define MB_TYPE_L0L1 (MB_TYPE_L0 | MB_TYPE_L1)
821 #define MB_TYPE_QUANT 0x00010000
822 #define MB_TYPE_CBP 0x00020000
823 //Note bits 24-31 are reserved for codec specific use (h264 ref0, mpeg1 0mv, ...)
824 #endif
825 
831 typedef struct AVPanScan{
837  int id;
838 
844  int width;
845  int height;
846 
852  int16_t position[3][2];
853 }AVPanScan;
854 
855 #if FF_API_QSCALE_TYPE
856 #define FF_QSCALE_TYPE_MPEG1 0
857 #define FF_QSCALE_TYPE_MPEG2 1
858 #define FF_QSCALE_TYPE_H264 2
859 #define FF_QSCALE_TYPE_VP56 3
860 #endif
861 
862 #if FF_API_GET_BUFFER
863 #define FF_BUFFER_TYPE_INTERNAL 1
864 #define FF_BUFFER_TYPE_USER 2
865 #define FF_BUFFER_TYPE_SHARED 4
866 #define FF_BUFFER_TYPE_COPY 8
867 
868 #define FF_BUFFER_HINTS_VALID 0x01 // Buffer hints value is meaningful (if 0 ignore).
869 #define FF_BUFFER_HINTS_READABLE 0x02 // Codec will read from buffer.
870 #define FF_BUFFER_HINTS_PRESERVE 0x04 // User must not alter buffer content.
871 #define FF_BUFFER_HINTS_REUSABLE 0x08 // Codec will reuse the buffer (update).
872 #endif
873 
877 #define AV_GET_BUFFER_FLAG_REF (1 << 0)
878 
888 
905 
926 };
927 
950 typedef struct AVPacket {
966  int64_t pts;
972  int64_t dts;
974  int size;
979  int flags;
984  struct {
985  uint8_t *data;
986  int size;
988  } *side_data;
990 
995  int duration;
996 #if FF_API_DESTRUCT_PACKET
998  void (*destruct)(struct AVPacket *);
1000  void *priv;
1001 #endif
1002  int64_t pos;
1003 
1022 } AVPacket;
1023 #define AV_PKT_FLAG_KEY 0x0001
1024 #define AV_PKT_FLAG_CORRUPT 0x0002
1025 
1031 };
1036 struct AVCodecInternal;
1037 
1041  AV_FIELD_TT, //< Top coded_first, top displayed first
1042  AV_FIELD_BB, //< Bottom coded first, bottom displayed first
1043  AV_FIELD_TB, //< Top coded first, bottom displayed first
1044  AV_FIELD_BT, //< Bottom coded first, top displayed first
1045 };
1046 
1054 typedef struct AVCodecContext {
1061 
1062  enum AVMediaType codec_type; /* see AVMEDIA_TYPE_xxx */
1063  const struct AVCodec *codec;
1064  char codec_name[32];
1065  enum AVCodecID codec_id; /* see AV_CODEC_ID_xxx */
1066 
1080  unsigned int codec_tag;
1081 
1088  unsigned int stream_codec_tag;
1089 
1090  void *priv_data;
1091 
1098  struct AVCodecInternal *internal;
1099 
1105  void *opaque;
1106 
1113 
1121 
1129 
1135 #define FF_COMPRESSION_DEFAULT -1
1136 
1142  int flags;
1143 
1149  int flags2;
1150 
1164 
1174 
1183 
1205  int delay;
1206 
1207 
1208  /* video only */
1218 
1228 
1229 #if FF_API_ASPECT_EXTENDED
1230 #define FF_ASPECT_EXTENDED 15
1231 #endif
1232 
1239 
1248 
1257 
1282  const AVFrame *src, int offset[AV_NUM_DATA_POINTERS],
1283  int y, int type, int height);
1284 
1294  enum AVPixelFormat (*get_format)(struct AVCodecContext *s, const enum AVPixelFormat * fmt);
1295 
1303 
1312 
1315 #define FF_RC_STRATEGY_XVID 1
1316 
1318 
1325 
1333 
1340 
1349 
1356 
1363 
1370 
1377 
1383  float p_masking;
1384 
1391 
1404 #define FF_PRED_LEFT 0
1405 #define FF_PRED_PLANE 1
1406 #define FF_PRED_MEDIAN 2
1407 
1414 
1423 
1429  int me_cmp;
1441  int mb_cmp;
1448 #define FF_CMP_SAD 0
1449 #define FF_CMP_SSE 1
1450 #define FF_CMP_SATD 2
1451 #define FF_CMP_DCT 3
1452 #define FF_CMP_PSNR 4
1453 #define FF_CMP_BIT 5
1454 #define FF_CMP_RD 6
1455 #define FF_CMP_ZERO 7
1456 #define FF_CMP_VSAD 8
1457 #define FF_CMP_VSSE 9
1458 #define FF_CMP_NSSE 10
1459 #define FF_CMP_DCTMAX 13
1460 #define FF_CMP_DCT264 14
1461 #define FF_CMP_CHROMA 256
1462 
1469 
1476 
1482  int pre_me;
1483 
1490 
1497 
1504 
1514 #define FF_DTG_AFD_SAME 8
1515 #define FF_DTG_AFD_4_3 9
1516 #define FF_DTG_AFD_16_9 10
1517 #define FF_DTG_AFD_14_9 11
1518 #define FF_DTG_AFD_4_3_SP_14_9 13
1519 #define FF_DTG_AFD_16_9_SP_14_9 14
1520 #define FF_DTG_AFD_SP_4_3 15
1521 
1530 
1537 #define FF_DEFAULT_QUANT_BIAS 999999
1538 
1545 
1552 #define SLICE_FLAG_CODED_ORDER 0x0001
1553 #define SLICE_FLAG_ALLOW_FIELD 0x0002
1554 #define SLICE_FLAG_ALLOW_PLANE 0x0004
1555 
1556 #if FF_API_XVMC
1557 
1563  attribute_deprecated int xvmc_acceleration;
1564 #endif /* FF_API_XVMC */
1565 
1572 #define FF_MB_DECISION_SIMPLE 0
1573 #define FF_MB_DECISION_BITS 1
1574 #define FF_MB_DECISION_RD 2
1575 
1576 
1581  uint16_t *intra_matrix;
1582 
1588  uint16_t *inter_matrix;
1589 
1597 
1604 
1613 
1620 
1627 
1634 
1641 
1649 
1655  int mb_lmin;
1656 
1662  int mb_lmax;
1663 
1670 
1677 
1684 
1691 
1697  int refs;
1698 
1705 
1712 
1720 
1727 
1734 
1741 
1748 
1755 
1762 
1770  int slices;
1771 
1777 
1778  /* audio only */
1780  int channels;
1781 
1788 
1789  /* The following data should not be initialized. */
1800 
1811 
1817 
1823  int cutoff;
1824 
1825 #if FF_API_REQUEST_CHANNELS
1826 
1833 #endif
1834 
1840  uint64_t channel_layout;
1841 
1848 
1855 
1862 
1863 #if FF_API_GET_BUFFER
1864 
1927  int (*get_buffer)(struct AVCodecContext *c, AVFrame *pic);
1928 
1942 
1956  int (*reget_buffer)(struct AVCodecContext *c, AVFrame *pic);
1957 #endif
1958 
2037  int (*get_buffer2)(struct AVCodecContext *s, AVFrame *frame, int flags);
2038 
2051 
2052  /* - encoding parameters */
2053  float qcompress;
2054  float qblur;
2055 
2061  int qmin;
2062 
2068  int qmax;
2069 
2076 
2083  float rc_qsquish;
2084 
2087 
2094 
2102 
2108  const char *rc_eq;
2109 
2116 
2123 
2125 
2132 
2139 
2146 
2153 
2154 #define FF_CODER_TYPE_VLC 0
2155 #define FF_CODER_TYPE_AC 1
2156 #define FF_CODER_TYPE_RAW 2
2157 #define FF_CODER_TYPE_RLE 3
2158 #define FF_CODER_TYPE_DEFLATE 4
2159 
2165 
2172 
2178  int lmin;
2179 
2185  int lmax;
2186 
2193 
2200 
2207 
2214 
2220  int trellis;
2221 
2227 
2233 
2240 
2241  /* The RTP callback: This function is called */
2242  /* every time the encoder has a packet to send. */
2243  /* It depends on the encoder if the data starts */
2244  /* with a Start Code (it should). H.263 does. */
2245  /* mb_nb contains the number of macroblocks */
2246  /* encoded in the RTP payload. */
2247  void (*rtp_callback)(struct AVCodecContext *avctx, void *data, int size, int mb_nb);
2248 
2249  int rtp_payload_size; /* The size of the RTP payload: the coder will */
2250  /* do its best to deliver a chunk with size */
2251  /* below rtp_payload_size, the chunk will start */
2252  /* with a start code on some codecs like H.263. */
2253  /* This doesn't take account of any particular */
2254  /* headers inside the transmitted RTP payload. */
2255 
2256  /* statistics, used for 2-pass encoding */
2257  int mv_bits;
2261  int i_count;
2262  int p_count;
2265 
2272 
2278  char *stats_out;
2279 
2286  char *stats_in;
2287 
2294 #define FF_BUG_AUTODETECT 1
2295 #if FF_API_OLD_MSMPEG4
2296 #define FF_BUG_OLD_MSMPEG4 2
2297 #endif
2298 #define FF_BUG_XVID_ILACE 4
2299 #define FF_BUG_UMP4 8
2300 #define FF_BUG_NO_PADDING 16
2301 #define FF_BUG_AMV 32
2302 #if FF_API_AC_VLC
2303 #define FF_BUG_AC_VLC 0
2304 #endif
2305 #define FF_BUG_QPEL_CHROMA 64
2306 #define FF_BUG_STD_QPEL 128
2307 #define FF_BUG_QPEL_CHROMA2 256
2308 #define FF_BUG_DIRECT_BLOCKSIZE 512
2309 #define FF_BUG_EDGE 1024
2310 #define FF_BUG_HPEL_CHROMA 2048
2311 #define FF_BUG_DC_CLIP 4096
2312 #define FF_BUG_MS 8192
2313 #define FF_BUG_TRUNCATED 16384
2314 
2328 #define FF_COMPLIANCE_VERY_STRICT 2
2329 #define FF_COMPLIANCE_STRICT 1
2330 #define FF_COMPLIANCE_NORMAL 0
2331 #define FF_COMPLIANCE_UNOFFICIAL -1
2332 #define FF_COMPLIANCE_EXPERIMENTAL -2
2333 
2334 
2340 #define FF_EC_GUESS_MVS 1
2341 #define FF_EC_DEBLOCK 2
2342 
2348  int debug;
2349 #define FF_DEBUG_PICT_INFO 1
2350 #define FF_DEBUG_RC 2
2351 #define FF_DEBUG_BITSTREAM 4
2352 #define FF_DEBUG_MB_TYPE 8
2353 #define FF_DEBUG_QP 16
2354 #if FF_API_DEBUG_MV
2355 
2358 #define FF_DEBUG_MV 32
2359 #endif
2360 #define FF_DEBUG_DCT_COEFF 0x00000040
2361 #define FF_DEBUG_SKIP 0x00000080
2362 #define FF_DEBUG_STARTCODE 0x00000100
2363 #define FF_DEBUG_PTS 0x00000200
2364 #define FF_DEBUG_ER 0x00000400
2365 #define FF_DEBUG_MMCO 0x00000800
2366 #define FF_DEBUG_BUGS 0x00001000
2367 #if FF_API_DEBUG_MV
2368 #define FF_DEBUG_VIS_QP 0x00002000
2369 #define FF_DEBUG_VIS_MB_TYPE 0x00004000
2370 #endif
2371 #define FF_DEBUG_BUFFERS 0x00008000
2372 #define FF_DEBUG_THREADS 0x00010000
2373 
2374 #if FF_API_DEBUG_MV
2375 
2380 #define FF_DEBUG_VIS_MV_P_FOR 0x00000001 //visualize forward predicted MVs of P frames
2381 #define FF_DEBUG_VIS_MV_B_FOR 0x00000002 //visualize forward predicted MVs of B frames
2382 #define FF_DEBUG_VIS_MV_B_BACK 0x00000004 //visualize backward predicted MVs of B frames
2383 #endif
2384 
2391 
2398 #define AV_EF_CRCCHECK (1<<0)
2399 #define AV_EF_BITSTREAM (1<<1)
2400 #define AV_EF_BUFFER (1<<2)
2401 #define AV_EF_EXPLODE (1<<3)
2402 
2411 
2418 
2430 
2437 
2444 #define FF_DCT_AUTO 0
2445 #define FF_DCT_FASTINT 1
2446 #define FF_DCT_INT 2
2447 #define FF_DCT_MMX 3
2448 #define FF_DCT_ALTIVEC 5
2449 #define FF_DCT_FAAN 6
2450 
2457 #define FF_IDCT_AUTO 0
2458 #define FF_IDCT_INT 1
2459 #define FF_IDCT_SIMPLE 2
2460 #define FF_IDCT_SIMPLEMMX 3
2461 #define FF_IDCT_ARM 7
2462 #define FF_IDCT_ALTIVEC 8
2463 #define FF_IDCT_SH4 9
2464 #define FF_IDCT_SIMPLEARM 10
2465 #define FF_IDCT_IPP 13
2466 #define FF_IDCT_XVIDMMX 14
2467 #define FF_IDCT_SIMPLEARMV5TE 16
2468 #define FF_IDCT_SIMPLEARMV6 17
2469 #define FF_IDCT_SIMPLEVIS 18
2470 #define FF_IDCT_FAAN 20
2471 #define FF_IDCT_SIMPLENEON 22
2472 #if FF_API_ARCH_ALPHA
2473 #define FF_IDCT_SIMPLEALPHA 23
2474 #endif
2475 
2482 
2489 
2490 #if FF_API_LOWRES
2491 
2499 #endif
2500 
2507 
2515 
2525 #define FF_THREAD_FRAME 1
2526 #define FF_THREAD_SLICE 2
2527 
2528 
2534 
2544 
2554  int (*execute)(struct AVCodecContext *c, int (*func)(struct AVCodecContext *c2, void *arg), void *arg2, int *ret, int count, int size);
2555 
2574  int (*execute2)(struct AVCodecContext *c, int (*func)(struct AVCodecContext *c2, void *arg, int jobnr, int threadnr), void *arg2, int *ret, int count);
2575 
2576 #if FF_API_THREAD_OPAQUE
2577 
2582 #endif
2583 
2590 
2596  int profile;
2597 #define FF_PROFILE_UNKNOWN -99
2598 #define FF_PROFILE_RESERVED -100
2599 
2600 #define FF_PROFILE_AAC_MAIN 0
2601 #define FF_PROFILE_AAC_LOW 1
2602 #define FF_PROFILE_AAC_SSR 2
2603 #define FF_PROFILE_AAC_LTP 3
2604 #define FF_PROFILE_AAC_HE 4
2605 #define FF_PROFILE_AAC_HE_V2 28
2606 #define FF_PROFILE_AAC_LD 22
2607 #define FF_PROFILE_AAC_ELD 38
2608 #define FF_PROFILE_MPEG2_AAC_LOW 128
2609 #define FF_PROFILE_MPEG2_AAC_HE 131
2610 
2611 #define FF_PROFILE_DTS 20
2612 #define FF_PROFILE_DTS_ES 30
2613 #define FF_PROFILE_DTS_96_24 40
2614 #define FF_PROFILE_DTS_HD_HRA 50
2615 #define FF_PROFILE_DTS_HD_MA 60
2616 
2617 #define FF_PROFILE_MPEG2_422 0
2618 #define FF_PROFILE_MPEG2_HIGH 1
2619 #define FF_PROFILE_MPEG2_SS 2
2620 #define FF_PROFILE_MPEG2_SNR_SCALABLE 3
2621 #define FF_PROFILE_MPEG2_MAIN 4
2622 #define FF_PROFILE_MPEG2_SIMPLE 5
2623 
2624 #define FF_PROFILE_H264_CONSTRAINED (1<<9) // 8+1; constraint_set1_flag
2625 #define FF_PROFILE_H264_INTRA (1<<11) // 8+3; constraint_set3_flag
2626 
2627 #define FF_PROFILE_H264_BASELINE 66
2628 #define FF_PROFILE_H264_CONSTRAINED_BASELINE (66|FF_PROFILE_H264_CONSTRAINED)
2629 #define FF_PROFILE_H264_MAIN 77
2630 #define FF_PROFILE_H264_EXTENDED 88
2631 #define FF_PROFILE_H264_HIGH 100
2632 #define FF_PROFILE_H264_HIGH_10 110
2633 #define FF_PROFILE_H264_HIGH_10_INTRA (110|FF_PROFILE_H264_INTRA)
2634 #define FF_PROFILE_H264_HIGH_422 122
2635 #define FF_PROFILE_H264_HIGH_422_INTRA (122|FF_PROFILE_H264_INTRA)
2636 #define FF_PROFILE_H264_HIGH_444 144
2637 #define FF_PROFILE_H264_HIGH_444_PREDICTIVE 244
2638 #define FF_PROFILE_H264_HIGH_444_INTRA (244|FF_PROFILE_H264_INTRA)
2639 #define FF_PROFILE_H264_CAVLC_444 44
2640 
2641 #define FF_PROFILE_VC1_SIMPLE 0
2642 #define FF_PROFILE_VC1_MAIN 1
2643 #define FF_PROFILE_VC1_COMPLEX 2
2644 #define FF_PROFILE_VC1_ADVANCED 3
2645 
2646 #define FF_PROFILE_MPEG4_SIMPLE 0
2647 #define FF_PROFILE_MPEG4_SIMPLE_SCALABLE 1
2648 #define FF_PROFILE_MPEG4_CORE 2
2649 #define FF_PROFILE_MPEG4_MAIN 3
2650 #define FF_PROFILE_MPEG4_N_BIT 4
2651 #define FF_PROFILE_MPEG4_SCALABLE_TEXTURE 5
2652 #define FF_PROFILE_MPEG4_SIMPLE_FACE_ANIMATION 6
2653 #define FF_PROFILE_MPEG4_BASIC_ANIMATED_TEXTURE 7
2654 #define FF_PROFILE_MPEG4_HYBRID 8
2655 #define FF_PROFILE_MPEG4_ADVANCED_REAL_TIME 9
2656 #define FF_PROFILE_MPEG4_CORE_SCALABLE 10
2657 #define FF_PROFILE_MPEG4_ADVANCED_CODING 11
2658 #define FF_PROFILE_MPEG4_ADVANCED_CORE 12
2659 #define FF_PROFILE_MPEG4_ADVANCED_SCALABLE_TEXTURE 13
2660 #define FF_PROFILE_MPEG4_SIMPLE_STUDIO 14
2661 #define FF_PROFILE_MPEG4_ADVANCED_SIMPLE 15
2662 
2663 #define FF_PROFILE_JPEG2000_CSTREAM_RESTRICTION_0 0
2664 #define FF_PROFILE_JPEG2000_CSTREAM_RESTRICTION_1 1
2665 #define FF_PROFILE_JPEG2000_CSTREAM_NO_RESTRICTION 2
2666 #define FF_PROFILE_JPEG2000_DCINEMA_2K 3
2667 #define FF_PROFILE_JPEG2000_DCINEMA_4K 4
2668 
2669 
2670 #define FF_PROFILE_HEVC_MAIN 1
2671 #define FF_PROFILE_HEVC_MAIN_10 2
2672 #define FF_PROFILE_HEVC_MAIN_STILL_PICTURE 3
2673 
2679  int level;
2680 #define FF_LEVEL_UNKNOWN -99
2681 
2688 
2695 
2702 
2713 
2714 #if FF_API_ERROR_RATE
2715 
2721 #endif
2722 
2723 #if FF_API_CODEC_PKT
2724 
2729 #endif
2730 
2737  uint64_t vbv_delay;
2738 } AVCodecContext;
2739 
2743 typedef struct AVProfile {
2744  int profile;
2745  const char *name;
2746 } AVProfile;
2747 
2748 typedef struct AVCodecDefault AVCodecDefault;
2749 
2750 struct AVSubtitle;
2751 
2755 typedef struct AVCodec {
2762  const char *name;
2767  const char *long_name;
2776  const enum AVPixelFormat *pix_fmts;
2779  const uint64_t *channel_layouts;
2780 #if FF_API_LOWRES
2782 #endif
2785 
2786  /*****************************************************************
2787  * No fields below this line are part of the public API. They
2788  * may not be used outside of libavcodec and can be changed and
2789  * removed at will.
2790  * New public fields should be added right above.
2791  *****************************************************************
2792  */
2794  struct AVCodec *next;
2819 
2823  void (*init_static_data)(struct AVCodec *codec);
2824 
2826  int (*encode_sub)(AVCodecContext *, uint8_t *buf, int buf_size,
2827  const struct AVSubtitle *sub);
2838  int (*encode2)(AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame,
2839  int *got_packet_ptr);
2840  int (*decode)(AVCodecContext *, void *outdata, int *outdata_size, AVPacket *avpkt);
2847 } AVCodec;
2848 
2852 typedef struct AVHWAccel {
2858  const char *name;
2859 
2866 
2873 
2880 
2886 
2887  struct AVHWAccel *next;
2888 
2903  int (*start_frame)(AVCodecContext *avctx, const uint8_t *buf, uint32_t buf_size);
2904 
2916  int (*decode_slice)(AVCodecContext *avctx, const uint8_t *buf, uint32_t buf_size);
2917 
2927  int (*end_frame)(AVCodecContext *avctx);
2928 
2937 } AVHWAccel;
2938 
2950 typedef struct AVPicture {
2953 } AVPicture;
2954 
2959 #define AVPALETTE_SIZE 1024
2960 #define AVPALETTE_COUNT 256
2961 
2964 
2966 
2972 
2978 };
2979 
2980 #define AV_SUBTITLE_FLAG_FORCED 0x00000001
2981 
2982 typedef struct AVSubtitleRect {
2983  int x;
2984  int y;
2985  int w;
2986  int h;
2988 
2995 
2996  char *text;
2997 
3003  char *ass;
3004  int flags;
3005 } AVSubtitleRect;
3006 
3007 typedef struct AVSubtitle {
3008  uint16_t format; /* 0 = graphics */
3009  uint32_t start_display_time; /* relative to packet pts, in ms */
3010  uint32_t end_display_time; /* relative to packet pts, in ms */
3011  unsigned num_rects;
3013  int64_t pts;
3014 } AVSubtitle;
3015 
3021 AVCodec *av_codec_next(const AVCodec *c);
3022 
3026 unsigned avcodec_version(void);
3027 
3031 const char *avcodec_configuration(void);
3032 
3036 const char *avcodec_license(void);
3037 
3046 void avcodec_register(AVCodec *codec);
3047 
3058 void avcodec_register_all(void);
3059 
3076 
3087 
3094 const AVClass *avcodec_get_class(void);
3095 
3107 int avcodec_copy_context(AVCodecContext *dest, const AVCodecContext *src);
3108 
3109 #if FF_API_AVFRAME_LAVC
3110 
3114 AVFrame *avcodec_alloc_frame(void);
3115 
3124 void avcodec_get_frame_defaults(AVFrame *frame);
3125 
3139 void avcodec_free_frame(AVFrame **frame);
3140 #endif
3141 
3178 int avcodec_open2(AVCodecContext *avctx, const AVCodec *codec, AVDictionary **options);
3179 
3189 int avcodec_close(AVCodecContext *avctx);
3190 
3196 void avsubtitle_free(AVSubtitle *sub);
3197 
3207 #if FF_API_DESTRUCT_PACKET
3208 
3213 void av_destruct_packet(AVPacket *pkt);
3214 #endif
3215 
3224 void av_init_packet(AVPacket *pkt);
3225 
3234 int av_new_packet(AVPacket *pkt, int size);
3235 
3242 void av_shrink_packet(AVPacket *pkt, int size);
3243 
3250 int av_grow_packet(AVPacket *pkt, int grow_by);
3251 
3265 int av_packet_from_data(AVPacket *pkt, uint8_t *data, int size);
3266 
3271 int av_dup_packet(AVPacket *pkt);
3272 
3278 void av_free_packet(AVPacket *pkt);
3279 
3289  int size);
3290 
3300  int size);
3301 
3311  int *size);
3312 
3320 
3337 int av_packet_ref(AVPacket *dst, AVPacket *src);
3338 
3347 void av_packet_unref(AVPacket *pkt);
3348 
3357 void av_packet_move_ref(AVPacket *dst, AVPacket *src);
3358 
3371 int av_packet_copy_props(AVPacket *dst, const AVPacket *src);
3372 
3389 
3397 
3398 #if FF_API_GET_BUFFER
3402 #endif
3403 
3410 
3411 #if FF_API_EMU_EDGE
3412 
3423 unsigned avcodec_get_edge_width(void);
3424 #endif
3425 
3434 
3443  int linesize_align[AV_NUM_DATA_POINTERS]);
3444 
3493 int avcodec_decode_audio4(AVCodecContext *avctx, AVFrame *frame,
3494  int *got_frame_ptr, AVPacket *avpkt);
3495 
3537  int *got_picture_ptr,
3538  AVPacket *avpkt);
3539 
3557  int *got_sub_ptr,
3558  AVPacket *avpkt);
3559 
3567  AV_PICTURE_STRUCTURE_TOP_FIELD, //< coded as top field
3568  AV_PICTURE_STRUCTURE_BOTTOM_FIELD, //< coded as bottom field
3569  AV_PICTURE_STRUCTURE_FRAME, //< coded as frame
3570 };
3571 
3572 typedef struct AVCodecParserContext {
3573  void *priv_data;
3575  int64_t frame_offset; /* offset of the current frame */
3576  int64_t cur_offset; /* current offset
3577  (incremented by each av_parser_parse()) */
3578  int64_t next_frame_offset; /* offset of the next frame */
3579  /* video info */
3580  int pict_type; /* XXX: Put it back in AVCodecContext. */
3590  int repeat_pict; /* XXX: Put it back in AVCodecContext. */
3591  int64_t pts; /* pts of the current frame */
3592  int64_t dts; /* dts of the current frame */
3593 
3594  /* private data */
3595  int64_t last_pts;
3596  int64_t last_dts;
3598 
3599 #define AV_PARSER_PTS_NB 4
3604 
3605  int flags;
3606 #define PARSER_FLAG_COMPLETE_FRAMES 0x0001
3607 #define PARSER_FLAG_ONCE 0x0002
3608 #define PARSER_FLAG_FETCHED_OFFSET 0x0004
3610 
3611  int64_t offset;
3613 
3621 
3640 
3641  // Timestamp generation support:
3652 
3667 
3681 
3688 
3692  int64_t pos;
3693 
3697  int64_t last_pos;
3698 
3705 
3707 
3717 
3726 
3727 typedef struct AVCodecParser {
3728  int codec_ids[5]; /* several codec IDs are permitted */
3732  AVCodecContext *avctx,
3733  const uint8_t **poutbuf, int *poutbuf_size,
3734  const uint8_t *buf, int buf_size);
3736  int (*split)(AVCodecContext *avctx, const uint8_t *buf, int buf_size);
3738 } AVCodecParser;
3739 
3741 
3744 
3774  AVCodecContext *avctx,
3775  uint8_t **poutbuf, int *poutbuf_size,
3776  const uint8_t *buf, int buf_size,
3777  int64_t pts, int64_t dts,
3778  int64_t pos);
3779 
3785  AVCodecContext *avctx,
3786  uint8_t **poutbuf, int *poutbuf_size,
3787  const uint8_t *buf, int buf_size, int keyframe);
3789 
3807 
3815 
3854 int avcodec_encode_audio2(AVCodecContext *avctx, AVPacket *avpkt,
3855  const AVFrame *frame, int *got_packet_ptr);
3856 
3891 int avcodec_encode_video2(AVCodecContext *avctx, AVPacket *avpkt,
3892  const AVFrame *frame, int *got_packet_ptr);
3893 
3894 int avcodec_encode_subtitle(AVCodecContext *avctx, uint8_t *buf, int buf_size,
3895  const AVSubtitle *sub);
3896 
3897 
3919 
3928 
3950  enum AVPixelFormat pix_fmt, int width, int height);
3951 
3967 int avpicture_layout(const AVPicture* src, enum AVPixelFormat pix_fmt,
3968  int width, int height,
3969  unsigned char *dest, int dest_size);
3970 
3984 
3985 #if FF_API_DEINTERLACE
3986 
3992 int avpicture_deinterlace(AVPicture *dst, const AVPicture *src,
3993  enum AVPixelFormat pix_fmt, int width, int height);
3994 #endif
3995 
3998 void av_picture_copy(AVPicture *dst, const AVPicture *src,
3999  enum AVPixelFormat pix_fmt, int width, int height);
4000 
4004 int av_picture_crop(AVPicture *dst, const AVPicture *src,
4005  enum AVPixelFormat pix_fmt, int top_band, int left_band);
4006 
4010 int av_picture_pad(AVPicture *dst, const AVPicture *src, int height, int width, enum AVPixelFormat pix_fmt,
4011  int padtop, int padbottom, int padleft, int padright, int *color);
4012 
4037 void attribute_deprecated avcodec_get_chroma_sub_sample(enum AVPixelFormat pix_fmt, int *h_shift, int *v_shift);
4038 
4045 
4046 #define FF_LOSS_RESOLUTION 0x0001
4047 #define FF_LOSS_DEPTH 0x0002
4048 #define FF_LOSS_COLORSPACE 0x0004
4049 #define FF_LOSS_ALPHA 0x0008
4050 #define FF_LOSS_COLORQUANT 0x0010
4051 #define FF_LOSS_CHROMA 0x0020
4070 int avcodec_get_pix_fmt_loss(enum AVPixelFormat dst_pix_fmt, enum AVPixelFormat src_pix_fmt,
4071  int has_alpha);
4072 
4091  enum AVPixelFormat src_pix_fmt,
4092  int has_alpha, int *loss_ptr);
4093 
4094 enum AVPixelFormat avcodec_default_get_format(struct AVCodecContext *s, const enum AVPixelFormat * fmt);
4095 
4100 #if FF_API_SET_DIMENSIONS
4101 
4106 #endif
4107 
4117 size_t av_get_codec_tag_string(char *buf, size_t buf_size, unsigned int codec_tag);
4118 
4119 void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode);
4120 
4128 const char *av_get_profile_name(const AVCodec *codec, int profile);
4129 
4130 int avcodec_default_execute(AVCodecContext *c, int (*func)(AVCodecContext *c2, void *arg2),void *arg, int *ret, int count, int size);
4131 int avcodec_default_execute2(AVCodecContext *c, int (*func)(AVCodecContext *c2, void *arg2, int, int),void *arg, int *ret, int count);
4132 //FIXME func typedef
4133 
4151  enum AVSampleFormat sample_fmt, const uint8_t *buf,
4152  int buf_size, int align);
4153 
4164 
4172 
4182 
4191 int av_get_audio_frame_duration(AVCodecContext *avctx, int frame_bytes);
4192 
4193 
4195  void *priv_data;
4200 
4201 
4202 typedef struct AVBitStreamFilter {
4203  const char *name;
4206  AVCodecContext *avctx, const char *args,
4207  uint8_t **poutbuf, int *poutbuf_size,
4208  const uint8_t *buf, int buf_size, int keyframe);
4212 
4216  AVCodecContext *avctx, const char *args,
4217  uint8_t **poutbuf, int *poutbuf_size,
4218  const uint8_t *buf, int buf_size, int keyframe);
4220 
4222 
4223 /* memory */
4224 
4232 void av_fast_padded_malloc(void *ptr, unsigned int *size, size_t min_size);
4233 
4241 unsigned int av_xiphlacing(unsigned char *s, unsigned int v);
4242 
4243 #if FF_API_MISSING_SAMPLE
4244 
4258 void av_log_missing_feature(void *avc, const char *feature, int want_sample);
4259 
4270 void av_log_ask_for_sample(void *avc, const char *msg, ...) av_printf_format(2, 3);
4271 #endif /* FF_API_MISSING_SAMPLE */
4272 
4276 void av_register_hwaccel(AVHWAccel *hwaccel);
4277 
4284 
4285 
4289 enum AVLockOp {
4294 };
4295 
4309 int av_lockmgr_register(int (*cb)(void **mutex, enum AVLockOp op));
4310 
4315 
4321 
4325 int av_codec_is_encoder(const AVCodec *codec);
4326 
4330 int av_codec_is_decoder(const AVCodec *codec);
4331 
4336 
4345 
4351 
4356 #endif /* AVCODEC_AVCODEC_H */
codec_id is not known (like AV_CODEC_ID_NONE) but lavf should attempt to identify it ...
Definition: avcodec.h:452
int(* parser_init)(AVCodecParserContext *s)
Definition: avcodec.h:3730
const struct AVCodec * codec
Definition: avcodec.h:1063
discard all frames except keyframes
Definition: avcodec.h:545
AVSideDataParamChangeFlags
Definition: avcodec.h:1026
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:1088
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:2903
attribute_deprecated int lowres
low resolution decoding, 1-> 1/2 size, 2->1/4 size
Definition: avcodec.h:2498
#define AV_NUM_DATA_POINTERS
Definition: frame.h:108
AVPacketSideDataType
Definition: avcodec.h:885
int size
int linesize[AV_NUM_DATA_POINTERS]
number of bytes per line
Definition: avcodec.h:2952
void av_free_packet(AVPacket *pkt)
Free a packet.
Definition: avpacket.c:242
This structure describes decoded (raw) audio or video data.
Definition: frame.h:107
int avcodec_default_execute2(AVCodecContext *c, int(*func)(AVCodecContext *c2, void *arg2, int, int), void *arg, int *ret, int count)
ITU-R BT2020.
Definition: avcodec.h:557
AVCodec * avcodec_find_encoder(enum AVCodecID id)
Find a registered encoder with a matching codec ID.
Definition: utils.c:1654
#define c2
Definition: idct_sh4.c:27
ITU-R BT2020 constant luminance system.
Definition: avcodec.h:589
int x
top left corner of pict, undefined when pict is not set
Definition: avcodec.h:2983
int mpeg_quant
0-> h263 quant 1-> mpeg quant
Definition: avcodec.h:1339
int dct_algo
DCT algorithm, see FF_DCT_* below.
Definition: avcodec.h:2443
A dummy id pointing at the start of audio codecs.
Definition: avcodec.h:289
attribute_deprecated int avpicture_deinterlace(AVPicture *dst, const AVPicture *src, enum AVPixelFormat pix_fmt, int width, int height)
deinterlace - if not supported return -1
Definition: imgconvert.c:461
IEC 61966-2-1 (sRGB or sYCC)
Definition: avcodec.h:573
uint64_t error[AV_NUM_DATA_POINTERS]
error
Definition: avcodec.h:2436
mpeg2/4, h264 default
Definition: avcodec.h:607
int avpicture_fill(AVPicture *picture, uint8_t *ptr, enum AVPixelFormat pix_fmt, int width, int height)
Fill in the AVPicture fields.
Definition: avpicture.c:34
int coded_width
Bitstream width / height, may be different from width/height e.g.
Definition: avcodec.h:1227
also ITU-R BT601-6 525 or 625 / ITU-R BT1358 525 or 625 / ITU-R BT1700 NTSC
Definition: avcodec.h:566
int capabilities
Hardware accelerated codec capabilities.
Definition: avcodec.h:2885
void(* flush)(AVCodecContext *)
Flush buffers.
Definition: avcodec.h:2846
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:2191
float qblur
amount of qscale smoothing over time (0.0-1.0)
Definition: avcodec.h:2054
Unlock the mutex.
Definition: avcodec.h:4292
float border_masking
Border processing masking, raises the quantizer for mbs on the borders of the picture.
Definition: avcodec.h:1648
memory handling functions
int64_t pos
byte position in stream, -1 if unknown
Definition: avcodec.h:1002
void av_shrink_packet(AVPacket *pkt, int size)
Reduce packet size, correctly zeroing padding.
Definition: avpacket.c:100
attribute_deprecated int request_channels
Decoder should decode to this many channels if it can (0 for default)
Definition: avcodec.h:1832
int64_t next_frame_offset
Definition: avcodec.h:3578
static AVFrame * picture
Definition: output.c:179
AVFrame * coded_frame
the picture in the bitstream
Definition: avcodec.h:2506
int id
id
Definition: avcodec.h:837
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:1302
int rc_initial_buffer_occupancy
Number of bits which should be loaded into the rc buffer before decoding starts.
Definition: avcodec.h:2152
Dummy codec for streams containing only metadata information.
Definition: avcodec.h:458
int height
Definition: avcodec.h:845
const char * avcodec_configuration(void)
Return the libavcodec build-time configuration.
Definition: utils.c:1871
enum AVColorRange color_range
MPEG vs JPEG YUV range.
Definition: avcodec.h:1754
"Logarithmic transfer characteristic (100:1 range)"
Definition: avcodec.h:569
int qscale
Definition: avcodec.h:635
enum AVFieldOrder field_order
Definition: avcodec.h:3706
struct AVBitStreamFilter * next
Definition: avcodec.h:4210
void(* rtp_callback)(struct AVCodecContext *avctx, void *data, int size, int mb_nb)
Definition: avcodec.h:2247
int nb_colors
number of colors in pict, undefined when pict is not set
Definition: avcodec.h:2987
int size
Definition: avcodec.h:974
char codec_name[32]
Definition: avcodec.h:1064
int mb_lmin
minimum MB lagrange multipler
Definition: avcodec.h:1655
const char * avcodec_license(void)
Return the libavcodec license.
Definition: utils.c:1876
int codec_ids[5]
Definition: avcodec.h:3728
enhanced predictive zonal search
Definition: avcodec.h:528
enum AVPixelFormat pix_fmt
Supported pixel format.
Definition: avcodec.h:2879
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:1422
int av_picture_crop(AVPicture *dst, const AVPicture *src, enum AVPixelFormat pix_fmt, int top_band, int left_band)
Crop image top and left side.
Definition: imgconvert.c:267
void attribute_deprecated avcodec_get_chroma_sub_sample(enum AVPixelFormat pix_fmt, int *h_shift, int *v_shift)
Definition: imgconvert.c:54
enum AVPixelFormat pix_fmt
Pixel format, see AV_PIX_FMT_xxx.
Definition: avcodec.h:1247
external API header
int avpicture_layout(const AVPicture *src, enum AVPixelFormat pix_fmt, int width, int height, unsigned char *dest, int dest_size)
Copy pixel data from an AVPicture into a buffer.
Definition: avpicture.c:49
unsigned num_rects
Definition: avcodec.h:3011
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:70
enum AVMediaType type
Type of codec implemented by the hardware accelerator.
Definition: avcodec.h:2865
A dummy ID pointing at the start of various fake codecs.
Definition: avcodec.h:449
char * stats_in
pass2 encoding statistics input buffer Concatenated stuff from stats_out of pass1 should be placed he...
Definition: avcodec.h:2286
int ildct_cmp
interlaced DCT comparison function
Definition: avcodec.h:1447
attribute_deprecated void * thread_opaque
Definition: avcodec.h:2581
enum AVMediaType type
Definition: avcodec.h:2768
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:1715
int rtp_payload_size
Definition: avcodec.h:2249
int(* decode)(AVCodecContext *, void *outdata, int *outdata_size, AVPacket *avpkt)
Definition: avcodec.h:2840
AVColorRange
Definition: avcodec.h:593
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:605
int duration
Duration of the current frame.
Definition: avcodec.h:3704
discard all
Definition: avcodec.h:546
int intra_quant_bias
intra quantizer bias
Definition: avcodec.h:1536
int64_t cur_frame_pos[AV_PARSER_PTS_NB]
Position of the packet in file.
Definition: avcodec.h:3687
int avcodec_encode_audio2(AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame, int *got_packet_ptr)
Encode a frame of audio.
Definition: utils.c:1194
int bits_per_raw_sample
Bits per sample/pixel of internal libavcodec pixel/sample format.
Definition: avcodec.h:2488
void avcodec_register_all(void)
Register all the codecs, parsers and bitstream filters which were enabled at configuration time...
Definition: allcodecs.c:68
int dts_ref_dts_delta
Offset of the current timestamp against last timestamp sync point in units of AVCodecContext.time_base.
Definition: avcodec.h:3666
int avcodec_decode_subtitle2(AVCodecContext *avctx, AVSubtitle *sub, int *got_sub_ptr, AVPacket *avpkt)
Decode a subtitle message.
Definition: utils.c:1557
attribute_deprecated void avcodec_default_release_buffer(AVCodecContext *s, AVFrame *pic)
Definition: utils.c:788
int av_dup_packet(AVPacket *pkt)
Definition: avpacket.c:189
attribute_deprecated int(* get_buffer)(struct AVCodecContext *c, AVFrame *pic)
Called at the beginning of each frame to get a buffer for it.
Definition: avcodec.h:1927
four components are given, that's all.
Definition: avcodec.h:2950
Not part of ABI.
Definition: avcodec.h:558
int profile
profile
Definition: avcodec.h:2596
int lmax
maximum Lagrange multipler
Definition: avcodec.h:2185
int frame_skip_cmp
frame skip comparison function
Definition: avcodec.h:2213
An AV_PKT_DATA_H263_MB_INFO side data packet contains a number of structures with info about macroblo...
Definition: avcodec.h:925
AVCodec.
Definition: avcodec.h:2755
int avcodec_copy_context(AVCodecContext *dest, const AVCodecContext *src)
Copy the settings of the source AVCodecContext into the destination AVCodecContext.
Definition: options.c:138
int block_align
number of bytes per packet if constant and known or 0 Used by some WAV based audio codecs...
Definition: avcodec.h:1816
float i_quant_offset
qscale offset between P and I-frames
Definition: avcodec.h:1355
AVLockOp
Lock operation used by lockmgr.
Definition: avcodec.h:4289
uint64_t vbv_delay
VBV delay coded in the last frame (in periods of a 27 MHz clock).
Definition: avcodec.h:2737
attribute_deprecated void(* release_buffer)(struct AVCodecContext *c, AVFrame *pic)
Called to release buffers which were allocated with get_buffer.
Definition: avcodec.h:1941
char * text
0 terminated plain UTF-8 text
Definition: avcodec.h:2996
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:131
int scenechange_threshold
scene change detection threshold 0 is default, larger means fewer detected scene changes.
Definition: avcodec.h:1596
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:2134
AVRational time_base
This is the fundamental unit of time (in seconds) in terms of which frame timestamps are represented...
Definition: avcodec.h:1173
int av_codec_is_decoder(const AVCodec *codec)
Definition: utils.c:111
AVSubtitleRect ** rects
Definition: avcodec.h:3012
enum AVAudioServiceType audio_service_type
Type of service that the audio stream conveys.
Definition: avcodec.h:1854
const AVCodecDescriptor * avcodec_descriptor_next(const AVCodecDescriptor *prev)
Iterate over all codec descriptors known to libavcodec.
Definition: codec_desc.c:2272
void av_picture_copy(AVPicture *dst, const AVPicture *src, enum AVPixelFormat pix_fmt, int width, int height)
Copy image src to dst.
Definition: avpicture.c:119
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:291
enum AVDiscard skip_frame
Definition: avcodec.h:2701
"Linear transfer characteristics"
Definition: avcodec.h:568
const AVClass * avcodec_get_class(void)
Get the AVClass for AVCodecContext.
Definition: options.c:194
int av_codec_is_encoder(const AVCodec *codec)
Definition: utils.c:106
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:276
int w
width of pict, undefined when pict is not set
Definition: avcodec.h:2985
struct AVHWAccel * hwaccel
Hardware accelerator in use.
Definition: avcodec.h:2417
float p_masking
p block masking (0-> disabled)
Definition: avcodec.h:1383
int context_model
context model
Definition: avcodec.h:2171
AVCodecParserContext * parser
Definition: avcodec.h:4197
Public dictionary API.
int(* init_thread_copy)(AVCodecContext *)
If defined, called on thread contexts when they are created.
Definition: avcodec.h:2804
int bit_rate_tolerance
number of bits the bitstream is allowed to diverge from the reference.
Definition: avcodec.h:1120
int mb_lmax
maximum MB lagrange multipler
Definition: avcodec.h:1662
enum AVPictureStructure picture_structure
Indicate whether a picture is coded as a frame, top field or bottom field.
Definition: avcodec.h:3716
enum AVPixelFormat avcodec_default_get_format(struct AVCodecContext *s, const enum AVPixelFormat *fmt)
Definition: utils.c:830
enum AVSampleFormat sample_fmt
audio sample format
Definition: avcodec.h:1787
Lock the mutex.
Definition: avcodec.h:4291
uint8_t
void * hwaccel_context
Hardware accelerator context.
Definition: avcodec.h:2429
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:174
int subtitle_header_size
Definition: avcodec.h:2712
int me_range
maximum motion estimation search range in subpel units If 0 then no limit.
Definition: avcodec.h:1529
attribute_deprecated void(* destruct)(struct AVPacket *)
Definition: avcodec.h:998
uint8_t * data[AV_NUM_DATA_POINTERS]
Definition: avcodec.h:2951
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:170
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:1311
Not part of ABI.
Definition: avcodec.h:597
int pre_dia_size
ME prepass diamond size & shape.
Definition: avcodec.h:1496
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:141
uint8_t * extradata
some codecs need / can use extradata like Huffman tables.
Definition: avcodec.h:1162
const char * name
const AVClass * av_class
information on struct for av_log
Definition: avcodec.h:1059
int scenechange_factor
Multiplied by qscale for each frame and added to scene_change_score.
Definition: avcodec.h:1711
int me_cmp
motion estimation comparison function
Definition: avcodec.h:1429
int avcodec_encode_video2(AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame, int *got_packet_ptr)
Encode a frame of video.
Definition: utils.c:1292
also ITU-R BT470M / ITU-R BT1700 625 PAL & SECAM
Definition: avcodec.h:564
struct AVCodecParser * next
Definition: avcodec.h:3737
int rc_strategy
obsolete FIXME remove
Definition: avcodec.h:1314
mpeg1, jpeg, h263
Definition: avcodec.h:608
const char data[16]
Definition: mxf.c:66
const char * name
Definition: avcodec.h:4203
int coder_type
coder type
Definition: avcodec.h:2164
uint8_t * data
Definition: avcodec.h:973
void av_packet_move_ref(AVPacket *dst, AVPacket *src)
Move every field in src to dst and reset src.
Definition: avpacket.c:378
static int flags
Definition: log.c:44
int mb_threshold
Macroblock threshold below which the user specified macroblock types will be used.
Definition: avcodec.h:1619
Motion_Est_ID
motion estimation type.
Definition: avcodec.h:523
attribute_deprecated int(* reget_buffer)(struct AVCodecContext *c, AVFrame *pic)
Called at the beginning of a frame to get cr buffer for it.
Definition: avcodec.h:1956
int(* parser_parse)(AVCodecParserContext *s, AVCodecContext *avctx, const uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size)
Definition: avcodec.h:3731
int h
height of pict, undefined when pict is not set
Definition: avcodec.h:2986
void avpicture_free(AVPicture *picture)
Free a picture previously allocated by avpicture_alloc().
Definition: avpicture.c:114
int bits_per_coded_sample
bits per sample/pixel from the demuxer (needed for huffyuv).
Definition: avcodec.h:2481
int min_prediction_order
Definition: avcodec.h:2226
float lumi_masking
luminance masking (0-> disabled)
Definition: avcodec.h:1362
char * stats_out
pass1 encoding statistics output buffer
Definition: avcodec.h:2278
int duration
Duration of this packet in AVStream->time_base units, 0 if unknown.
Definition: avcodec.h:995
struct AVBitStreamFilterContext * next
Definition: avcodec.h:4198
enum AVChromaLocation chroma_sample_location
This defines the location of chroma samples.
Definition: avcodec.h:1761
float rc_qmod_amp
Definition: avcodec.h:2085
float quality_factor
Definition: avcodec.h:636
hexagon based search
Definition: avcodec.h:530
AVCodec * avcodec_find_encoder_by_name(const char *name)
Find a registered encoder with the specified name.
Definition: utils.c:1659
int chromaoffset
chroma qp offset from luma
Definition: avcodec.h:1704
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:182
int slice_count
slice count
Definition: avcodec.h:1397
attribute_deprecated void avcodec_set_dimensions(AVCodecContext *s, int width, int height)
Definition: utils.c:138
Libavcodec version macros.
int(* close)(AVCodecContext *)
Definition: avcodec.h:2841
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:1590
int av_new_packet(AVPacket *pkt, int size)
Allocate the payload of a packet and initialize its fields with default values.
Definition: avpacket.c:80
no search, that is use 0,0 vector whenever one is needed
Definition: avcodec.h:524
enum AVCodecID id
Definition: avcodec.h:2769
const uint64_t * channel_layouts
array of support channel layouts, or NULL if unknown. array is terminated by 0
Definition: avcodec.h:2779
AVHWAccel * av_hwaccel_next(AVHWAccel *hwaccel)
If hwaccel is NULL, returns the first registered hardware accelerator, if hwaccel is non-NULL...
Definition: utils.c:2172
reserved for experiments
Definition: avcodec.h:529
const AVCodecDefault * defaults
Private codec-specific defaults.
Definition: avcodec.h:2818
AVCodecID
Identify the syntax and semantics of the bitstream.
Definition: avcodec.h:105
IEC 61966-2-4.
Definition: avcodec.h:571
int av_get_bits_per_sample(enum AVCodecID codec_id)
Return codec bits per sample.
Definition: utils.c:1938
int has_b_frames
Size of the frame reordering buffer in the decoder.
Definition: avcodec.h:1332
int64_t pos
Byte position of currently parsed frame in stream.
Definition: avcodec.h:3692
Create a mutex.
Definition: avcodec.h:4290
int priv_data_size
Definition: avcodec.h:3729
struct AVCodecParser * parser
Definition: avcodec.h:3574
AVAudioServiceType
Definition: avcodec.h:616
int y
top left corner of pict, undefined when pict is not set
Definition: avcodec.h:2984
discard all bidirectional frames
Definition: avcodec.h:544
An AV_PKT_DATA_PARAM_CHANGE side data packet is laid out as follows:
Definition: avcodec.h:904
int frame_skip_threshold
frame skip threshold
Definition: avcodec.h:2192
int me_sub_cmp
subpixel motion estimation comparison function
Definition: avcodec.h:1435
void av_packet_free_side_data(AVPacket *pkt)
Convenience function to free all the side data stored.
Definition: avpacket.c:233
int qmax
maximum quantizer
Definition: avcodec.h:2068
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:86
enum AVSampleFormat request_sample_fmt
Used to request a sample format from the decoder.
Definition: avcodec.h:1861
int active_thread_type
Which multithreading methods are in use by the codec.
Definition: avcodec.h:2533
int avcodec_is_open(AVCodecContext *s)
Definition: utils.c:2297
int error_concealment
error concealment flags
Definition: avcodec.h:2339
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:1021
int capabilities
Codec capabilities.
Definition: avcodec.h:2774
void av_bitstream_filter_close(AVBitStreamFilterContext *bsf)
preferred ID for decoding MPEG audio layer 1, 2 or 3
Definition: avcodec.h:369
AVBufferRef * buf
A reference to the reference-counted buffer where the packet data is stored.
Definition: avcodec.h:956
int flags
CODEC_FLAG_*.
Definition: avcodec.h:1142
int rc_max_rate
maximum bitrate
Definition: avcodec.h:2115
int log_level_offset
Definition: avcodec.h:1060
enum AVMediaType avcodec_get_type(enum AVCodecID codec_id)
Get the type of the given codec.
Definition: utils.c:2283
AVBitStreamFilter * av_bitstream_filter_next(AVBitStreamFilter *f)
const char * name
Name of the codec implementation.
Definition: avcodec.h:2762
int64_t cur_frame_dts[AV_PARSER_PTS_NB]
Definition: avcodec.h:3603
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:1348
int side_data_elems
Definition: avcodec.h:989
const char * rc_eq
rate control equation
Definition: avcodec.h:2108
int width
width and height in 1/16 pel
Definition: avcodec.h:844
int av_packet_shrink_side_data(AVPacket *pkt, enum AVPacketSideDataType type, int size)
Shrink the already allocated side data buffer.
Definition: avpacket.c:301
const char * long_name
A more descriptive name for this codec.
Definition: avcodec.h:478
enum AVCodecID codec_id
Definition: mov_chan.c:432
transformed exhaustive search algorithm
Definition: avcodec.h:532
functionally identical to above
Definition: avcodec.h:555
AVCodecParser * av_parser_next(AVCodecParser *c)
Definition: parser.c:32
#define av_printf_format(fmtpos, attrpos)
Definition: attributes.h:117
int priv_data_size
Size of HW accelerator private data.
Definition: avcodec.h:2936
int flags
A combination of AV_PKT_FLAG values.
Definition: avcodec.h:979
reference-counted frame API
const AVCodecDescriptor * avcodec_descriptor_get(enum AVCodecID id)
Definition: codec_desc.c:2262
uint64_t channel_layout
Audio channel layout.
Definition: avcodec.h:1840
uint32_t end_display_time
Definition: avcodec.h:3010
int64_t pts
Same as packet pts, in AV_TIME_BASE.
Definition: avcodec.h:3013
int rc_buffer_size
decoder bitstream buffer size
Definition: avcodec.h:2093
the normal 2^n-1 "JPEG" YUV ranges
Definition: avcodec.h:596
int props
Codec properties, a combination of AV_CODEC_PROP_* flags.
Definition: avcodec.h:482
int intra_dc_precision
precision of the intra DC coefficient - 8
Definition: avcodec.h:1626
int me_penalty_compensation
Definition: avcodec.h:1669
also ITU-R BT1361
Definition: avcodec.h:562
int(* encode_sub)(AVCodecContext *, uint8_t *buf, int buf_size, const struct AVSubtitle *sub)
Definition: avcodec.h:2826
int dtg_active_format
DTG active format information (additional aspect ratio information only used in DVB MPEG-2 transport ...
Definition: avcodec.h:1513
Not part of ABI.
Definition: avcodec.h:626
the normal 219*2^(n-8) "MPEG" YUV ranges
Definition: avcodec.h:595
int refs
number of reference frames
Definition: avcodec.h:1697
A bitmap, pict will be set.
Definition: avcodec.h:2965
int av_packet_copy_props(AVPacket *dst, const AVPacket *src)
Copy only "properties" fields from src to dst.
Definition: avpacket.c:317
int rc_override_count
ratecontrol override, see RcOverride
Definition: avcodec.h:2100
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:1281
int bit_rate
the average bitrate
Definition: avcodec.h:1112
int64_t timecode_frame_start
GOP timecode frame start number, in non drop frame format.
Definition: avcodec.h:2239
enum AVPixelFormat * pix_fmts
array of supported pixel formats, or NULL if unknown, array is terminated by -1
Definition: avcodec.h:2776
int err_recognition
Error recognition; may misdetect some more or less valid parts as errors.
Definition: avcodec.h:2390
AVPicture pict
data+linesize for the bitmap of this subtitle.
Definition: avcodec.h:2993
const char * name
Name of the hardware accelerated codec.
Definition: avcodec.h:2858
int av_get_exact_bits_per_sample(enum AVCodecID codec_id)
Return codec bits per sample.
Definition: utils.c:1893
AVCodecContext * avcodec_alloc_context3(const AVCodec *codec)
Allocate an AVCodecContext and set its fields to default values.
Definition: options.c:124
int av_parser_parse2(AVCodecParserContext *s, AVCodecContext *avctx, uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size, int64_t pts, int64_t dts, int64_t pos)
Parse a packet.
Definition: parser.c:120
int width
picture width / height.
Definition: avcodec.h:1217
Not part of ABI.
Definition: avcodec.h:613
void(* parser_close)(AVCodecParserContext *s)
Definition: avcodec.h:3735
AVBitStreamFilterContext * av_bitstream_filter_init(const char *name)
int idct_algo
IDCT algorithm, see FF_IDCT_* below.
Definition: avcodec.h:2456
int64_t offset
byte offset from starting packet start
Definition: avcodec.h:3611
int priv_data_size
Definition: avcodec.h:2793
int profile
Definition: avcodec.h:2744
float rc_max_available_vbv_use
Ratecontrol attempt to use, at maximum, of what can be used without an underflow. ...
Definition: avcodec.h:2138
float rc_min_vbv_overflow_use
Ratecontrol attempt to use, at least, times the amount needed to prevent a vbv overflow.
Definition: avcodec.h:2145
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:3639
void av_parser_close(AVCodecParserContext *s)
Definition: parser.c:207
int b_frame_strategy
Definition: avcodec.h:1317
enum AVColorPrimaries color_primaries
Chromaticity coordinates of the source primaries.
Definition: avcodec.h:1733
void av_register_bitstream_filter(AVBitStreamFilter *bsf)
float rc_qsquish
ratecontrol qmin qmax limiting method 0-> clipping, 1-> use a nice continuous function to limit qscal...
Definition: avcodec.h:2083
int start_frame
Definition: avcodec.h:633
uint16_t format
Definition: avcodec.h:3008
int level
level
Definition: avcodec.h:2679
const AVProfile * profiles
array of recognized profiles, or NULL if unknown, array is terminated by {FF_PROFILE_UNKNOWN} ...
Definition: avcodec.h:2784
int64_t reordered_opaque
opaque 64bit number (generally a PTS) that will be reordered and output in AVFrame.reordered_opaque
Definition: avcodec.h:2410
int refcounted_frames
If non-zero, the decoded audio and video frames returned from avcodec_decode_video2() and avcodec_dec...
Definition: avcodec.h:2050
int ticks_per_frame
For some codecs, the time base is closer to the field rate than the frame rate.
Definition: avcodec.h:1182
int skip_top
Number of macroblock rows at the top which are skipped.
Definition: avcodec.h:1633
int mb_decision
macroblock decision mode
Definition: avcodec.h:1571
int last_predictor_count
amount of previous MV predictors (2a+1 x 2a+1 square)
Definition: avcodec.h:1475
int max_qdiff
maximum quantizer difference between frames
Definition: avcodec.h:2075
enum AVPixelFormat pix_fmt
Definition: movenc.c:821
int64_t cur_frame_end[AV_PARSER_PTS_NB]
Definition: avcodec.h:3612
static pthread_mutex_t * mutex
Definition: w32pthreads.h:68
int lmin
minimum Lagrange multipler
Definition: avcodec.h:2178
int64_t cur_frame_pts[AV_PARSER_PTS_NB]
Definition: avcodec.h:3602
preferred ID for MPEG-1/2 video decoding
Definition: avcodec.h:110
const AVCodecDescriptor * avcodec_descriptor_get_by_name(const char *name)
Definition: codec_desc.c:2281
RcOverride * rc_override
Definition: avcodec.h:2101
int64_t last_pos
Previous frame byte position.
Definition: avcodec.h:3697
int thread_count
thread count is used to decide how many independent tasks should be passed to execute() ...
Definition: avcodec.h:2514
int inter_quant_bias
inter quantizer bias
Definition: avcodec.h:1544
void avcodec_flush_buffers(AVCodecContext *avctx)
Reset the internal decoder state / flush internal buffers.
Definition: utils.c:1882
FAKE codec to indicate a MPEG-4 Systems stream (only used by libavformat)
Definition: avcodec.h:456
int frame_skip_factor
frame skip factor
Definition: avcodec.h:2199
const char * av_get_profile_name(const AVCodec *codec, int profile)
Return a name for the specified profile, if available.
Definition: utils.c:1853
int frame_size
Number of samples per channel in an audio frame.
Definition: avcodec.h:1799
int pts_dts_delta
Presentation delay of current frame in units of AVCodecContext.time_base.
Definition: avcodec.h:3680
attribute_deprecated void av_destruct_packet(AVPacket *pkt)
Default packet destructor.
Definition: avpacket.c:31
const char * long_name
Descriptive name for the codec, meant to be more human readable than name.
Definition: avcodec.h:2767
float rc_initial_cplx
initial complexity for pass1 ratecontrol
Definition: avcodec.h:2131
int bidir_refine
Definition: avcodec.h:1676
static int width
Definition: utils.c:156
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)
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:46
sample_fmt
Definition: avconv_filter.c:68
int avcodec_default_get_buffer2(AVCodecContext *s, AVFrame *frame, int flags)
The default callback for AVCodecContext.get_buffer2().
Definition: utils.c:524
also ITU-R BT1361 / IEC 61966-2-4 xvYCC709 / SMPTE RP177 Annex B
Definition: avcodec.h:581
enum AVMediaType codec_type
Definition: avcodec.h:1062
void(* init_static_data)(struct AVCodec *codec)
Initialize codec static data, called from avcodec_register().
Definition: avcodec.h:2823
int me_threshold
Motion estimation threshold below which no motion estimation is performed, but instead the user speci...
Definition: avcodec.h:1612
const AVRational * supported_framerates
array of supported framerates, or NULL if any, array is terminated by {0,0}
Definition: avcodec.h:2775
attribute_deprecated int avcodec_default_reget_buffer(AVCodecContext *s, AVFrame *pic)
Definition: utils.c:793
also ITU-R BT601-6 625 / ITU-R BT1358 625 / ITU-R BT1700 625 PAL & SECAM
Definition: avcodec.h:553
enum AVCodecID codec_id
Definition: avcodec.h:1065
AVHWAccel.
Definition: avcodec.h:2852
int compression_level
Definition: avcodec.h:1134
int sample_rate
samples per second
Definition: avcodec.h:1779
enum AVDiscard skip_idct
Definition: avcodec.h:2694
int frame_bits
number of bits used for the previously encoded frame
Definition: avcodec.h:2271
attribute_deprecated AVPacket * pkt
Definition: avcodec.h:2728
Plain text, the text field must be set by the decoder and is authoritative.
Definition: avcodec.h:2971
int debug
debug
Definition: avcodec.h:2348
ITU-R BT2020 for 12 bit system.
Definition: avcodec.h:575
main external API structure.
Definition: avcodec.h:1054
AVCodec * avcodec_find_decoder(enum AVCodecID id)
Find a registered decoder with a matching codec ID.
Definition: utils.c:1673
static void(WINAPI *cond_broadcast)(pthread_cond_t *cond)
void av_packet_unref(AVPacket *pkt)
Wipe the packet.
Definition: avpacket.c:345
int pre_me
prepass for motion estimation
Definition: avcodec.h:1482
int qmin
minimum quantizer
Definition: avcodec.h:2061
ITU-R BT2020 for 10 bit system.
Definition: avcodec.h:574
AVColorTransferCharacteristic
Definition: avcodec.h:561
void avsubtitle_free(AVSubtitle *sub)
Free all allocated data in the given subtitle struct.
Definition: utils.c:1571
unsigned int codec_tag
fourcc (LSB first, so "ABCD" -> ('D'<<24) + ('C'<<16) + ('B'<<8) + 'A').
Definition: avcodec.h:1080
Used by Dirac / VC-2 and H.264 FRext, see ITU-T SG16.
Definition: avcodec.h:587
float spatial_cplx_masking
spatial complexity masking (0-> disabled)
Definition: avcodec.h:1376
int extradata_size
Definition: avcodec.h:1163
unsigned int av_xiphlacing(unsigned char *s, unsigned int v)
Encode extradata length to a buffer.
Definition: utils.c:2111
struct AVCodec * next
Definition: avcodec.h:2794
struct AVBitStreamFilter * filter
Definition: avcodec.h:4196
uint16_t * intra_matrix
custom intra quantization matrix
Definition: avcodec.h:1581
int slice_flags
slice flags
Definition: avcodec.h:1551
int coded_height
Definition: avcodec.h:1227
Describe the class of an AVClass context structure.
Definition: log.h:33
int avpicture_alloc(AVPicture *picture, enum AVPixelFormat pix_fmt, int width, int height)
Allocate memory for a picture.
Definition: avpicture.c:101
AVColorPrimaries
Definition: avcodec.h:549
enum AVPixelFormat(* get_format)(struct AVCodecContext *s, const enum AVPixelFormat *fmt)
callback to negotiate the pixelFormat
Definition: avcodec.h:1294
float rc_buffer_aggressivity
Definition: avcodec.h:2124
enum AVColorSpace colorspace
YUV colorspace type.
Definition: avcodec.h:1747
rational number numerator/denominator
Definition: rational.h:43
enum AVColorTransferCharacteristic color_trc
Color Transfer Characteristic.
Definition: avcodec.h:1740
const char * name
short name for the profile
Definition: avcodec.h:2745
void av_register_codec_parser(AVCodecParser *parser)
Definition: parser.c:40
AVFieldOrder
Definition: avcodec.h:1038
attribute_deprecated int debug_mv
Definition: avcodec.h:2379
AVMediaType
Definition: avutil.h:185
discard useless packets like 0 size packets in avi
Definition: avcodec.h:542
refcounted data buffer API
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:2037
const char * name
Name of the codec described by this descriptor.
Definition: avcodec.h:474
int avcodec_open2(AVCodecContext *avctx, const AVCodec *codec, AVDictionary **options)
Initialize the AVCodecContext to use the given AVCodec.
Definition: utils.c:872
float b_quant_offset
qscale offset between IP and B-frames
Definition: avcodec.h:1324
attribute_deprecated void * priv
Definition: avcodec.h:1000
int frame_skip_exp
frame skip exponent
Definition: avcodec.h:2206
#define AV_PARSER_PTS_NB
Definition: avcodec.h:3599
int av_get_audio_frame_duration(AVCodecContext *avctx, int frame_bytes)
Return audio frame duration.
Definition: utils.c:1956
float qcompress
amount of qscale change between easy & hard scenes (0.0-1.0)
Definition: avcodec.h:2053
uint16_t * inter_matrix
custom inter quantization matrix
Definition: avcodec.h:1588
int end_frame
Definition: avcodec.h:634
void(* close)(AVBitStreamFilterContext *bsfc)
Definition: avcodec.h:4209
This struct describes the properties of a single codec described by an AVCodecID. ...
Definition: avcodec.h:466
float dark_masking
darkness masking (0-> disabled)
Definition: avcodec.h:1390
int global_quality
Global quality for codecs which cannot change it per frame.
Definition: avcodec.h:1128
int skip_bottom
Number of macroblock rows at the bottom which are skipped.
Definition: avcodec.h:1640
AVCodec * avcodec_find_decoder_by_name(const char *name)
Find a registered decoder with the specified name.
Definition: utils.c:1678
int output_picture_number
Picture number incremented in presentation or output order.
Definition: avcodec.h:3724
float temporal_cplx_masking
temporary complexity masking (0-> disabled)
Definition: avcodec.h:1369
also ITU-R BT601-6 525 / ITU-R BT1358 525 / ITU-R BT1700 NTSC
Definition: avcodec.h:554
Pan Scan area.
Definition: avcodec.h:831
const AVClass * priv_class
AVClass for the private context.
Definition: avcodec.h:2783
#define attribute_deprecated
Definition: attributes.h:80
int rc_qmod_freq
Definition: avcodec.h:2086
int noise_reduction
noise reduction strength
Definition: avcodec.h:1603
int height
Definition: gxfenc.c:72
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:4205
int gop_size
the number of pictures in a group of pictures, or 0 for intra_only
Definition: avcodec.h:1238
const OptionDef options[]
Definition: avserver.c:4624
enum AVMediaType type
Definition: avcodec.h:468
A reference to a data buffer.
Definition: buffer.h:81
discard all non reference
Definition: avcodec.h:543
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
int mb_cmp
macroblock comparison function (not supported yet)
Definition: avcodec.h:1441
int(* split)(AVCodecContext *avctx, const uint8_t *buf, int buf_size)
Definition: avcodec.h:3736
Free mutex resources.
Definition: avcodec.h:4293
rational numbers
attribute_deprecated void void av_register_hwaccel(AVHWAccel *hwaccel)
Register the hardware accelerator hwaccel.
Definition: utils.c:2163
raw UTF-8 text
Definition: avcodec.h:440
struct AVHWAccel * next
Definition: avcodec.h:2887
int nsse_weight
noise vs.
Definition: avcodec.h:2589
uint32_t start_display_time
Definition: avcodec.h:3009
int prediction_method
prediction method (needed for huffyuv)
Definition: avcodec.h:1403
AVSampleFormat
Audio Sample Formats.
Definition: samplefmt.h:49
AVProfile.
Definition: avcodec.h:2743
int workaround_bugs
Work around bugs in encoders which sometimes cannot be detected automatically.
Definition: avcodec.h:2293
enum AVCodecID id
Codec implemented by the hardware accelerator.
Definition: avcodec.h:2872
int64_t cur_frame_offset[AV_PARSER_PTS_NB]
Definition: avcodec.h:3601
int av_grow_packet(AVPacket *pkt, int grow_by)
Increase packet size, correctly zeroing padding.
Definition: avpacket.c:108
void av_init_packet(AVPacket *pkt)
Initialize optional fields of a packet with default values.
Definition: avpacket.c:46
enum AVDiscard skip_loop_filter
Definition: avcodec.h:2687
int thread_safe_callbacks
Set by the client if its custom get_buffer() callback can be called synchronously from another thread...
Definition: avcodec.h:2543
int avcodec_get_context_defaults3(AVCodecContext *s, const AVCodec *codec)
Set the fields of the given AVCodecContext to default values corresponding to the given codec (defaul...
Definition: options.c:80
static const uint8_t color[]
Definition: log.c:54
AVPictureStructure
Definition: avcodec.h:3565
int trellis
trellis RD quantization
Definition: avcodec.h:2220
void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode)
Definition: utils.c:1735
int av_packet_ref(AVPacket *dst, AVPacket *src)
Setup a new reference to the data described by a given packet.
Definition: avpacket.c:354
int slices
Number of slices.
Definition: avcodec.h:1770
int16_t position[3][2]
position of the top left corner in 1/16 pel for up to 3 fields/frames
Definition: avcodec.h:852
void * priv_data
Definition: avcodec.h:1090
int cutoff
Audio cutoff bandwidth (0 means "automatic")
Definition: avcodec.h:1823
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:2812
FAKE codec to indicate a raw MPEG-2 TS stream (only used by libavformat)
Definition: avcodec.h:454
Formatted text, the ass field must be set by the decoder and is authoritative.
Definition: avcodec.h:2977
int64_t frame_offset
Definition: avcodec.h:3575
enum AVCodecID id
Definition: avcodec.h:467
pixel format definitions
int dia_size
ME diamond size & shape.
Definition: avcodec.h:1468
int b_sensitivity
Adjust sensitivity of b_frame_strategy 1.
Definition: avcodec.h:1726
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:2554
uneven multi-hexagon search
Definition: avcodec.h:531
as in Berlin toast format
Definition: avcodec.h:386
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:2574
int channels
number of audio channels
Definition: avcodec.h:1780
const int * supported_samplerates
array of supported audio samplerates, or NULL if unknown, array is terminated by 0 ...
Definition: avcodec.h:2777
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)
Pad image.
Definition: imgconvert.c:290
int avpicture_get_size(enum AVPixelFormat 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: avpicture.c:85
unsigned avcodec_version(void)
Return the LIBAVCODEC_VERSION_INT constant.
Definition: utils.c:1866
char * ass
0 terminated ASS/SSA compatible event line.
Definition: avcodec.h:3003
struct AVPacket::@11 * side_data
Additional packet data that can be provided by the container.
attribute_deprecated int error_rate
Definition: avcodec.h:2720
int mv0_threshold
Note: Value depends upon the compare function used for fullpel ME.
Definition: avcodec.h:1719
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:1454
int flags2
CODEC_FLAG2_*.
Definition: avcodec.h:1149
AVDiscard
Definition: avcodec.h:538
Not part of ABI.
Definition: avcodec.h:590
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:140
int64_t dts
Decompression timestamp in AVStream->time_base units; the time at which the packet is decompressed...
Definition: avcodec.h:972
void avcodec_register(AVCodec *codec)
Register the codec codec and initialize libavcodec.
Definition: utils.c:116
int * slice_offset
slice offsets in the frame in bytes
Definition: avcodec.h:1413
int frame_number
Frame counter, set by libavcodec.
Definition: avcodec.h:1810
int repeat_pict
This field is used for proper frame duration computation in lavf.
Definition: avcodec.h:3590
int max_prediction_order
Definition: avcodec.h:2232
also ITU-R BT1361 / IEC 61966-2-4 / SMPTE RP177 Annex B
Definition: avcodec.h:550
enum AVFieldOrder field_order
Field order.
Definition: avcodec.h:1776
ITU-R BT2020 non-constant luminance system.
Definition: avcodec.h:588
AVColorSpace
Definition: avcodec.h:579
uint8_t * av_packet_get_side_data(AVPacket *pkt, enum AVPacketSideDataType type, int *size)
Get side information from packet.
Definition: avpacket.c:286
"Logarithmic transfer characteristic (100 * Sqrt( 10 ) : 1 range)"
Definition: avcodec.h:570
enum AVPacketSideDataType type
Definition: avcodec.h:987
enum AVSampleFormat * sample_fmts
array of supported sample formats, or NULL if unknown, array is terminated by -1
Definition: avcodec.h:2778
attribute_deprecated uint8_t max_lowres
maximum value for lowres supported by the decoder
Definition: avcodec.h:2781
also ITU-R BT601-6 625 / ITU-R BT1358 625 / ITU-R BT1700 625 PAL & SECAM / IEC 61966-2-4 xvYCC601 ...
Definition: avcodec.h:584
int nb_channels
int me_method
Motion estimation algorithm used for video coding.
Definition: avcodec.h:1256
uint8_t * av_packet_new_side_data(AVPacket *pkt, enum AVPacketSideDataType type, int size)
Allocate new information of a packet.
Definition: avpacket.c:261
int stream_index
Definition: avcodec.h:975
int(* decode_slice)(AVCodecContext *avctx, const uint8_t *buf, uint32_t buf_size)
Callback for each slice.
Definition: avcodec.h:2916
int rc_min_rate
minimum bitrate
Definition: avcodec.h:2122
int(* init)(AVCodecContext *)
Definition: avcodec.h:2825
enum AVSubtitleType type
Definition: avcodec.h:2994
also ITU-R BT470BG
Definition: avcodec.h:565
int(* end_frame)(AVCodecContext *avctx)
Called at the end of each frame or field picture.
Definition: avcodec.h:2927
uint64_t request_channel_layout
Request decoder to use this channel layout if it can (0 for default)
Definition: avcodec.h:1847
int me_pre_cmp
motion estimation prepass comparison function
Definition: avcodec.h:1489
AVPixelFormat
Pixel format.
Definition: pixfmt.h:63
This structure stores compressed data.
Definition: avcodec.h:950
int avcodec_encode_subtitle(AVCodecContext *avctx, uint8_t *buf, int buf_size, const AVSubtitle *sub)
Definition: utils.c:1337
int(* encode2)(AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame, int *got_packet_ptr)
Encode data to an AVPacket.
Definition: avcodec.h:2838
int key_frame
Set by parser to 1 for key frames and 0 for non-key frames.
Definition: avcodec.h:3620
int delay
Codec delay.
Definition: avcodec.h:1205
int me_subpel_quality
subpel ME quality
Definition: avcodec.h:1503
int strict_std_compliance
strictly follow the standard (MPEG4, ...).
Definition: avcodec.h:2327
int dts_sync_point
Synchronization point for start of timestamp generation.
Definition: avcodec.h:3651
Not part of ABI.
Definition: avcodec.h:576
int64_t pts
Presentation timestamp in AVStream->time_base units; the time at which the decompressed packet will b...
Definition: avcodec.h:966
A dummy ID pointing at the start of subtitle codecs.
Definition: avcodec.h:437
void * opaque
Private data of the user, can be used to carry app specific stuff.
Definition: avcodec.h:1105
ITU-R BT1361 Extended Colour Gamut.
Definition: avcodec.h:572
int thread_type
Which multithreading methods to use.
Definition: avcodec.h:2524
AVSubtitleType
Definition: avcodec.h:2962
int avcodec_default_execute(AVCodecContext *c, int(*func)(AVCodecContext *c2, void *arg2), void *arg, int *ret, int count, int size)
Definition: utils.c:800
discard nothing
Definition: avcodec.h:541
uint8_t * subtitle_header
Header containing style information for text subtitles.
Definition: avcodec.h:2711
int keyint_min
minimum GOP size
Definition: avcodec.h:1690
attribute_deprecated int avcodec_default_get_buffer(AVCodecContext *s, AVFrame *pic)
Definition: utils.c:549
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:1510
also ITU-R BT601-6 525 / ITU-R BT1358 525 / ITU-R BT1700 NTSC / functionally identical to above ...
Definition: avcodec.h:585