87 s1 = av_clip_int16(s0);
100 int buf_size = avpkt->
size;
103 const uint8_t *buf = avpkt->
data;
104 int num_blocks, ch, ret;
120 if (buf_size < header_size)
123 buf_size -= header_size;
134 if (buf_size >= 4 && (
AV_RB16(buf) & 0x8000)) {
150 while (num_blocks--) {
151 for (ch = 0; ch < c->
channels; ch++) {
160 samples += BLOCK_SAMPLES * c->
channels;
166 return buf - avpkt->
data;
172 memset(c->
prev, 0,
sizeof(c->
prev));
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
AV_WL32 AV_WL24 AV_WL16 AV_WB32 AV_WB24 AV_RB16
static av_cold int adx_decode_init(AVCodecContext *avctx)
AVFrame * coded_frame
the picture in the bitstream
static int get_sbits(GetBitContext *s, int n)
static int decode(MimicContext *ctx, int quality, int num_coeffs, int is_iframe)
enum AVSampleFormat sample_fmt
audio sample format
uint8_t * extradata
some codecs need / can use extradata like Huffman tables.
static int adx_decode(ADXContext *c, int16_t *out, const uint8_t *in, int ch)
Decode 32 samples from 18 bytes.
bitstream reader API header.
static int init(AVCodecParserContext *s)
#define CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
#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.
static void adx_decode_flush(AVCodecContext *avctx)
static int adx_decode_frame(AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt)
int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame)
main external API structure.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
static int init_get_bits(GetBitContext *s, const uint8_t *buffer, int bit_size)
Initialize GetBitContext.
static const uint16_t scale[4]
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
int avpriv_adx_decode_header(AVCodecContext *avctx, const uint8_t *buf, int bufsize, int *header_size, int *coeff)
Decode ADX stream header.
common internal api header.
static av_cold void flush(AVCodecContext *avctx)
Flush (reset) the frame ID after seeking.
AVCodec ff_adpcm_adx_decoder
int channels
number of audio channels
void avcodec_get_frame_defaults(AVFrame *pic)
Set the fields of the given AVFrame to default values.
int nb_samples
number of audio samples (per channel) described by this frame