[FFmpeg-cvslog] avcodec/aacps_fixed_tablegen: change f_center to 64bit to avoid overflow
Michael Niedermayer
git at videolan.org
Sat Jul 25 22:41:56 CEST 2015
ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Sat Jul 25 22:07:41 2015 +0200| [c105e0f077fb988d5c19e1a1beadf839f01e1a3e] | committer: Michael Niedermayer
avcodec/aacps_fixed_tablegen: change f_center to 64bit to avoid overflow
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c105e0f077fb988d5c19e1a1beadf839f01e1a3e
---
libavcodec/aacps_fixed_tablegen.h | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/libavcodec/aacps_fixed_tablegen.h b/libavcodec/aacps_fixed_tablegen.h
index 701a9d2..01f2ece 100644
--- a/libavcodec/aacps_fixed_tablegen.h
+++ b/libavcodec/aacps_fixed_tablegen.h
@@ -349,7 +349,8 @@ static void ps_tableinit(void)
}
for (k = 0; k < NR_ALLPASS_BANDS20; k++) {
- int theta, f_center;
+ int theta;
+ int64_t f_center;
int c, s;
if (k < FF_ARRAY_ELEMS(f_center_20))
@@ -377,7 +378,7 @@ static void ps_tableinit(void)
if (k < FF_ARRAY_ELEMS(f_center_34))
f_center = f_center_34[k];
else
- f_center = (k << 26) - (53 << 25);
+ f_center = ((int64_t)k << 26) - (53 << 25);
for (m = 0; m < PS_AP_LINKS; m++) {
theta = (int)(((int64_t)fractional_delay_links[m] * f_center + 0x10000000) >> 27);
More information about the ffmpeg-cvslog
mailing list