Apple proraw DNG support
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 379
- Forks
- 75
- PR merge metrics
- No merged PRs in 30d
Description
Hi I would like to make a pull request for iphone pro raw DNG support (which is 3-component ljpeg, using predictor 7).
I have already implemented the decoding, very simple, but the design is not finalised. I see a few ways to proceed:
- Add a separate function like "proraw_decode" to
decompressors.rs, just for decoding 3-component predictor 7 data.- Bad: It will be 80% identical to decode_ljpeg_3components.
- Good: Specialising the implementation to proraw will help performance. As proraw is 12 bit, it is possible to do the predictor calculation within u16. But a more general implementation would need to convert to u32 which I guess would be slower (because 16 bit files might exist somewhere??).
- Same as first option, but a more general implementation (including u32 conversion).
- Write a whole set of general predictor 7 functions equivalent to the existing
decode_ljpeg_(1|2|3|4)components - Make predictor be a parameter of
decode_ljpeg_(1|2|3|4)components, this will be slower. - Combine
decode_ljpeg_(1|2|3|4)componentsin to one generic function - likefn decode_ljpeg<const N: usize>(...), where component number is a compile time parameter. and then have separate functions for each predictor:
-fn decode_ljpeg_predictor_1<const N: usize>(...)
-fn decode_ljpeg_predictor_7<const N: usize>(...)
This will generate separate code paths for different component counts, so should not lose performance compared to the current duplicate implementations (will need testing of course) all while reducing repetition. This option would require upgrading to rust 2021 for const generics though.
Please let me know what would be best as a pull request!
Also, the data seems to be BGR not RGB, but I guess that can be considered later Nevermind, that was an issue with how I was saving test files. The data is indeed RGB.
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.
Research direction
Start in decompressors.rs by reviewing decode_ljpeg_(1|2|3|4)components and the proposed predictor 7 implementation. Compare the design options, including const generics and Rust 2021 requirements, before choosing an approach. Done means an agreed design decodes three-component, 12-bit ProRAW DNG data correctly without regressing existing JPEG decoding.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- computer-graphics
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100