65 av_log(avctx,
AV_LOG_ERROR,
"Invalid minimum required packet size %"PRId64
" (max allowed is %d)\n",
91 if (avpkt->
data || avpkt->
buf) {
92 av_log(avctx,
AV_LOG_ERROR,
"avpkt->{data,buf} != NULL in avcodec_default_get_encode_buffer()\n");
120 if (!avpkt->
data || !avpkt->
buf) {
164 frame->nb_samples = out_samples;
177 src->nb_samples,
s->ch_layout.nb_channels,
181 frame->nb_samples -
src->nb_samples,
182 s->ch_layout.nb_channels,
s->sample_fmt)) < 0)
185 discard_padding =
frame->nb_samples -
src->nb_samples;
254 if (frame_sd && frame_sd->
size >= 10) {
264 if (skip_samples > 0 || discard_padding > 0) {
268 AV_WL32A(packet_sd + 0, skip_samples);
269 AV_WL32A(packet_sd + 4, discard_padding);
303 if (!ret && *got_packet) {
360 if (!
frame->buf[0]) {
373#if CONFIG_FRAME_THREAD_ENCODER
460 if (!avci->icc.avctx) {
510 int out_samples = (
src->nb_samples + pad_samples - 1) / pad_samples * pad_samples;
512 if (out_samples !=
src->nb_samples) {
687 ret = codec->
reconf(avctx, dict);
701 int ret,
i, num_pix_fmts;
710 0, (
const void **) &
pix_fmts, &num_pix_fmts);
715 for (
i = 0;
i < num_pix_fmts;
i++)
718 if (
i == num_pix_fmts) {
720 "Specified pixel format %s is not supported by the %s encoder.\n",
743 0, (
const void **) &alpha_modes, &num_alpha_modes);
748 for (
i = 0;
i < num_alpha_modes;
i++) {
752 if (
i == num_alpha_modes) {
754 "Specified alpha mode '%s' is not supported by the %s encoder.\n",
768 av_log(avctx,
AV_LOG_WARNING,
"Specified bit depth %d not possible with the specified pixel formats depth %d\n",
781 "Mismatching AVCodecContext.pix_fmt and AVHWFramesContext.format\n");
787 "Mismatching AVCodecContext.sw_pix_fmt (%s) "
788 "and AVHWFramesContext.sw_format (%s)\n",
803 const int *supported_samplerates;
805 int ret,
i, num_sample_fmts, num_samplerates, num_ch_layouts;
819 for (
i = 0;
i < num_sample_fmts;
i++) {
829 if (
i == num_sample_fmts) {
831 "Specified sample format %s is not supported by the %s encoder\n",
845 0, (
const void **) &supported_samplerates,
849 if (supported_samplerates) {
850 for (
i = 0;
i < num_samplerates;
i++)
853 if (
i == num_samplerates) {
855 "Specified sample rate %d is not supported by the %s encoder\n",
859 for (
int p = 0; supported_samplerates[p]; p++)
866 0, (
const void **) &ch_layouts, &num_ch_layouts);
870 for (
i = 0;
i < num_ch_layouts;
i++) {
874 if (
i == num_ch_layouts) {
878 "Specified channel layout '%s' is not supported by the %s encoder\n",
879 ret > 0 ? buf :
"?",
c->name);
917 "encoder does not support it.\n");
948 "from an encoder not supporting it\n");
973 type_packet, sd_frame->
size, 0);
977 memcpy(sd_packet->
data, sd_frame->
data, sd_frame->
size);
980#if CONFIG_FRAME_THREAD_ENCODER
996 if (
frame->width <= 0 ||
frame->height <= 0) {
1074 size_t side_data_size;
1078 side_data_size = 4+4+8*error_count;
1083 if (!side_data || side_data_size < 4+4+8*error_count)
1087 side_data[4] = pict_type;
1088 side_data[5] = error_count;
1089 for (
int i = 0;
i < error_count; ++
i)
1098 const char *names[] = {
"Intra",
"Inter",
"Chroma Intra"};
1101 uint16_t *
matrix = matrices[m];
1102 if (
matrix && (types & (1U << m))) {
1103 for (
int i = 0;
i < 64;
i++) {
uint8_t ptrdiff_t const uint8_t ptrdiff_t int intptr_t intptr_t int int16_t * dst
static enum AVSampleFormat sample_fmts[]
simple assert() macros that are a bit more flexible than ISO C assert().
#define av_assert1(cond)
assert() equivalent, that does not lie in speed critical code.
#define av_assert0(cond)
assert() equivalent, that is always enabled.
const SideDataMap ff_sd_global_map[]
A map between packet and frame side data types.
Libavcodec external API header.
#define flags(name, subs,...)
#define i(width, name, range_min, range_max)
Public libavutil channel layout APIs header.
#define FF_CODEC_CAP_EOF_FLUSH
The encoder has AV_CODEC_CAP_DELAY set, but does not actually have delay - it only wants to be flushe...
@ FF_CODEC_CB_TYPE_ENCODE
@ FF_CODEC_CB_TYPE_RECEIVE_PACKET
static av_always_inline const FFCodec * ffcodec(const AVCodec *codec)
#define FF_CODEC_CAP_ICC_PROFILES
Codec supports embedded ICC profiles (AV_FRAME_DATA_ICC_PROFILE).
AVCPBProperties * av_cpb_properties_alloc(size_t *size)
Allocate a CPB properties structure and initialize its fields to default values.
int ff_alloc_packet(AVCodecContext *avctx, AVPacket *avpkt, int64_t size)
Check AVPacket size and allocate data.
int ff_get_encode_buffer(AVCodecContext *avctx, AVPacket *avpkt, int64_t size, int flags)
Get a buffer for a packet.
int ff_encode_get_frame(AVCodecContext *avctx, AVFrame *frame)
Called by encoders to get the next frame for encoding.
static int encode_make_refcounted(AVCodecContext *avctx, AVPacket *avpkt)
static int encode_preinit_audio(AVCodecContext *avctx)
static int encode_preinit_video(AVCodecContext *avctx)
AVCPBProperties * ff_encode_add_cpb_side_data(AVCodecContext *avctx)
Add a CPB properties side data to an encoding context.
AVCodecInternal * ff_encode_internal_alloc(void)
static int encode_send_frame_internal(AVCodecContext *avctx, const AVFrame *src)
static int encode_generate_icc_profile(av_unused AVCodecContext *c, av_unused AVFrame *f)
int ff_encode_encode_cb(AVCodecContext *avctx, AVPacket *avpkt, AVFrame *frame, int *got_packet)
static EncodeContext * encode_ctx(AVCodecInternal *avci)
static int encode_set_packet_props(AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame)
int ff_encode_preinit(AVCodecContext *avctx)
int ff_encode_add_stats_side_data(AVPacket *pkt, int quality, const int64_t error[], int error_count, enum AVPictureType pict_type)
static int pad_last_frame(AVCodecContext *s, AVFrame *frame, const AVFrame *src, int out_samples)
Pad last frame with silence.
static int encode_receive_packet_internal(AVCodecContext *avctx, AVPacket *avpkt)
static int encode_simple_receive_packet(AVCodecContext *avctx, AVPacket *avpkt)
int ff_encode_reordered_opaque(AVCodecContext *avctx, AVPacket *pkt, const AVFrame *frame)
Propagate user opaque values from the frame to avctx/pkt as needed.
static int encode_simple_internal(AVCodecContext *avctx, AVPacket *avpkt)
int ff_encode_receive_frame(AVCodecContext *avctx, AVFrame *frame)
avcodec_receive_frame() implementation for encoders.
int ff_encode_alloc_frame(AVCodecContext *avctx, AVFrame *frame)
Allocate buffers for a frame.
int ff_check_codec_matrices(AVCodecContext *avctx, unsigned types, uint16_t min, uint16_t max)
av_cold int ff_encode_reconf_parse_dict(AVCodecContext *avctx, AVDictionary **dict)
void ff_encode_flush_buffers(AVCodecContext *avctx)
static av_always_inline int64_t ff_samples_from_time_base(const AVCodecContext *avctx, int64_t duration)
Rescale from time base to AVCodecContext.sample_rate.
static av_always_inline int64_t ff_samples_to_time_base(const AVCodecContext *avctx, int64_t samples)
Rescale from sample rate to AVCodecContext.time_base.
reference-counted frame API
av_cold int ff_frame_thread_encoder_init(AVCodecContext *avctx)
Initialize frame thread encoder.
int ff_thread_video_encode_frame(AVCodecContext *avctx, AVPacket *pkt, AVFrame *frame, int *got_packet_ptr)
#define AV_OPT_FLAG_RUNTIME_PARAM
A generic parameter which can be set by the user at runtime.
av_cold int avcodec_encode_reconfigure(AVCodecContext *avctx, AVDictionary **dict)
Try to reconfigure the encoder with the provided dictionary.
#define AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE
This encoder can reorder user opaque values from input AVFrames and return them with corresponding ou...
#define AV_CODEC_CAP_ENCODER_RECONF
Encoder can be reconfigured by passing new initialization parameters.
#define AV_CODEC_FLAG2_ICC_PROFILES
Generate/parse ICC profiles on encode/decode, as appropriate for the type of file.
int av_codec_is_encoder(const AVCodec *codec)
#define AV_CODEC_CAP_DELAY
Encoder or decoder requires flushing with NULL input at the end in order to give the complete and cor...
#define AV_CODEC_PROP_INTRA_ONLY
Codec uses only intra compression.
#define AV_CODEC_FLAG_FRAME_DURATION
Signal to the encoder that the values of AVFrame.duration are valid and should be used (typically for...
#define AV_CODEC_FLAG_PASS1
Use internal 2pass ratecontrol in first pass mode.
#define AV_CODEC_FLAG2_FIXED_FRAME_SIZE
Force audio encoders to use a fixed frame size.
int av_get_exact_bits_per_sample(enum AVCodecID codec_id)
Return codec bits per sample.
#define AV_CODEC_CAP_SMALL_LAST_FRAME
Codec can be fed a final frame with a smaller size.
#define AV_CODEC_CAP_ENCODER_RECON_FRAME
The encoder is able to output reconstructed frame data, i.e.
#define AV_CODEC_FLAG_COPY_OPAQUE
#define AV_CODEC_PROP_REORDER
Codec supports frame reordering.
#define AV_CODEC_FLAG_RECON_FRAME
Request the encoder to output reconstructed frames, i.e. frames that would be produced by decoding th...
int avcodec_default_get_buffer2(AVCodecContext *s, AVFrame *frame, int flags)
The default callback for AVCodecContext.get_buffer2().
int attribute_align_arg avcodec_receive_packet(AVCodecContext *avctx, AVPacket *avpkt)
Read encoded data from the encoder.
#define AV_INPUT_BUFFER_PADDING_SIZE
Required number of additionally allocated bytes at the end of the input bitstream for decoding.
int attribute_align_arg 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 *avctx, AVPacket *avpkt, int flags)
The default callback for AVCodecContext.get_encode_buffer().
int avcodec_get_supported_config(const AVCodecContext *avctx, const AVCodec *codec, enum AVCodecConfig config, unsigned flags, const void **out, int *out_num)
Retrieve a list of all supported values for a given configuration type.
@ AV_CODEC_CONFIG_PIX_FORMAT
AVPixelFormat, terminated by AV_PIX_FMT_NONE.
@ AV_CODEC_CONFIG_SAMPLE_FORMAT
AVSampleFormat, terminated by AV_SAMPLE_FMT_NONE.
@ AV_CODEC_CONFIG_ALPHA_MODE
AVAlphaMode, terminated by AVALPHA_MODE_UNSPECIFIED.
@ AV_CODEC_CONFIG_SAMPLE_RATE
int, terminated by 0
@ AV_CODEC_CONFIG_CHANNEL_LAYOUT
AVChannelLayout, terminated by {0}.
int avcodec_encode_subtitle(AVCodecContext *avctx, uint8_t *buf, int buf_size, const AVSubtitle *sub)
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 avcodec_is_open(AVCodecContext *s)
AVPacketSideData * av_packet_side_data_new(AVPacketSideData **psd, int *pnb_sd, enum AVPacketSideDataType type, size_t size, int flags)
Allocate a new packet side data.
const AVPacketSideData * av_packet_side_data_get(const AVPacketSideData *sd, int nb_sd, enum AVPacketSideDataType type)
Get side information from a side data array.
@ AV_PKT_DATA_SKIP_SAMPLES
Recommends skipping the specified number of samples.
@ AV_PKT_DATA_QUALITY_STATS
This side data contains quality related information from the encoder.
@ AV_PKT_DATA_CPB_PROPERTIES
This side data corresponds to the AVCPBProperties struct.
@ AV_PKT_DATA_NB
The number of side data types.
void av_packet_unref(AVPacket *pkt)
Wipe the packet.
uint8_t * av_packet_new_side_data(AVPacket *pkt, enum AVPacketSideDataType type, size_t size)
Allocate new information of a packet.
#define AV_PKT_FLAG_KEY
The packet contains a keyframe.
void av_packet_move_ref(AVPacket *dst, AVPacket *src)
Move every field in src to dst and reset src.
uint8_t * av_packet_get_side_data(const AVPacket *pkt, enum AVPacketSideDataType type, size_t *size)
Get side information from packet.
int av_channel_layout_compare(const AVChannelLayout *chl, const AVChannelLayout *chl1)
Check whether two channel layouts are semantically the same, i.e.
int av_channel_layout_describe(const AVChannelLayout *channel_layout, char *buf, size_t buf_size)
Get a human-readable string describing the channel layout properties.
int av_channel_layout_copy(AVChannelLayout *dst, const AVChannelLayout *src)
Make a copy of a channel layout.
int av_buffer_realloc(AVBufferRef **pbuf, size_t size)
Reallocate a given buffer.
int av_buffer_replace(AVBufferRef **pdst, const AVBufferRef *src)
Ensure dst refers to the same data as src.
void av_dict_free(AVDictionary **pm)
Free all the memory allocated for an AVDictionary struct and all keys and values.
const AVDictionaryEntry * av_dict_iterate(const AVDictionary *m, const AVDictionaryEntry *prev)
Iterate over a dictionary.
int av_dict_copy(AVDictionary **dst, const AVDictionary *src, int flags)
Copy entries from one AVDictionary struct into another.
int av_dict_set(AVDictionary **pm, const char *key, const char *value, int flags)
Set the given entry in *pm, overwriting an existing entry.
int av_dict_count(const AVDictionary *m)
Get number of entries in dictionary.
#define AVERROR_BUG
Internal bug, also see AVERROR_BUG2.
#define AVERROR_EOF
End of file.
#define AVERROR_OPTION_NOT_FOUND
Option not found.
void av_frame_unref(AVFrame *frame)
Unreference all the buffers referenced by frame and reset the frame fields.
AVFrameSideData * av_frame_get_side_data(const AVFrame *frame, enum AVFrameSideDataType type)
int av_frame_get_buffer(AVFrame *frame, int align)
Allocate new buffer(s) for audio or video data.
void av_frame_move_ref(AVFrame *dst, AVFrame *src)
Move everything contained in src to dst and reset src.
int av_frame_ref(AVFrame *dst, const AVFrame *src)
Set up a new reference to the data described by the source frame.
AVFrameSideData * av_frame_new_side_data(AVFrame *frame, enum AVFrameSideDataType type, size_t size)
Add a new side data to a frame.
int av_frame_copy_props(AVFrame *dst, const AVFrame *src)
Copy only "metadata" fields from src to dst.
AVFrame * av_frame_alloc(void)
Allocate an AVFrame and set its fields to default values.
static const AVFrameSideData * av_frame_side_data_get(AVFrameSideData *const *sd, const int nb_sd, enum AVFrameSideDataType type)
Wrapper around av_frame_side_data_get_c() to workaround the limitation that for any type T the conver...
@ AV_FRAME_DATA_AUDIO_SERVICE_TYPE
This side data must be associated with an audio frame and corresponds to enum AVAudioServiceType defi...
@ AV_FRAME_DATA_SKIP_SAMPLES
Recommends skipping the specified number of samples.
@ AV_FRAME_DATA_ICC_PROFILE
The data contains an ICC profile as an opaque octet buffer following the format described by ISO 1507...
#define AV_LOG_WARNING
Something somehow does not look correct.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
void * av_realloc_array(void *ptr, size_t nmemb, size_t size)
int av_get_bytes_per_sample(enum AVSampleFormat sample_fmt)
Return number of bytes per sample.
enum AVSampleFormat av_get_planar_sample_fmt(enum AVSampleFormat sample_fmt)
Get the planar alternative form of the given sample format.
const char * av_get_sample_fmt_name(enum AVSampleFormat sample_fmt)
Return the name of sample_fmt, or NULL if sample_fmt is not recognized.
AVSampleFormat
Audio sample formats.
int av_samples_set_silence(uint8_t *const *audio_data, int offset, int nb_samples, int nb_channels, enum AVSampleFormat sample_fmt)
Fill an audio buffer with silence.
int av_samples_copy(uint8_t *const *dst, uint8_t *const *src, int dst_offset, int src_offset, int nb_samples, int nb_channels, enum AVSampleFormat sample_fmt)
Copy samples from src to dst.
#define AV_NOPTS_VALUE
Undefined timestamp value.
#define AV_OPT_SEARCH_CHILDREN
Search in possible children of the given object first.
const AVOption * av_opt_find(void *obj, const char *name, const char *unit, int opt_flags, int search_flags)
Look for an option in an object.
#define AV_OPT_SEARCH_FAKE_OBJ
The obj passed to av_opt_find() or av_opt_set() is fake – only a double pointer to AVClass instead of...
int av_opt_set_dict2(void *obj, AVDictionary **options, int search_flags)
Set all the options from a given dictionary on an object.
int ff_icc_profile_attach(FFIccContext *s, cmsHPROFILE profile, AVFrame *frame)
Attach an ICC profile to a frame.
int ff_icc_profile_generate(FFIccContext *s, enum AVColorPrimaries color_prim, enum AVColorTransferCharacteristic color_trc, cmsHPROFILE *out_profile)
Generate an ICC profile for a given combination of color primaries and transfer function.
int ff_icc_context_init(FFIccContext *s, void *avctx)
Initializes an FFIccContext.
common internal api header.
common internal API header
#define attribute_align_arg
static enum AVPixelFormat pix_fmts[]
Memory handling functions.
const char * av_alpha_mode_name(enum AVAlphaMode mode)
const char * av_get_pix_fmt_name(enum AVPixelFormat pix_fmt)
Return the short name for a pixel format, NULL in case pix_fmt is unknown.
const AVPixFmtDescriptor * av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
#define AV_PIX_FMT_FLAG_ALPHA
The pixel format has an alpha channel.
@ AVCOL_RANGE_JPEG
Full range content.
AVAlphaMode
Correlation between the alpha channel and color values.
@ AVALPHA_MODE_UNSPECIFIED
Unknown alpha handling, or no alpha channel.
AVPixelFormat
Pixel format.
@ AV_PIX_FMT_YUVJ440P
planar YUV 4:4:0 full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV440P and setting color_range
@ AV_PIX_FMT_YUVJ411P
planar YUV 4:1:1, 12bpp, (1 Cr & Cb sample per 4x1 Y samples) full scale (JPEG), deprecated in favor ...
@ AV_PIX_FMT_YUVJ422P
planar YUV 4:2:2, 16bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV422P and setting col...
@ AV_PIX_FMT_YUVJ444P
planar YUV 4:4:4, 24bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV444P and setting col...
@ AV_PIX_FMT_YUVJ420P
planar YUV 4:2:0, 12bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV420P and setting col...
AVColorPrimaries
Chromaticity coordinates of the source primaries.
AVColorTransferCharacteristic
Color Transfer Characteristic.
#define FF_ARRAY_ELEMS(a)
uint8_t * data
The data buffer.
This structure describes the bitrate properties of an encoded bitstream.
An AVChannelLayout holds information about the channel layout of audio data.
int nb_channels
Number of channels in this layout.
main external API structure.
enum AVPixelFormat pix_fmt
Pixel format, see AV_PIX_FMT_xxx.
uint16_t * chroma_intra_matrix
custom intra quantization matrix
int width
picture width / height.
AVPacketSideData * coded_side_data
Additional data associated with the entire coded stream.
char * stats_out
pass1 encoding statistics output buffer
const struct AVCodecDescriptor * codec_descriptor
AVCodecDescriptor.
int rc_buffer_size
decoder bitstream buffer size
AVChannelLayout ch_layout
Audio channel layout.
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.
enum AVColorRange color_range
MPEG vs JPEG YUV range.
enum AVAudioServiceType audio_service_type
Type of service that the audio stream conveys.
enum AVColorPrimaries color_primaries
Chromaticity coordinates of the source primaries.
AVBufferRef * hw_frames_ctx
A reference to the AVHWFramesContext describing the input (for encoding) or output (decoding) frames.
enum AVMediaType codec_type
int64_t frame_num
Frame counter, set by libavcodec.
uint16_t * inter_matrix
custom inter quantization matrix Must be allocated with the av_malloc() family of functions,...
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.
int64_t bit_rate
the average bitrate
const struct AVCodec * codec
int rc_initial_buffer_occupancy
Number of bits which should be loaded into the rc buffer before decoding starts.
int bits_per_raw_sample
Bits per sample/pixel of internal libavcodec pixel/sample format.
int initial_padding
Audio only.
int sample_rate
samples per second
const AVClass * av_class
information on struct for av_log
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.
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_*.
AVFrameSideData ** decoded_side_data
Array containing static side data, such as HDR10 CLL / MDCV structures.
enum AVAlphaMode alpha_mode
Indicates how the alpha channel of the video is represented.
int frame_size
Number of samples per channel in an audio frame.
struct AVCodecInternal * internal
Private context used for internal data.
int props
Codec properties, a combination of AV_CODEC_PROP_* flags.
AVFrame * recon_frame
When the AV_CODEC_FLAG_RECON_FRAME flag is used.
int pad_samples
Audio encoders can set this flag during init to indicate that they want the small last frame to be pa...
unsigned int byte_buffer_size
uint8_t * byte_buffer
temporary buffer used for encoders to store their bitstream
AVPacket * buffer_pkt
Temporary buffers for newly received or not yet output packets/frames.
AVFrame * in_frame
The input frame is stored here for encoders implementing the simple encode API.
int draining
decoding: AVERROR_EOF has been returned from ff_decode_get_packet(); must not be used by decoders tha...
void * frame_thread_encoder
const AVClass * priv_class
AVClass for the private context.
int capabilities
Codec capabilities.
int depth
Number of bits in the component.
Structure to hold side data for an AVFrame.
This structure describes decoded (raw) audio or video data.
AVBufferRef * buf[AV_NUM_DATA_POINTERS]
AVBuffer references backing the data for this frame.
This struct describes a set or pool of "hardware" frames (i.e.
enum AVPixelFormat format
The pixel format identifying the underlying HW surface type.
enum AVPixelFormat sw_format
The pixel format identifying the actual data layout of the hardware frames.
This structure stores auxiliary information for decoding, presenting, or otherwise processing the cod...
enum AVPacketSideDataType type
This structure stores compressed data.
AVBufferRef * buf
A reference to the reference-counted buffer where the packet data is stored.
int flags
A combination of AV_PKT_FLAG values.
int64_t duration
Duration of this packet in AVStream->time_base units, 0 if unknown.
int64_t pts
Presentation timestamp in AVStream->time_base units; the time at which the decompressed packet will b...
int64_t dts
Decompression timestamp in AVStream->time_base units; the time at which the packet is decompressed.
AVPacketSideData * side_data
Additional packet data that can be provided by the container.
Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes...
AVComponentDescriptor comp[4]
Parameters that describe how pixels are packed.
uint64_t flags
Combination of AV_PIX_FMT_FLAG_... flags.
uint32_t start_display_time
int intra_only_flag
This is set to AV_PKT_FLAG_KEY for encoders that encode intra-only formats (i.e.
int last_audio_frame
An audio frame with less than required samples has been submitted (and potentially padded with silenc...
unsigned cb_type
This field determines the type of the codec (decoder/encoder) and also the exact callback cb implemen...
const FFCodecDefault * defaults
Private codec-specific defaults.
int(* receive_packet)(struct AVCodecContext *avctx, struct AVPacket *avpkt)
Encode API with decoupled frame/packet dataflow.
int(* reconf)(struct AVCodecContext *avctx, struct AVDictionary **dict)
Encoding only.
int(* encode_sub)(struct AVCodecContext *avctx, uint8_t *buf, int buf_size, const struct AVSubtitle *sub)
Encode subtitles to a raw buffer.
int(* encode)(struct AVCodecContext *avctx, struct AVPacket *avpkt, const struct AVFrame *frame, int *got_packet_ptr)
Encode data to an AVPacket.
unsigned caps_internal
Internal codec capabilities FF_CODEC_CAP_*.
union FFCodec::@344166142000117327246261075357045351044045072174 cb
static void error(const char *err)
static void copy(const float *p1, float *p2, const int length)
static const uint8_t quality[]