Go to the documentation of this file.
58 #include <stdatomic.h>
65 #include "libavutil/ffversion.h"
149 *
data = matrix_encoding;
163 w_align = 1 <<
desc->log2_chroma_w;
164 h_align = 1 <<
desc->log2_chroma_h;
167 switch (
s->pix_fmt) {
324 w_align =
FFMAX(w_align, 8);
344 for (
i = 0;
i < 4;
i++)
351 int chroma_shift =
desc->log2_chroma_w;
356 align =
FFMAX(linesize_align[0], linesize_align[3]);
357 linesize_align[1] <<= chroma_shift;
358 linesize_align[2] <<= chroma_shift;
359 align =
FFMAX3(align, linesize_align[1], linesize_align[2]);
369 *xpos = (
pos&1) * 128;
370 *ypos = ((
pos>>1)^(
pos<4)) * 128;
388 int buf_size,
int align)
393 frame->nb_samples, sample_fmt,
395 if (buf_size < needed_size)
401 sizeof(*
frame->extended_data))))
409 sample_fmt, align)) < 0) {
429 for (p = 0; p<
desc->nb_components; p++) {
431 int is_chroma = p == 1 || p == 2;
434 if (
desc->comp[0].depth >= 9) {
435 ((uint16_t*)dst)[0] =
c[p];
437 dst +=
frame->linesize[p];
438 for (y = 1; y <
height; y++) {
439 memcpy(dst,
frame->data[p], 2*bytes);
440 dst +=
frame->linesize[p];
443 for (y = 0; y <
height; y++) {
444 memset(dst,
c[p], bytes);
445 dst +=
frame->linesize[p];
455 for (
i = 0;
i < count;
i++) {
468 for (
i = 0;
i < count;
i++) {
488 #if FF_API_CODEC_GET_SET
497 return codec->properties;
515 switch (
ctx->codec_type) {
524 if (bits_per_sample) {
525 bit_rate =
ctx->sample_rate * (int64_t)
ctx->channels;
526 if (bit_rate > INT64_MAX / bits_per_sample) {
529 bit_rate *= bits_per_sample;
568 int codec_init_ok = 0;
576 if (!codec && !avctx->
codec) {
580 if (codec && avctx->
codec && codec != avctx->
codec) {
582 "but %s passed to avcodec_open2()\n", avctx->
codec->
name, codec->
name);
586 codec = avctx->
codec;
693 avctx->
codec = codec;
713 "The %s '%s' is experimental but experimental codecs are not enabled, "
714 "add '-strict %d' if you want to use it.\n",
731 av_log(avctx,
AV_LOG_WARNING,
"Warning: not compiled with thread support, using thread emulation\n");
765 #if FF_API_CODED_FRAME
795 av_log(avctx,
AV_LOG_ERROR,
"Specified sample format %s is invalid or not supported\n",
810 av_log(avctx,
AV_LOG_ERROR,
"Specified pixel format %s is invalid or not supported\n",
861 "Channel layout '%s' with %d channels does not match number of specified channels %d\n",
879 av_log(avctx,
AV_LOG_WARNING,
"Specified bit depth %d not possible with the specified pixel formats depth %d\n",
900 "ticks_per_frame %d too large for the timebase %d/%d.",
911 "Mismatching AVCodecContext.pix_fmt and AVHWFramesContext.format\n");
918 "Mismatching AVCodecContext.sw_pix_fmt (%s) "
919 "and AVHWFramesContext.sw_format (%s)\n",
937 "gray decoding requested but not enabled at configuration time\n");
966 "Channel layout '%s' with %d channels does not match specified number of channels %d: "
967 "ignoring specified channel layout\n",
984 "supported with subtitles codecs\n");
989 "subtitles character encoding will be ignored\n",
1000 iconv_t cd = iconv_open(
"UTF-8", avctx->
sub_charenc);
1001 if (cd == (iconv_t)-1) {
1004 "with input character encoding \"%s\"\n", avctx->
sub_charenc);
1010 "conversion needs a libavcodec built with iconv support "
1011 "for this codec\n");
1019 #if FF_API_AVCTX_TIMEBASE
1038 (codec_init_ok > 0 || (codec_init_ok < 0 &&
1050 #if FF_API_CODED_FRAME
1091 "that doesn't support it\n");
1140 memset(sub, 0,
sizeof(*sub));
1151 if (CONFIG_FRAME_THREAD_ENCODER &&
1194 #if FF_API_CODED_FRAME
1223 return "unknown_codec";
1230 #define TAG_PRINT(x) \
1231 (((x) >= '0' && (x) <= '9') || \
1232 ((x) >= 'a' && (x) <= 'z') || ((x) >= 'A' && (x) <= 'Z') || \
1233 ((x) == '.' || (x) == ' ' || (x) == '-' || (x) == '_'))
1235 for (
i = 0;
i < 4;
i++) {
1237 TAG_PRINT(codec_tag & 0xFF) ?
"%c" :
"[%d]", codec_tag & 0xFF);
1239 buf_size = buf_size >
len ? buf_size -
len : 0;
1249 const char *codec_name;
1256 if (!buf || buf_size <= 0)
1264 buf[0] ^=
'a' ^
'A';
1270 snprintf(buf + strlen(buf), buf_size - strlen(buf),
" (%s)",
profile);
1274 snprintf(buf + strlen(buf), buf_size - strlen(buf),
1275 ", %d reference frame%s",
1276 enc->
refs, enc->
refs > 1 ?
"s" :
"");
1279 snprintf(buf + strlen(buf), buf_size - strlen(buf),
" (%s / 0x%04X)",
1285 char detail[256] =
"(";
1289 snprintf(buf + strlen(buf), buf_size - strlen(buf),
1315 const char *field_order =
"progressive";
1317 field_order =
"top first";
1319 field_order =
"bottom first";
1321 field_order =
"top coded first (swapped)";
1323 field_order =
"bottom coded first (swapped)";
1325 av_strlcatf(detail,
sizeof(detail),
"%s, ", field_order);
1333 if (strlen(detail) > 1) {
1334 detail[strlen(detail) - 2] = 0;
1340 av_strlcat(buf, new_line ? separator :
", ", buf_size);
1342 snprintf(buf + strlen(buf), buf_size - strlen(buf),
1349 snprintf(buf + strlen(buf), buf_size - strlen(buf),
1357 snprintf(buf + strlen(buf), buf_size - strlen(buf),
1358 " [SAR %d:%d DAR %d:%d]",
1360 display_aspect_ratio.
num, display_aspect_ratio.
den);
1364 snprintf(buf + strlen(buf), buf_size - strlen(buf),
1370 snprintf(buf + strlen(buf), buf_size - strlen(buf),
1371 ", q=%d-%d", enc->
qmin, enc->
qmax);
1374 snprintf(buf + strlen(buf), buf_size - strlen(buf),
1375 ", Closed Captions");
1377 snprintf(buf + strlen(buf), buf_size - strlen(buf),
1385 snprintf(buf + strlen(buf), buf_size - strlen(buf),
1390 snprintf(buf + strlen(buf), buf_size - strlen(buf),
1395 snprintf(buf + strlen(buf), buf_size - strlen(buf),
1399 snprintf(buf + strlen(buf), buf_size - strlen(buf),
1402 snprintf(buf + strlen(buf), buf_size - strlen(buf),
1410 snprintf(buf + strlen(buf), buf_size - strlen(buf),
1417 snprintf(buf + strlen(buf), buf_size - strlen(buf),
1425 snprintf(buf + strlen(buf), buf_size - strlen(buf),
1428 snprintf(buf + strlen(buf), buf_size - strlen(buf),
1433 snprintf(buf + strlen(buf), buf_size - strlen(buf),
1434 ", %"PRId64
" kb/s",
bitrate / 1000);
1436 snprintf(buf + strlen(buf), buf_size - strlen(buf),
1437 ", max. %"PRId64
" kb/s", enc->
rc_max_rate / 1000);
1481 return FFMPEG_CONFIGURATION;
1486 #define LICENSE_PREFIX "libavcodec license: "
1569 if (be < 0 || be > 1)
1571 return map[fmt][
be];
1593 uint32_t
tag,
int bits_per_coded_sample, int64_t
bitrate,
1597 int framecount = (ba > 0 && frame_bytes / ba > 0) ? frame_bytes / ba : 1;
1600 if (
bps > 0 && ch > 0 && frame_bytes > 0 && ch < 32768 &&
bps < 32768)
1601 return (frame_bytes * 8LL) / (
bps * ch);
1602 bps = bits_per_coded_sample;
1620 if (framecount > INT_MAX/1024)
1622 return 1024 * framecount;
1632 return 256 * sr / 245;
1634 return 588 * sr / 44100;
1639 if (sr / 22050 > 22)
1641 return (480 << (sr / 22050)) / ch;
1646 return sr <= 24000 ? 576 : 1152;
1653 case 20:
return 160;
1654 case 19:
return 144;
1655 case 29:
return 288;
1656 case 37:
return 480;
1660 case 38:
return 160;
1661 case 50:
return 240;
1666 if (frame_bytes > 0) {
1669 return 240 * (frame_bytes / 32);
1671 return 256 * (frame_bytes / 64);
1673 return 160 * (frame_bytes / 20);
1678 return frame_bytes * 8 /
bps;
1681 if (ch > 0 && ch < INT_MAX/16) {
1685 return frame_bytes / (9 * ch) * 16;
1688 frame_bytes /= 16 * ch;
1689 if (frame_bytes > INT_MAX / 28)
1691 return frame_bytes * 28;
1695 return (frame_bytes - 4 * ch) * 2 / ch;
1697 return (frame_bytes - 4) * 2 / ch;
1699 return (frame_bytes - 8) * 2 / ch;
1703 return frame_bytes * 14LL / (8 * ch);
1706 return (frame_bytes / 128) * 224 / ch;
1708 return (frame_bytes - 6 - ch) / ch;
1710 return (frame_bytes - 8) / ch;
1712 return (frame_bytes - 2 * ch) / ch;
1714 return 3 * frame_bytes / ch;
1716 return 6 * frame_bytes / ch;
1718 return 2 * (frame_bytes / (5 * ch));
1721 return 4 * frame_bytes / ch;
1728 return frame_bytes / ch;
1730 return frame_bytes * 2 / ch;
1736 int blocks = frame_bytes / ba;
1740 if (bps < 2 || bps > 5)
1742 tmp = blocks * (1LL + (ba - 4 * ch) / (
bps * ch) * 8);
1745 tmp = blocks * (((ba - 16LL) * 2 / 3 * 4) / ch);
1748 tmp = blocks * (1 + (ba - 4LL * ch) * 2 / ch);
1751 tmp = blocks * ((ba - 4LL * ch) * 2 / ch);
1754 tmp = blocks * (2 + (ba - 7LL * ch) * 2LL / ch);
1757 tmp = blocks * (ba - 16LL) * 2 / ch;
1771 if(
bps<4 || frame_bytes<3)
1773 return 2 * ((frame_bytes - 3) / ((
bps * 2 / 8) * ch));
1775 if(
bps<4 || frame_bytes<4)
1777 return (frame_bytes - 4) / ((
FFALIGN(ch, 2) *
bps) / 8);
1779 return 2 * (frame_bytes / ((
bps + 4) / 4)) / ch;
1791 if (
bitrate > 0 && frame_bytes > 0 && sr > 0 && ba > 1) {
1793 return (frame_bytes * 8LL * sr) /
bitrate;
1859 #if FF_API_USER_VISIBLE_AVHWACCEL
1882 ((
unsigned)
av_toupper((x >> 24) & 0xFF) << 24);
1898 if (
src->progress &&
1916 f->owner[0] =
f->owner[1] = avctx;
1964 return !!
s->internal;
1992 uint32_t *av_restrict
state)
2000 for (
i = 0;
i < 3;
i++) {
2003 if (
tmp == 0x100 || p ==
end)
2008 if (p[-1] > 1 ) p += 3;
2009 else if (p[-2] ) p += 2;
2010 else if (p[-3]|(p[-1]-1)) p++;
2030 *
size =
sizeof(*props);
2072 memset(par, 0,
sizeof(*par));
2112 memcpy(dst,
src,
sizeof(*dst));
2116 if (
src->extradata) {
2242 void **
data,
size_t *sei_size)
2255 *sei_size = side_data->
size + 11;
2274 sei_data[8] = ((side_data->
size/3) & 0x1f) | 0x40;
2277 memcpy(sei_data + 10, side_data->
data, side_data->
size);
2279 sei_data[side_data->
size+10] = 255;
2295 if (!bits_per_coded_sample) {
2306 const int * array_valid_values,
int default_value)
2311 ref_val = array_valid_values[
i];
2312 if (ref_val == INT_MAX)
2320 "%s %d are not supported. Set to default value : %d\n", val_name,
val, default_value);
2321 return default_value;
av_cold int avcodec_close(AVCodecContext *avctx)
Close a given AVCodecContext and free all the data associated with it (but not the AVCodecContext its...
int(* func)(AVBPrint *dst, const char *in, const char *arg)
int frame_size
Number of samples per channel in an audio frame.
void av_packet_unref(AVPacket *pkt)
Wipe the packet.
const struct AVHWAccel * hwaccel
Hardware accelerator in use.
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it be(in the first position) for now. Options ------- Then comes the options array. This is what will define the user accessible options. For example
#define FF_ENABLE_DEPRECATION_WARNINGS
@ AV_SAMPLE_FMT_FLTP
float, planar
@ AV_PIX_FMT_YUV420P9LE
planar YUV 4:2:0, 13.5bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian
unsigned av_codec_get_codec_properties(const AVCodecContext *codec)
#define AV_LOG_WARNING
Something somehow does not look correct.
#define FF_CODEC_CAP_INIT_THREADSAFE
The codec does not modify any global variables in the init function, allowing to call the init functi...
uint8_t * extradata
Extra binary data needed for initializing the decoder, codec-dependent.
AVPixelFormat
Pixel format.
@ AV_CODEC_ID_ADPCM_IMA_QT
#define AVERROR_EXPERIMENTAL
Requested feature is flagged experimental. Set strict_std_compliance if you really want to use it.
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining all references to the list are updated That means that if a filter requires that its input and output have the same format amongst a supported all it has to do is use a reference to the same list of formats query_formats can leave some formats unset and return AVERROR(EAGAIN) to cause the negotiation mechanism toagain later. That can be used by filters with complex requirements to use the format negotiated on one link to set the formats supported on another. Frame references ownership and permissions
unsigned int av_xiphlacing(unsigned char *s, unsigned int v)
Encode extradata length to a buffer.
enum AVMediaType codec_type
General type of the encoded data.
uint64_t channel_layout
Audio channel layout.
enum AVColorSpace colorspace
YUV colorspace type.
void av_opt_set_defaults(void *s)
Set the values of all AVOption fields to their default values.
int av_bprint_finalize(AVBPrint *buf, char **ret_str)
Finalize a print buffer.
int ff_get_format(AVCodecContext *avctx, const enum AVPixelFormat *fmt)
Select the (possibly hardware accelerated) pixel format.
int ff_thread_get_buffer(AVCodecContext *avctx, ThreadFrame *f, int flags)
Wrapper around get_buffer() for frame-multithreaded codecs.
#define FF_COMPLIANCE_EXPERIMENTAL
Allow nonstandardized experimental things.
int sample_rate
samples per second
static double cb(void *priv, double x, double y)
AVFrameSideData * av_frame_get_side_data(const AVFrame *frame, enum AVFrameSideDataType type)
This struct describes the properties of an encoded stream.
const AVClass * priv_class
AVClass for the private context.
@ AV_PIX_FMT_GBRP16BE
planar GBR 4:4:4 48bpp, big-endian
void ff_thread_report_progress2(AVCodecContext *avctx, int field, int thread, int n)
enum AVColorSpace color_space
int avpriv_bprint_to_extradata(AVCodecContext *avctx, struct AVBPrint *buf)
Finalize buf into extradata and set its size appropriately.
@ AV_PIX_FMT_GBRP10BE
planar GBR 4:4:4 30bpp, big-endian
const char * name
short name for the profile
static void ff_unlock_avcodec(const AVCodec *codec)
const AVPixFmtDescriptor * av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
uint8_t * data
The data buffer.
#define MKTAG(a, b, c, d)
void ff_thread_flush(AVCodecContext *avctx)
Wait for decoding threads to finish and reset internal state.
@ AV_FRAME_DATA_A53_CC
ATSC A53 Part 4 Closed Captions.
@ AV_PIX_FMT_YUV422P14LE
planar YUV 4:2:2,28bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian
int avcodec_parameters_from_context(AVCodecParameters *par, const AVCodecContext *codec)
Fill the parameters struct based on the values from the supplied codec context.
enum AVPixelFormat format
The pixel format identifying the underlying HW surface type.
void ff_thread_await_progress2(AVCodecContext *avctx, int field, int thread, int shift)
void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode)
unsigned int avpriv_toupper4(unsigned int x)
int ff_decode_bsfs_init(AVCodecContext *avctx)
Called during avcodec_open2() to initialize avctx->internal->bsf.
AVFrameSideData * av_frame_new_side_data(AVFrame *frame, enum AVFrameSideDataType type, int size)
Add a new side data to a frame.
const char * name
Name of the codec described by this descriptor.
AVPacketSideData * coded_side_data
Additional data associated with the entire coded stream.
int ff_thread_can_start_frame(AVCodecContext *avctx)
int av_samples_fill_arrays(uint8_t **audio_data, int *linesize, const uint8_t *buf, int nb_channels, int nb_samples, enum AVSampleFormat sample_fmt, int align)
Fill plane data pointers and linesize for samples with sample format sample_fmt.
enum AVPixelFormat * pix_fmts
array of supported pixel formats, or NULL if unknown, array is terminated by -1
void av_frame_free(AVFrame **frame)
Free the frame and any dynamically allocated objects in it, e.g.
@ AV_CODEC_ID_PCM_S32LE_PLANAR
static av_cold int end(AVCodecContext *avctx)
void av_get_channel_layout_string(char *buf, int buf_size, int nb_channels, uint64_t channel_layout)
Return a description of a channel layout.
This structure describes decoded (raw) audio or video data.
@ AV_PIX_FMT_YUVA444P10BE
planar YUV 4:4:4 40bpp, (1 Cr & Cb sample per 1x1 Y & A samples, big-endian)
enum AVColorTransferCharacteristic color_trc
Color Transfer Characteristic.
@ AV_PIX_FMT_YUV440P12BE
planar YUV 4:4:0,24bpp, (1 Cr & Cb sample per 1x2 Y samples), big-endian
int capabilities
Codec capabilities.
@ AVCOL_RANGE_JPEG
the normal 2^n-1 "JPEG" YUV ranges
static int ff_fast_malloc(void *ptr, unsigned int *size, size_t min_size, int zero_realloc)
@ AV_CODEC_ID_PCM_S16BE_PLANAR
int av_codec_get_max_lowres(const AVCodec *codec)
int av_lockmgr_register(int(*cb)(void **mutex, enum AVLockOp op))
Register a user provided lock manager supporting the operations specified by AVLockOp.
int depth
Number of bits in the component.
enum AVFieldOrder field_order
Field order.
int seek_preroll
Audio only.
void * frame_thread_encoder
@ AV_SAMPLE_FMT_S32P
signed 32 bits, planar
@ AV_PIX_FMT_YUV420P14BE
planar YUV 4:2:0,21bpp, (1 Cr & Cb sample per 2x2 Y samples), big-endian
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...
@ AV_PIX_FMT_YUV420P16LE
planar YUV 4:2:0, 24bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian
AVLockOp
Lock operation used by lockmgr.
@ AV_CODEC_ID_ADPCM_IMA_OKI
int(* decode)(struct AVCodecContext *, void *outdata, int *outdata_size, struct AVPacket *avpkt)
uint8_t * subtitle_header
Header containing style information for text subtitles.
void * av_mallocz_array(size_t nmemb, size_t size)
#define AV_LOG_VERBOSE
Detailed information.
@ AV_PIX_FMT_GBRP14BE
planar GBR 4:4:4 42bpp, big-endian
const char * avcodec_profile_name(enum AVCodecID codec_id, int profile)
Return a name for the specified profile, if available.
@ AV_PIX_FMT_BGR24
packed RGB 8:8:8, 24bpp, BGRBGR...
int av_get_bits_per_pixel(const AVPixFmtDescriptor *pixdesc)
Return the number of bits per pixel used by the pixel format described by pixdesc.
int ff_frame_thread_encoder_init(AVCodecContext *avctx, AVDictionary *options)
Initialize frame thread encoder.
uint32_t codec_tag
Additional information about the codec (corresponds to the AVI FOURCC).
@ AV_PIX_FMT_YUV440P
planar YUV 4:4:0 (1 Cr & Cb sample per 1x2 Y samples)
#define FF_SUB_CHARENC_MODE_PRE_DECODER
the AVPacket data needs to be recoded to UTF-8 before being fed to the decoder, requires iconv
@ AV_PIX_FMT_YUVA444P9BE
planar YUV 4:4:4 36bpp, (1 Cr & Cb sample per 1x1 Y & A samples), big-endian
@ AV_PIX_FMT_YUV422P9BE
planar YUV 4:2:2, 18bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian
int avcodec_is_open(AVCodecContext *s)
void(* flush)(struct AVCodecContext *)
Flush buffers.
int qmax
maximum quantizer
enum AVMediaType codec_type
#define FF_SUB_CHARENC_MODE_AUTOMATIC
libavcodec will select the mode itself
size_t av_strlcatf(char *dst, size_t size, const char *fmt,...)
void av_packet_free(AVPacket **pkt)
Free the packet, if the packet is reference counted, it will be unreferenced first.
const char * av_chroma_location_name(enum AVChromaLocation location)
#define FF_COMPLIANCE_UNOFFICIAL
Allow unofficial extensions.
@ AV_CODEC_ID_PCM_S16LE_PLANAR
@ AV_CODEC_ID_ADPCM_THP_LE
@ AV_PIX_FMT_YUV444P16LE
planar YUV 4:4:4, 48bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
int64_t av_gcd(int64_t a, int64_t b)
Compute the greatest common divisor of two integer operands.
static int ff_mutex_unlock(AVMutex *mutex)
@ AV_PIX_FMT_GBRAP12LE
planar GBR 4:4:4:4 48bpp, little-endian
@ AV_CODEC_ID_DSD_MSBF_PLANAR
enum AVColorPrimaries color_primaries
@ AV_PIX_FMT_GRAY16BE
Y , 16bpp, big-endian.
uint8_t max_lowres
maximum value for lowres supported by the decoder
int avcodec_enum_to_chroma_pos(int *xpos, int *ypos, enum AVChromaLocation pos)
Converts AVChromaLocation to swscale x/y chroma position.
const char * av_get_colorspace_name(enum AVColorSpace val)
Get the name of a colorspace.
static void ff_lock_avcodec(AVCodecContext *log_ctx, const AVCodec *codec)
const char * av_color_space_name(enum AVColorSpace space)
@ AV_PIX_FMT_GBRAP
planar GBRA 4:4:4:4 32bpp
const struct AVCodec * codec
@ AV_PIX_FMT_YUV420P12LE
planar YUV 4:2:0,18bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian
@ AV_FRAME_DATA_MATRIXENCODING
The data is the AVMatrixEncoding enum defined in libavutil/channel_layout.h.
int bits_per_raw_sample
This is the number of valid bits in each output sample.
enum AVSampleFormat * sample_fmts
array of supported sample formats, or NULL if unknown, array is terminated by -1
int thread_count
thread count is used to decide how many independent tasks should be passed to execute()
#define MAKE_ACCESSORS(str, name, type, field)
int(* encode_sub)(struct AVCodecContext *, uint8_t *buf, int buf_size, const struct AVSubtitle *sub)
const uint8_t * avpriv_find_start_code(const uint8_t *av_restrict p, const uint8_t *end, uint32_t *av_restrict state)
int initial_padding
Audio only.
static const struct twinvq_data tab
int refs
number of reference frames
AVCodec * avcodec_find_encoder(enum AVCodecID id)
Find a registered encoder with a matching codec ID.
AVCodecContext * owner[2]
#define FF_SUB_CHARENC_MODE_DO_NOTHING
do nothing (demuxer outputs a stream supposed to be already in UTF-8, or the codec is bitmap for inst...
int flags
AV_CODEC_FLAG_*.
static double val(void *priv, double ch)
@ AV_SAMPLE_FMT_S64P
signed 64 bits, planar
enum AVPixelFormat ff_thread_get_format(AVCodecContext *avctx, const enum AVPixelFormat *fmt)
Wrapper around get_format() for frame-multithreaded codecs.
#define AV_CODEC_CAP_ENCODER_FLUSH
This encoder can be flushed using avcodec_flush_buffers().
@ AV_CODEC_ID_MP3
preferred ID for decoding MPEG audio layer 1, 2 or 3
@ AV_PIX_FMT_YUVA444P16BE
planar YUV 4:4:4 64bpp, (1 Cr & Cb sample per 1x1 Y & A samples, big-endian)
int av_reduce(int *dst_num, int *dst_den, int64_t num, int64_t den, int64_t max)
Reduce a fraction.
@ AV_PIX_FMT_YUV444P10BE
planar YUV 4:4:4, 30bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian
char * ass
0 terminated ASS/SSA compatible event line.
int avcodec_default_execute2(AVCodecContext *c, int(*func)(AVCodecContext *c2, void *arg2, int jobnr, int threadnr), void *arg, int *ret, int count)
int av_image_check_size2(unsigned int w, unsigned int h, int64_t max_pixels, enum AVPixelFormat pix_fmt, int log_offset, void *log_ctx)
Check if the given dimension of an image is valid, meaning that all bytes of a plane of an image with...
@ AV_PIX_FMT_YUV420P10LE
planar YUV 4:2:0, 15bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian
void avsubtitle_free(AVSubtitle *sub)
Free all allocated data in the given subtitle struct.
enum AVSampleFormat av_get_planar_sample_fmt(enum AVSampleFormat sample_fmt)
Get the planar alternative form of the given sample format.
#define FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM
The decoder extracts and fills its parameters even if the frame is skipped due to the skip_frame sett...
@ AV_PIX_FMT_YUV444P12LE
planar YUV 4:4:4,36bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
AVFrame * av_frame_alloc(void)
Allocate an AVFrame and set its fields to default values.
int64_t bit_rate
Total stream bitrate in bit/s, 0 if not available.
@ AV_PIX_FMT_YUVJ411P
planar YUV 4:1:1, 12bpp, (1 Cr & Cb sample per 4x1 Y samples) full scale (JPEG), deprecated in favor ...
enum AVColorTransferCharacteristic color_trc
@ AV_CODEC_ID_ADPCM_SBPRO_2
@ AV_PIX_FMT_YUV422P12BE
planar YUV 4:2:2,24bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian
@ AV_PIX_FMT_YUV444P14LE
planar YUV 4:4:4,42bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
@ AV_PIX_FMT_BGR8
packed RGB 3:3:2, 8bpp, (msb)2B 3G 3R(lsb)
enum AVColorPrimaries color_primaries
Chromaticity coordinates of the source primaries.
const int * supported_samplerates
array of supported audio samplerates, or NULL if unknown, array is terminated by 0
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
static AVMutex codec_mutex
#define AV_CODEC_CAP_EXPERIMENTAL
Codec is experimental and is thus avoided in favor of non experimental encoders.
int64_t pts_correction_num_faulty_pts
Current statistics for PTS correction.
#define FF_CODEC_PROPERTY_LOSSLESS
int rc_initial_buffer_occupancy
Number of bits which should be loaded into the rc buffer before decoding starts.
enum AVPixelFormat avpriv_find_pix_fmt(const PixelFormatTag *tags, unsigned int fourcc)
#define LIBAVCODEC_VERSION_MICRO
int frame_size
Audio only.
void av_memcpy_backptr(uint8_t *dst, int back, int cnt)
Overlapping memcpy() implementation.
int av_opt_set_dict(void *obj, AVDictionary **options)
Set all the options from a given dictionary on an object.
@ 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_GBRAP16BE
planar GBRA 4:4:4:4 64bpp, big-endian
void ff_frame_thread_encoder_free(AVCodecContext *avctx)
int has_b_frames
Size of the frame reordering buffer in the decoder.
This struct describes the properties of a single codec described by an AVCodecID.
@ AV_PIX_FMT_GBRP16LE
planar GBR 4:4:4 48bpp, little-endian
AVPacket * buffer_pkt
buffers for using new encode/decode API through legacy API
@ AV_PIX_FMT_YUVA420P
planar YUV 4:2:0, 20bpp, (1 Cr & Cb sample per 2x2 Y & A samples)
AVFrame * compat_decode_frame
#define AV_CEIL_RSHIFT(a, b)
void * av_realloc_array(void *ptr, size_t nmemb, size_t size)
int(* uninit)(AVCodecContext *avctx)
Uninitialize the hwaccel private data.
@ AV_CODEC_ID_ADPCM_IMA_EA_SEAD
AVRational sample_aspect_ratio
Video only.
static int op(uint8_t **dst, const uint8_t *dst_end, GetByteContext *gb, int pixel, int count, int *x, int width, int linesize)
Perform decode operation.
int ticks_per_frame
For some codecs, the time base is closer to the field rate than the frame rate.
@ AV_CODEC_ID_ADPCM_IMA_DK3
@ AV_PIX_FMT_GBRP12LE
planar GBR 4:4:4 36bpp, little-endian
int avcodec_parameters_copy(AVCodecParameters *dst, const AVCodecParameters *src)
Copy the contents of src to dst.
#define FF_PROFILE_UNKNOWN
#define av_assert0(cond)
assert() equivalent, that is always enabled.
int av_sample_fmt_is_planar(enum AVSampleFormat sample_fmt)
Check if the sample format is planar.
@ AV_CODEC_ID_ADPCM_IMA_APC
int ff_thread_ref_frame(ThreadFrame *dst, ThreadFrame *src)
int bits_per_raw_sample
Bits per sample/pixel of internal libavcodec pixel/sample format.
@ AV_PIX_FMT_YUVA420P16BE
planar YUV 4:2:0 40bpp, (1 Cr & Cb sample per 2x2 Y & A samples, big-endian)
#define AV_LOG_DEBUG
Stuff which is only useful for libav* developers.
int ff_side_data_update_matrix_encoding(AVFrame *frame, enum AVMatrixEncoding matrix_encoding)
Add or update AV_FRAME_DATA_MATRIXENCODING side data.
@ AV_CODEC_ID_ADPCM_IMA_ISS
@ AV_CODEC_ID_BINKAUDIO_DCT
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.
int ff_alloc_entries(AVCodecContext *avctx, int count)
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...
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this field
int64_t max_pixels
The number of pixels per image to maximally accept.
@ AV_CODEC_ID_ADPCM_IMA_SMJPEG
@ AV_PIX_FMT_GBRP10LE
planar GBR 4:4:4 30bpp, little-endian
@ AV_PIX_FMT_YUV420P
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
int64_t rc_max_rate
maximum bitrate
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.
@ AVMEDIA_TYPE_DATA
Opaque data information usually continuous.
char * text
0 terminated plain UTF-8 text
This structure describes the bitrate properties of an encoded bitstream.
size_t av_get_codec_tag_string(char *buf, size_t buf_size, unsigned int codec_tag)
Put a string representing the codec tag codec_tag in buf.
@ AV_PIX_FMT_YUVJ444P
planar YUV 4:4:4, 24bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV444P and setting col...
void ff_thread_free(AVCodecContext *avctx)
@ AV_PIX_FMT_YUV444P10LE
planar YUV 4:4:4, 30bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
int props
Codec properties, a combination of AV_CODEC_PROP_* flags.
@ AV_PIX_FMT_YUVA422P10LE
planar YUV 4:2:2 30bpp, (1 Cr & Cb sample per 2x1 Y & A samples, little-endian)
int rc_buffer_size
decoder bitstream buffer size
char * sub_charenc
DTS of the last frame.
const char * av_color_range_name(enum AVColorRange range)
@ AV_PIX_FMT_YUV444P9BE
planar YUV 4:4:4, 27bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian
#define AV_CODEC_CAP_FRAME_THREADS
Codec supports frame-level multithreading.
int av_log_get_level(void)
Get the current log level.
@ AV_PIX_FMT_YUV422P10BE
planar YUV 4:2:2, 20bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian
#define LIBAVCODEC_VERSION_INT
@ AV_PIX_FMT_YUV422P16LE
planar YUV 4:2:2, 32bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian
@ AV_CODEC_ID_ADPCM_EA_XAS
int ff_match_2uint16(const uint16_t(*tab)[2], int size, int a, int b)
Return the index into tab at which {a,b} match elements {[0],[1]} of tab.
Describe the class of an AVClass context structure.
@ AV_PIX_FMT_GBRAP12BE
planar GBR 4:4:4:4 48bpp, big-endian
void ff_thread_release_buffer(AVCodecContext *avctx, ThreadFrame *f)
Wrapper around release_buffer() frame-for multithreaded codecs.
enum AVPixelFormat sw_format
The pixel format identifying the actual data layout of the hardware frames.
int av_match_list(const char *name, const char *list, char separator)
Check if a name is in a list.
enum AVColorRange color_range
MPEG vs JPEG YUV range.
void av_buffer_unref(AVBufferRef **buf)
Free a given reference and automatically free the buffer if there are no more references to it.
@ AV_CODEC_ID_INTERPLAY_VIDEO
@ AV_CODEC_ID_ADPCM_YAMAHA
@ AV_CODEC_ID_ADPCM_IMA_WS
@ AV_PIX_FMT_YUYV422
packed YUV 4:2:2, 16bpp, Y0 Cb Y1 Cr
Rational number (pair of numerator and denominator).
@ AV_CODEC_ID_INTERPLAY_DPCM
struct AVCodecInternal * internal
Private context used for internal data.
@ AV_PIX_FMT_YUVJ420P
planar YUV 4:2:0, 12bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV420P and setting col...
@ AV_CODEC_ID_ADPCM_IMA_DK4
int64_t bit_rate
the average bitrate
enum AVPacketSideDataType type
@ AV_PIX_FMT_YUVA422P12LE
planar YUV 4:2:2,24bpp, (1 Cr & Cb sample per 2x1 Y samples), 12b alpha, little-endian
uint8_t * data[4]
data+linesize for the bitmap of this subtitle.
#define AV_CODEC_PROP_BITMAP_SUB
Subtitle codec is bitmap based Decoded AVSubtitle data can be read from the AVSubtitleRect->pict fiel...
@ AV_PIX_FMT_YUVA444P12BE
planar YUV 4:4:4,36bpp, (1 Cr & Cb sample per 1x1 Y samples), 12b alpha, big-endian
const AVProfile * profiles
array of recognized profiles, or NULL if unknown, array is terminated by {FF_PROFILE_UNKNOWN}
int trailing_padding
Audio only.
@ AV_PIX_FMT_YUVA444P9LE
planar YUV 4:4:4 36bpp, (1 Cr & Cb sample per 1x1 Y & A samples), little-endian
const char * av_color_primaries_name(enum AVColorPrimaries primaries)
const char * avcodec_license(void)
Return the libavcodec license.
int ff_alloc_a53_sei(const AVFrame *frame, size_t prefix_len, void **data, size_t *sei_size)
Check AVFrame for A53 side data and allocate and fill SEI message with A53 info.
@ AV_CODEC_ID_ADPCM_IMA_AMV
void av_opt_free(void *obj)
Free all allocated objects in obj.
@ AV_PIX_FMT_YUVA420P16LE
planar YUV 4:2:0 40bpp, (1 Cr & Cb sample per 2x2 Y & A samples, little-endian)
@ AV_PIX_FMT_RGB8
packed RGB 3:3:2, 8bpp, (msb)2R 3G 3B(lsb)
int attribute_align_arg avcodec_open2(AVCodecContext *avctx, const AVCodec *codec, AVDictionary **options)
Initialize the AVCodecContext to use the given AVCodec.
unsigned avcodec_version(void)
Return the LIBAVCODEC_VERSION_INT constant.
@ AV_PIX_FMT_YUV440P10LE
planar YUV 4:4:0,20bpp, (1 Cr & Cb sample per 1x2 Y samples), little-endian
int skip_samples_multiplier
@ AV_PIX_FMT_GRAY8
Y , 8bpp.
@ AV_PIX_FMT_YUVA420P9LE
planar YUV 4:2:0 22.5bpp, (1 Cr & Cb sample per 2x2 Y & A samples), little-endian
AVCPBProperties * av_cpb_properties_alloc(size_t *size)
Allocate a CPB properties structure and initialize its fields to default values.
@ AVCOL_RANGE_UNSPECIFIED
void ff_color_frame(AVFrame *frame, const int c[4])
Undefined Behavior In the C some operations are like signed integer dereferencing freed accessing outside allocated Undefined Behavior must not occur in a C it is not safe even if the output of undefined operations is unused The unsafety may seem nit picking but Optimizing compilers have in fact optimized code on the assumption that no undefined Behavior occurs Optimizing code based on wrong assumptions can and has in some cases lead to effects beyond the output of computations The signed integer overflow problem in speed critical code Code which is highly optimized and works with signed integers sometimes has the problem that often the output of the computation does not c
int sample_rate
Audio only.
int av_get_channel_layout_nb_channels(uint64_t channel_layout)
Return the number of channels in the channel layout.
AVPacket * last_pkt_props
Properties (timestamps+side data) extracted from the last packet passed for decoding.
@ AV_PIX_FMT_YUV420P14LE
planar YUV 4:2:0,21bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian
@ AV_CODEC_ID_PCM_S24LE_PLANAR
AVCodecParameters * avcodec_parameters_alloc(void)
Allocate a new AVCodecParameters and set its fields to default values (unknown/invalid/0).
@ AV_CODEC_ID_GSM
as in Berlin toast format
static int av_bprint_is_complete(const AVBPrint *buf)
Test if the print buffer is complete (not truncated).
AVCodecID
Identify the syntax and semantics of the bitstream.
@ AV_PIX_FMT_YUV444P14BE
planar YUV 4:4:4,42bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian
int extradata_size
Size of the extradata content in bytes.
@ AV_PIX_FMT_YUV420P9BE
The following 12 formats have the disadvantage of needing 1 format for each bit depth.
AVRational time_base
This is the fundamental unit of time (in seconds) in terms of which frame timestamps are represented.
int av_codec_is_decoder(const AVCodec *codec)
int lowres
low resolution decoding, 1-> 1/2 size, 2->1/4 size
const OptionDef options[]
int av_get_bits_per_sample(enum AVCodecID codec_id)
Return codec bits per sample.
#define AV_CODEC_CAP_AUTO_THREADS
Codec supports avctx->thread_count == 0 (auto).
int flags2
AV_CODEC_FLAG2_*.
int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame, int flags)
Get a buffer for a frame.
@ AV_PIX_FMT_RGB24
packed RGB 8:8:8, 24bpp, RGBRGB...
@ AV_PIX_FMT_YUV440P12LE
planar YUV 4:4:0,24bpp, (1 Cr & Cb sample per 1x2 Y samples), little-endian
#define AV_CODEC_FLAG_GRAY
Only decode/encode grayscale.
int av_frame_ref(AVFrame *dst, const AVFrame *src)
Set up a new reference to the data described by the source frame.
int(* send_frame)(struct AVCodecContext *avctx, const struct AVFrame *frame)
Encode API with decoupled packet/frame dataflow.
@ AV_SAMPLE_FMT_U8P
unsigned 8 bits, planar
void * hwaccel_priv_data
hwaccel-specific private data
int(* close)(struct AVCodecContext *)
@ AV_CODEC_ID_ADPCM_IMA_RAD
@ AV_PIX_FMT_YUV420P12BE
planar YUV 4:2:0,18bpp, (1 Cr & Cb sample per 2x2 Y samples), big-endian
@ AV_PIX_FMT_YUV422P10LE
planar YUV 4:2:2, 20bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian
const char * av_get_profile_name(const AVCodec *codec, int profile)
Return a name for the specified profile, if available.
@ AV_PIX_FMT_YUV422P14BE
planar YUV 4:2:2,28bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian
enum AVSampleFormat sample_fmt
audio sample format
#define AV_MUTEX_INITIALIZER
int avpriv_codec_get_cap_skip_frame_fill_param(const AVCodec *codec)
int(* encode2)(struct AVCodecContext *avctx, struct AVPacket *avpkt, const struct AVFrame *frame, int *got_packet_ptr)
Encode data to an AVPacket.
#define AV_NUM_DATA_POINTERS
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_WL32 unsigned int_TMPL AV_WL24 unsigned int_TMPL AV_WL16 uint64_t_TMPL AV_WB64 unsigned int_TMPL AV_RB32
@ AV_PIX_FMT_GBRP9BE
planar GBR 4:4:4 27bpp, big-endian
AVCPBProperties * ff_add_cpb_side_data(AVCodecContext *avctx)
Add a CPB properties side data to an encoding context.
uint8_t * byte_buffer
temporary buffer used for encoders to store their bitstream
int profile
Codec-specific bitstream restrictions that the stream conforms to.
@ AVCHROMA_LOC_UNSPECIFIED
@ AV_PIX_FMT_YUV420P10BE
planar YUV 4:2:0, 15bpp, (1 Cr & Cb sample per 2x2 Y samples), big-endian
@ AVMEDIA_TYPE_UNKNOWN
Usually treated as AVMEDIA_TYPE_DATA.
@ AV_PIX_FMT_GBRP9LE
planar GBR 4:4:4 27bpp, little-endian
#define AV_CODEC_FLAG_PASS2
Use internal 2pass ratecontrol in second pass mode.
static void encode(AVCodecContext *ctx, AVFrame *frame, AVPacket *pkt, FILE *output)
int(* receive_frame)(struct AVCodecContext *avctx, struct AVFrame *frame)
Decode API with decoupled packet/frame dataflow.
int64_t pts_correction_num_faulty_dts
Number of incorrect PTS values so far.
The reader does not expect b to be semantically here and if the code is changed by maybe adding a a division or other the signedness will almost certainly be mistaken To avoid this confusion a new type was SUINT is the C unsigned type but it holds a signed int to use the same example SUINT a
int64_t pts_correction_last_pts
Number of incorrect DTS values so far.
@ AV_PIX_FMT_YUVA444P
planar YUV 4:4:4 32bpp, (1 Cr & Cb sample per 1x1 Y & A samples)
int avcodec_default_execute(AVCodecContext *c, int(*func)(AVCodecContext *c2, void *arg2), void *arg, int *ret, int count, int size)
static int ff_mutex_lock(AVMutex *mutex)
AVPacket * av_packet_alloc(void)
Allocate an AVPacket and set its fields to default values.
void av_dict_free(AVDictionary **pm)
Free all the memory allocated for an AVDictionary struct and all keys and values.
void ff_reset_entries(AVCodecContext *avctx)
unsigned int byte_buffer_size
int ff_int_from_list_or_default(void *ctx, const char *val_name, int val, const int *array_valid_values, int default_value)
Check if a value is in the list.
@ AV_PIX_FMT_YUVA420P10LE
planar YUV 4:2:0 25bpp, (1 Cr & Cb sample per 2x2 Y & A samples, little-endian)
AVHWAccel * av_hwaccel_next(const AVHWAccel *hwaccel)
If hwaccel is NULL, returns the first registered hardware accelerator, if hwaccel is non-NULL,...
@ AV_SAMPLE_FMT_S16P
signed 16 bits, planar
void ff_thread_await_progress(ThreadFrame *f, int progress, int field)
Wait for earlier decoding threads to finish reference pictures.
#define FF_THREAD_FRAME
Decode more than one frame at once.
int channels
number of audio channels
AVChromaLocation
Location of chroma samples.
@ AV_PIX_FMT_YUVA422P10BE
planar YUV 4:2:2 30bpp, (1 Cr & Cb sample per 2x1 Y & A samples, big-endian)
int av_codec_is_encoder(const AVCodec *codec)
uint64_t vbv_delay
The delay between the time the packet this structure is associated with is received and the time when...
const char * avcodec_get_name(enum AVCodecID id)
Get the name of a codec.
int bits_per_coded_sample
bits per sample/pixel from the demuxer (needed for huffyuv).
@ AV_PIX_FMT_YUVA444P12LE
planar YUV 4:4:4,36bpp, (1 Cr & Cb sample per 1x1 Y samples), 12b alpha, little-endian
@ AV_PIX_FMT_YUVA422P9BE
planar YUV 4:2:2 27bpp, (1 Cr & Cb sample per 2x1 Y & A samples), big-endian
void ff_thread_finish_setup(AVCodecContext *avctx)
If the codec defines update_thread_context(), call this when they are ready for the next thread to st...
#define i(width, name, range_min, range_max)
unsigned properties
Properties of the stream that gets decoded.
int av_get_bytes_per_sample(enum AVSampleFormat sample_fmt)
Return number of bytes per sample.
uint8_t * extradata
some codecs need / can use extradata like Huffman tables.
#define FF_CODEC_CAP_INIT_CLEANUP
The codec allows calling the close function for deallocation even if the init function returned a fai...
int avcodec_parameters_to_context(AVCodecContext *codec, const AVCodecParameters *par)
Fill the codec context based on the values from the supplied codec parameters.
int block_align
Audio only.
@ AV_CODEC_ID_DSD_LSBF_PLANAR
AVSampleFormat
Audio sample formats.
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...
#define AV_PIX_FMT_RGB555
int64_t pts_correction_last_dts
PTS of the last frame.
static av_const int av_toupper(int c)
Locale-independent conversion of ASCII characters to uppercase.
@ AVMEDIA_TYPE_ATTACHMENT
Opaque data information usually sparse.
uint8_t * dump_separator
dump format separator.
@ AV_PIX_FMT_YUVJ440P
planar YUV 4:4:0 full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV440P and setting color_range
void av_frame_unref(AVFrame *frame)
Unreference all the buffers referenced by frame and reset the frame fields.
int av_get_audio_frame_duration(AVCodecContext *avctx, int frame_bytes)
Return audio frame duration.
@ AV_SAMPLE_FMT_S16
signed 16 bits
void * av_mallocz(size_t size)
Allocate a memory block with alignment suitable for all memory accesses (including vectors if availab...
const char * name
Name of the codec implementation.
static av_always_inline AVRational av_inv_q(AVRational q)
Invert a rational.
AVBufferRef * hw_device_ctx
A reference to the AVHWDeviceContext describing the device which will be used by a hardware encoder/d...
@ AV_PKT_DATA_CPB_PROPERTIES
This side data corresponds to the AVCPBProperties struct.
enum AVChromaLocation chroma_sample_location
This defines the location of chroma samples.
enum AVColorRange color_range
Video only.
@ AV_CODEC_ID_ADPCM_IMA_DAT4
void av_register_hwaccel(AVHWAccel *hwaccel)
Register the hardware accelerator hwaccel.
int av_samples_get_buffer_size(int *linesize, int nb_channels, int nb_samples, enum AVSampleFormat sample_fmt, int align)
Get the required buffer size for the given audio parameters.
@ AV_PIX_FMT_YUV444P16BE
planar YUV 4:4:4, 48bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian
enum AVPixelFormat pix_fmt
Pixel format, see AV_PIX_FMT_xxx.
int64_t ff_guess_coded_bitrate(AVCodecContext *avctx)
Get an estimated video bitrate based on frame size, frame rate and coded bits per pixel.
enum AVFieldOrder field_order
Video only.
int av_get_exact_bits_per_sample(enum AVCodecID codec_id)
Return codec bits per sample.
AVBufferRef * hw_frames_ctx
A reference to the AVHWFramesContext describing the input (for encoding) or output (decoding) frames.
int sub_charenc_mode
Subtitles character encoding mode.
This struct describes a set or pool of "hardware" frames (i.e.
@ AV_PIX_FMT_GBRAP16LE
planar GBRA 4:4:4:4 64bpp, little-endian
@ AV_PIX_FMT_PAL8
8 bits with AV_PIX_FMT_RGB32 palette
@ AV_PIX_FMT_YVYU422
packed YUV 4:2:2, 16bpp, Y0 Cr Y1 Cb
int caps_internal
Internal codec capabilities.
int block_align
number of bytes per packet if constant and known or 0 Used by some WAV based audio codecs.
static int get_audio_frame_duration(enum AVCodecID id, int sr, int ch, int ba, uint32_t tag, int bits_per_coded_sample, int64_t bitrate, uint8_t *extradata, int frame_size, int frame_bytes)
void avcodec_flush_buffers(AVCodecContext *avctx)
Reset the internal codec state / flush internal buffers.
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several the filter must be ready for frames arriving randomly on any input any filter with several inputs will most likely require some kind of queuing mechanism It is perfectly acceptable to have a limited queue and to drop frames when the inputs are too unbalanced request_frame For filters that do not use the this method is called when a frame is wanted on an output For a it should directly call filter_frame on the corresponding output For a if there are queued frames already one of these frames should be pushed If the filter should request a frame on one of its repeatedly until at least one frame has been pushed Return or at least make progress towards producing a frame
const struct AVCodecHWConfigInternal ** hw_configs
Array of pointers to hardware configurations supported by the codec, or NULL if no hardware supported...
size_t av_strlcat(char *dst, const char *src, size_t size)
Append the string src to the string dst, but to a total length of no more than size - 1 bytes,...
AVCodec * avcodec_find_decoder(enum AVCodecID id)
Find a registered decoder with a matching codec ID.
int strict_std_compliance
strictly follow the standard (MPEG-4, ...).
static void codec_parameters_reset(AVCodecParameters *par)
attribute_deprecated int refcounted_frames
If non-zero, the decoded audio and video frames returned from avcodec_decode_video2() and avcodec_dec...
#define AV_INPUT_BUFFER_PADDING_SIZE
@ AV_PIX_FMT_GBRP12BE
planar GBR 4:4:4 36bpp, big-endian
@ AV_PIX_FMT_UYVY422
packed YUV 4:2:2, 16bpp, Cb Y0 Cr Y1
#define FF_ARRAY_ELEMS(a)
@ AV_PIX_FMT_YUV444P12BE
planar YUV 4:4:4,36bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian
enum AVChromaLocation chroma_location
void av_bsf_flush(AVBSFContext *ctx)
Reset the internal bitstream filter state / flush internal buffers.
int trailing_padding
Audio only.
const char * av_get_media_type_string(enum AVMediaType media_type)
Return a string describing the media_type enum, NULL if media_type is unknown.
attribute_deprecated AVFrame * coded_frame
the picture in the bitstream
main external API structure.
int active_thread_type
Which multithreading methods are in use by the codec.
const AVCodecDescriptor * codec_descriptor
AVCodecDescriptor.
@ AV_CODEC_ID_ADPCM_G726LE
int qmin
minimum quantizer
enum AVCodecID av_get_pcm_codec(enum AVSampleFormat fmt, int be)
Return the PCM codec associated with a sample format.
@ AV_PIX_FMT_YUV444P9LE
planar YUV 4:4:4, 27bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
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.
@ AV_SAMPLE_FMT_DBLP
double, planar
AVComponentDescriptor comp[4]
Parameters that describe how pixels are packed.
#define AV_PIX_FMT_FLAG_PLANAR
At least one pixel component is not in the first data plane.
int export_side_data
Bit set of AV_CODEC_EXPORT_DATA_* flags, which affects the kind of metadata exported in frame,...
int av_get_audio_frame_duration2(AVCodecParameters *par, int frame_bytes)
This function is the same as av_get_audio_frame_duration(), except it works with AVCodecParameters in...
enum AVChromaLocation avcodec_chroma_pos_to_enum(int xpos, int ypos)
Converts swscale x/y chroma position to AVChromaLocation.
#define FF_CODEC_PROPERTY_CLOSED_CAPTIONS
AVRational av_mul_q(AVRational b, AVRational c)
Multiply two rationals.
AVBufferRef * av_buffer_ref(AVBufferRef *buf)
Create a new reference to an AVBuffer.
@ AV_PIX_FMT_YUVA420P10BE
planar YUV 4:2:0 25bpp, (1 Cr & Cb sample per 2x2 Y & A samples, big-endian)
@ AV_PIX_FMT_YUV444P
planar YUV 4:4:4, 24bpp, (1 Cr & Cb sample per 1x1 Y samples)
const AVCodecHWConfig * avcodec_get_hw_config(const AVCodec *codec, int index)
Retrieve supported hardware configurations for a codec.
@ AV_PIX_FMT_YUV420P16BE
planar YUV 4:2:0, 24bpp, (1 Cr & Cb sample per 2x2 Y samples), big-endian
int draining
checks API usage: after codec draining, flush is required to resume operation
static int shift(int a, int b)
#define FF_DISABLE_DEPRECATION_WARNINGS
@ AV_PIX_FMT_GBRP
planar GBR 4:4:4 24bpp
@ AV_PIX_FMT_YUV422P16BE
planar YUV 4:2:2, 32bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian
int coded_width
Bitstream width / height, may be different from width/height e.g.
enum AVMediaType codec_type
int seek_preroll
Number of samples to skip after a discontinuity.
@ AV_PIX_FMT_GRAY16LE
Y , 16bpp, little-endian.
int bits_per_coded_sample
The number of bits per sample in the codedwords.
@ AV_PIX_FMT_YUV422P
planar YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)
#define AV_CODEC_EXPORT_DATA_MVS
Export motion vectors through frame side data.
@ AV_CODEC_ID_ADPCM_SBPRO_4
int ff_set_dimensions(AVCodecContext *s, int width, int height)
Check that the provided frame dimensions are valid and set them on the codec context.
int ff_set_sar(AVCodecContext *avctx, AVRational sar)
Check that the provided sample aspect ratio is valid and set it on the codec context.
int video_delay
Video only.
int frame_number
Frame counter, set by libavcodec.
@ AV_PIX_FMT_YUVA444P10LE
planar YUV 4:4:4 40bpp, (1 Cr & Cb sample per 1x1 Y & A samples, little-endian)
Structure to hold side data for an AVFrame.
@ AV_CODEC_ID_PCM_S24DAUD
@ AV_CODEC_ID_ADPCM_IMA_SSI
Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes...
const VDPAUPixFmtMap * map
#define AV_CODEC_FLAG2_EXPORT_MVS
Export motion vectors through frame side data.
unsigned int codec_tag
fourcc (LSB first, so "ABCD" -> ('D'<<24) + ('C'<<16) + ('B'<<8) + 'A').
#define FF_MAX_EXTRADATA_SIZE
Maximum size in bytes of extradata.
enum AVCodecID codec_id
Specific type of the encoded data (the codec used).
void avcodec_parameters_free(AVCodecParameters **ppar)
Free an AVCodecParameters instance and everything associated with it and write NULL to the supplied p...
@ AV_CODEC_ID_ADPCM_IMA_WAV
const char av_codec_ffversion[]
static int64_t get_bit_rate(AVCodecContext *ctx)
int av_dict_copy(AVDictionary **dst, const AVDictionary *src, int flags)
Copy entries from one AVDictionary struct into another.
@ AV_PIX_FMT_YUV411P
planar YUV 4:1:1, 12bpp, (1 Cr & Cb sample per 4x1 Y samples)
uint64_t channel_layout
Audio only.
void av_bsf_free(AVBSFContext **pctx)
Free a bitstream filter context and everything associated with it; write NULL into the supplied point...
@ AV_PIX_FMT_YUV440P10BE
planar YUV 4:4:0,20bpp, (1 Cr & Cb sample per 1x2 Y samples), big-endian
@ AV_PIX_FMT_YUVA422P16BE
planar YUV 4:2:2 48bpp, (1 Cr & Cb sample per 2x1 Y & A samples, big-endian)
const char * avcodec_configuration(void)
Return the libavcodec build-time configuration.
int(* init)(struct AVCodecContext *)
@ AV_PIX_FMT_YUV422P9LE
planar YUV 4:2:2, 18bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian
@ AV_PIX_FMT_YUVA422P16LE
planar YUV 4:2:2 48bpp, (1 Cr & Cb sample per 2x1 Y & A samples, little-endian)
@ AV_PIX_FMT_GBRP14LE
planar GBR 4:4:4 42bpp, little-endian
@ AV_CODEC_ID_PCM_S8_PLANAR
int width
picture width / height.
#define flags(name, subs,...)
@ AVCHROMA_LOC_NB
Not part of ABI.
@ AV_PIX_FMT_YUV410P
planar YUV 4:1:0, 9bpp, (1 Cr & Cb sample per 4x4 Y samples)
int64_t bit_rate
The average bitrate of the encoded data (in bits per second).
@ AV_SAMPLE_FMT_DBL
double
const AVCodecDescriptor * avcodec_descriptor_get(enum AVCodecID id)
enum AVPixelFormat sw_pix_fmt
Nominal unaccelerated pixel format, see AV_PIX_FMT_xxx.
int av_image_check_sar(unsigned int w, unsigned int h, AVRational sar)
Check if the given sample aspect ratio of an image is valid.
@ AV_PIX_FMT_YUVA444P16LE
planar YUV 4:4:4 64bpp, (1 Cr & Cb sample per 1x1 Y & A samples, little-endian)
#define FF_SANE_NB_CHANNELS
char * codec_whitelist
',' separated list of allowed decoders.
uint8_t pi<< 24) CONV_FUNC(AV_SAMPLE_FMT_S64, int64_t, AV_SAMPLE_FMT_U8,(uint64_t)((*(const uint8_t *) pi - 0x80U))<< 56) CONV_FUNC(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_U8,(*(const uint8_t *) pi - 0x80) *(1.0f/(1<< 7))) CONV_FUNC(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_U8,(*(const uint8_t *) pi - 0x80) *(1.0/(1<< 7))) CONV_FUNC(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S16,(*(const int16_t *) pi >>8)+0x80) CONV_FUNC(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_S16, *(const int16_t *) pi *(1<< 16)) CONV_FUNC(AV_SAMPLE_FMT_S64, int64_t, AV_SAMPLE_FMT_S16,(uint64_t)(*(const int16_t *) pi)<< 48) CONV_FUNC(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S16, *(const int16_t *) pi *(1.0f/(1<< 15))) CONV_FUNC(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S16, *(const int16_t *) pi *(1.0/(1<< 15))) CONV_FUNC(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S32,(*(const int32_t *) pi >>24)+0x80) CONV_FUNC(AV_SAMPLE_FMT_S64, int64_t, AV_SAMPLE_FMT_S32,(uint64_t)(*(const int32_t *) pi)<< 32) CONV_FUNC(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S32, *(const int32_t *) pi *(1.0f/(1U<< 31))) CONV_FUNC(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S32, *(const int32_t *) pi *(1.0/(1U<< 31))) CONV_FUNC(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S64,(*(const int64_t *) pi >>56)+0x80) CONV_FUNC(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S64, *(const int64_t *) pi *(1.0f/(UINT64_C(1)<< 63))) CONV_FUNC(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S64, *(const int64_t *) pi *(1.0/(UINT64_C(1)<< 63))) CONV_FUNC(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_FLT, av_clip_uint8(lrintf(*(const float *) pi *(1<< 7))+0x80)) CONV_FUNC(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_FLT, av_clip_int16(lrintf(*(const float *) pi *(1<< 15)))) CONV_FUNC(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_FLT, av_clipl_int32(llrintf(*(const float *) pi *(1U<< 31)))) CONV_FUNC(AV_SAMPLE_FMT_S64, int64_t, AV_SAMPLE_FMT_FLT, llrintf(*(const float *) pi *(UINT64_C(1)<< 63))) CONV_FUNC(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_DBL, av_clip_uint8(lrint(*(const double *) pi *(1<< 7))+0x80)) CONV_FUNC(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_DBL, av_clip_int16(lrint(*(const double *) pi *(1<< 15)))) CONV_FUNC(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_DBL, av_clipl_int32(llrint(*(const double *) pi *(1U<< 31)))) CONV_FUNC(AV_SAMPLE_FMT_S64, int64_t, AV_SAMPLE_FMT_DBL, llrint(*(const double *) pi *(UINT64_C(1)<< 63))) #define FMT_PAIR_FUNC(out, in) static conv_func_type *const fmt_pair_to_conv_functions[AV_SAMPLE_FMT_NB *AV_SAMPLE_FMT_NB]={ FMT_PAIR_FUNC(AV_SAMPLE_FMT_U8, AV_SAMPLE_FMT_U8), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_U8), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S32, AV_SAMPLE_FMT_U8), FMT_PAIR_FUNC(AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_U8), FMT_PAIR_FUNC(AV_SAMPLE_FMT_DBL, AV_SAMPLE_FMT_U8), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S64, AV_SAMPLE_FMT_U8), FMT_PAIR_FUNC(AV_SAMPLE_FMT_U8, AV_SAMPLE_FMT_S16), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_S16), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S32, AV_SAMPLE_FMT_S16), FMT_PAIR_FUNC(AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_S16), FMT_PAIR_FUNC(AV_SAMPLE_FMT_DBL, AV_SAMPLE_FMT_S16), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S64, AV_SAMPLE_FMT_S16), FMT_PAIR_FUNC(AV_SAMPLE_FMT_U8, AV_SAMPLE_FMT_S32), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_S32), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S32, AV_SAMPLE_FMT_S32), FMT_PAIR_FUNC(AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_S32), FMT_PAIR_FUNC(AV_SAMPLE_FMT_DBL, AV_SAMPLE_FMT_S32), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S64, AV_SAMPLE_FMT_S32), FMT_PAIR_FUNC(AV_SAMPLE_FMT_U8, AV_SAMPLE_FMT_FLT), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_FLT), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S32, AV_SAMPLE_FMT_FLT), FMT_PAIR_FUNC(AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_FLT), FMT_PAIR_FUNC(AV_SAMPLE_FMT_DBL, AV_SAMPLE_FMT_FLT), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S64, AV_SAMPLE_FMT_FLT), FMT_PAIR_FUNC(AV_SAMPLE_FMT_U8, AV_SAMPLE_FMT_DBL), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_DBL), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S32, AV_SAMPLE_FMT_DBL), FMT_PAIR_FUNC(AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_DBL), FMT_PAIR_FUNC(AV_SAMPLE_FMT_DBL, AV_SAMPLE_FMT_DBL), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S64, AV_SAMPLE_FMT_DBL), FMT_PAIR_FUNC(AV_SAMPLE_FMT_U8, AV_SAMPLE_FMT_S64), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_S64), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S32, AV_SAMPLE_FMT_S64), FMT_PAIR_FUNC(AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_S64), FMT_PAIR_FUNC(AV_SAMPLE_FMT_DBL, AV_SAMPLE_FMT_S64), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S64, AV_SAMPLE_FMT_S64), };static void cpy1(uint8_t **dst, const uint8_t **src, int len){ memcpy(*dst, *src, len);} static void cpy2(uint8_t **dst, const uint8_t **src, int len){ memcpy(*dst, *src, 2 *len);} static void cpy4(uint8_t **dst, const uint8_t **src, int len){ memcpy(*dst, *src, 4 *len);} static void cpy8(uint8_t **dst, const uint8_t **src, int len){ memcpy(*dst, *src, 8 *len);} AudioConvert *swri_audio_convert_alloc(enum AVSampleFormat out_fmt, enum AVSampleFormat in_fmt, int channels, const int *ch_map, int flags) { AudioConvert *ctx;conv_func_type *f=fmt_pair_to_conv_functions[av_get_packed_sample_fmt(out_fmt)+AV_SAMPLE_FMT_NB *av_get_packed_sample_fmt(in_fmt)];if(!f) return NULL;ctx=av_mallocz(sizeof(*ctx));if(!ctx) return NULL;if(channels==1){ in_fmt=av_get_planar_sample_fmt(in_fmt);out_fmt=av_get_planar_sample_fmt(out_fmt);} ctx->channels=channels;ctx->conv_f=f;ctx->ch_map=ch_map;if(in_fmt==AV_SAMPLE_FMT_U8||in_fmt==AV_SAMPLE_FMT_U8P) memset(ctx->silence, 0x80, sizeof(ctx->silence));if(out_fmt==in_fmt &&!ch_map) { switch(av_get_bytes_per_sample(in_fmt)){ case 1:ctx->simd_f=cpy1;break;case 2:ctx->simd_f=cpy2;break;case 4:ctx->simd_f=cpy4;break;case 8:ctx->simd_f=cpy8;break;} } if(HAVE_X86ASM &&1) swri_audio_convert_init_x86(ctx, out_fmt, in_fmt, channels);if(ARCH_ARM) swri_audio_convert_init_arm(ctx, out_fmt, in_fmt, channels);if(ARCH_AARCH64) swri_audio_convert_init_aarch64(ctx, out_fmt, in_fmt, channels);return ctx;} void swri_audio_convert_free(AudioConvert **ctx) { av_freep(ctx);} int swri_audio_convert(AudioConvert *ctx, AudioData *out, AudioData *in, int len) { int ch;int off=0;const int os=(out->planar ? 1 :out->ch_count) *out->bps;unsigned misaligned=0;av_assert0(ctx->channels==out->ch_count);if(ctx->in_simd_align_mask) { int planes=in->planar ? in->ch_count :1;unsigned m=0;for(ch=0;ch< planes;ch++) m|=(intptr_t) in->ch[ch];misaligned|=m &ctx->in_simd_align_mask;} if(ctx->out_simd_align_mask) { int planes=out->planar ? out->ch_count :1;unsigned m=0;for(ch=0;ch< planes;ch++) m|=(intptr_t) out->ch[ch];misaligned|=m &ctx->out_simd_align_mask;} if(ctx->simd_f &&!ctx->ch_map &&!misaligned){ off=len &~15;av_assert1(off >=0);av_assert1(off<=len);av_assert2(ctx->channels==SWR_CH_MAX||!in->ch[ctx->channels]);if(off >0){ if(out->planar==in->planar){ int planes=out->planar ? out->ch_count :1;for(ch=0;ch< planes;ch++){ ctx->simd_f(out->ch+ch,(const uint8_t **) in->ch+ch, off *(out-> planar
@ AV_PIX_FMT_YUVA422P12BE
planar YUV 4:2:2,24bpp, (1 Cr & Cb sample per 2x1 Y samples), 12b alpha, big-endian
AVCodecHWConfig public
This is the structure which will be returned to the user by avcodec_get_hw_config().
void ff_thread_report_progress(ThreadFrame *f, int progress, int field)
Notify later decoding threads when part of their reference picture is ready.
@ AV_SAMPLE_FMT_S32
signed 32 bits
@ AV_PIX_FMT_YUV422P12LE
planar YUV 4:2:2,24bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian
int initial_padding
Audio only.
int ff_thread_init(AVCodecContext *s)
@ AV_PIX_FMT_YUVA420P9BE
planar YUV 4:2:0 22.5bpp, (1 Cr & Cb sample per 2x2 Y & A samples), big-endian
const char * av_color_transfer_name(enum AVColorTransferCharacteristic transfer)
AVRational sample_aspect_ratio
sample aspect ratio (0 if unknown) That is the width of a pixel divided by the height of the pixel.
const uint64_t * channel_layouts
array of support channel layouts, or NULL if unknown. array is terminated by 0
@ AV_PIX_FMT_YUVA422P
planar YUV 4:2:2 24bpp, (1 Cr & Cb sample per 2x1 Y & A samples)
static void * av_x_if_null(const void *p, const void *x)
Return x default pointer in case p is NULL.
int attribute_align_arg ff_codec_open2_recursive(AVCodecContext *avctx, const AVCodec *codec, AVDictionary **options)
Call avcodec_open2 recursively by decrementing counter, unlocking mutex, calling the function and the...
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.
@ AV_PIX_FMT_UYYVYY411
packed YUV 4:1:1, 12bpp, Cb Y0 Y1 Cr Y2 Y3
#define AV_CODEC_FLAG_PASS1
Use internal 2pass ratecontrol in first pass mode.
#define av_fourcc2str(fourcc)
@ AV_CODEC_ID_ADPCM_SBPRO_3
@ AV_PIX_FMT_YUVA422P9LE
planar YUV 4:2:2 27bpp, (1 Cr & Cb sample per 2x1 Y & A samples), little-endian