Minor tuning the WB/SWB and SWB/FB thresholds
authorJean-Marc Valin <jean-marc.valin@usherbrooke.ca>
Thu, 5 May 2011 01:01:20 +0000 (21:01 -0400)
committerJean-Marc Valin <jean-marc.valin@usherbrooke.ca>
Thu, 5 May 2011 01:01:20 +0000 (21:01 -0400)
src/opus_encoder.c

index 8d4d0e4..a8ea8c8 100644 (file)
@@ -178,9 +178,9 @@ int opus_encode(OpusEncoder *st, const short *pcm, int frame_size,
                st->bandwidth = BANDWIDTH_NARROWBAND;
     } else if (st->first || st->silk_mode.allowBandwidthSwitch)
     {
-       if (mono_rate>30000 || (mono_rate>26000 && st->bandwidth==BANDWIDTH_FULLBAND))
+       if (mono_rate>31000 || (mono_rate>27000 && st->bandwidth==BANDWIDTH_FULLBAND))
                st->bandwidth = BANDWIDTH_FULLBAND;
-       else if (mono_rate>22000 || (mono_rate>18000 && st->bandwidth>=BANDWIDTH_SUPERWIDEBAND))
+       else if (mono_rate>23000 || (mono_rate>19000 && st->bandwidth>=BANDWIDTH_SUPERWIDEBAND))
                st->bandwidth = BANDWIDTH_SUPERWIDEBAND;
        else if (mono_rate>16000 || (mono_rate>13000 && st->bandwidth>=BANDWIDTH_WIDEBAND))
                st->bandwidth = BANDWIDTH_WIDEBAND;