diff options
author | Nedeljko Babic <nbabic@mips.com> | 2014-04-01 16:31:08 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-04-01 19:01:57 +0200 |
commit | 696e34a6e15d9d9d655191a953779d06dc3b5897 (patch) | |
tree | 4401c485e31b7cc878179d44481635213eecd7a6 /libavcodec/kbdwin.c | |
parent | d506deaeaa98013505241d8149d82327efea0379 (diff) | |
download | ffmpeg-696e34a6e15d9d9d655191a953779d06dc3b5897.tar.gz |
libavcodec: Implementation of AC3 fixedpoint decoder
Signed-off-by: Nedeljko Babic <nbabic@mips.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/kbdwin.c')
-rw-r--r-- | libavcodec/kbdwin.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libavcodec/kbdwin.c b/libavcodec/kbdwin.c index 5a62e9da2b..bf32aeb317 100644 --- a/libavcodec/kbdwin.c +++ b/libavcodec/kbdwin.c @@ -45,3 +45,13 @@ av_cold void ff_kbd_window_init(float *window, float alpha, int n) for (i = 0; i < n; i++) window[i] = sqrt(local_window[i] / sum); } + +av_cold void ff_kbd_window_init_fixed(int32_t *window, float alpha, int n) +{ + int i; + float local_window[FF_KBD_WINDOW_MAX]; + + ff_kbd_window_init(local_window, alpha, n); + for (i = 0; i < n; i++) + window[i] = (int)floor(2147483647.0 * local_window[i] + 0.5); +} |