tkhd should parse track height and width as fixed point numbers
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
Research direction
Start in mp4parse/src/lib.rs around the tkhd parser at line 1098, then compare the C API handling at mp4parse_capi/src/lib.rs:725 and the MPEG4 specification. Determine how the fixed-point width and height should be represented and parsed; done means the values are no longer off by a factor of 65536 without relying on unsupported assumptions about the fixed crate.
Written by the indexing model from the issue text.
Description
the tkhd parser currently parses the width and height fields of a track as u32.
According to the MPEG4 spec, these fields are fixed-points.
This leads to the parsed values being off by a factor of 65536.
It looks like this is handled in the C API by shifting the number right 16 bits
Unfortunately, Rust doesn't provide built-in fixed-point support but it looks like a couple of crates implement it (see fixed), but this would require adding a dependency. I'm also not sure if that crate provides an interface for parsing fixed-point numbers from binary.
- Dominant language
- Rust
- Stars
- 448
- Forks
- 72
- Avg merge
- 20d 3h
- Merged PRs (30d)
- 1
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from mozilla/mp4parse-rust
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
mozilla/mp4parse-rust#444 · 5 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
mozilla/mp4parse-rust#441 ·
-
senc box Open
Difficulty 5/5 Over a week Newbie friendliness 15/100
mozilla/mp4parse-rust#415 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 28/100
mozilla/mp4parse-rust#414 · 4 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 35/100
mozilla/mp4parse-rust#412 · 2 comments ·
All issues in mozilla/mp4parse-rust
Similar issues
-
bug CLI custom-model
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
rust-bitcoin/rust-bitcoin#6930 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
fulcrumgenomics/ferro-hgvs#2251 ·
-
A-allocators A-docs C-enhancement T-libs
Difficulty 2/5 1-3 hours Newbie friendliness 75/100