37 return avctx->
bit_rate <= 14000 ? 30 : 20;
84 int buf_size = avpkt->
size;
88 if (s->
decoder.no_of_bytes > buf_size) {
90 buf_size, s->
decoder.no_of_bytes);
100 WebRtcIlbcfix_DecodeImpl((WebRtc_Word16*) s->
frame.
data[0],
101 (
const WebRtc_UWord16*) buf, &s->
decoder, 1);
159 #if FF_API_OLD_ENCODE_AUDIO
170 #if FF_API_OLD_ENCODE_AUDIO
177 const AVFrame *frame,
int *got_packet_ptr)
187 WebRtcIlbcfix_EncodeImpl((WebRtc_UWord16*) avpkt->
data, (
const WebRtc_Word16*) frame->
data[0], &s->
encoder);
This structure describes decoded (raw) audio or video data.
static int ilbc_decode_frame(AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt)
struct ILBCDecContext ILBCDecContext
AVFrame * coded_frame
the picture in the bitstream
static av_cold int ilbc_decode_init(AVCodecContext *avctx)
struct ILBCEncContext ILBCEncContext
static int get_mode(AVCodecContext *avctx)
#define AV_OPT_FLAG_AUDIO_PARAM
int block_align
number of bytes per packet if constant and known or 0 Used by some WAV based audio codecs...
void av_freep(void *arg)
Free a memory block which has been allocated with av_malloc(z)() or av_realloc() and set the pointer ...
static const AVClass ilbc_dec_class
static int decode(MimicContext *ctx, int quality, int num_coeffs, int is_iframe)
enum AVSampleFormat sample_fmt
audio sample format
AVCodec ff_libilbc_decoder
static av_cold int ilbc_encode_init(AVCodecContext *avctx)
static const AVCodecDefault ilbc_encode_defaults[]
static int init(AVCodecParserContext *s)
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
void av_log(void *avcl, int level, const char *fmt,...)
const char * name
Name of the codec implementation.
uint64_t channel_layout
Audio channel layout.
static const AVClass ilbc_enc_class
AVFrame * avcodec_alloc_frame(void)
Allocate an AVFrame and set its fields to default values.
int bit_rate
the average bitrate
audio channel layout utility functions
AVCodec ff_libilbc_encoder
int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame)
Get a buffer for a frame.
int ff_alloc_packet(AVPacket *avpkt, int size)
Check AVPacket size and/or allocate data.
#define AV_OPT_FLAG_ENCODING_PARAM
int frame_size
Number of samples per channel in an audio frame.
static int ilbc_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame, int *got_packet_ptr)
int sample_rate
samples per second
#define AV_OPT_FLAG_DECODING_PARAM
main external API structure.
static void close(AVCodecParserContext *s)
void avcodec_get_frame_defaults(AVFrame *frame)
Set the fields of the given AVFrame to default values.
Describe the class of an AVClass context structure.
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
common internal api header.
common internal and external API header
#define AVERROR_INVALIDDATA
AVSampleFormat
Audio Sample Formats.
int channels
number of audio channels
static av_cold int ilbc_encode_close(AVCodecContext *avctx)
static const AVOption ilbc_enc_options[]
static const AVOption ilbc_dec_options[]
#define AV_CH_LAYOUT_MONO
This structure stores compressed data.
int nb_samples
number of audio samples (per channel) described by this frame