ref: 3421f6d2baebd064ed42d7ee5814b511be11c105
parent: 9f3883a955d8d7a7110aa1b5973b041f5374b76a
author: Mark Harris <[email protected]>
date: Sat Aug 27 03:03:02 EDT 2016
Correct analysis downmix scaling factor Divide by the actual number of channels mixed
--- a/src/opus_encoder.c
+++ b/src/opus_encoder.c
@@ -811,9 +811,9 @@
#else
scale = 1.f;
#endif
- if (C==-2)
+ if (c2==-2)
scale /= C;
- else
+ else if (c2>-1)
scale /= 2;
for (j=0;j<subframe;j++)
sub[j] *= scale;
@@ -846,9 +846,9 @@
#else
scale = 1.f/32768;
#endif
- if (C==-2)
+ if (c2==-2)
scale /= C;
- else
+ else if (c2>-1)
scale /= 2;
for (j=0;j<subframe;j++)
sub[j] *= scale;