29 uint16_t predict_table[5786 * 2];
34 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
35 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
36 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
37 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
38 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
39 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7
49 -1, -1, 2, 6, -1, -1, 2, 6
54 -1, -1, -1, -1, 1, 2, 4, 6,
55 -1, -1, -1, -1, 1, 2, 4, 6
60 -1, -1, -1, -1, -1, -1, -1, -1,
61 1, 1, 1, 2, 2, 4, 5, 6,
62 -1, -1, -1, -1, -1, -1, -1, -1,
63 1, 1, 1, 2, 2, 4, 5, 6
68 -1, -1, -1, -1, -1, -1, -1, -1,
69 -1, -1, -1, -1, -1, -1, -1, -1,
70 1, 1, 1, 1, 1, 2, 2, 2,
71 2, 4, 4, 4, 5, 5, 6, 6,
72 -1, -1, -1, -1, -1, -1, -1, -1,
73 -1, -1, -1, -1, -1, -1, -1, -1,
74 1, 1, 1, 1, 1, 2, 2, 2,
75 2, 4, 4, 4, 5, 5, 6, 6
80 -1, -1, -1, -1, -1, -1, -1, -1,
81 -1, -1, -1, -1, -1, -1, -1, -1,
82 -1, -1, -1, -1, -1, -1, -1, -1,
83 -1, -1, -1, -1, -1, -1, -1, -1,
84 1, 1, 1, 1, 1, 1, 1, 1,
85 1, 1, 2, 2, 2, 2, 2, 2,
86 2, 2, 4, 4, 4, 4, 4, 4,
87 5, 5, 5, 5, 6, 6, 6, 6,
88 -1, -1, -1, -1, -1, -1, -1, -1,
89 -1, -1, -1, -1, -1, -1, -1, -1,
90 -1, -1, -1, -1, -1, -1, -1, -1,
91 -1, -1, -1, -1, -1, -1, -1, -1,
92 1, 1, 1, 1, 1, 1, 1, 1,
93 1, 1, 2, 2, 2, 2, 2, 2,
94 2, 2, 4, 4, 4, 4, 4, 4,
95 5, 5, 5, 5, 6, 6, 6, 6
109 for (start_pos = 0; start_pos < 64; start_pos++) {
110 unsigned int dest_pos, table_pos;
112 for (table_pos = 0, dest_pos = start_pos;
114 table_pos++, dest_pos += 64) {
119 if (start_pos &
count)
140 int8_t channel_hint[2];
141 int ret, chan, channels = 1;
150 if (samples == 0xffffffff) {
155 if (samples > pkt->
size * 2)
159 if (channel_hint[0] & 0x80) {
160 channel_hint[0] = ~channel_hint[0];
176 for (chan = 0; chan < channels; chan++) {
177 uint16_t *
dest = (uint16_t*)frame->
data[0] + chan;
178 int step_index = channel_hint[chan];
179 int output = pcm_data[chan];
183 int lookup_size,
lookup, highbit, lowbits;
185 step_index = av_clip(step_index, 0, 88);
187 lookup =
get_bits(&gb, lookup_size);
188 highbit = 1 << (lookup_size - 1);
189 lowbits = highbit - 1;
191 if (lookup & highbit)
196 if (lookup == lowbits) {
199 int predict_index,
diff;
201 predict_index = (lookup << (7 - lookup_size)) | (step_index << 6);
202 predict_index = av_clip(predict_index, 0, 5785);
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
This structure describes decoded (raw) audio or video data.
static unsigned int get_bits(GetBitContext *s, int n)
Read 1-25 bits.
static void skip_bits_long(GetBitContext *s, int n)
static av_cold int init(AVCodecContext *avctx)
static const int8_t *const step_index_tables[]
static const int8_t index_table3[]
#define FF_ARRAY_ELEMS(a)
#define AV_CH_LAYOUT_STEREO
static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *pkt)
static int get_sbits(GetBitContext *s, int n)
enum AVSampleFormat sample_fmt
audio sample format
#define CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
bitstream reader API header.
static const int8_t index_table2[]
static const uint8_t size_table[]
static const int8_t index_table6[]
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
const int16_t ff_adpcm_step_table[89]
This is the step table.
const char * name
Name of the codec implementation.
uint64_t channel_layout
Audio channel layout.
audio channel layout utility functions
static const int8_t index_table4[]
#define diff(a, as, b, bs)
static const int8_t index_table5[]
static av_cold int decode_init(AVCodecContext *avctx)
static const int8_t index_table1[]
static int init_get_bits8(GetBitContext *s, const uint8_t *buffer, int byte_size)
Initialize GetBitContext.
main external API structure.
int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame, int flags)
Get a buffer for a frame.
static unsigned int get_bits_long(GetBitContext *s, int n)
Read 0-32 bits.
uint16_t predict_table[5786 *2]
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
common internal api header.
these buffered frames must be flushed immediately if a new input produces new output(Example:frame rate-doubling filter:filter_frame must(1) flush the second copy of the previous frame, if it is still there,(2) push the first copy of the incoming frame,(3) keep the second copy for later.) If the input frame is not enough to produce output
int channels
number of audio channels
Filter the word “frame” indicates either a video frame or a group of audio samples
static int decode(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
#define AV_CH_LAYOUT_MONO
This structure stores compressed data.
int nb_samples
number of audio samples (per channel) described by this frame