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

IETF test cases - 3 of 64 FAIL (61 of 64 PASS) in flac.TestDecode #54

Closed
3 tasks
mewmew opened this issue Oct 4, 2022 · 6 comments
Closed
3 tasks

IETF test cases - 3 of 64 FAIL (61 of 64 PASS) in flac.TestDecode #54

mewmew opened this issue Oct 4, 2022 · 6 comments

Comments

@mewmew
Copy link
Member

mewmew commented Oct 4, 2022

The IETF flac-test-files repository contains 64 FLAC files, published by @ktmf01, which help exercise corner cases of the FLAC decoder.

When adding these test cases to the test suite, 3 of 64 FLAC files resulted in decoding failures, namely:

    --- FAIL: TestDecode/parse/testdata/flac-test-files/subset/16_-_partition_order_8_containing_escaped_partitions.flac (0.00s)
    --- FAIL: TestDecode/parse/testdata/flac-test-files/subset/32_-_high_resolution_audio,_partition_order_8_containing_escaped_partitions.flac (0.00s)
    --- FAIL: TestDecode/parse/testdata/flac-test-files/subset/64_-_rice_partitions_with_escape_code_zero.flac (0.00s)

This issue tracks the resolution of the identified decoding issues.

  • 16_-_partition_order_8_containing_escaped_partitions.flac
  • 32_-_high_resolution_audio,_partition_order_8_containing_escaped_partitions.flac
  • 64_-_rice_partitions_with_escape_code_zero.flac

Further tests will be run to also exercise e.g. metadata decoding and decoding of all audio samples.

@mewmew
Copy link
Member Author

mewmew commented Oct 4, 2022

We will also be able to remove a lot of "please send us test cases" debug messages, as the IETF test suite contained a lot of the test cases we were hoping to add coverage for!

"The flac library test cases do not yet include any audio files with ... If possible please consider contributing this audio sample to improve the reliability of the test cases."

from frame.Frame.parseHeader:

  • "12 bits-per-sample"
  • "20 bits-per-sample"
  • "block size 192"
  • "sample rate 39000"
  • "sample rate 134560"
  • "sample rate 192000"
  • "sample rate 384000"

from frame.Subframe.decodeRicePart:

  • "Rice parameter escape codes"

@mewmew
Copy link
Member Author

mewmew commented Oct 4, 2022

The test cases also seem to trigger an issue in frame.Subframe.decodeLPC:

  • "subframe sample count mismatch; expected 4096, got 192"
  • "subframe sample count mismatch; expected 4096, got 1024"
  • "subframe sample count mismatch; expected 4096, got 1664"

@mewmew
Copy link
Member Author

mewmew commented Oct 4, 2022

The ietf-test-cases branch contains the IETF FLAC test cases.

@karlek
Copy link
Contributor

karlek commented Oct 4, 2022

// TODO(u): Verify that decoding of subframes with Rice parameter escape

I have reviewed this code, which seems to be responsible for subframe sample count mismatch [..]. However, after cross-referencing it with the documentation from xiph, there's no obvious error.

Will check again later too see if I missed anything.

@wader
Copy link

wader commented Oct 4, 2022

Hi, fq had a similar issue wader/fq#379 that @ktmf01 fixed where it read escaped samples unsigned when they should be signed. If i understand the code around:

sample, err := br.Read(n)
it seems to have the same issue?

@mewmew
Copy link
Member Author

mewmew commented Oct 24, 2023

Fixed by @MarkKremer in #59.

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

No branches or pull requests

3 participants