aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Kasten <gkasten@google.com>2016-04-20 19:00:06 +0000
committerandroid-build-merger <android-build-merger@google.com>2016-04-20 19:00:06 +0000
commit2b2e97b893b16b69c7728d16e8653b9c94944294 (patch)
tree7715a5cb4422e8ada7adf09de2f9443db1217dce
parentad1e8985d954c289b1c5c0683ac92d5ec08c5e0d (diff)
parent6ae54806ab88efd76e884447680fd30b340936fd (diff)
downloadfdk-aac-2b2e97b893b16b69c7728d16e8653b9c94944294.tar.gz
fdk-aac-2b2e97b893b16b69c7728d16e8653b9c94944294.tar.bz2
fdk-aac-2b2e97b893b16b69c7728d16e8653b9c94944294.zip
Merge "Left shift of negative int is undefined"
am: 6ae5480 * commit '6ae54806ab88efd76e884447680fd30b340936fd': Left shift of negative int is undefined Change-Id: If6a4abe686d3ab6b7f825058255b03aa46055484
-rw-r--r--libAACenc/src/metadata_compressor.cpp50
1 files changed, 25 insertions, 25 deletions
diff --git a/libAACenc/src/metadata_compressor.cpp b/libAACenc/src/metadata_compressor.cpp
index 876de57..68a64ae 100644
--- a/libAACenc/src/metadata_compressor.cpp
+++ b/libAACenc/src/metadata_compressor.cpp
@@ -193,36 +193,36 @@ struct DRC_COMP {
* Profile tables.
*/
static const FIXP_DBL tabMaxBoostThr[] = {
- (FIXP_DBL)(-43<<METADATA_FRACT_BITS),
- (FIXP_DBL)(-53<<METADATA_FRACT_BITS),
- (FIXP_DBL)(-55<<METADATA_FRACT_BITS),
- (FIXP_DBL)(-65<<METADATA_FRACT_BITS),
- (FIXP_DBL)(-50<<METADATA_FRACT_BITS),
- (FIXP_DBL)(-40<<METADATA_FRACT_BITS)
+ (FIXP_DBL)(int)((unsigned)-43<<METADATA_FRACT_BITS),
+ (FIXP_DBL)(int)((unsigned)-53<<METADATA_FRACT_BITS),
+ (FIXP_DBL)(int)((unsigned)-55<<METADATA_FRACT_BITS),
+ (FIXP_DBL)(int)((unsigned)-65<<METADATA_FRACT_BITS),
+ (FIXP_DBL)(int)((unsigned)-50<<METADATA_FRACT_BITS),
+ (FIXP_DBL)(int)((unsigned)-40<<METADATA_FRACT_BITS)
};
static const FIXP_DBL tabBoostThr[] = {
- (FIXP_DBL)(-31<<METADATA_FRACT_BITS),
- (FIXP_DBL)(-41<<METADATA_FRACT_BITS),
- (FIXP_DBL)(-31<<METADATA_FRACT_BITS),
- (FIXP_DBL)(-41<<METADATA_FRACT_BITS),
- (FIXP_DBL)(-31<<METADATA_FRACT_BITS),
- (FIXP_DBL)(-31<<METADATA_FRACT_BITS)
+ (FIXP_DBL)(int)((unsigned)-31<<METADATA_FRACT_BITS),
+ (FIXP_DBL)(int)((unsigned)-41<<METADATA_FRACT_BITS),
+ (FIXP_DBL)(int)((unsigned)-31<<METADATA_FRACT_BITS),
+ (FIXP_DBL)(int)((unsigned)-41<<METADATA_FRACT_BITS),
+ (FIXP_DBL)(int)((unsigned)-31<<METADATA_FRACT_BITS),
+ (FIXP_DBL)(int)((unsigned)-31<<METADATA_FRACT_BITS)
};
static const FIXP_DBL tabEarlyCutThr[] = {
- (FIXP_DBL)(-26<<METADATA_FRACT_BITS),
- (FIXP_DBL)(-21<<METADATA_FRACT_BITS),
- (FIXP_DBL)(-26<<METADATA_FRACT_BITS),
- (FIXP_DBL)(-21<<METADATA_FRACT_BITS),
- (FIXP_DBL)(-26<<METADATA_FRACT_BITS),
- (FIXP_DBL)(-20<<METADATA_FRACT_BITS)
+ (FIXP_DBL)(int)((unsigned)-26<<METADATA_FRACT_BITS),
+ (FIXP_DBL)(int)((unsigned)-21<<METADATA_FRACT_BITS),
+ (FIXP_DBL)(int)((unsigned)-26<<METADATA_FRACT_BITS),
+ (FIXP_DBL)(int)((unsigned)-21<<METADATA_FRACT_BITS),
+ (FIXP_DBL)(int)((unsigned)-26<<METADATA_FRACT_BITS),
+ (FIXP_DBL)(int)((unsigned)-20<<METADATA_FRACT_BITS)
};
static const FIXP_DBL tabCutThr[] = {
- (FIXP_DBL)(-16<<METADATA_FRACT_BITS),
- (FIXP_DBL)(-11<<METADATA_FRACT_BITS),
- (FIXP_DBL)(-16<<METADATA_FRACT_BITS),
- (FIXP_DBL)(-21<<METADATA_FRACT_BITS),
- (FIXP_DBL)(-16<<METADATA_FRACT_BITS),
- (FIXP_DBL)(-10<<METADATA_FRACT_BITS)
+ (FIXP_DBL)(int)((unsigned)-16<<METADATA_FRACT_BITS),
+ (FIXP_DBL)(int)((unsigned)-11<<METADATA_FRACT_BITS),
+ (FIXP_DBL)(int)((unsigned)-16<<METADATA_FRACT_BITS),
+ (FIXP_DBL)(int)((unsigned)-21<<METADATA_FRACT_BITS),
+ (FIXP_DBL)(int)((unsigned)-16<<METADATA_FRACT_BITS),
+ (FIXP_DBL)(int)((unsigned)-10<<METADATA_FRACT_BITS)
};
static const FIXP_DBL tabMaxCutThr[] = {
(FIXP_DBL)(4<<METADATA_FRACT_BITS),
@@ -576,7 +576,7 @@ INT FDK_DRC_Generator_Initialize(
drcComp->channels = channelMapping.nChannels;
/* Init states. */
- drcComp->smoothLevel[0] = drcComp->smoothLevel[1] = (FIXP_DBL)(-135<<METADATA_FRACT_BITS);
+ drcComp->smoothLevel[0] = drcComp->smoothLevel[1] = (FIXP_DBL)(int)((unsigned)-135<<METADATA_FRACT_BITS);
FDKmemclear(drcComp->smoothGain, sizeof(drcComp->smoothGain));
FDKmemclear(drcComp->holdCnt, sizeof(drcComp->holdCnt));