mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
wmapro: use av_float2int()
Signed-off-by: Mans Rullgard <mans@mansr.com>
This commit is contained in:
parent
a09bb3ba5e
commit
4424fe9c02
@ -86,6 +86,7 @@
|
|||||||
* subframe in order to reconstruct the output samples.
|
* subframe in order to reconstruct the output samples.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "libavutil/intfloat.h"
|
||||||
#include "libavutil/intreadwrite.h"
|
#include "libavutil/intreadwrite.h"
|
||||||
#include "avcodec.h"
|
#include "avcodec.h"
|
||||||
#include "internal.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);
|
v1 = get_vlc2(&s->gb, vec1_vlc.table, VLCBITS, VEC1MAXDEPTH);
|
||||||
if (v1 == HUFF_VEC1_SIZE - 1)
|
if (v1 == HUFF_VEC1_SIZE - 1)
|
||||||
v1 += ff_wma_get_large_val(&s->gb);
|
v1 += ff_wma_get_large_val(&s->gb);
|
||||||
vals[i ] = ((av_alias32){ .f32 = v0 }).u32;
|
vals[i ] = av_float2int(v0);
|
||||||
vals[i+1] = ((av_alias32){ .f32 = v1 }).u32;
|
vals[i+1] = av_float2int(v1);
|
||||||
} else {
|
} else {
|
||||||
vals[i] = fval_tab[symbol_to_vec2[idx] >> 4 ];
|
vals[i] = fval_tab[symbol_to_vec2[idx] >> 4 ];
|
||||||
vals[i+1] = fval_tab[symbol_to_vec2[idx] & 0xF];
|
vals[i+1] = fval_tab[symbol_to_vec2[idx] & 0xF];
|
||||||
|
Loading…
Reference in New Issue
Block a user