Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Mark Harris
Opus
Commits
d5553e8a
Commit
d5553e8a
authored
Dec 10, 2013
by
Jean-Marc Valin
Browse files
Using OPUS_COPY()/OPUS_CLEAR() in the decoder too
parent
15edb78b
Changes
1
Hide whitespace changes
Inline
Side-by-side
celt/celt_decoder.c
View file @
d5553e8a
...
...
@@ -931,8 +931,7 @@ int celt_decode_with_ec(CELTDecoder * OPUS_RESTRICT st, const unsigned char *dat
int
bound
=
M
*
eBands
[
effEnd
];
if
(
st
->
downsample
!=
1
)
bound
=
IMIN
(
bound
,
N
/
st
->
downsample
);
for
(
i
=
bound
;
i
<
N
;
i
++
)
freq
[
c
*
N
+
i
]
=
0
;
OPUS_CLEAR
(
&
freq
[
c
*
N
+
bound
],
N
-
bound
);
}
while
(
++
c
<
C
);
c
=
0
;
do
{
...
...
@@ -940,10 +939,7 @@ int celt_decode_with_ec(CELTDecoder * OPUS_RESTRICT st, const unsigned char *dat
}
while
(
++
c
<
CC
);
if
(
CC
==
2
&&
C
==
1
)
{
for
(
i
=
0
;
i
<
N
;
i
++
)
freq
[
N
+
i
]
=
freq
[
i
];
}
OPUS_COPY
(
freq
+
N
,
freq
,
N
);
if
(
CC
==
1
&&
C
==
2
)
{
for
(
i
=
0
;
i
<
N
;
i
++
)
...
...
@@ -978,18 +974,14 @@ int celt_decode_with_ec(CELTDecoder * OPUS_RESTRICT st, const unsigned char *dat
st
->
postfilter_tapset_old
=
st
->
postfilter_tapset
;
}
if
(
C
==
1
)
{
for
(
i
=
0
;
i
<
nbEBands
;
i
++
)
oldBandE
[
nbEBands
+
i
]
=
oldBandE
[
i
];
}
if
(
C
==
1
)
OPUS_COPY
(
&
oldBandE
[
nbEBands
],
oldBandE
,
nbEBands
);
/* In case start or end were to change */
if
(
!
isTransient
)
{
for
(
i
=
0
;
i
<
2
*
nbEBands
;
i
++
)
oldLogE2
[
i
]
=
oldLogE
[
i
];
for
(
i
=
0
;
i
<
2
*
nbEBands
;
i
++
)
oldLogE
[
i
]
=
oldBandE
[
i
];
OPUS_COPY
(
oldLogE2
,
oldLogE
,
2
*
nbEBands
);
OPUS_COPY
(
oldLogE
,
oldBandE
,
2
*
nbEBands
);
for
(
i
=
0
;
i
<
2
*
nbEBands
;
i
++
)
backgroundLogE
[
i
]
=
MIN16
(
backgroundLogE
[
i
]
+
M
*
QCONST16
(
0
.
001
f
,
DB_SHIFT
),
oldBandE
[
i
]);
}
else
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment