[FFmpeg-cvslog] wmapro: use av_float2int()
Mans Rullgard
git at videolan.org
Mon Dec 12 01:43:50 CET 2011
ffmpeg | branch: master | Mans Rullgard <mans at mansr.com> | Sat Dec 10 15:51:25 2011 +0000| [4424fe9c029ccefc5868823b4967c792e51487f3] | committer: Mans Rullgard
wmapro: use av_float2int()
Signed-off-by: Mans Rullgard <mans at mansr.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4424fe9c029ccefc5868823b4967c792e51487f3
---
libavcodec/wmaprodec.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/libavcodec/wmaprodec.c b/libavcodec/wmaprodec.c
index b947eb8..a1b82db 100644
--- a/libavcodec/wmaprodec.c
+++ b/libavcodec/wmaprodec.c
@@ -86,6 +86,7 @@
* subframe in order to reconstruct the output samples.
*/
+#include "libavutil/intfloat.h"
#include "libavutil/intreadwrite.h"
#include "avcodec.h"
#include "internal.h"
@@ -823,8 +824,8 @@ static int decode_coeffs(WMAProDecodeCtx *s, int c)
v1 = get_vlc2(&s->gb, vec1_vlc.table, VLCBITS, VEC1MAXDEPTH);
if (v1 == HUFF_VEC1_SIZE - 1)
v1 += ff_wma_get_large_val(&s->gb);
- vals[i ] = ((av_alias32){ .f32 = v0 }).u32;
- vals[i+1] = ((av_alias32){ .f32 = v1 }).u32;
+ vals[i ] = av_float2int(v0);
+ vals[i+1] = av_float2int(v1);
} else {
vals[i] = fval_tab[symbol_to_vec2[idx] >> 4 ];
vals[i+1] = fval_tab[symbol_to_vec2[idx] & 0xF];
More information about the ffmpeg-cvslog
mailing list