-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix an issue in the float32_unpack routine
There has been a bug that led lewton to wrongly decode singlemap-test.ogg as well as audio_simple_with_error.ogg. I tracked it down by printing out intermediary values for lewton as well as for stb_vorbis and comparing them. First, I saw that there was a mismatch in the pre imdct values. Then, I tracked it down to a mismatch in the residue values. After that, I found out that the codebook values were wrong. And then, I saw that the settings for codebook_minimum_value and codebook_delta_value have been parsed wrongly by lewton, which caused all the other mismatches. This wrong parsing has been caused by a bug in the behaviour of the float conversion routine float32_unpack. The deployed fix was to replace the overengineered and overoptimized bit twiddling implementation by a more straight forward, spec following one. Performance impact wasn't measured, but the code is super cold: It's called only during header setup and even there only twice per codebook. In singlemap-test.ogg, it was called a few dozen times or such. Fixes #24, and also addresses parts of #26.
- Loading branch information
Showing
2 changed files
with
68 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters