Lines Matching +full:no +full:- +full:use +full:- +full:before +full:- +full:define
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22 #define AVCODEC_AVCODEC_H
95 * - Set up and open the AVCodecContext as usual.
96 * - Send valid input:
97 * - For decoding, call avcodec_send_packet() to give the decoder raw
99 * - For encoding, call avcodec_send_frame() to give the encoder an AVFrame
106 * - Receive output in a loop. Periodically call one of the avcodec_receive_*()
108 * - For decoding, call avcodec_receive_frame(). On success, it will return
110 * - For encoding, call avcodec_receive_packet(). On success, it will return
124 * In theory, sending input can result in EAGAIN - this should happen only if
125 * not all output was received. You can use this to structure alternative decode
132 * performance or out of necessity (consider B-frames).
134 * - Instead of valid input, send NULL to the avcodec_send_packet() (decoding)
137 * - Call avcodec_receive_frame() (decoding) or avcodec_receive_packet()
140 * - Before decoding can be resumed again, the codec has to be reset with
149 * AVERROR(EAGAIN). Once it starts rejecting input, you have no choice but to
155 * at least will not fail with AVERROR(EAGAIN). In general, no codec will
159 * - avcodec_decode_video2() and avcodec_decode_audio4():
160 * Use avcodec_send_packet() to feed input to the decoder, then use
165 * feed an AVPacket to the API twice (unless it is rejected with AVERROR(EAGAIN) - then
166 * no data was read from the packet).
168 * - avcodec_encode_video2()/avcodec_encode_audio2():
169 * Use avcodec_send_frame() to feed input to the encoder, then use
171 * Providing user-allocated buffers for avcodec_receive_packet() is not
173 * - The new API does not handle subtitles yet.
183 * loop. The API has no concept of time either: it cannot happen that trying to
185 * later accepts the packet (with no other receive/flush API calls involved).
187 * to influence it. Some timing-dependent behavior might still be deemed
190 * avoided that the current state is "unstable" and can "flip-flop" between
215 #define AV_INPUT_BUFFER_PADDING_SIZE 64
222 #define AV_INPUT_BUFFER_MIN_SIZE 16384
229 * keyframes for intra-only or drop just some bidir frames). */
230 AVDISCARD_NONE =-16, ///< discard nothing
263 These flags can be passed in AVCodecContext.flags before initialization.
271 #define AV_CODEC_FLAG_UNALIGNED (1 << 0)
273 * Use fixed qscale.
275 #define AV_CODEC_FLAG_QSCALE (1 << 1)
279 #define AV_CODEC_FLAG_4MV (1 << 2)
283 #define AV_CODEC_FLAG_OUTPUT_CORRUPT (1 << 3)
285 * Use qpel MC.
287 #define AV_CODEC_FLAG_QPEL (1 << 4)
292 #define AV_CODEC_FLAG_DROPCHANGED (1 << 5)
294 * Use internal 2pass ratecontrol in first pass mode.
296 #define AV_CODEC_FLAG_PASS1 (1 << 9)
298 * Use internal 2pass ratecontrol in second pass mode.
300 #define AV_CODEC_FLAG_PASS2 (1 << 10)
304 #define AV_CODEC_FLAG_LOOP_FILTER (1 << 11)
308 #define AV_CODEC_FLAG_GRAY (1 << 13)
312 #define AV_CODEC_FLAG_PSNR (1 << 15)
317 #define AV_CODEC_FLAG_TRUNCATED (1 << 16)
319 * Use interlaced DCT.
321 #define AV_CODEC_FLAG_INTERLACED_DCT (1 << 18)
325 #define AV_CODEC_FLAG_LOW_DELAY (1 << 19)
329 #define AV_CODEC_FLAG_GLOBAL_HEADER (1 << 22)
331 * Use only bitexact stuff (except (I)DCT).
333 #define AV_CODEC_FLAG_BITEXACT (1 << 23)
336 * H.263 advanced intra coding / MPEG-4 AC prediction
338 #define AV_CODEC_FLAG_AC_PRED (1 << 24)
342 #define AV_CODEC_FLAG_INTERLACED_ME (1 << 29)
343 #define AV_CODEC_FLAG_CLOSED_GOP (1U << 31)
348 #define AV_CODEC_FLAG2_FAST (1 << 0)
352 #define AV_CODEC_FLAG2_NO_OUTPUT (1 << 2)
356 #define AV_CODEC_FLAG2_LOCAL_HEADER (1 << 3)
361 #define AV_CODEC_FLAG2_DROP_FRAME_TIMECODE (1 << 13)
367 #define AV_CODEC_FLAG2_CHUNKS (1 << 15)
371 #define AV_CODEC_FLAG2_IGNORE_CROP (1 << 16)
374 * Show all frames before the first keyframe
376 #define AV_CODEC_FLAG2_SHOW_ALL (1 << 22)
380 #define AV_CODEC_FLAG2_EXPORT_MVS (1 << 28)
384 #define AV_CODEC_FLAG2_SKIP_MANUAL (1 << 29)
388 #define AV_CODEC_FLAG2_RO_FLUSH_NOOP (1 << 30)
398 These flags can be passed in AVCodecContext.export_side_data before initialization.
403 #define AV_CODEC_EXPORT_DATA_MVS (1 << 0)
407 #define AV_CODEC_EXPORT_DATA_PRFT (1 << 1)
412 #define AV_CODEC_EXPORT_DATA_VIDEO_ENC_PARAMS (1 << 2)
417 #define AV_CODEC_EXPORT_DATA_FILM_GRAIN (1 << 3)
427 * - encoding: Set by user.
428 * - decoding: Set by libavcodec.
434 * - encoding: Set by user.
435 * - decoding: Set by libavcodec.
442 * - encoding: Set by user.
443 * - decoding: Set by libavcodec.
450 * roughly corresponds to a subset the VBV parameters for MPEG-2 or HRD
501 * as defined in ISO/IEC 14496-12
514 #define AV_GET_BUFFER_FLAG_REF (1 << 0)
519 #define AV_GET_ENCODE_BUFFER_FLAG_REF (1 << 0)
528 * You can use AVOptions (av_opt* / av_set/get*()) to access these fields from user
539 * - set by avcodec_alloc_context3
549 * fourcc (LSB first, so "ABCD" -> ('D'<<24) + ('C'<<16) + ('B'<<8) + 'A').
558 * - encoding: Set by user, if not then the default based on codec_id will be used.
559 * - decoding: Set by user, will be converted to uppercase by libavcodec during init.
568 * Unlike priv_data, this is not codec-specific. It is used in general
575 * - encoding: Set by user.
576 * - decoding: Set by user.
582 * - encoding: Set by user; unused for constant quantizer encoding.
583 * - decoding: Set by user, may be overwritten by libavcodec
591 * - encoding: Set by user; unused for constant quantizer encoding.
592 * - decoding: unused
598 * This should be proportional to MPEG-1/2/4 qscale.
599 * - encoding: Set by user.
600 * - decoding: unused
605 * - encoding: Set by user.
606 * - decoding: unused
609 #define FF_COMPRESSION_DEFAULT -1
613 * - encoding: Set by user.
614 * - decoding: Set by user.
620 * - encoding: Set by user.
621 * - decoding: Set by user.
626 * some codecs need / can use extradata like Huffman tables.
629 * MPEG-4: global headers (they can be in the bitstream or here)
634 * - encoding: Set/allocated/freed by libavcodec.
635 * - decoding: Set/allocated/freed by user.
642 * of which frame timestamps are represented. For fixed-fps content,
651 * As example of such codec time base see ISO/IEC 14496-2:2001(E)
655 * - encoding: MUST be set by user.
656 * - decoding: the use of this field for decoding is deprecated.
657 * Use framerate instead.
663 * Most notably, H.264 and MPEG-2 specify time_base as half of frame duration
664 * if no telecine is used ...
666 * Set to time_base ticks per frame. Default 1, e.g., H.264/MPEG-2 set it to 2.
686 * output before the decoder's output is valid. When seeking, you should
689 * - encoding: Set by libavcodec.
690 * - decoding: Set by libavcodec.
703 * - encoding: MUST be set by user.
704 * - decoding: May be set by the user before opening the decoder if known e.g.
713 * the decoded frame is cropped before being output or lowres is enabled.
719 * - encoding: unused
720 * - decoding: May be set by the user before opening the decoder if known
728 * - encoding: Set by user.
729 * - decoding: unused
742 * - encoding: Set by user.
743 * - decoding: Set by user if known, overridden by libavcodec while
755 * or multiple AVFrames, and there is no guarantee that slices will be drawn
764 * - encoding: unused
765 * - decoding: Set by user.
768 * @param type 1->top field, 2->bottom field, 3->frame
778 * it is terminated by -1 as 0 is a valid format, the formats are ordered by quality.
781 * the selected (hardware-accelerated) pixel format failed.
785 * - encoding: unused
786 * - decoding: Set by user, if not set the native format will be chosen.
791 * maximum number of B-frames between non-B-frames
793 * - encoding: Set by user.
794 * - decoding: unused
799 * qscale factor between IP and B-frames
800 * If > 0 then the last P-frame quantizer will be used (q= lastp_q*factor+offset).
801 * If < 0 then normal ratecontrol will be done (q= -normal_q*factor+offset).
802 * - encoding: Set by user.
803 * - decoding: unused
808 /** @deprecated use encoder private options instead */
814 * qscale offset between IP and B-frames
815 * - encoding: Set by user.
816 * - decoding: unused
822 * For MPEG-2 it is 1 IPB or 0 low delay IP.
823 * - encoding: Set by libavcodec.
824 * - decoding: Set by libavcodec.
829 /** @deprecated use encoder private options instead */
835 * qscale factor between P- and I-frames
836 * If > 0 then the last P-frame quantizer will be used (q = lastp_q * factor + offset).
837 * If < 0 then normal ratecontrol will be done (q= -normal_q*factor+offset).
838 * - encoding: Set by user.
839 * - decoding: unused
844 * qscale offset between P and I-frames
845 * - encoding: Set by user.
846 * - decoding: unused
851 * luminance masking (0-> disabled)
852 * - encoding: Set by user.
853 * - decoding: unused
858 * temporary complexity masking (0-> disabled)
859 * - encoding: Set by user.
860 * - decoding: unused
865 * spatial complexity masking (0-> disabled)
866 * - encoding: Set by user.
867 * - decoding: unused
872 * p block masking (0-> disabled)
873 * - encoding: Set by user.
874 * - decoding: unused
879 * darkness masking (0-> disabled)
880 * - encoding: Set by user.
881 * - decoding: unused
887 * - encoding: Set by libavcodec.
888 * - decoding: Set by user (or 0).
893 /** @deprecated use encoder private options instead */
896 #define FF_PRED_LEFT 0
897 #define FF_PRED_PLANE 1
898 #define FF_PRED_MEDIAN 2
903 * - encoding: Set/allocated by libavcodec.
904 * - decoding: Set/allocated by user (or NULL).
912 * - encoding: Set by user.
913 * - decoding: Set by libavcodec.
919 * - encoding: Set by user.
920 * - decoding: unused
925 * - encoding: Set by user.
926 * - decoding: unused
931 * - encoding: Set by user.
932 * - decoding: unused
937 * - encoding: Set by user.
938 * - decoding: unused
941 #define FF_CMP_SAD 0
942 #define FF_CMP_SSE 1
943 #define FF_CMP_SATD 2
944 #define FF_CMP_DCT 3
945 #define FF_CMP_PSNR 4
946 #define FF_CMP_BIT 5
947 #define FF_CMP_RD 6
948 #define FF_CMP_ZERO 7
949 #define FF_CMP_VSAD 8
950 #define FF_CMP_VSSE 9
951 #define FF_CMP_NSSE 10
952 #define FF_CMP_W53 11
953 #define FF_CMP_W97 12
954 #define FF_CMP_DCTMAX 13
955 #define FF_CMP_DCT264 14
956 #define FF_CMP_MEDIAN_SAD 15
957 #define FF_CMP_CHROMA 256
961 * - encoding: Set by user.
962 * - decoding: unused
968 * - encoding: Set by user.
969 * - decoding: unused
974 /** @deprecated use encoder private options instead */
981 * - encoding: Set by user.
982 * - decoding: unused
988 * - encoding: Set by user.
989 * - decoding: unused
995 * - encoding: Set by user.
996 * - decoding: unused
1002 * If 0 then no limit.
1004 * - encoding: Set by user.
1005 * - decoding: unused
1011 * - encoding: unused
1012 * - decoding: Set by user.
1015 #define SLICE_FLAG_CODED_ORDER 0x0001 ///< draw_horiz_band() is called in coded order instead of…
1016 #define SLICE_FLAG_ALLOW_FIELD 0x0002 ///< allow draw_horiz_band() with field slices (MPEG-2 fie…
1017 #define SLICE_FLAG_ALLOW_PLANE 0x0004 ///< allow draw_horiz_band() with 1 component at a time (S…
1021 * - encoding: Set by user.
1022 * - decoding: unused
1025 #define FF_MB_DECISION_SIMPLE 0 ///< uses mb_cmp
1026 #define FF_MB_DECISION_BITS 1 ///< chooses the one which needs the fewest bits
1027 #define FF_MB_DECISION_RD 2 ///< rate distortion
1033 * - encoding: Set/allocated by user, freed by libavcodec. Can be NULL.
1034 * - decoding: Set/allocated/freed by libavcodec.
1042 * - encoding: Set/allocated by user, freed by libavcodec. Can be NULL.
1043 * - decoding: Set/allocated/freed by libavcodec.
1048 /** @deprecated use encoder private options instead */
1052 /** @deprecated use encoder private options instead */
1058 * precision of the intra DC coefficient - 8
1059 * - encoding: Set by user.
1060 * - decoding: Set by libavcodec
1066 * - encoding: unused
1067 * - decoding: Set by user.
1073 * - encoding: unused
1074 * - decoding: Set by user.
1080 * - encoding: Set by user.
1081 * - decoding: unused
1087 * - encoding: Set by user.
1088 * - decoding: unused
1094 * @deprecated use encoder private options instead
1101 * - encoding: Set by user.
1102 * - decoding: unused
1107 /** @deprecated use encoder private options instead */
1114 * - encoding: Set by user.
1115 * - decoding: unused
1121 * - encoding: Set by user.
1122 * - decoding: Set by lavc.
1127 /** @deprecated use encoder private options instead */
1134 * - encoding: Set by user.
1135 * - decoding: unused
1140 /** @deprecated use encoder private options instead */
1147 * - encoding: Set by user
1148 * - decoding: Set by libavcodec
1154 * - encoding: Set by user
1155 * - decoding: Set by libavcodec
1161 * - encoding: Set by user
1162 * - decoding: Set by libavcodec
1168 * - encoding: Set by user
1169 * - decoding: Set by libavcodec
1175 * - encoding: Set by user
1176 * - decoding: Set by libavcodec
1184 * - encoding: Set by user
1185 * - decoding: unused
1190 * - encoding: set by libavcodec
1191 * - decoding: Set by user.
1201 * - encoding: Set by user.
1202 * - decoding: Set by libavcodec.
1210 * - encoding: set by libavcodec in avcodec_open2(). Each submitted frame
1214 * - decoding: may be set by some decoders to indicate constant frame size
1221 * - decoding: total number of frames returned from the decoder so far.
1222 * - encoding: total number of frames passed to the encoder so far.
1237 * - encoding: Set by user.
1238 * - decoding: unused
1244 * - encoding: set by user.
1245 * - decoding: set by user, may be overwritten by libavcodec.
1250 * Request decoder to use this channel layout if it can (0 for default)
1251 * - encoding: unused
1252 * - decoding: Set by user.
1258 * - encoding: Set by user.
1259 * - decoding: Set by libavcodec.
1265 * - encoding: Not used.
1266 * - decoding: Set by user.
1276 * Each buffer must be reference-counted using the AVBuffer API (see description
1279 * The following fields will be set in the frame before this callback is
1281 * - format
1282 * - width, height (video only)
1283 * - sample_rate, channel_layout, nb_samples (audio only)
1285 * AVCodecContext. This callback must use the frame values, not the codec
1289 * - data[]
1290 * - linesize[]
1291 * - extended_data:
1298 * - buf[] must contain one or more pointers to AVBufferRef structures. Each of
1303 * - extended_buf and nb_extended_buf must be allocated with av_malloc() by
1348 * - encoding: unused
1349 * - decoding: Set by libavcodec, user can override.
1355 * If non-zero, the decoded audio and video frames returned from
1356 * avcodec_decode_video2() and avcodec_decode_audio4() are reference-counted
1364 * - encoding: unused
1365 * - decoding: set by the caller before avcodec_open2().
1371 /* - encoding parameters */
1372 float qcompress; ///< amount of qscale change between easy & hard scenes (0.0-1.0)
1373 float qblur; ///< amount of qscale smoothing over time (0.0-1.0)
1377 * - encoding: Set by user.
1378 * - decoding: unused
1384 * - encoding: Set by user.
1385 * - decoding: unused
1391 * - encoding: Set by user.
1392 * - decoding: unused
1398 * - encoding: Set by user.
1399 * - decoding: unused
1405 * - encoding: Allocated/set/freed by user.
1406 * - decoding: unused
1413 * - encoding: Set by user.
1414 * - decoding: Set by user, may be overwritten by libavcodec.
1420 * - encoding: Set by user.
1421 * - decoding: unused
1426 * Ratecontrol attempt to use, at maximum, <value> of what can be used without an underflow.
1427 * - encoding: Set by user.
1428 * - decoding: unused.
1433 … * Ratecontrol attempt to use, at least, <value> times the amount needed to prevent a vbv overflow.
1434 * - encoding: Set by user.
1435 * - decoding: unused.
1440 * Number of bits which should be loaded into the rc buffer before decoding starts.
1441 * - encoding: Set by user.
1442 * - decoding: unused
1447 #define FF_CODER_TYPE_VLC 0
1448 #define FF_CODER_TYPE_AC 1
1449 #define FF_CODER_TYPE_RAW 2
1450 #define FF_CODER_TYPE_RLE 3
1452 * @deprecated use encoder private options instead
1459 /** @deprecated use encoder private options instead */
1465 /** @deprecated use encoder private options instead */
1469 /** @deprecated use encoder private options instead */
1473 /** @deprecated use encoder private options instead */
1477 /** @deprecated use encoder private options instead */
1484 * - encoding: Set by user.
1485 * - decoding: unused
1490 /** @deprecated use encoder private options instead */
1494 /** @deprecated use encoder private options instead */
1498 /** @deprecated use encoder private options instead */
1518 /** @deprecated use encoder private options instead */
1529 /* statistics, used for 2-pass encoding */
1554 * - encoding: Set by libavcodec.
1555 * - decoding: unused
1562 * - encoding: Allocated/set/freed by user.
1563 * - decoding: unused
1569 * - encoding: Set by user
1570 * - decoding: Set by user
1573 #define FF_BUG_AUTODETECT 1 ///< autodetection
1574 #define FF_BUG_XVID_ILACE 4
1575 #define FF_BUG_UMP4 8
1576 #define FF_BUG_NO_PADDING 16
1577 #define FF_BUG_AMV 32
1578 #define FF_BUG_QPEL_CHROMA 64
1579 #define FF_BUG_STD_QPEL 128
1580 #define FF_BUG_QPEL_CHROMA2 256
1581 #define FF_BUG_DIRECT_BLOCKSIZE 512
1582 #define FF_BUG_EDGE 1024
1583 #define FF_BUG_HPEL_CHROMA 2048
1584 #define FF_BUG_DC_CLIP 4096
1585 #define FF_BUG_MS 8192 ///< Work around various bugs in Microsoft's broken decoders.
1586 #define FF_BUG_TRUNCATED 16384
1587 #define FF_BUG_IEDGE 32768
1590 * strictly follow the standard (MPEG-4, ...).
1591 * - encoding: Set by user.
1592 * - decoding: Set by user.
1596 * spec-compliant decoders. Decoders don't differentiate between normal,
1602 #define FF_COMPLIANCE_VERY_STRICT 2 ///< Strictly conform to an older more strict version of the …
1603 #define FF_COMPLIANCE_STRICT 1 ///< Strictly conform to all the things in the spec no matter…
1604 #define FF_COMPLIANCE_NORMAL 0
1605 #define FF_COMPLIANCE_UNOFFICIAL -1 ///< Allow unofficial extensions
1606 #define FF_COMPLIANCE_EXPERIMENTAL -2 ///< Allow nonstandardized experimental things.
1610 * - encoding: unused
1611 * - decoding: Set by user.
1614 #define FF_EC_GUESS_MVS 1
1615 #define FF_EC_DEBLOCK 2
1616 #define FF_EC_FAVOR_INTER 256
1620 * - encoding: Set by user.
1621 * - decoding: Set by user.
1624 #define FF_DEBUG_PICT_INFO 1
1625 #define FF_DEBUG_RC 2
1626 #define FF_DEBUG_BITSTREAM 4
1627 #define FF_DEBUG_MB_TYPE 8
1628 #define FF_DEBUG_QP 16
1629 #define FF_DEBUG_DCT_COEFF 0x00000040
1630 #define FF_DEBUG_SKIP 0x00000080
1631 #define FF_DEBUG_STARTCODE 0x00000100
1632 #define FF_DEBUG_ER 0x00000400
1633 #define FF_DEBUG_MMCO 0x00000800
1634 #define FF_DEBUG_BUGS 0x00001000
1635 #define FF_DEBUG_BUFFERS 0x00008000
1636 #define FF_DEBUG_THREADS 0x00010000
1637 #define FF_DEBUG_GREEN_MD 0x00800000
1638 #define FF_DEBUG_NOMC 0x01000000
1642 * - encoding: Set by user.
1643 * - decoding: Set by user.
1653 #define AV_EF_CRCCHECK (1<<0)
1654 #define AV_EF_BITSTREAM (1<<1) ///< detect bitstream specification deviations
1655 #define AV_EF_BUFFER (1<<2) ///< detect improper bitstream length
1656 #define AV_EF_EXPLODE (1<<3) ///< abort decoding on minor error detection
1658 #define AV_EF_IGNORE_ERR (1<<15) ///< ignore errors and continue
1659 #define AV_EF_CAREFUL (1<<16) ///< consider things that violate the spec, are fast to cal…
1660 #define AV_EF_COMPLIANT (1<<17) ///< consider all spec non compliances as errors
1661 #define AV_EF_AGGRESSIVE (1<<18) ///< consider things that a sane encoder should not do as a…
1665 * opaque 64-bit number (generally a PTS) that will be reordered and
1667 * - encoding: Set by libavcodec to the reordered_opaque of the input
1671 * - decoding: Set by user.
1676 * Hardware accelerator in use
1677 * - encoding: unused.
1678 * - decoding: Set by libavcodec
1685 * provided by the user. In that case, this holds display-dependent
1689 * - encoding: unused
1690 * - decoding: Set by user
1696 * - encoding: Set by libavcodec if flags & AV_CODEC_FLAG_PSNR.
1697 * - decoding: unused
1703 * - encoding: Set by user.
1704 * - decoding: unused
1707 #define FF_DCT_AUTO 0
1708 #define FF_DCT_FASTINT 1
1709 #define FF_DCT_INT 2
1710 #define FF_DCT_MMX 3
1711 #define FF_DCT_ALTIVEC 5
1712 #define FF_DCT_FAAN 6
1716 * - encoding: Set by user.
1717 * - decoding: Set by user.
1720 #define FF_IDCT_AUTO 0
1721 #define FF_IDCT_INT 1
1722 #define FF_IDCT_SIMPLE 2
1723 #define FF_IDCT_SIMPLEMMX 3
1724 #define FF_IDCT_ARM 7
1725 #define FF_IDCT_ALTIVEC 8
1726 #define FF_IDCT_SIMPLEARM 10
1727 #define FF_IDCT_XVID 14
1728 #define FF_IDCT_SIMPLEARMV5TE 16
1729 #define FF_IDCT_SIMPLEARMV6 17
1730 #define FF_IDCT_FAAN 20
1731 #define FF_IDCT_SIMPLENEON 22
1732 #define FF_IDCT_NONE 24 /* Used by XvMC to extract IDCT coefficients with FF_IDCT_PERM_NON…
1733 #define FF_IDCT_SIMPLEAUTO 128
1737 * - encoding: Set by libavcodec.
1738 * - decoding: Set by user.
1744 * - encoding: set by user.
1745 * - decoding: set by libavcodec.
1750 * low resolution decoding, 1-> 1/2 size, 2->1/4 size
1751 * - encoding: unused
1752 * - decoding: Set by user.
1759 * - encoding: Set by libavcodec.
1760 * - decoding: unused
1762 * @deprecated use the quality factor packet side data instead
1770 * - encoding: Set by user.
1771 * - decoding: Set by user.
1776 * Which multithreading methods to use.
1777 * Use of FF_THREAD_FRAME will increase decoding delay by one frame per thread,
1778 * so clients which cannot provide future frames should not use it.
1780 * - encoding: Set by user, otherwise the default is used.
1781 * - decoding: Set by user, otherwise the default is used.
1784 #define FF_THREAD_FRAME 1 ///< Decode more than one frame at once
1785 #define FF_THREAD_SLICE 2 ///< Decode more than one part of a single frame at once
1788 * Which multithreading methods are in use by the codec.
1789 * - encoding: Set by libavcodec.
1790 * - decoding: Set by libavcodec.
1800 * - encoding: Set by user.
1801 * - decoding: Set by user.
1804 * thread-safe. Thread-unsafe get_buffer2() implementations will be
1821 * - encoding: Set by libavcodec, user can override.
1822 * - decoding: Set by libavcodec, user can override.
1831 * Also see avcodec_thread_init and e.g. the --enable-pthread configure option.
1836 * @param func function that will be called count times, with jobnr from 0 to count-1.
1837 * threadnr will be in the range 0 to c->thread_count-1 < MAX_THREADS and so that no
1840 * returns < 0 no further calls to func may be done and < 0 is returned.
1841 * - encoding: Set by libavcodec, user can override.
1842 * - decoding: Set by libavcodec, user can override.
1848 * - encoding: Set by user.
1849 * - decoding: unused
1855 * - encoding: Set by user.
1856 * - decoding: Set by libavcodec.
1859 #define FF_PROFILE_UNKNOWN -99
1860 #define FF_PROFILE_RESERVED -100
1862 #define FF_PROFILE_AAC_MAIN 0
1863 #define FF_PROFILE_AAC_LOW 1
1864 #define FF_PROFILE_AAC_SSR 2
1865 #define FF_PROFILE_AAC_LTP 3
1866 #define FF_PROFILE_AAC_HE 4
1867 #define FF_PROFILE_AAC_HE_V2 28
1868 #define FF_PROFILE_AAC_LD 22
1869 #define FF_PROFILE_AAC_ELD 38
1870 #define FF_PROFILE_MPEG2_AAC_LOW 128
1871 #define FF_PROFILE_MPEG2_AAC_HE 131
1873 #define FF_PROFILE_DNXHD 0
1874 #define FF_PROFILE_DNXHR_LB 1
1875 #define FF_PROFILE_DNXHR_SQ 2
1876 #define FF_PROFILE_DNXHR_HQ 3
1877 #define FF_PROFILE_DNXHR_HQX 4
1878 #define FF_PROFILE_DNXHR_444 5
1880 #define FF_PROFILE_DTS 20
1881 #define FF_PROFILE_DTS_ES 30
1882 #define FF_PROFILE_DTS_96_24 40
1883 #define FF_PROFILE_DTS_HD_HRA 50
1884 #define FF_PROFILE_DTS_HD_MA 60
1885 #define FF_PROFILE_DTS_EXPRESS 70
1887 #define FF_PROFILE_MPEG2_422 0
1888 #define FF_PROFILE_MPEG2_HIGH 1
1889 #define FF_PROFILE_MPEG2_SS 2
1890 #define FF_PROFILE_MPEG2_SNR_SCALABLE 3
1891 #define FF_PROFILE_MPEG2_MAIN 4
1892 #define FF_PROFILE_MPEG2_SIMPLE 5
1894 #define FF_PROFILE_H264_CONSTRAINED (1<<9) // 8+1; constraint_set1_flag
1895 #define FF_PROFILE_H264_INTRA (1<<11) // 8+3; constraint_set3_flag
1897 #define FF_PROFILE_H264_BASELINE 66
1898 #define FF_PROFILE_H264_CONSTRAINED_BASELINE (66|FF_PROFILE_H264_CONSTRAINED)
1899 #define FF_PROFILE_H264_MAIN 77
1900 #define FF_PROFILE_H264_EXTENDED 88
1901 #define FF_PROFILE_H264_HIGH 100
1902 #define FF_PROFILE_H264_HIGH_10 110
1903 #define FF_PROFILE_H264_HIGH_10_INTRA (110|FF_PROFILE_H264_INTRA)
1904 #define FF_PROFILE_H264_MULTIVIEW_HIGH 118
1905 #define FF_PROFILE_H264_HIGH_422 122
1906 #define FF_PROFILE_H264_HIGH_422_INTRA (122|FF_PROFILE_H264_INTRA)
1907 #define FF_PROFILE_H264_STEREO_HIGH 128
1908 #define FF_PROFILE_H264_HIGH_444 144
1909 #define FF_PROFILE_H264_HIGH_444_PREDICTIVE 244
1910 #define FF_PROFILE_H264_HIGH_444_INTRA (244|FF_PROFILE_H264_INTRA)
1911 #define FF_PROFILE_H264_CAVLC_444 44
1913 #define FF_PROFILE_VC1_SIMPLE 0
1914 #define FF_PROFILE_VC1_MAIN 1
1915 #define FF_PROFILE_VC1_COMPLEX 2
1916 #define FF_PROFILE_VC1_ADVANCED 3
1918 #define FF_PROFILE_MPEG4_SIMPLE 0
1919 #define FF_PROFILE_MPEG4_SIMPLE_SCALABLE 1
1920 #define FF_PROFILE_MPEG4_CORE 2
1921 #define FF_PROFILE_MPEG4_MAIN 3
1922 #define FF_PROFILE_MPEG4_N_BIT 4
1923 #define FF_PROFILE_MPEG4_SCALABLE_TEXTURE 5
1924 #define FF_PROFILE_MPEG4_SIMPLE_FACE_ANIMATION 6
1925 #define FF_PROFILE_MPEG4_BASIC_ANIMATED_TEXTURE 7
1926 #define FF_PROFILE_MPEG4_HYBRID 8
1927 #define FF_PROFILE_MPEG4_ADVANCED_REAL_TIME 9
1928 #define FF_PROFILE_MPEG4_CORE_SCALABLE 10
1929 #define FF_PROFILE_MPEG4_ADVANCED_CODING 11
1930 #define FF_PROFILE_MPEG4_ADVANCED_CORE 12
1931 #define FF_PROFILE_MPEG4_ADVANCED_SCALABLE_TEXTURE 13
1932 #define FF_PROFILE_MPEG4_SIMPLE_STUDIO 14
1933 #define FF_PROFILE_MPEG4_ADVANCED_SIMPLE 15
1935 #define FF_PROFILE_JPEG2000_CSTREAM_RESTRICTION_0 1
1936 #define FF_PROFILE_JPEG2000_CSTREAM_RESTRICTION_1 2
1937 #define FF_PROFILE_JPEG2000_CSTREAM_NO_RESTRICTION 32768
1938 #define FF_PROFILE_JPEG2000_DCINEMA_2K 3
1939 #define FF_PROFILE_JPEG2000_DCINEMA_4K 4
1941 #define FF_PROFILE_VP9_0 0
1942 #define FF_PROFILE_VP9_1 1
1943 #define FF_PROFILE_VP9_2 2
1944 #define FF_PROFILE_VP9_3 3
1946 #define FF_PROFILE_HEVC_MAIN 1
1947 #define FF_PROFILE_HEVC_MAIN_10 2
1948 #define FF_PROFILE_HEVC_MAIN_STILL_PICTURE 3
1949 #define FF_PROFILE_HEVC_REXT 4
1951 #define FF_PROFILE_VVC_MAIN_10 1
1952 #define FF_PROFILE_VVC_MAIN_10_444 33
1954 #define FF_PROFILE_AV1_MAIN 0
1955 #define FF_PROFILE_AV1_HIGH 1
1956 #define FF_PROFILE_AV1_PROFESSIONAL 2
1958 #define FF_PROFILE_MJPEG_HUFFMAN_BASELINE_DCT 0xc0
1959 #define FF_PROFILE_MJPEG_HUFFMAN_EXTENDED_SEQUENTIAL_DCT 0xc1
1960 #define FF_PROFILE_MJPEG_HUFFMAN_PROGRESSIVE_DCT 0xc2
1961 #define FF_PROFILE_MJPEG_HUFFMAN_LOSSLESS 0xc3
1962 #define FF_PROFILE_MJPEG_JPEG_LS 0xf7
1964 #define FF_PROFILE_SBC_MSBC 1
1966 #define FF_PROFILE_PRORES_PROXY 0
1967 #define FF_PROFILE_PRORES_LT 1
1968 #define FF_PROFILE_PRORES_STANDARD 2
1969 #define FF_PROFILE_PRORES_HQ 3
1970 #define FF_PROFILE_PRORES_4444 4
1971 #define FF_PROFILE_PRORES_XQ 5
1973 #define FF_PROFILE_ARIB_PROFILE_A 0
1974 #define FF_PROFILE_ARIB_PROFILE_C 1
1976 #define FF_PROFILE_KLVA_SYNC 0
1977 #define FF_PROFILE_KLVA_ASYNC 1
1981 * - encoding: Set by user.
1982 * - decoding: Set by libavcodec.
1985 #define FF_LEVEL_UNKNOWN -99
1989 * - encoding: unused
1990 * - decoding: Set by user.
1996 * - encoding: unused
1997 * - decoding: Set by user.
2003 * - encoding: unused
2004 * - decoding: Set by user.
2013 * - encoding: Set/allocated/freed by user (before avcodec_open2())
2014 * - decoding: Set/allocated/freed by libavcodec (by avcodec_open2())
2023 * - encoding: Set by libavcodec.
2024 * - decoding: unused.
2053 * - decoding: unused
2054 * - encoding: Set by libavcodec. The timestamps on the output packets are
2060 * -initial_padding.
2065 * - decoding: For codecs that store a framerate value in the compressed
2068 * - encoding: May be used to signal the framerate of CFR content to an
2075 * - encoding: unused.
2076 * - decoding: Set by libavcodec before calling get_format()
2082 * - encoding unused.
2083 * - decoding set by user.
2089 * - encoding: unused.
2090 * - decoding: set by libavcodec.
2096 * - decoding: maintained and used by libavcodec, not intended to be used by user apps
2097 * - encoding: unused
2106 * - decoding: set by user
2107 * - encoding: unused
2114 * - decoding: set by libavcodec
2115 * - encoding: unused
2118 #define FF_SUB_CHARENC_MODE_DO_NOTHING -1 ///< do nothing (demuxer outputs a stream supposed to b…
2119 #define FF_SUB_CHARENC_MODE_AUTOMATIC 0 ///< libavcodec will select the mode itself
2120 #define FF_SUB_CHARENC_MODE_PRE_DECODER 1 ///< the AVPacket data needs to be recoded to UTF-8 bef…
2121 #define FF_SUB_CHARENC_MODE_IGNORE 2 ///< neither convert the subtitles, nor check them for …
2125 * Note that if the format uses pre-multiplied alpha (common with VP6,
2127 * the image will look as if alpha-blended onto a black background.
2128 * However for formats that do not use pre-multiplied alpha
2130 * assumes pre-multiplied alpha anyway).
2132 * - decoding: set by user
2133 * - encoding: unused
2139 * - decoding: unused
2140 * - encoding: set by libavcodec
2150 #define FF_DEBUG_VIS_MV_P_FOR 0x00000001 //visualize forward predicted MVs of P frames
2151 #define FF_DEBUG_VIS_MV_B_FOR 0x00000002 //visualize forward predicted MVs of B frames
2152 #define FF_DEBUG_VIS_MV_B_BACK 0x00000004 //visualize backward predicted MVs of B frames
2157 * - encoding: Set by user, can be NULL.
2158 * - decoding: unused.
2165 * - encoding: Set by user.
2166 * - decoding: Set by user.
2173 * - encoding: unused
2174 * - decoding: set by user
2180 * - encoding: unused
2181 * - decoding: set by libavcodec
2184 #define FF_CODEC_PROPERTY_LOSSLESS 0x00000001
2185 #define FF_CODEC_PROPERTY_CLOSED_CAPTIONS 0x00000002
2190 * - decoding: unused
2191 * - encoding: may be set by libavcodec after avcodec_open2().
2199 * afterwards owned (and freed) by libavcodec - it should never be read by
2202 * - decoding: This field should be set by the caller from the get_format()
2204 * unreffed by libavcodec before the get_format() call.
2210 * - encoding: For hardware encoders configured to use a hwaccel pixel
2216 * This field should be set before avcodec_open2() is called.
2221 * Control the form of AVSubtitle.rects[N]->ass
2222 * - decoding: set by user
2223 * - encoding: unused
2226 #define FF_SUB_TEXT_FMT_ASS 0
2228 #define FF_SUB_TEXT_FMT_ASS_WITH_TIMINGS 1
2237 * - decoding: unused
2238 * - encoding: unused
2245 * - decoding: set by user
2246 * - encoding: set by user
2263 * For both encoders and decoders this field should be set before
2267 * order to support hw_frames_ctx at all - in that case, all frames
2275 * - encoding: unused
2276 * - decoding: Set by user (either before avcodec_open2(), or in the
2283 * only a sub-rectangle of the decoded frame is intended for display. This
2310 * the decoder will allocate for use by the caller. This must be set
2311 * before avcodec_open2() is called.
2313 * Some hardware decoders require all frames that they will use for
2314 * output to be defined in advance before decoding starts. For such
2325 * - decoding: set by user
2326 * - encoding: unused
2333 * - decoding: set by user
2334 * - encoding: set by user
2343 * - decoding: set by user
2344 * - encoding: set by user
2352 * The following field will be set in the packet before this callback is
2354 * - size
2355 * This callback must use the above value to calculate the required buffer size,
2359 * - data: alignment requirements for AVPacket apply, if any. Some architectures and
2361 * - buf: must contain a pointer to an AVBufferRef structure. The packet's
2370 * They may be used for example to hint what use the buffer may get after being
2376 * This callback must be thread-safe, as when frame threading is used, it may
2381 * - encoding: Set by libavcodec, user can override.
2382 * - decoding: unused
2474 * No fields below this line are part of the public API. They
2542 * Size of per-frame hardware accelerator private data.
2544 * Private data is allocated with av_mallocz() before
2594 * This CAN be called before AVHWAccel.init is called, and you must assume
2595 * that avctx->hwaccel_priv_data is invalid.
2604 #define AV_HWACCEL_CODEC_CAP_EXPERIMENTAL 0x0200
2612 * reason not to, as hardware tends to under-report supported levels.
2614 #define AV_HWACCEL_FLAG_IGNORE_LEVEL (1 << 0)
2620 #define AV_HWACCEL_FLAG_ALLOW_HIGH_DEPTH (1 << 1)
2627 * streams in hardware - it will often succeed, because many streams marked
2634 #define AV_HWACCEL_FLAG_ALLOW_PROFILE_MISMATCH (1 << 2)
2653 * @deprecated use AVFrame or imgutils functions instead
2685 #define AV_SUBTITLE_FLAG_FORCED 0x00000001
2710 char *text; ///< 0 terminated plain UTF-8 text
2734 * if c is non-NULL, returns the next registered codec after c,
2747 * Return the libavcodec build-time configuration.
2774 * @param codec if non-NULL, allocate private data and initialize defaults
2777 * If NULL, then the codec-specific defaults won't be initialized,
2795 * allocated for each new use.
2828 * unopened, i.e. you are required to call avcodec_open2() before you
2829 * can use this AVCodecContext to decode/encode video/audio data.
2836 * @deprecated The semantics of this function are ill-defined and it should not
2838 * to another, use an intermediate AVCodecParameters instance and the
2868 * Initialize the AVCodecContext to use the given AVCodec. Prior to using this
2877 * @note Always call this function before using decoding routines (such as
2893 * @param codec The codec to open this context for. If a non-NULL codec has been
2897 * @param options A dictionary filled with AVCodecContext and codec-private options.
2911 * the codec-specific data allocated in avcodec_alloc_context3() with a non-NULL
2914 * @note Do not use this function. Use avcodec_free_context() to destroy a
2916 * multiple times is not supported anymore -- use multiple codec contexts
2953 * buffer that is acceptable for the codec if you do not use any horizontal
2994 * Decode the audio frame of size avpkt->size from avpkt->data into frame.
3000 * decode the second frame, etc... Even if no frames are returned, the packet
3008 * with avpkt->data set to NULL and avpkt->size set to 0 until it stops
3010 * marked with AV_CODEC_CAP_DELAY, then no samples will be returned.
3012 * @warning The input buffer, avpkt->data must be AV_INPUT_BUFFER_PADDING_SIZE
3017 * before packets may be fed to the decoder.
3026 * when the frame is no longer needed. The caller may safely write
3032 * @param[out] got_frame_ptr Zero if no frame could be decoded, otherwise it is
3033 * non-zero. Note that this field being set to zero
3035 * decoders with AV_CODEC_CAP_DELAY set, no given decode
3038 * At least avpkt->data and avpkt->size should be set. Some
3044 * @deprecated Use avcodec_send_packet() and avcodec_receive_frame().
3051 * Decode the video frame of size avpkt->size from avpkt->data into picture.
3060 * no overreading happens for damaged MPEG streams.
3063 * between input and output, these need to be fed with avpkt->data=NULL,
3064 * avpkt->size=0 at the end to return the remaining frames.
3067 * before packets may be fed to the decoder.
3071 * Use av_frame_alloc() to get an AVFrame. The codec will
3077 * when the frame is no longer needed. The caller may safely write
3087 * flags&AV_PKT_FLAG_KEY. All decoders are designed to use the least
3089 * @param[in,out] got_picture_ptr Zero if no frame could be decompressed, otherwise, it is nonzero.
3091 * used or zero if no frame could be decompressed.
3093 * @deprecated Use avcodec_send_packet() and avcodec_receive_frame().
3104 * If no subtitle could be decompressed, got_sub_ptr is zero.
3115 * with avpkt->data set to NULL and avpkt->size set to 0 until it stops
3117 * marked with AV_CODEC_CAP_DELAY, then no subtitles will be returned.
3120 * before packets may be fed to the decoder.
3125 * @param[in,out] got_sub_ptr Zero if no subtitle could be decompressed, otherwise, it is nonzero.
3136 * influence decoding per-packet, and apply them when the packet is actually
3140 * @warning The input buffer, avpkt->data must be AV_INPUT_BUFFER_PADDING_SIZE
3149 * before packets may be fed to the decoder.
3157 * not reference-counted).
3161 * times afterwards before you can send a new packet.
3171 * AVERROR(EAGAIN): input is not accepted in the current state - user
3175 * AVERROR_EOF: the decoder has been flushed, and no new packets can
3188 * @param frame This will be set to a reference-counted video or audio
3191 * av_frame_unref(frame) before doing anything else.
3195 * AVERROR(EAGAIN): output is not available in this state - user must try
3198 * no more output frames
3208 * Supply a raw video or audio frame to the encoder. Use avcodec_receive_packet()
3216 * not reference-counted).
3227 * If it is not set, frame->nb_samples must be equal to
3228 * avctx->frame_size for all frames except the last.
3229 * The final frame may be smaller than avctx->frame_size.
3231 * AVERROR(EAGAIN): input is not accepted in the current state - user
3235 * AVERROR_EOF: the encoder has been flushed, and no new frames can
3248 * @param avpkt This will be set to a reference-counted packet allocated by the
3250 * av_packet_unref(avpkt) before doing anything else.
3252 * AVERROR(EAGAIN): output is not available in the current state - user
3255 * no more output packets
3280 * - It must be called from get_format with the same avctx parameter that was
3283 * - The function is not always supported (see description of return values).
3288 * - The hw_pix_fmt must be one of the choices suggested by get_format. If the
3289 * user decides to use a AVHWFramesContext prepared with this API function,
3291 * - The device_ref passed to this function must support the given hw_pix_fmt.
3292 * - After calling this API function, it is the user's responsibility to
3295 * before returning from get_format (this is implied by the normal
3297 * - The AVHWFramesContext parameters may change every time time get_format is
3298 * called. Also, AVCodecContext.hw_frames_ctx is reset before get_format. So
3301 * - It is perfectly possible to call this function without actually using
3302 * the resulting AVHWFramesContext. One use-case might be trying to reuse a
3305 * - Fields that use dynamically allocated values of any kind must not be set
3315 * - All fields set by av_hwframe_ctx_alloc().
3316 * - Set the format field to hw_pix_fmt.
3317 * - Set the sw_format field to the most suited and most versatile format. (An
3320 * - Set the width/height fields to the coded frame size, rounded up to the
3321 * API-specific minimum alignment.
3322 * - Only _if_ the hwaccel requires a pre-allocated pool: set the initial_pool_size
3326 * by frame threading. If the hwaccel does not require pre-allocation, the
3329 * - Possibly AVHWFramesContext.hwctx fields, depending on the underlying
3404 #define AV_PARSER_PTS_NB 4
3411 #define PARSER_FLAG_COMPLETE_FRAMES 0x0001
3412 #define PARSER_FLAG_ONCE 0x0002
3414 #define PARSER_FLAG_FETCHED_OFFSET 0x0004
3415 #define PARSER_FLAG_USE_CODEC_TS 0x1000
3421 * Set by parser to 1 for key frames and 0 for non-key frames.
3422 * It is initialized to -1, so if the parser doesn't set this flag,
3423 * old-style fallback using AV_PICTURE_TYPE_I picture type as key frames
3440 * Set to >0 for sync point, 0 for no sync point and <0 for undefined
3467 * contain valid non-negative timestamp delta (presentation time of a frame
3606 * in_len -= len;
3623 * @deprecated Use dump_extradata, remove_extra or extract_extradata
3656 * avpkt->data and avpkt->size prior to calling the
3657 * function, but if the size of the user-provided data is not
3658 * large enough, encoding will fail. If avpkt->data and
3659 * avpkt->size are set, avpkt->destruct must also be set. All
3661 * av_init_packet(). If avpkt->data is NULL, the encoder will
3662 * allocate it. The encoder will set avpkt->size to the size
3665 * If this function fails or produces no output, avpkt will be
3672 * If it is not set, frame->nb_samples must be equal to
3673 * avctx->frame_size for all frames except the last.
3674 * The final frame may be smaller than avctx->frame_size.
3676 * output packet is non-empty, and to 0 if it is
3683 * @deprecated use avcodec_send_frame()/avcodec_receive_packet() instead.
3702 * avpkt->data and avpkt->size prior to calling the
3703 * function, but if the size of the user-provided data is not
3706 * avpkt->data is NULL, the encoder will allocate it.
3707 * The encoder will set avpkt->size to the size of the
3711 * If this function fails or produces no output, avpkt will be
3717 * output packet is non-empty, and to 0 if it is
3724 * @deprecated use avcodec_send_frame()/avcodec_receive_packet() instead.
3760 * @deprecated use av_image_fill_arrays() instead.
3767 * @deprecated use av_image_copy_to_buffer() instead.
3775 * @deprecated use av_image_get_buffer_size() instead.
3824 * @deprecated Use av_pix_fmt_get_chroma_sub_sample
3833 * pixel format pix_fmt, or 0 if no associated fourCC code can be
3853 * @return The best pixel format to convert to or -1 if none was found.
3939 * frame->nb_samples must be set prior to calling the
3940 * function. This function fills in frame->data,
3941 * frame->extended_data, frame->linesize[0].
3944 * @param buf buffer to use for frame data
3960 * (i.e. avctx->refcounted_frames is 0), this invalidates the frames previously
3967 * will drain any remaining packets, and can then be re-used for a different
3985 * -1 (or anything else) for native
3992 * Only return non-zero if the bits per sample is exactly correct, not an
4031 * is deprecated. Use the new bitstream filtering API (using AVBSFContext).
4037 * is deprecated. Use av_bsf_get_by_name(), av_bsf_alloc(), and av_bsf_init()
4044 * is deprecated. Use av_bsf_send_packet() and av_bsf_receive_packet() from the
4054 * is deprecated. Use av_bsf_free() from the new bitstream filtering API (using
4061 * is deprecated. Use av_bsf_iterate() from the new bitstream filtering API (using
4080 * be 0-initialized so that no uninitialized data will ever appear.
4086 * be 0-initialized after call.
4110 * if hwaccel is non-NULL, returns the next registered hardware accelerator
4113 * @deprecated AVHWaccel structures contain no user-serviceable parts, so
4140 * state as when it was called and return a non-zero value. However,
4143 * it will return a non-negative value, if it fails it will return a
4145 * av_lockmgr_register is not thread-safe, it must be called from a
4146 * single thread before any calls which make use of locking are used.
4152 * mechanism (i.e. do not use a single static object to
4165 * with no corresponding avcodec_close()), 0 otherwise.
4173 * @param size if non-NULL, the size of the allocated struct will be written