21#ifndef AVCODEC_ENCODE_H
22#define AVCODEC_ENCODE_H
34#define FF_INPUT_BUFFER_MIN_SIZE 16384
121#define FF_MATRIX_TYPE_INTRA (1U << 0)
122#define FF_MATRIX_TYPE_INTER (1U << 1)
123#define FF_MATRIX_TYPE_CHROMA_INTRA (1U << 2)
Libavcodec external API header.
#define flags(name, subs,...)
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.
AVCPBProperties * ff_encode_add_cpb_side_data(AVCodecContext *avctx)
Add a CPB properties side data to an encoding context.
int ff_encode_encode_cb(AVCodecContext *avctx, AVPacket *avpkt, AVFrame *frame, int *got_packet)
int ff_encode_reconf_parse_dict(AVCodecContext *avctx, AVDictionary **dict)
int ff_encode_add_stats_side_data(AVPacket *pkt, int quality, const int64_t error[], int error_count, enum AVPictureType pict_type)
int ff_encode_reordered_opaque(AVCodecContext *avctx, AVPacket *pkt, const AVFrame *frame)
Propagate user opaque values from the frame to avctx/pkt as needed.
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)
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
int64_t av_rescale_q(int64_t a, AVRational bq, AVRational cq)
Rescale a 64-bit integer by 2 rational numbers.
#define AV_NOPTS_VALUE
Undefined timestamp value.
This structure describes the bitrate properties of an encoded bitstream.
main external API structure.
int sample_rate
samples per second
AVRational time_base
This is the fundamental unit of time (in seconds) in terms of which frame timestamps are represented.
This structure describes decoded (raw) audio or video data.
This structure stores compressed data.
Rational number (pair of numerator and denominator).
static void error(const char *err)
static const uint8_t quality[]