[libav-bugs] [Bug 265] smacker audio decode regression

bugzilla-daemon at aruru.libav.org bugzilla-daemon at aruru.libav.org
Fri Mar 30 17:35:43 CEST 2012


--- Comment #6 from Franz Brauße <dev at karlchenofhell.org> 2012-03-30 17:35:43 CEST ---
Appearently av_clip_int16_c() wants to clip a signed integer. "Clipping" a
16-bit value in an int is producing the afore-mentioned garbage:

static av_always_inline av_const int16_t av_clip_int16_c(int a)
    if ((a+0x8000) & ~0xFFFF) return (a>>31) ^ 0x7FFF;
    else                      return a;

a = 0x00008000 -> av_clip_int16(a) = (0 ^ 0x7fff) = 0x7fff -> the "blocks" I've

Maybe a fix is to use
  *samples++ = av_clip_int16((int16_t)pred[0])
although actually I don't understand why the clipping is necessary, because as
far as I can see, these values are generated by calls to get_bits(gb, 8), so
these houldn't be signed integers.

Configure bugmail: https://bugzilla.libav.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.

More information about the libav-bugs mailing list