comparison libfaad2/hcr.c @ 12527:4a370c80fe5c

update to the 2.0 release of faad, patch by adland
author diego
date Wed, 02 Jun 2004 22:59:04 +0000
parents 3185f64f6350
children d81145997036
comparison
equal deleted inserted replaced
12526:e183ad37d24c 12527:4a370c80fe5c
1 /* 1 /*
2 ** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding 2 ** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
3 ** Copyright (C) 2002 A. Kurpiers 3 ** Copyright (C) 2002-2004 A. Kurpiers
4 ** 4 **
5 ** This program is free software; you can redistribute it and/or modify 5 ** This program is free software; you can redistribute it and/or modify
6 ** it under the terms of the GNU General Public License as published by 6 ** it under the terms of the GNU General Public License as published by
7 ** the Free Software Foundation; either version 2 of the License, or 7 ** the Free Software Foundation; either version 2 of the License, or
8 ** (at your option) any later version. 8 ** (at your option) any later version.
20 ** forbidden. 20 ** forbidden.
21 ** 21 **
22 ** Commercial non-GPL licensing of this software is possible. 22 ** Commercial non-GPL licensing of this software is possible.
23 ** For more info contact Ahead Software through Mpeg4AAClicense@nero.com. 23 ** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
24 ** 24 **
25 ** $Id: hcr.c,v 1.1 2003/08/30 22:30:21 arpi Exp $ 25 ** $Id: hcr.c,v 1.2 2003/10/03 22:22:27 alex Exp $
26 **/ 26 **/
27
28 27
29 #include "common.h" 28 #include "common.h"
30 #include "structs.h" 29 #include "structs.h"
31 30
32 #include <stdlib.h> 31 #include <stdlib.h>
152 uint8_t numberOfSets, set; 151 uint8_t numberOfSets, set;
153 codeword_state Codewords[ 1024 ]; // FIXME max length? PCWs are not stored, so index is Codewordnr - numberOfSegments!, maybe malloc()? 152 codeword_state Codewords[ 1024 ]; // FIXME max length? PCWs are not stored, so index is Codewordnr - numberOfSegments!, maybe malloc()?
154 bits_t Segment[ 512 ]; 153 bits_t Segment[ 512 ];
155 154
156 uint8_t PCW_decoded=0; 155 uint8_t PCW_decoded=0;
157 uint16_t segment_index=0, codeword_index=0;
158 uint16_t nshort = hDecoder->frameLength/8; 156 uint16_t nshort = hDecoder->frameLength/8;
159 157
160 158
161 memset (spectral_data, 0, hDecoder->frameLength*sizeof(uint16_t)); 159 /*memset (spectral_data, 0, hDecoder->frameLength*sizeof(uint16_t));*/
162 160
163 if (ics->length_of_reordered_spectral_data == 0) 161 if (ics->length_of_reordered_spectral_data == 0)
164 return 0; /* nothing to do */ 162 return 0; /* nothing to do */
165 163
166 /* if we have a corrupted bitstream this can happen... */ 164 /* if we have a corrupted bitstream this can happen... */