comparison libfaad2/huffman.c @ 13453:6d50ef45a058

Update FAAD to a 2.1 beta CVS snapshot from 2004.07.12. patch by adland <adland123 at yahoo dot com>
author diego
date Fri, 24 Sep 2004 17:31:36 +0000
parents d81145997036
children 2ae5ab4331ca
comparison
equal deleted inserted replaced
13452:c364b7c13dd8 13453:6d50ef45a058
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 ** Initially modified for use with MPlayer by Alex Beregszaszi on 2003/10/03 25 ** Initially modified for use with MPlayer by Alex Beregszaszi on 2003/10/03
26 ** $Id: huffman.c,v 1.2 2004/06/02 22:59:03 diego Exp $ 26 ** $Id: huffman.c,v 1.3 2004/06/23 13:50:50 diego Exp $
27 ** detailed CVS changelog at http://www.mplayerhq.hu/cgi-bin/cvsweb.cgi/main/ 27 ** detailed CVS changelog at http://www.mplayerhq.hu/cgi-bin/cvsweb.cgi/main/
28 **/ 28 **/
29 29
30 #include "common.h" 30 #include "common.h"
31 #include "structs.h" 31 #include "structs.h"
120 } 120 }
121 121
122 static INLINE int16_t huffman_getescape(bitfile *ld, int16_t sp) 122 static INLINE int16_t huffman_getescape(bitfile *ld, int16_t sp)
123 { 123 {
124 uint8_t neg, i; 124 uint8_t neg, i;
125 int32_t j; 125 int16_t j;
126 int32_t off; 126 int16_t off;
127 127
128 if (sp < 0) 128 if (sp < 0)
129 { 129 {
130 if (sp != -16) 130 if (sp != -16)
131 return sp; 131 return sp;
143 { 143 {
144 break; 144 break;
145 } 145 }
146 } 146 }
147 147
148 off = faad_getbits(ld, i 148 off = (int16_t)faad_getbits(ld, i
149 DEBUGVAR(1,9,"huffman_getescape(): escape")); 149 DEBUGVAR(1,9,"huffman_getescape(): escape"));
150 150
151 j = off | (1<<i); 151 j = off | (1<<i);
152 if (neg) 152 if (neg)
153 j = -j; 153 j = -j;