On Sun, Dec 13, 2015 at 10:51:31PM +0100, Andreas Cadhalpun wrote: > nlsf can be negative, but a negative index for silk_cosine doesn't work. > --- > libavcodec/opus_silk.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libavcodec/opus_silk.c b/libavcodec/opus_silk.c > index 841d1ed..3ac83b8 100644 > --- a/libavcodec/opus_silk.c > +++ b/libavcodec/opus_silk.c > @@ -941,7 +941,7 @@ static void silk_lsf2lpc(const int16_t nlsf[16], float > lpcf[16], int order) > > /* convert the LSFs to LSPs, i.e. 2*cos(LSF) */ > for (k = 0; k < order; k++) { > - int index = nlsf[k] >> 8; > + int index = FFABS(nlsf[k]) >> 8; > int offset = nlsf[k] & 255;
this looks a bit strange if nlsf[] is allowed to be negative then i would have expected that both nlsf[] would use the absolute value or if its nt allowed to be negative then why is it ? does the spec explain what should be done in this case ? if not, its authors may want to amend it to clarify if this is invalid or undefined or something specific should be done [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB There will always be a question for which you do not know the correct answer.
signature.asc
Description: Digital signature
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel