Originally committed as revision 11767 to svn://svn.ffmpeg.org/ffmpeg/trunk

Michael Niedermayer authored on 2008/02/02 00:37:24
Showing 1 changed files
... ...
@@ -106,7 +106,7 @@ typedef struct {
106 106
     float level;
107 107
     float *samples_im;
108 108
     float *samples_re;
109
-    float *table;
109
+    const float *table;
110 110
     int   phase;
111 111
     int   phase_shift;
112 112
     int   duration;
... ...
@@ -176,7 +176,7 @@ typedef struct {
176 176
     QDM2FFT fft;
177 177
 
178 178
     /// I/O data
179
-    uint8_t *compressed_data;
179
+    const uint8_t *compressed_data;
180 180
     int compressed_size;
181 181
     float output_buffer[1024];
182 182
 
... ...
@@ -404,7 +404,7 @@ static int qdm2_get_se_vlc (VLC *vlc, GetBitContext *gb, int depth)
404 404
  *
405 405
  * @return          0 if checksum is OK
406 406
  */
407
-static uint16_t qdm2_packet_checksum (uint8_t *data, int length, int value) {
407
+static uint16_t qdm2_packet_checksum (const uint8_t *data, int length, int value) {
408 408
     int i;
409 409
 
410 410
     for (i=0; i < length; i++)
... ...
@@ -1598,7 +1598,7 @@ static void qdm2_fft_tone_synthesizer (QDM2Context *q, int sub_packet)
1598 1598
                     tone.level = (q->fft_coefs[j].exp < 0) ? 0.0 : fft_tone_level_table[q->superblocktype_2_3 ? 0 : 1][q->fft_coefs[j].exp & 63];
1599 1599
                     tone.samples_im = &q->fft.samples_im[ch][offset];
1600 1600
                     tone.samples_re = &q->fft.samples_re[ch][offset];
1601
-                    tone.table = (float*)fft_tone_sample_table[i][q->fft_coefs[j].offset - (offset << four_i)];
1601
+                    tone.table = fft_tone_sample_table[i][q->fft_coefs[j].offset - (offset << four_i)];
1602 1602
                     tone.phase = 64 * q->fft_coefs[j].phase - (offset << 8) - 128;
1603 1603
                     tone.phase_shift = (2 * q->fft_coefs[j].offset + 1) << (7 - four_i);
1604 1604
                     tone.duration = i;
... ...
@@ -1943,7 +1943,7 @@ static int qdm2_decode_close(AVCodecContext *avctx)
1943 1943
 }
1944 1944
 
1945 1945
 
1946
-static void qdm2_decode (QDM2Context *q, uint8_t *in, int16_t *out)
1946
+static void qdm2_decode (QDM2Context *q, const uint8_t *in, int16_t *out)
1947 1947
 {
1948 1948
     int ch, i;
1949 1949
     const int frame_size = (q->frame_size * q->channels);
... ...
@@ -2005,7 +2005,7 @@ static void qdm2_decode (QDM2Context *q, uint8_t *in, int16_t *out)
2005 2005
 
2006 2006
 static int qdm2_decode_frame(AVCodecContext *avctx,
2007 2007
             void *data, int *data_size,
2008
-            uint8_t *buf, int buf_size)
2008
+            const uint8_t *buf, int buf_size)
2009 2009
 {
2010 2010
     QDM2Context *s = avctx->priv_data;
2011 2011