summaryrefslogtreecommitdiff
path: root/ac3dec/dither.h
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2001-08-09 11:41:39 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2001-08-09 11:41:39 +0200
commitc50dc5e888627bd1644f46585a44dc118c865127 (patch)
tree1dc5a28da106e3404863fc0234891142a5c29b2f /ac3dec/dither.h
parent85a027791063dfd7e94ccef45ea9e755df63d29a (diff)
downloadvdr-c50dc5e888627bd1644f46585a44dc118c865127.tar.gz
vdr-c50dc5e888627bd1644f46585a44dc118c865127.tar.bz2
Improvements from Matjaz Thaler
Diffstat (limited to 'ac3dec/dither.h')
-rw-r--r--ac3dec/dither.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/ac3dec/dither.h b/ac3dec/dither.h
index 6d68e1b5..abb9f518 100644
--- a/ac3dec/dither.h
+++ b/ac3dec/dither.h
@@ -22,16 +22,16 @@
*/
-extern uint_16 lfsr_state;
-extern const uint_16 dither_lut[256];
+extern uint16_t lfsr_state;
+extern const uint16_t dither_lut[256];
-static inline uint_16 dither_gen(void)
+static inline uint16_t dither_gen(void)
{
- sint_16 state;
+ int16_t state;
state = dither_lut[lfsr_state >> 8] ^ (lfsr_state << 8);
- lfsr_state = (uint_16) state;
+ lfsr_state = (uint16_t) state;
- return ((state * (sint_32) (0.707106 * 256.0))>>8);
+ return ((state * (int32_t) (0.707106 * 256.0))>>8);
}