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
93 float *gain_block = ractx->
gain_hist + 28;
95 memmove(ractx->
sp_hist + 70, ractx->
sp_hist + 75, 36*
sizeof(*block));
99 for (i=0; i < 10; i++)
100 sum -= gain_block[9-i] * ractx->
gain_lpc[i];
103 sum = av_clipf(sum, 0, 60);
107 sumsum = exp(sum * 0.1151292546497) * gain * (1.0/(1<<23));
109 for (i=0; i < 5; i++)
110 buffer[i] =
codetable[cb_coef][i] * sumsum;
114 sum =
FFMAX(sum, 5.0 / (1<<24));
117 memmove(gain_block, gain_block + 1, 9 *
sizeof(*gain_block));
119 gain_block[9] = 10 * log10(sum) + (10*log10(((1<<24)/5.)) - 32);
137 int order,
int n,
int non_rec,
float *
out,
138 float *hist,
float *out2,
const float *window)
151 convolve(buffer1, work + order , n , order);
152 convolve(buffer2, work + order + n, non_rec, order);
154 for (i=0; i <= order; i++) {
155 out2[i] = out2[i] * 0.5625 + buffer1[i];
156 out [i] = out2[i] + buffer2[i];
160 *out *= 257.0 / 256.0;
167 float *hist,
float *rec,
const float *window,
168 float *lpc,
const float *
tab,
169 int order,
int n,
int non_rec,
int move_size)
178 memmove(hist, hist + n, move_size*
sizeof(*hist));
182 int *got_frame_ptr,
AVPacket *avpkt)
186 int buf_size = avpkt->
size;
192 if (buf_size < avctx->block_align) {
194 "Error! Input buffer is too small [%d<%d]\n",
203 out = (
float *)frame->
data[0];
209 int cb_coef =
get_bits(&gb, 6 + (i&1));
211 decode(ractx, gain, cb_coef);