34 #if FF_API_OLD_SAMPLE_FMT
35 const char *avcodec_get_sample_fmt_name(
int sample_fmt)
45 void avcodec_sample_fmt_string (
char *buf,
int buf_size,
int sample_fmt)
65 #if FF_API_OLD_AUDIOCONVERT
66 int64_t avcodec_get_channel_layout(
const char *
name)
71 void avcodec_get_channel_layout_string(
char *buf,
int buf_size,
int nb_channels, int64_t channel_layout)
76 int avcodec_channel_layout_num_channels(int64_t channel_layout)
89 const float *matrix,
int flags)
92 if (in_channels!=out_channels)
109 void *
const out[6],
const int out_stride[6],
110 const void *
const in[6],
const int in_stride[6],
int len)
117 const int is= in_stride[ch];
118 const int os= out_stride[ch];
119 const uint8_t *pi= in[ch];
120 uint8_t *po= out[ch];
121 uint8_t *end= po + os*
len;
125 #define CONV(ofmt, otype, ifmt, expr)\
126 if(ctx->fmt_pair == ofmt + AV_SAMPLE_FMT_NB*ifmt){\
128 *(otype*)po = expr; pi += is; po += os;\
Number of sample formats. DO NOT USE if linking dynamically.
#define AV_CH_LAYOUT_7POINT1
#define CONV(ofmt, otype, ifmt, expr)
#define AV_CH_LAYOUT_SURROUND
#define AV_CH_LAYOUT_STEREO
#define AV_CH_LAYOUT_5POINT0
#define AV_CH_LAYOUT_5POINT1
void av_free(void *ptr)
Free a memory block which has been allocated with av_malloc(z)() or av_realloc(). ...
int av_audio_convert(AVAudioConvert *ctx, void *const out[6], const int out_stride[6], const void *const in[6], const int in_stride[6], int len)
Convert between audio sample formats.
int av_get_channel_layout_nb_channels(uint64_t channel_layout)
Return the number of channels in the channel layout.
#define AV_CH_LAYOUT_QUAD
static av_always_inline av_const long int lrintf(float x)
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.
char * av_get_sample_fmt_string(char *buf, int buf_size, enum AVSampleFormat sample_fmt)
Generate a string corresponding to the sample format with sample_fmt, or a header if sample_fmt is ne...
Replacements for frequently missing libm functions.
void * av_malloc(size_t size)
Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if ...
static av_always_inline av_const long int lrint(double x)
Audio format conversion routines.
AVAudioConvert * av_audio_convert_alloc(enum AVSampleFormat out_fmt, int out_channels, enum AVSampleFormat in_fmt, int in_channels, const float *matrix, int flags)
Create an audio sample format converter context.
AVSampleFormat
all in native-endian format
CodecID
Identify the syntax and semantics of the bitstream.
uint64_t av_get_channel_layout(const char *name)
Return a channel layout id that matches name, 0 if no match.
uint64_t avcodec_guess_channel_layout(int nb_channels, enum CodecID codec_id, const char *fmt_name)
Guess the channel layout.
#define AV_CH_LAYOUT_MONO
void av_audio_convert_free(AVAudioConvert *ctx)
Free audio sample format converter context.
enum AVSampleFormat av_get_sample_fmt(const char *name)
Return a sample format corresponding to name, or AV_SAMPLE_FMT_NONE on error.
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.