21#ifndef AVCODEC_AVCODEC_H
22#define AVCODEC_AVCODEC_H
47#ifndef HAVE_AV_CONFIG_H
191#define AV_INPUT_BUFFER_MIN_SIZE 16384
212#define AV_CODEC_FLAG_UNALIGNED (1 << 0)
216#define AV_CODEC_FLAG_QSCALE (1 << 1)
220#define AV_CODEC_FLAG_4MV (1 << 2)
224#define AV_CODEC_FLAG_OUTPUT_CORRUPT (1 << 3)
228#define AV_CODEC_FLAG_QPEL (1 << 4)
233#define AV_CODEC_FLAG_DROPCHANGED (1 << 5)
237#define AV_CODEC_FLAG_PASS1 (1 << 9)
241#define AV_CODEC_FLAG_PASS2 (1 << 10)
245#define AV_CODEC_FLAG_LOOP_FILTER (1 << 11)
249#define AV_CODEC_FLAG_GRAY (1 << 13)
253#define AV_CODEC_FLAG_PSNR (1 << 15)
254#if FF_API_FLAG_TRUNCATED
261#define AV_CODEC_FLAG_TRUNCATED (1 << 16)
266#define AV_CODEC_FLAG_INTERLACED_DCT (1 << 18)
270#define AV_CODEC_FLAG_LOW_DELAY (1 << 19)
274#define AV_CODEC_FLAG_GLOBAL_HEADER (1 << 22)
278#define AV_CODEC_FLAG_BITEXACT (1 << 23)
283#define AV_CODEC_FLAG_AC_PRED (1 << 24)
287#define AV_CODEC_FLAG_INTERLACED_ME (1 << 29)
288#define AV_CODEC_FLAG_CLOSED_GOP (1U << 31)
293#define AV_CODEC_FLAG2_FAST (1 << 0)
297#define AV_CODEC_FLAG2_NO_OUTPUT (1 << 2)
301#define AV_CODEC_FLAG2_LOCAL_HEADER (1 << 3)
306#define AV_CODEC_FLAG2_DROP_FRAME_TIMECODE (1 << 13)
312#define AV_CODEC_FLAG2_CHUNKS (1 << 15)
316#define AV_CODEC_FLAG2_IGNORE_CROP (1 << 16)
321#define AV_CODEC_FLAG2_SHOW_ALL (1 << 22)
325#define AV_CODEC_FLAG2_EXPORT_MVS (1 << 28)
329#define AV_CODEC_FLAG2_SKIP_MANUAL (1 << 29)
333#define AV_CODEC_FLAG2_RO_FLUSH_NOOP (1 << 30)
348#define AV_CODEC_EXPORT_DATA_MVS (1 << 0)
352#define AV_CODEC_EXPORT_DATA_PRFT (1 << 1)
357#define AV_CODEC_EXPORT_DATA_VIDEO_ENC_PARAMS (1 << 2)
362#define AV_CODEC_EXPORT_DATA_FILM_GRAIN (1 << 3)
367#define AV_GET_BUFFER_FLAG_REF (1 << 0)
372#define AV_GET_ENCODE_BUFFER_FLAG_REF (1 << 0)
374struct AVCodecInternal;
462#define FF_COMPRESSION_DEFAULT -1
626 int y,
int type,
int height);
795#define FF_CMP_NSSE 10
798#define FF_CMP_DCTMAX 13
799#define FF_CMP_DCT264 14
800#define FF_CMP_MEDIAN_SAD 15
801#define FF_CMP_CHROMA 256
853#define SLICE_FLAG_CODED_ORDER 0x0001
854#define SLICE_FLAG_ALLOW_FIELD 0x0002
855#define SLICE_FLAG_ALLOW_PLANE 0x0004
863#define FF_MB_DECISION_SIMPLE 0
864#define FF_MB_DECISION_BITS 1
865#define FF_MB_DECISION_RD 2
1000#if FF_API_OLD_CHANNEL_LAYOUT
1052#if FF_API_OLD_CHANNEL_LAYOUT
1272#define FF_BUG_AUTODETECT 1
1273#define FF_BUG_XVID_ILACE 4
1274#define FF_BUG_UMP4 8
1275#define FF_BUG_NO_PADDING 16
1276#define FF_BUG_AMV 32
1277#define FF_BUG_QPEL_CHROMA 64
1278#define FF_BUG_STD_QPEL 128
1279#define FF_BUG_QPEL_CHROMA2 256
1280#define FF_BUG_DIRECT_BLOCKSIZE 512
1281#define FF_BUG_EDGE 1024
1282#define FF_BUG_HPEL_CHROMA 2048
1283#define FF_BUG_DC_CLIP 4096
1284#define FF_BUG_MS 8192
1285#define FF_BUG_TRUNCATED 16384
1286#define FF_BUG_IEDGE 32768
1301#define FF_COMPLIANCE_VERY_STRICT 2
1302#define FF_COMPLIANCE_STRICT 1
1303#define FF_COMPLIANCE_NORMAL 0
1304#define FF_COMPLIANCE_UNOFFICIAL -1
1305#define FF_COMPLIANCE_EXPERIMENTAL -2
1313#define FF_EC_GUESS_MVS 1
1314#define FF_EC_DEBLOCK 2
1315#define FF_EC_FAVOR_INTER 256
1323#define FF_DEBUG_PICT_INFO 1
1324#define FF_DEBUG_RC 2
1325#define FF_DEBUG_BITSTREAM 4
1326#define FF_DEBUG_MB_TYPE 8
1327#define FF_DEBUG_QP 16
1328#define FF_DEBUG_DCT_COEFF 0x00000040
1329#define FF_DEBUG_SKIP 0x00000080
1330#define FF_DEBUG_STARTCODE 0x00000100
1331#define FF_DEBUG_ER 0x00000400
1332#define FF_DEBUG_MMCO 0x00000800
1333#define FF_DEBUG_BUGS 0x00001000
1334#define FF_DEBUG_BUFFERS 0x00008000
1335#define FF_DEBUG_THREADS 0x00010000
1336#define FF_DEBUG_GREEN_MD 0x00800000
1337#define FF_DEBUG_NOMC 0x01000000
1352#define AV_EF_CRCCHECK (1<<0)
1353#define AV_EF_BITSTREAM (1<<1)
1354#define AV_EF_BUFFER (1<<2)
1355#define AV_EF_EXPLODE (1<<3)
1357#define AV_EF_IGNORE_ERR (1<<15)
1358#define AV_EF_CAREFUL (1<<16)
1359#define AV_EF_COMPLIANT (1<<17)
1360#define AV_EF_AGGRESSIVE (1<<18)
1405#define FF_DCT_AUTO 0
1406#define FF_DCT_FASTINT 1
1409#define FF_DCT_ALTIVEC 5
1410#define FF_DCT_FAAN 6
1418#define FF_IDCT_AUTO 0
1419#define FF_IDCT_INT 1
1420#define FF_IDCT_SIMPLE 2
1421#define FF_IDCT_SIMPLEMMX 3
1422#define FF_IDCT_ARM 7
1423#define FF_IDCT_ALTIVEC 8
1424#define FF_IDCT_SIMPLEARM 10
1425#define FF_IDCT_XVID 14
1426#define FF_IDCT_SIMPLEARMV5TE 16
1427#define FF_IDCT_SIMPLEARMV6 17
1428#define FF_IDCT_FAAN 20
1429#define FF_IDCT_SIMPLENEON 22
1432#define FF_IDCT_NONE 24
1434#define FF_IDCT_SIMPLEAUTO 128
1474#define FF_THREAD_FRAME 1
1475#define FF_THREAD_SLICE 2
1484#if FF_API_THREAD_SAFE_CALLBACKS
1548#define FF_PROFILE_UNKNOWN -99
1549#define FF_PROFILE_RESERVED -100
1551#define FF_PROFILE_AAC_MAIN 0
1552#define FF_PROFILE_AAC_LOW 1
1553#define FF_PROFILE_AAC_SSR 2
1554#define FF_PROFILE_AAC_LTP 3
1555#define FF_PROFILE_AAC_HE 4
1556#define FF_PROFILE_AAC_HE_V2 28
1557#define FF_PROFILE_AAC_LD 22
1558#define FF_PROFILE_AAC_ELD 38
1559#define FF_PROFILE_MPEG2_AAC_LOW 128
1560#define FF_PROFILE_MPEG2_AAC_HE 131
1562#define FF_PROFILE_DNXHD 0
1563#define FF_PROFILE_DNXHR_LB 1
1564#define FF_PROFILE_DNXHR_SQ 2
1565#define FF_PROFILE_DNXHR_HQ 3
1566#define FF_PROFILE_DNXHR_HQX 4
1567#define FF_PROFILE_DNXHR_444 5
1569#define FF_PROFILE_DTS 20
1570#define FF_PROFILE_DTS_ES 30
1571#define FF_PROFILE_DTS_96_24 40
1572#define FF_PROFILE_DTS_HD_HRA 50
1573#define FF_PROFILE_DTS_HD_MA 60
1574#define FF_PROFILE_DTS_EXPRESS 70
1576#define FF_PROFILE_MPEG2_422 0
1577#define FF_PROFILE_MPEG2_HIGH 1
1578#define FF_PROFILE_MPEG2_SS 2
1579#define FF_PROFILE_MPEG2_SNR_SCALABLE 3
1580#define FF_PROFILE_MPEG2_MAIN 4
1581#define FF_PROFILE_MPEG2_SIMPLE 5
1583#define FF_PROFILE_H264_CONSTRAINED (1<<9)
1584#define FF_PROFILE_H264_INTRA (1<<11)
1586#define FF_PROFILE_H264_BASELINE 66
1587#define FF_PROFILE_H264_CONSTRAINED_BASELINE (66|FF_PROFILE_H264_CONSTRAINED)
1588#define FF_PROFILE_H264_MAIN 77
1589#define FF_PROFILE_H264_EXTENDED 88
1590#define FF_PROFILE_H264_HIGH 100
1591#define FF_PROFILE_H264_HIGH_10 110
1592#define FF_PROFILE_H264_HIGH_10_INTRA (110|FF_PROFILE_H264_INTRA)
1593#define FF_PROFILE_H264_MULTIVIEW_HIGH 118
1594#define FF_PROFILE_H264_HIGH_422 122
1595#define FF_PROFILE_H264_HIGH_422_INTRA (122|FF_PROFILE_H264_INTRA)
1596#define FF_PROFILE_H264_STEREO_HIGH 128
1597#define FF_PROFILE_H264_HIGH_444 144
1598#define FF_PROFILE_H264_HIGH_444_PREDICTIVE 244
1599#define FF_PROFILE_H264_HIGH_444_INTRA (244|FF_PROFILE_H264_INTRA)
1600#define FF_PROFILE_H264_CAVLC_444 44
1602#define FF_PROFILE_VC1_SIMPLE 0
1603#define FF_PROFILE_VC1_MAIN 1
1604#define FF_PROFILE_VC1_COMPLEX 2
1605#define FF_PROFILE_VC1_ADVANCED 3
1607#define FF_PROFILE_MPEG4_SIMPLE 0
1608#define FF_PROFILE_MPEG4_SIMPLE_SCALABLE 1
1609#define FF_PROFILE_MPEG4_CORE 2
1610#define FF_PROFILE_MPEG4_MAIN 3
1611#define FF_PROFILE_MPEG4_N_BIT 4
1612#define FF_PROFILE_MPEG4_SCALABLE_TEXTURE 5
1613#define FF_PROFILE_MPEG4_SIMPLE_FACE_ANIMATION 6
1614#define FF_PROFILE_MPEG4_BASIC_ANIMATED_TEXTURE 7
1615#define FF_PROFILE_MPEG4_HYBRID 8
1616#define FF_PROFILE_MPEG4_ADVANCED_REAL_TIME 9
1617#define FF_PROFILE_MPEG4_CORE_SCALABLE 10
1618#define FF_PROFILE_MPEG4_ADVANCED_CODING 11
1619#define FF_PROFILE_MPEG4_ADVANCED_CORE 12
1620#define FF_PROFILE_MPEG4_ADVANCED_SCALABLE_TEXTURE 13
1621#define FF_PROFILE_MPEG4_SIMPLE_STUDIO 14
1622#define FF_PROFILE_MPEG4_ADVANCED_SIMPLE 15
1624#define FF_PROFILE_JPEG2000_CSTREAM_RESTRICTION_0 1
1625#define FF_PROFILE_JPEG2000_CSTREAM_RESTRICTION_1 2
1626#define FF_PROFILE_JPEG2000_CSTREAM_NO_RESTRICTION 32768
1627#define FF_PROFILE_JPEG2000_DCINEMA_2K 3
1628#define FF_PROFILE_JPEG2000_DCINEMA_4K 4
1630#define FF_PROFILE_VP9_0 0
1631#define FF_PROFILE_VP9_1 1
1632#define FF_PROFILE_VP9_2 2
1633#define FF_PROFILE_VP9_3 3
1635#define FF_PROFILE_HEVC_MAIN 1
1636#define FF_PROFILE_HEVC_MAIN_10 2
1637#define FF_PROFILE_HEVC_MAIN_STILL_PICTURE 3
1638#define FF_PROFILE_HEVC_REXT 4
1640#define FF_PROFILE_VVC_MAIN_10 1
1641#define FF_PROFILE_VVC_MAIN_10_444 33
1643#define FF_PROFILE_AV1_MAIN 0
1644#define FF_PROFILE_AV1_HIGH 1
1645#define FF_PROFILE_AV1_PROFESSIONAL 2
1647#define FF_PROFILE_MJPEG_HUFFMAN_BASELINE_DCT 0xc0
1648#define FF_PROFILE_MJPEG_HUFFMAN_EXTENDED_SEQUENTIAL_DCT 0xc1
1649#define FF_PROFILE_MJPEG_HUFFMAN_PROGRESSIVE_DCT 0xc2
1650#define FF_PROFILE_MJPEG_HUFFMAN_LOSSLESS 0xc3
1651#define FF_PROFILE_MJPEG_JPEG_LS 0xf7
1653#define FF_PROFILE_SBC_MSBC 1
1655#define FF_PROFILE_PRORES_PROXY 0
1656#define FF_PROFILE_PRORES_LT 1
1657#define FF_PROFILE_PRORES_STANDARD 2
1658#define FF_PROFILE_PRORES_HQ 3
1659#define FF_PROFILE_PRORES_4444 4
1660#define FF_PROFILE_PRORES_XQ 5
1662#define FF_PROFILE_ARIB_PROFILE_A 0
1663#define FF_PROFILE_ARIB_PROFILE_C 1
1665#define FF_PROFILE_KLVA_SYNC 0
1666#define FF_PROFILE_KLVA_ASYNC 1
1674#define FF_LEVEL_UNKNOWN -99
1779#define FF_SUB_CHARENC_MODE_DO_NOTHING -1
1780#define FF_SUB_CHARENC_MODE_AUTOMATIC 0
1781#define FF_SUB_CHARENC_MODE_PRE_DECODER 1
1782#define FF_SUB_CHARENC_MODE_IGNORE 2
1811#define FF_DEBUG_VIS_MV_P_FOR 0x00000001
1812#define FF_DEBUG_VIS_MV_B_FOR 0x00000002
1813#define FF_DEBUG_VIS_MV_B_BACK 0x00000004
1845#define FF_CODEC_PROPERTY_LOSSLESS 0x00000001
1846#define FF_CODEC_PROPERTY_CLOSED_CAPTIONS 0x00000002
1847#define FF_CODEC_PROPERTY_FILM_GRAIN 0x00000004
1882#if FF_API_SUB_TEXT_FORMAT
1888#define FF_SUB_TEXT_FMT_ASS 0
2221#define AV_HWACCEL_CODEC_CAP_EXPERIMENTAL 0x0200
2231#define AV_HWACCEL_FLAG_IGNORE_LEVEL (1 << 0)
2237#define AV_HWACCEL_FLAG_ALLOW_HIGH_DEPTH (1 << 1)
2251#define AV_HWACCEL_FLAG_ALLOW_PROFILE_MISMATCH (1 << 2)
2275#define AV_SUBTITLE_FLAG_FORCED 0x00000001
2358#if FF_API_GET_FRAME_CLASS
2816#define AV_PARSER_PTS_NB 4
2823#define PARSER_FLAG_COMPLETE_FRAMES 0x0001
2824#define PARSER_FLAG_ONCE 0x0002
2826#define PARSER_FLAG_FETCHED_OFFSET 0x0004
2827#define PARSER_FLAG_USE_CODEC_TS 0x1000
2956 const uint8_t **poutbuf,
int *poutbuf_size,
2957 const uint8_t *buf,
int buf_size);
3008 uint8_t **poutbuf,
int *poutbuf_size,
3009 const uint8_t *buf,
int buf_size,
3010 int64_t
pts, int64_t dts,
3075 int has_alpha,
int *loss_ptr);
3114 int buf_size,
int align);
Macro definitions for various function/variable attributes.
#define attribute_deprecated
Convenience header that includes libavutil's core.
refcounted data buffer API
Misc types and constants that do not belong anywhere else.
static enum AVPixelFormat pix_fmt
static void encode(AVCodecContext *ctx, AVFrame *frame, AVPacket *pkt, FILE *output)
reference-counted frame API
#define AV_NUM_DATA_POINTERS
int avcodec_parameters_from_context(AVCodecParameters *par, const AVCodecContext *codec)
Fill the parameters struct based on the values from the supplied codec context.
int avcodec_open2(AVCodecContext *avctx, const AVCodec *codec, AVDictionary **options)
Initialize the AVCodecContext to use the given AVCodec.
const AVClass * avcodec_get_class(void)
Get the AVClass for AVCodecContext.
const AVClass * avcodec_get_subtitle_rect_class(void)
Get the AVClass for AVSubtitleRect.
AVCodecContext * avcodec_alloc_context3(const AVCodec *codec)
Allocate an AVCodecContext and set its fields to default values.
void avsubtitle_free(AVSubtitle *sub)
Free all allocated data in the given subtitle struct.
AVCodecID
Identify the syntax and semantics of the bitstream.
const char * avcodec_license(void)
Return the libavcodec license.
int avcodec_parameters_to_context(AVCodecContext *codec, const AVCodecParameters *par)
Fill the codec context based on the values from the supplied codec parameters.
attribute_deprecated const AVClass * avcodec_get_frame_class(void)
unsigned avcodec_version(void)
Return the LIBAVCODEC_VERSION_INT constant.
const char * avcodec_configuration(void)
Return the libavcodec build-time configuration.
int avcodec_close(AVCodecContext *avctx)
Close a given AVCodecContext and free all the data associated with it (but not the AVCodecContext its...
void avcodec_free_context(AVCodecContext **avctx)
Free the codec context and everything associated with it and write NULL to the provided pointer.
@ SUBTITLE_BITMAP
A bitmap, pict will be set.
@ SUBTITLE_ASS
Formatted text, the ass field must be set by the decoder and is authoritative.
@ SUBTITLE_TEXT
Plain text, the text field must be set by the decoder and is authoritative.
int avcodec_default_get_buffer2(AVCodecContext *s, AVFrame *frame, int flags)
The default callback for AVCodecContext.get_buffer2().
int avcodec_receive_frame(AVCodecContext *avctx, AVFrame *frame)
Return decoded output data from a decoder.
int avcodec_enum_to_chroma_pos(int *xpos, int *ypos, enum AVChromaLocation pos)
Converts AVChromaLocation to swscale x/y chroma position.
enum AVChromaLocation avcodec_chroma_pos_to_enum(int xpos, int ypos)
Converts swscale x/y chroma position to AVChromaLocation.
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...
int avcodec_decode_subtitle2(AVCodecContext *avctx, AVSubtitle *sub, int *got_sub_ptr, AVPacket *avpkt)
Decode a subtitle message.
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...
int avcodec_send_packet(AVCodecContext *avctx, const AVPacket *avpkt)
Supply raw packet data as input to a decoder.
int avcodec_receive_packet(AVCodecContext *avctx, AVPacket *avpkt)
Read encoded data from the encoder.
int avcodec_get_hw_frames_parameters(AVCodecContext *avctx, AVBufferRef *device_ref, enum AVPixelFormat hw_pix_fmt, AVBufferRef **out_frames_ref)
Create and return a AVHWFramesContext with values adequate for hardware decoding.
int avcodec_send_frame(AVCodecContext *avctx, const AVFrame *frame)
Supply a raw video or audio frame to the encoder.
int avcodec_default_get_encode_buffer(AVCodecContext *s, AVPacket *pkt, int flags)
The default callback for AVCodecContext.get_encode_buffer().
int avcodec_encode_subtitle(AVCodecContext *avctx, uint8_t *buf, int buf_size, const AVSubtitle *sub)
enum AVPixelFormat avcodec_default_get_format(struct AVCodecContext *s, const enum AVPixelFormat *fmt)
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,...
enum AVPixelFormat avcodec_find_best_pix_fmt_of_list(const enum AVPixelFormat *pix_fmt_list, enum AVPixelFormat src_pix_fmt, int has_alpha, int *loss_ptr)
Find the best pixel format to convert to given a certain source pixel format.
void av_fast_padded_malloc(void *ptr, unsigned int *size, size_t min_size)
Same behaviour av_fast_malloc but the buffer has additional AV_INPUT_BUFFER_PADDING_SIZE at the end w...
int av_get_audio_frame_duration(AVCodecContext *avctx, int frame_bytes)
Return audio frame duration.
int avcodec_default_execute2(AVCodecContext *c, int(*func)(AVCodecContext *c2, void *arg2, int, int), void *arg, int *ret, int count)
int avcodec_fill_audio_frame(AVFrame *frame, int nb_channels, enum AVSampleFormat sample_fmt, const uint8_t *buf, int buf_size, int align)
Fill AVFrame audio data and linesize pointers.
void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode)
int avcodec_is_open(AVCodecContext *s)
int avcodec_default_execute(AVCodecContext *c, int(*func)(AVCodecContext *c2, void *arg2), void *arg, int *ret, int count, int size)
void av_fast_padded_mallocz(void *ptr, unsigned int *size, size_t min_size)
Same behaviour av_fast_padded_malloc except that buffer will always be 0-initialized after call.
void avcodec_flush_buffers(AVCodecContext *avctx)
Reset the internal codec state / flush internal buffers.
void av_parser_close(AVCodecParserContext *s)
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.
AVCodecParserContext * av_parser_init(int codec_id)
const AVCodecParser * av_parser_iterate(void **opaque)
Iterate over all registered codec parsers.
@ AV_PICTURE_STRUCTURE_FRAME
@ AV_PICTURE_STRUCTURE_BOTTOM_FIELD
@ AV_PICTURE_STRUCTURE_TOP_FIELD
@ AV_PICTURE_STRUCTURE_UNKNOWN
struct AVDictionary AVDictionary
AVSampleFormat
Audio sample formats.
static enum AVPixelFormat hw_pix_fmt
AVChromaLocation
Location of chroma samples.
AVColorRange
Visual content value range.
AVPixelFormat
Pixel format.
AVColorPrimaries
Chromaticity coordinates of the source primaries.
AVColorTransferCharacteristic
Color Transfer Characteristic.
AVColorSpace
YUV colorspace type.
Utilties for rational number calculation.
A reference to a data buffer.
An AVChannelLayout holds information about the channel layout of audio data.
Describe the class of an AVClass context structure.
main external API structure.
float rc_max_available_vbv_use
Ratecontrol attempt to use, at maximum, of what can be used without an underflow.
int skip_top
Number of macroblock rows at the top which are skipped.
int trellis
trellis RD quantization
enum AVPixelFormat pix_fmt
Pixel format, see AV_PIX_FMT_xxx.
int64_t pts_correction_last_dts
PTS of the last frame.
int max_qdiff
maximum quantizer difference between frames
uint16_t * chroma_intra_matrix
custom intra quantization matrix
const AVCodecDescriptor * codec_descriptor
AVCodecDescriptor.
int hwaccel_flags
Bit set of AV_HWACCEL_FLAG_* flags, which affect hardware accelerated decoding (if active).
int width
picture width / height.
AVPacketSideData * coded_side_data
Additional data associated with the entire coded stream.
int64_t pts_correction_num_faulty_dts
Number of incorrect PTS values so far.
char * stats_out
pass1 encoding statistics output buffer
int rc_buffer_size
decoder bitstream buffer size
AVChannelLayout ch_layout
Audio channel layout.
int64_t pts_correction_last_pts
Number of incorrect DTS values so far.
int me_cmp
motion estimation comparison function
int flags2
AV_CODEC_FLAG2_*.
enum AVSampleFormat sample_fmt
audio sample format
enum AVPixelFormat sw_pix_fmt
Nominal unaccelerated pixel format, see AV_PIX_FMT_xxx.
int global_quality
Global quality for codecs which cannot change it per frame.
int64_t max_pixels
The number of pixels per image to maximally accept.
attribute_deprecated uint64_t request_channel_layout
Request decoder to use this channel layout if it can (0 for default)
enum AVColorRange color_range
MPEG vs JPEG YUV range.
char * sub_charenc
DTS of the last frame.
int error_concealment
error concealment flags
int dct_algo
DCT algorithm, see FF_DCT_* below.
unsigned int codec_tag
fourcc (LSB first, so "ABCD" -> ('D'<<24) + ('C'<<16) + ('B'<<8) + 'A').
int slice_flags
slice flags
int strict_std_compliance
strictly follow the standard (MPEG-4, ...).
float b_quant_offset
qscale offset between IP and B-frames
AVRational pkt_timebase
Timebase in which pkt_dts/pts and AVPacket.dts/pts are.
enum AVPixelFormat(* get_format)(struct AVCodecContext *s, const enum AVPixelFormat *fmt)
Callback to negotiate the pixel format.
enum AVAudioServiceType audio_service_type
Type of service that the audio stream conveys.
enum AVColorPrimaries color_primaries
Chromaticity coordinates of the source primaries.
int me_subpel_quality
subpel ME quality
AVBufferRef * hw_frames_ctx
A reference to the AVHWFramesContext describing the input (for encoding) or output (decoding) frames.
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...
int mb_lmax
maximum MB Lagrange multiplier
int qmin
minimum quantizer
int keyint_min
minimum GOP size
enum AVMediaType codec_type
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...
int dia_size
ME diamond size & shape.
attribute_deprecated int debug_mv
int workaround_bugs
Work around bugs in encoders which sometimes cannot be detected automatically.
int apply_cropping
Video decoding only.
char * stats_in
pass2 encoding statistics input buffer Concatenated stuff from stats_out of pass1 should be placed he...
AVRational sample_aspect_ratio
sample aspect ratio (0 if unknown) That is the width of a pixel divided by the height of the pixel.
int bits_per_coded_sample
bits per sample/pixel from the demuxer (needed for huffyuv).
int rc_override_count
ratecontrol override, see RcOverride
uint8_t * dump_separator
dump format separator.
attribute_deprecated uint64_t channel_layout
Audio channel layout.
int slice_count
slice count
int ticks_per_frame
For some codecs, the time base is closer to the field rate than the frame rate.
enum AVFieldOrder field_order
Field order.
uint16_t * inter_matrix
custom inter quantization matrix Must be allocated with the av_malloc() family of functions,...
const struct AVHWAccel * hwaccel
Hardware accelerator in use.
int active_thread_type
Which multithreading methods are in use by the codec.
int(* get_encode_buffer)(struct AVCodecContext *s, AVPacket *pkt, int flags)
This callback is called at the beginning of each packet to get a data buffer for it.
int sub_charenc_mode
Subtitles character encoding mode.
int64_t reordered_opaque
opaque 64-bit number (generally a PTS) that will be reordered and output in AVFrame....
int bit_rate_tolerance
number of bits the bitstream is allowed to diverge from the reference.
int mb_decision
macroblock decision mode
int has_b_frames
Size of the frame reordering buffer in the decoder.
char * codec_whitelist
',' separated list of allowed decoders.
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.
int64_t bit_rate
the average bitrate
enum AVDiscard skip_loop_filter
Skip loop filtering for selected frames.
int64_t pts_correction_num_faulty_pts
Current statistics for PTS correction.
const struct AVCodec * codec
attribute_deprecated int channels
number of audio channels
int rc_initial_buffer_occupancy
Number of bits which should be loaded into the rc buffer before decoding starts.
int thread_type
Which multithreading methods to use.
int me_sub_cmp
subpixel motion estimation comparison function
unsigned properties
Properties of the stream that gets decoded.
int last_predictor_count
amount of previous MV predictors (2a+1 x 2a+1 square)
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.
int bits_per_raw_sample
Bits per sample/pixel of internal libavcodec pixel/sample format.
int idct_algo
IDCT algorithm, see FF_IDCT_* below.
int export_side_data
Bit set of AV_CODEC_EXPORT_DATA_* flags, which affects the kind of metadata exported in frame,...
enum AVColorSpace colorspace
YUV colorspace type.
enum AVSampleFormat request_sample_fmt
desired sample format
int initial_padding
Audio only.
float temporal_cplx_masking
temporary complexity masking (0-> disabled)
int sample_rate
samples per second
const AVClass * av_class
information on struct for av_log
float p_masking
p block masking (0-> disabled)
float dark_masking
darkness masking (0-> disabled)
int mb_cmp
macroblock comparison function (not supported yet)
int gop_size
the number of pictures in a group of pictures, or 0 for intra_only
int frame_number
Frame counter, set by libavcodec.
int skip_alpha
Skip processing alpha if supported by codec.
int refs
number of reference frames
int ildct_cmp
interlaced DCT comparison function
attribute_deprecated int thread_safe_callbacks
Set by the client if its custom get_buffer() callback can be called synchronously from another thread...
int mv0_threshold
Note: Value depends upon the compare function used for fullpel ME.
int mb_lmin
minimum MB Lagrange multiplier
int64_t rc_max_rate
maximum bitrate
int discard_damaged_percentage
The percentage of damaged samples to discard a frame.
int thread_count
thread count is used to decide how many independent tasks should be passed to execute()
void * opaque
Private data of the user, can be used to carry app specific stuff.
int qmax
maximum quantizer
void * hwaccel_context
Hardware accelerator context.
uint16_t * intra_matrix
custom intra quantization matrix Must be allocated with the av_malloc() family of functions,...
enum AVColorTransferCharacteristic color_trc
Color Transfer Characteristic.
float rc_min_vbv_overflow_use
Ratecontrol attempt to use, at least, times the amount needed to prevent a vbv overflow.
uint8_t * subtitle_header
Header containing style information for text subtitles.
AVRational time_base
This is the fundamental unit of time (in seconds) in terms of which frame timestamps are represented.
int flags
AV_CODEC_FLAG_*.
int seek_preroll
Number of samples to skip after a discontinuity.
uint8_t * extradata
some codecs need / can use extradata like Huffman tables.
int me_pre_cmp
motion estimation prepass comparison function
int64_t rc_min_rate
minimum bitrate
int trailing_padding
Audio only.
enum AVDiscard skip_idct
Skip IDCT/dequantization for selected frames.
int intra_dc_precision
precision of the intra DC coefficient - 8
enum AVChromaLocation chroma_sample_location
This defines the location of chroma samples.
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.
uint64_t error[AV_NUM_DATA_POINTERS]
error
float qcompress
amount of qscale change between easy & hard scenes (0.0-1.0)
float qblur
amount of qscale smoothing over time (0.0-1.0)
AVBufferRef * hw_device_ctx
A reference to the AVHWDeviceContext describing the device which will be used by a hardware encoder/d...
int me_range
maximum motion estimation search range in subpel units If 0 then no limit.
attribute_deprecated int sub_text_format
int64_t max_samples
The number of samples per frame to maximally accept.
int pre_dia_size
ME prepass diamond size & shape.
float lumi_masking
luminance masking (0-> disabled)
int cutoff
Audio cutoff bandwidth (0 means "automatic")
int skip_bottom
Number of macroblock rows at the bottom which are skipped.
int coded_width
Bitstream width / height, may be different from width/height e.g.
int block_align
number of bytes per packet if constant and known or 0 Used by some WAV based audio codecs.
int frame_size
Number of samples per channel in an audio frame.
int * slice_offset
slice offsets in the frame in bytes
float i_quant_factor
qscale factor between P- and I-frames If > 0 then the last P-frame quantizer will be used (q = lastp_...
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.
struct AVCodecInternal * internal
Private context used for internal data.
int lowres
low resolution decoding, 1-> 1/2 size, 2->1/4 size
float spatial_cplx_masking
spatial complexity masking (0-> disabled)
enum AVDiscard skip_frame
Skip decoding for selected frames.
int err_recognition
Error recognition; may misdetect some more or less valid parts as errors.
float i_quant_offset
qscale offset between P and I-frames
int slices
Number of slices.
This struct describes the properties of a single codec described by an AVCodecID.
This struct describes the properties of an encoded stream.
int duration
Duration of the current frame.
int dts_ref_dts_delta
Offset of the current timestamp against last timestamp sync point in units of AVCodecContext....
int64_t cur_frame_end[AV_PARSER_PTS_NB]
int width
Dimensions of the decoded video intended for presentation.
enum AVFieldOrder field_order
const struct AVCodecParser * parser
int64_t pos
Byte position of currently parsed frame in stream.
int format
The format of the coded data, corresponds to enum AVPixelFormat for video and for enum AVSampleFormat...
int repeat_pict
This field is used for proper frame duration computation in lavf.
enum AVPictureStructure picture_structure
Indicate whether a picture is coded as a frame, top field or bottom field.
int64_t cur_frame_dts[AV_PARSER_PTS_NB]
int64_t cur_frame_pos[AV_PARSER_PTS_NB]
Position of the packet in file.
int output_picture_number
Picture number incremented in presentation or output order.
int pts_dts_delta
Presentation delay of current frame in units of AVCodecContext.time_base.
int64_t next_frame_offset
int64_t cur_frame_pts[AV_PARSER_PTS_NB]
int64_t cur_frame_offset[AV_PARSER_PTS_NB]
int key_frame
Set by parser to 1 for key frames and 0 for non-key frames.
int cur_frame_start_index
int64_t last_pos
Previous frame byte position.
int coded_width
Dimensions of the coded video.
int64_t offset
byte offset from starting packet start
int dts_sync_point
Synchronization point for start of timestamp generation.
int(* split)(AVCodecContext *avctx, const uint8_t *buf, int buf_size)
void(* parser_close)(AVCodecParserContext *s)
int(* parser_parse)(AVCodecParserContext *s, AVCodecContext *avctx, const uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size)
int(* parser_init)(AVCodecParserContext *s)
This structure describes decoded (raw) audio or video data.
int priv_data_size
Size of the private data to allocate in AVCodecInternal.hwaccel_priv_data.
int(* alloc_frame)(AVCodecContext *avctx, AVFrame *frame)
Allocate a custom buffer.
int(* uninit)(AVCodecContext *avctx)
Uninitialize the hwaccel private data.
enum AVCodecID id
Codec implemented by the hardware accelerator.
int(* start_frame)(AVCodecContext *avctx, const uint8_t *buf, uint32_t buf_size)
Called at the beginning of each frame or field picture.
int(* init)(AVCodecContext *avctx)
Initialize the hwaccel private data.
const char * name
Name of the hardware accelerated codec.
int capabilities
Hardware accelerated codec capabilities.
int(* decode_slice)(AVCodecContext *avctx, const uint8_t *buf, uint32_t buf_size)
Callback for each slice.
int(* frame_params)(AVCodecContext *avctx, AVBufferRef *hw_frames_ctx)
Fill the given hw_frames context with current codec parameters.
int(* decode_params)(AVCodecContext *avctx, int type, const uint8_t *buf, uint32_t buf_size)
Callback for parameter data (SPS/PPS/VPS etc).
enum AVPixelFormat pix_fmt
Supported pixel format.
int caps_internal
Internal hwaccel capabilities.
int(* end_frame)(AVCodecContext *avctx)
Called at the end of each frame or field picture.
int frame_priv_data_size
Size of per-frame hardware accelerator private data.
enum AVMediaType type
Type of codec implemented by the hardware accelerator.
This structure stores compressed data.
Rational number (pair of numerator and denominator).
int x
top left corner of pict, undefined when pict is not set
char * ass
0 terminated ASS/SSA compatible event line.
int w
width of pict, undefined when pict is not set
int nb_colors
number of colors in pict, undefined when pict is not set
char * text
0 terminated plain UTF-8 text
uint8_t * data[4]
data+linesize for the bitmap of this subtitle.
int y
top left corner of pict, undefined when pict is not set
int h
height of pict, undefined when pict is not set
uint32_t start_display_time
uint32_t end_display_time
int64_t pts
Same as packet pts, in AV_TIME_BASE.