mirror of
https://github.com/xiph/opus.git
synced 2025-06-06 15:30:48 +00:00
Avoid using C++ keyword 'new'
Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
This commit is contained in:
parent
f2446c25c6
commit
a32fa319d3
1 changed files with 6 additions and 6 deletions
|
@ -370,7 +370,7 @@ static int transient_analysis(const opus_val32 * OPUS_RESTRICT in, int len, int
|
||||||
|
|
||||||
/* Looks for sudden increases of energy to decide whether we need to patch
|
/* Looks for sudden increases of energy to decide whether we need to patch
|
||||||
the transient decision */
|
the transient decision */
|
||||||
int patch_transient_decision(opus_val16 *new, opus_val16 *old, int nbEBands,
|
int patch_transient_decision(opus_val16 *newE, opus_val16 *oldE, int nbEBands,
|
||||||
int end, int C)
|
int end, int C)
|
||||||
{
|
{
|
||||||
int i, c;
|
int i, c;
|
||||||
|
@ -380,14 +380,14 @@ int patch_transient_decision(opus_val16 *new, opus_val16 *old, int nbEBands,
|
||||||
avoid false detection caused by irrelevant bands */
|
avoid false detection caused by irrelevant bands */
|
||||||
if (C==1)
|
if (C==1)
|
||||||
{
|
{
|
||||||
spread_old[0] = old[0];
|
spread_old[0] = oldE[0];
|
||||||
for (i=1;i<end;i++)
|
for (i=1;i<end;i++)
|
||||||
spread_old[i] = MAX16(spread_old[i-1]-QCONST16(1.0f, DB_SHIFT), old[i]);
|
spread_old[i] = MAX16(spread_old[i-1]-QCONST16(1.0f, DB_SHIFT), oldE[i]);
|
||||||
} else {
|
} else {
|
||||||
spread_old[0] = MAX16(old[0],old[nbEBands]);
|
spread_old[0] = MAX16(oldE[0],oldE[nbEBands]);
|
||||||
for (i=1;i<end;i++)
|
for (i=1;i<end;i++)
|
||||||
spread_old[i] = MAX16(spread_old[i-1]-QCONST16(1.0f, DB_SHIFT),
|
spread_old[i] = MAX16(spread_old[i-1]-QCONST16(1.0f, DB_SHIFT),
|
||||||
MAX16(old[i],old[i+nbEBands]));
|
MAX16(oldE[i],oldE[i+nbEBands]));
|
||||||
}
|
}
|
||||||
for (i=end-2;i>=0;i--)
|
for (i=end-2;i>=0;i--)
|
||||||
spread_old[i] = MAX16(spread_old[i], spread_old[i+1]-QCONST16(1.0f, DB_SHIFT));
|
spread_old[i] = MAX16(spread_old[i], spread_old[i+1]-QCONST16(1.0f, DB_SHIFT));
|
||||||
|
@ -396,7 +396,7 @@ int patch_transient_decision(opus_val16 *new, opus_val16 *old, int nbEBands,
|
||||||
for (i=2;i<end-1;i++)
|
for (i=2;i<end-1;i++)
|
||||||
{
|
{
|
||||||
opus_val16 x1, x2;
|
opus_val16 x1, x2;
|
||||||
x1 = MAX16(0, new[i]);
|
x1 = MAX16(0, newE[i]);
|
||||||
x2 = MAX16(0, spread_old[i]);
|
x2 = MAX16(0, spread_old[i]);
|
||||||
mean_diff = ADD32(mean_diff, EXTEND32(MAX16(0, SUB16(x1, x2))));
|
mean_diff = ADD32(mean_diff, EXTEND32(MAX16(0, SUB16(x1, x2))));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue