Explicitly cast results of silk OPUS_FAST_INT64 macros back to opus_int32.
Signed-off-by: Timothy B. Terriberry <tterribe@xiph.org>
This commit is contained in:
parent
d6a44c5511
commit
c59c138d6c
1 changed files with 5 additions and 5 deletions
|
@ -48,14 +48,14 @@ POSSIBILITY OF SUCH DAMAGE.
|
|||
|
||||
/* (a32 * (opus_int32)((opus_int16)(b32))) >> 16 output have to be 32bit int */
|
||||
#if OPUS_FAST_INT64
|
||||
#define silk_SMULWB(a32, b32) (((a32) * (opus_int64)((opus_int16)(b32))) >> 16)
|
||||
#define silk_SMULWB(a32, b32) ((opus_int32)(((a32) * (opus_int64)((opus_int16)(b32))) >> 16))
|
||||
#else
|
||||
#define silk_SMULWB(a32, b32) ((((a32) >> 16) * (opus_int32)((opus_int16)(b32))) + ((((a32) & 0x0000FFFF) * (opus_int32)((opus_int16)(b32))) >> 16))
|
||||
#endif
|
||||
|
||||
/* a32 + (b32 * (opus_int32)((opus_int16)(c32))) >> 16 output have to be 32bit int */
|
||||
#if OPUS_FAST_INT64
|
||||
#define silk_SMLAWB(a32, b32, c32) ((a32) + (((b32) * (opus_int64)((opus_int16)(c32))) >> 16))
|
||||
#define silk_SMLAWB(a32, b32, c32) ((opus_int32)((a32) + (((b32) * (opus_int64)((opus_int16)(c32))) >> 16)))
|
||||
#else
|
||||
#define silk_SMLAWB(a32, b32, c32) ((a32) + ((((b32) >> 16) * (opus_int32)((opus_int16)(c32))) + ((((b32) & 0x0000FFFF) * (opus_int32)((opus_int16)(c32))) >> 16)))
|
||||
#endif
|
||||
|
@ -65,7 +65,7 @@ POSSIBILITY OF SUCH DAMAGE.
|
|||
|
||||
/* a32 + (b32 * (c32 >> 16)) >> 16 */
|
||||
#if OPUS_FAST_INT64
|
||||
#define silk_SMLAWT(a32, b32, c32) ((a32) + (((b32) * ((opus_int64)(c32) >> 16)) >> 16))
|
||||
#define silk_SMLAWT(a32, b32, c32) ((opus_int32)((a32) + (((b32) * ((opus_int64)(c32) >> 16)) >> 16)))
|
||||
#else
|
||||
#define silk_SMLAWT(a32, b32, c32) ((a32) + (((b32) >> 16) * ((c32) >> 16)) + ((((b32) & 0x0000FFFF) * ((c32) >> 16)) >> 16))
|
||||
#endif
|
||||
|
@ -87,14 +87,14 @@ POSSIBILITY OF SUCH DAMAGE.
|
|||
|
||||
/* (a32 * b32) >> 16 */
|
||||
#if OPUS_FAST_INT64
|
||||
#define silk_SMULWW(a32, b32) (((opus_int64)(a32) * (b32)) >> 16)
|
||||
#define silk_SMULWW(a32, b32) ((opus_int32)(((opus_int64)(a32) * (b32)) >> 16))
|
||||
#else
|
||||
#define silk_SMULWW(a32, b32) silk_MLA(silk_SMULWB((a32), (b32)), (a32), silk_RSHIFT_ROUND((b32), 16))
|
||||
#endif
|
||||
|
||||
/* a32 + ((b32 * c32) >> 16) */
|
||||
#if OPUS_FAST_INT64
|
||||
#define silk_SMLAWW(a32, b32, c32) ((a32) + (((opus_int64)(b32) * (c32)) >> 16))
|
||||
#define silk_SMLAWW(a32, b32, c32) ((opus_int32)((a32) + (((opus_int64)(b32) * (c32)) >> 16)))
|
||||
#else
|
||||
#define silk_SMLAWW(a32, b32, c32) silk_MLA(silk_SMLAWB((a32), (b32), (c32)), (b32), silk_RSHIFT_ROUND((c32), 16))
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue