1 /*
2 * Real Audio 1.0 (14.4K)
3 *
4 * Copyright (c) 2008 Vitor Sessak
5 * Copyright (c) 2003 Nick Kurshev
6 * Based on public domain decoder at http://www.honeypot.net/audio
7 *
8 * This file is part of FFmpeg.
9 *
10 * FFmpeg is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU Lesser General Public
12 * License as published by the Free Software Foundation; either
13 * version 2.1 of the License, or (at your option) any later version.
14 *
15 * FFmpeg is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 * Lesser General Public License for more details.
19 *
20 * You should have received a copy of the GNU Lesser General Public
21 * License along with FFmpeg; if not, write to the Free Software
22 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
23 */
24
31
32
34 {
36
38
41
45
48
49 return 0;
50 }
51
54 {
55 int cba_idx =
get_bits(gb, 7);
// index of the adaptive CB, 0 if none
59
61 gain);
62 }
63
64 /** Uncompress one block (20 bytes -> 160*2 bytes). */
67 {
69 int buf_size = avpkt->
size;
71 unsigned int refl_rms[
NBLOCKS];
// RMS of the reflection coefficients
72 uint16_t block_coefs[
NBLOCKS][
LPC_ORDER];
// LPC coefficients of each sub-block
73 unsigned int lpc_refl[
LPC_ORDER];
// LPC reflection coefficients of the frame
74 int i, j;
75 int ret;
77 unsigned int energy;
78
81
82 /* get output buffer */
86 return ret;
87 }
88 samples = (int16_t *)ractx->
frame.
data[0];
89
92 "Frame too small (%d bytes). Truncated file?\n", buf_size);
93 *got_frame_ptr = 0;
94 return buf_size;
95 }
97
100
103
105
107 refl_rms[1] =
ff_interp(ractx, block_coefs[1], 2,
108 energy <= ractx->old_energy,
110 refl_rms[2] =
ff_interp(ractx, block_coefs[2], 3, 0, energy);
112
114
117
119 *samples++ = av_clip_int16(ractx->
curr_sblock[j + 10] << 2);
120 }
121
124
126
127 *got_frame_ptr = 1;
129
131 }
132
142 };