On Thu, Feb 2, 2012 at 9:58 AM, Ronald S. Bultje <[email protected]> wrote: > Hi, > > On Wed, Feb 1, 2012 at 3:02 PM, Alex Converse <[email protected]> wrote: >> On Wed, Feb 1, 2012 at 2:18 PM, Ronald S. Bultje <[email protected]> wrote: >>> On Wed, Feb 1, 2012 at 1:26 PM, Alex Converse <[email protected]> >>> wrote: >>>> 2012/2/1 Måns Rullgård <[email protected]>: >>>>> "Ronald S. Bultje" <[email protected]> writes: >>>>> >>>>>> Prevent values in floor1[] from wrapping over uint16_t boundaries (in >>>>>> crafted bitstreams, they can go < 0), which causes them to wrap to >>>>>> MAXUINT16, causing huge jumps in the dB LUT indexes. Likewise, clip >>>>>> (rather than wrap) dB LUT indexes, to prevent jumping of indexes at >>>>>> uint8_t wrapping boundaries. >>>>> >>>>> Why does it matter how invalid streams are decoded, as long as it >>>>> doesn't crash or overrun buffers? >>>>> >>>> >>>> Are large floor1 values actually forbidden? I've noticed that in both >>>> Vorbis and AAC a lot of very stupid behavior is legal despite >>>> increased decoder complexity to handle the behavior properly. >>> >>> The vorbis devs say my patch is correct. >> >> That's not what I asked. > > They're not possible (at least not as large as MAXUINT16). The exact > limit isn't implied in the spec, but the libvorbis encoder clips to > 255 or 256, according to people in #vorbis. Other encoders (like ours) > may not do so, so larger values may be used in practice and are > certainly not in conflict with the spec, therefore clipping them at > that level (255 or 256) isn't right in a decoder (since it'd break > prediction of later values). >
OK based on that info, the patch seems reasonable. _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
