summaryrefslogtreecommitdiff
path: root/apps/codecs/libcook/cook.h
diff options
context:
space:
mode:
authorDave Chapman <dave@dchapman.com>2009-05-10 22:26:02 +0000
committerDave Chapman <dave@dchapman.com>2009-05-10 22:26:02 +0000
commitfc28cb4ed5adf4a0bc548af38ca6de95bbf027e5 (patch)
tree5902a50d7efe84a5f3e6270c464dbf54572a744a /apps/codecs/libcook/cook.h
parent3a0a9915eb802d558c0399d17a5ac045934d6be1 (diff)
downloadrockbox-fc28cb4ed5adf4a0bc548af38ca6de95bbf027e5.tar.gz
rockbox-fc28cb4ed5adf4a0bc548af38ca6de95bbf027e5.zip
Patch by Mohamed Tarek from FS#10182 - convert codec to fixed-point using patches submitted to the ffmpeg mailing list in 2007 by Ian Braithwaite.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20901 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/libcook/cook.h')
-rw-r--r--apps/codecs/libcook/cook.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/apps/codecs/libcook/cook.h b/apps/codecs/libcook/cook.h
index 8d4c078f1a..c4c06cd4f1 100644
--- a/apps/codecs/libcook/cook.h
+++ b/apps/codecs/libcook/cook.h
@@ -19,7 +19,6 @@
19 * License along with FFmpeg; if not, write to the Free Software 19 * License along with FFmpeg; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 */ 21 */
22
23#ifndef _COOK_H 22#ifndef _COOK_H
24#define _COOK_H 23#define _COOK_H
25 24
@@ -29,6 +28,7 @@
29#include "dsputil.h" 28#include "dsputil.h"
30#include "bytestream.h" 29#include "bytestream.h"
31#include "rm2wav.h" 30#include "rm2wav.h"
31#include "cookdata_fixpoint.h"
32 32
33typedef struct { 33typedef struct {
34 int *now; 34 int *now;
@@ -42,18 +42,18 @@ typedef struct cook {
42 */ 42 */
43 void (* scalar_dequant)(struct cook *q, int index, int quant_index, 43 void (* scalar_dequant)(struct cook *q, int index, int quant_index,
44 int* subband_coef_index, int* subband_coef_sign, 44 int* subband_coef_index, int* subband_coef_sign,
45 float* mlt_p); 45 REAL_T* mlt_p);
46 46
47 void (* decouple) (struct cook *q, 47 void (* decouple) (struct cook *q,
48 int subband, 48 int subband,
49 float f1, float f2, 49 REAL_T f1, REAL_T f2,
50 float *decode_buffer, 50 REAL_T *decode_buffer,
51 float *mlt_buffer1, float *mlt_buffer2); 51 REAL_T *mlt_buffer1, REAL_T *mlt_buffer2);
52 52
53 void (* imlt_window) (struct cook *q, float *buffer1, 53 void (* imlt_window) (struct cook *q, float *buffer1,
54 cook_gains *gains_ptr, float *previous_buffer); 54 cook_gains *gains_ptr, float *previous_buffer);
55 55
56 void (* interpolate) (struct cook *q, float* buffer, 56 void (* interpolate) (struct cook *q, REAL_T* buffer,
57 int gain_index, int gain_index_next); 57 int gain_index, int gain_index_next);
58 58
59 void (* saturate_output) (struct cook *q, int chan, int16_t *out); 59 void (* saturate_output) (struct cook *q, int chan, int16_t *out);
@@ -104,12 +104,12 @@ typedef struct cook {
104 /* data buffers */ 104 /* data buffers */
105 105
106 uint8_t* decoded_bytes_buffer; 106 uint8_t* decoded_bytes_buffer;
107 float mono_mdct_output[2048] __attribute__ ((aligned(16))); //DECLARE_ALIGNED_16(float,mono_mdct_output[2048]); 107 REAL_T mono_mdct_output[2048] __attribute__ ((aligned(16))); //DECLARE_ALIGNED_16(float,mono_mdct_output[2048]);
108 float mono_previous_buffer1[1024]; 108 REAL_T mono_previous_buffer1[1024];
109 float mono_previous_buffer2[1024]; 109 REAL_T mono_previous_buffer2[1024];
110 float decode_buffer_1[1024]; 110 REAL_T decode_buffer_1[1024];
111 float decode_buffer_2[1024]; 111 REAL_T decode_buffer_2[1024];
112 float decode_buffer_0[1060]; /* static allocation for joint decode */ 112 REAL_T decode_buffer_0[1060]; /* static allocation for joint decode */
113 113
114 const float *cplscales[5]; 114 const float *cplscales[5];
115} COOKContext; 115} COOKContext;