27 #define BITSTREAM_READER_LE
33 #define MAX_BACKWARD_FILTER_ORDER 36
34 #define MAX_BACKWARD_FILTER_LEN 40
35 #define MAX_BACKWARD_FILTER_NONREC 35
37 #define RA288_BLOCK_SIZE 5
38 #define RA288_BLOCKS_PER_FRAME 32
104 float *gain_block = ractx->
gain_hist + 28;
106 memmove(ractx->
sp_hist + 70, ractx->
sp_hist + 75, 36*
sizeof(*block));
110 for (i=0; i < 10; i++)
111 sum -= gain_block[9-i] * ractx->
gain_lpc[i];
114 sum = av_clipf(sum, 0, 60);
118 sumsum = exp(sum * 0.1151292546497) * gain * (1.0/(1<<23));
120 for (i=0; i < 5; i++)
121 buffer[i] =
codetable[cb_coef][i] * sumsum;
125 sum =
FFMAX(sum, 5.0 / (1<<24));
128 memmove(gain_block, gain_block + 1, 9 *
sizeof(*gain_block));
130 gain_block[9] = 10 * log10(sum) + (10*log10(((1<<24)/5.)) - 32);
148 int order,
int n,
int non_rec,
float *
out,
149 float *hist,
float *out2,
const float *window)
162 convolve(buffer1, work + order , n , order);
163 convolve(buffer2, work + order + n, non_rec, order);
165 for (i=0; i <= order; i++) {
166 out2[i] = out2[i] * 0.5625 + buffer1[i];
167 out [i] = out2[i] + buffer2[i];
171 *out *= 257.0 / 256.0;
178 float *hist,
float *rec,
const float *window,
179 float *lpc,
const float *
tab,
180 int order,
int n,
int non_rec,
int move_size)
189 memmove(hist, hist + n, move_size*
sizeof(*hist));
193 int *got_frame_ptr,
AVPacket *avpkt)
197 int buf_size = avpkt->
size;
203 if (buf_size < avctx->block_align) {
205 "Error! Input buffer is too small [%d<%d]\n",
214 out = (
float *)frame->
data[0];
220 int cb_coef =
get_bits(&gb, 6 + (i&1));
222 decode(ractx, gain, cb_coef);