summaryrefslogtreecommitdiff
path: root/libavcodec/gsmdec_template.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/gsmdec_template.c')
-rw-r--r--libavcodec/gsmdec_template.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/libavcodec/gsmdec_template.c b/libavcodec/gsmdec_template.c
index 2794bd1132..4e40a20106 100644
--- a/libavcodec/gsmdec_template.c
+++ b/libavcodec/gsmdec_template.c
@@ -2,20 +2,20 @@
* gsm 06.10 decoder
* Copyright (c) 2010 Reimar Döffinger <Reimar.Doeffinger@gmx.de>
*
- * This file is part of Libav.
+ * This file is part of FFmpeg.
*
- * Libav is free software; you can redistribute it and/or
+ * FFmpeg is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
- * Libav is distributed in the hope that it will be useful,
+ * FFmpeg is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with Libav; if not, write to the Free Software
+ * License along with FFmpeg; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
@@ -41,7 +41,7 @@ static void apcm_dequant_add(GetBitContext *gb, int16_t *dst, const int *frame_b
static inline int gsm_mult(int a, int b)
{
- return (a * b + (1 << 14)) >> 15;
+ return (int)(a * (SUINT)b + (1 << 14)) >> 15;
}
static void long_term_synth(int16_t *dst, int lag, int gain_idx)
@@ -57,7 +57,7 @@ static inline int decode_log_area(int coded, int factor, int offset)
{
coded <<= 10;
coded -= offset;
- return gsm_mult(coded, factor) << 1;
+ return gsm_mult(coded, factor) * 2;
}
static av_noinline int get_rrp(int filtered)
@@ -114,7 +114,7 @@ static int postprocess(int16_t *data, int msr)
int i;
for (i = 0; i < 160; i++) {
msr = av_clip_int16(data[i] + gsm_mult(msr, 28180));
- data[i] = av_clip_int16(msr << 1) & ~7;
+ data[i] = av_clip_int16(msr * 2) & ~7;
}
return msr;
}