Files
RetroArch/.github
LibretroAdmin a1b7f2204a rflac: 16-bit output rounded to the nearest step, not cut down
A FLAC stream wider than 16 bits was taken to 16 bits by shifting its
left-justified samples right by 16, which rounds down: every sample of
a 24-bit stream came out half a step low on average. Every 16-bit
output path (independent, left/side, side/right and mid/side stereo,
the 33-bit side channel of 32-bit streams, mono and more channels;
scalar, SSE2 and NEON) now rounds to the nearest step, halves up, and
clamps the top. A stream of 16 bits or fewer is unchanged, and the
decode is no slower (60 s of 24-bit stereo: 19.2 ms before, 19.1 ms
after, best of 15).

The 33-bit side channel's reconstruction shifted negative int64 values
left, which is undefined and which UBSan reports on the new fixtures;
those shifts go through uint64_t.

New sample formats/rflac: rflac_s16_test decodes FLAC streams of 16,
24 and 32 bits (stereo fixtures holding all four channel codings,
mono, six channels) and checks every sample against the PCM they were
made from, rebuilt from the same integer formulas as mkfixtures.py
(flac and metaflac made them). It is built with the target's SIMD and
again with RFLAC_NO_SIMD; the NEON loops were run under qemu-aarch64.
It fails before this change.
2026-11-12 21:10:28 +01:00
..
2025-01-16 20:00:16 +01:00
2020-03-14 02:53:46 +01:00