43 #define OFFSET(x) offsetof(G722Context, x)
44 #define AD AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_DECODING_PARAM
78 -35, -35, -2919, -2195, -1765, -1458, -1219, -1023,
79 -858, -714, -587, -473, -370, -276, -190, -110,
80 2919, 2195, 1765, 1458, 1219, 1023, 858, 714,
81 587, 473, 370, 276, 190, 110, 35, -35
108 for (j = 0; j < avpkt->
size; j++) {
109 int ilow, ihigh, rlow, rhigh, dhigh;
130 *out_buf++ = av_clip_int16(xout1 >> 11);
131 *out_buf++ = av_clip_int16(xout2 >> 11);
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
static unsigned int get_bits(GetBitContext *s, int n)
Read 1-25 bits.
AVFrame * coded_frame
the picture in the bitstream
AVCodec ff_adpcm_g722_decoder
void ff_g722_update_low_predictor(struct G722Band *band, const int ilow)
static av_cold int g722_decode_init(AVCodecContext *avctx)
const char * class_name
The name of the class; usually it is the same name as the context structure type to which the AVClass...
static int decode(MimicContext *ctx, int quality, int num_coeffs, int is_iframe)
enum AVSampleFormat sample_fmt
audio sample format
void ff_g722_update_high_predictor(struct G722Band *band, const int dhigh, const int ihigh)
#define PREV_SAMPLES_BUF_SIZE
bitstream reader API header.
static int init(AVCodecParserContext *s)
#define CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
static const AVClass g722_decoder_class
const int16_t ff_g722_low_inv_quant6[64]
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
int16_t prev_samples[PREV_SAMPLES_BUF_SIZE]
memory of past decoded samples
void av_log(void *avcl, int level, const char *fmt,...)
const char * name
Name of the codec implementation.
struct G722Context::G722Band band[2]
static const AVOption options[]
int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame)
static const int16_t low_inv_quant5[32]
main external API structure.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
const int16_t ff_g722_low_inv_quant4[16]
Describe the class of an AVClass context structure.
static void skip_bits(GetBitContext *s, int n)
static int init_get_bits(GetBitContext *s, const uint8_t *buffer, int bit_size)
Initialize GetBitContext.
static const int16_t * low_inv_quants[3]
const int16_t ff_g722_high_inv_quant[4]
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
common internal api header.
int prev_samples_pos
the number of values in prev_samples
void ff_g722_apply_qmf(const int16_t *prev_samples, int *xout1, int *xout2)
static int g722_decode_frame(AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt)
int channels
number of audio channels
int16_t s_predictor
predictor output value
void avcodec_get_frame_defaults(AVFrame *pic)
Set the fields of the given AVFrame to default values.
int16_t scale_factor
delayed quantizer scale factor
int nb_samples
number of audio samples (per channel) described by this frame