comparison g726.c @ 7057:2de55b561147 libavcodec

Get rid of useless wrapper function.
author michael
date Tue, 17 Jun 2008 13:40:40 +0000
parents 0c65c19e5aaa
children 819e52ba3125
comparison
equal deleted inserted replaced
7056:0c65c19e5aaa 7057:2de55b561147
181 dex = (dql>>7) & 0xf; /* 4bit exponent */ 181 dex = (dql>>7) & 0xf; /* 4bit exponent */
182 dqt = (1<<7) + (dql & 0x7f); /* log2 -> linear */ 182 dqt = (1<<7) + (dql & 0x7f); /* log2 -> linear */
183 return (dql < 0) ? 0 : ((dqt<<7) >> (14-dex)); 183 return (dql < 0) ? 0 : ((dqt<<7) >> (14-dex));
184 } 184 }
185 185
186 static int16_t g726_iterate(G726Context* c, int16_t I) 186 static int16_t g726_decode(G726Context* c, int16_t I)
187 { 187 {
188 int dq, re_signal, pk0, fa1, i, tr, ylint, ylfrac, thr2, al, dq0; 188 int dq, re_signal, pk0, fa1, i, tr, ylint, ylfrac, thr2, al, dq0;
189 Float11 f; 189 Float11 f;
190 190
191 dq = inverse_quant(c, I); 191 dq = inverse_quant(c, I);
284 c->y = 544; 284 c->y = 544;
285 285
286 return 0; 286 return 0;
287 } 287 }
288 288
289 static int16_t g726_decode(G726Context* c, int16_t i)
290 {
291 return g726_iterate(c, i);
292 }
293
294 #ifdef CONFIG_ENCODERS 289 #ifdef CONFIG_ENCODERS
295 static int16_t g726_encode(G726Context* c, int16_t sig) 290 static int16_t g726_encode(G726Context* c, int16_t sig)
296 { 291 {
297 uint8_t i; 292 uint8_t i;
298 293
299 i = quant(c, sig/4 - c->se) & ((1<<c->tbls->bits) - 1); 294 i = quant(c, sig/4 - c->se) & ((1<<c->tbls->bits) - 1);
300 g726_iterate(c, i); 295 g726_decode(c, i);
301 return i; 296 return i;
302 } 297 }
303 #endif 298 #endif
304 299
305 /* Interfacing to the libavcodec */ 300 /* Interfacing to the libavcodec */