Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MP3: Mismatch with max delta from 0.001 to 0.92 #72

Closed
Shnatsel opened this issue Nov 26, 2021 · 2 comments
Closed

MP3: Mismatch with max delta from 0.001 to 0.92 #72

Shnatsel opened this issue Nov 26, 2021 · 2 comments
Milestone

Comments

@Shnatsel
Copy link
Contributor

These files exhibit mismatches compared to ffmpeg ranging from 0.001 to 0.92.

Some of them are probably just misaligned, but hopefully there are some valuable samples in there.

Tested on commit 0b67a2d

@pdeljanov pdeljanov added this to the v0.5 milestone Nov 27, 2021
pdeljanov added a commit that referenced this issue Dec 4, 2021
By consuming the bits from the bit resevoir, a frame can no longer
erroneously reference data that was actually part of a previous
frame. This scenario will now trigger an underflow causing one or
more granules to be skipped (decoded as silence).

Addresses #72.
pdeljanov added a commit that referenced this issue Dec 4, 2021
@pdeljanov
Copy link
Owner

These were a mixed bag.

A couple files had malformed bitstreams that produced audible artifacts when decoded. I've adjusted the decoder to handle these bitstreams better and the artifacts are now fixed. However, the rest of the files still contain mismatches.

Of the remaining files, a couple are due to what I've tracked down and believe to be actual errors in ffmpeg.

Finally, there are a few more files where Symphonia has identical output to mpg123 and libmad, but where ffmpeg decodes a few packets differently. I spent a lot of time this week on tracking down where this difference could come from but have largely turned up empty. My guess is that one of the optimizations ffmpeg uses is being triggered incorrectly and causing some subtle glitches. I can't say that's conclusively the case, but it doesn't seem worth it to continue investigating these any further since ffmpeg seems to be the odd one out.

@Shnatsel
Copy link
Contributor Author

Shnatsel commented Dec 4, 2021

Thanks a lot for looking into these!

I'll use the new version to run the comparison on a larger corpus. On my system mpg123 is provided by mpg321 and it has its own 2.0 delta mismatches against Symphonia that don't show up on ffmpeg, so I suppose I'll stick to ffmpeg for now. I suggest simply ignoring ffmpeg if it's being the odd one out - otherwise we'd spend way too much time investigating inaudible ffmpeg glitches instead of doing high-yield work on Symphonia.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants