Skip to content

Add support for 16+ bits YUV files (up to 32-bit) - #677

Closed
for13to1 wants to merge 1 commit into
IENT:developfrom
for13to1:feat/16-to-32-bit-yuv
Closed

Add support for 16+ bits YUV files (up to 32-bit)#677
for13to1 wants to merge 1 commit into
IENT:developfrom
for13to1:feat/16-to-32-bit-yuv

Conversation

@for13to1

Copy link
Copy Markdown
Contributor
  • Extend BitDepthList to support 8-32 bit depth
  • Add get_min_standard_bytes() for correct bytes-per-sample calculation
  • Fix type overflows by upgrading to int64_t
  • Fix setFormatFromCorrelation loop to test 24/32-bit formats
  • Use bytesPerSample consistently instead of hardcoded (bps > 8) checks

- Extend BitDepthList to support 8-32 bit depth
- Add get_min_standard_bytes() for correct bytes-per-sample calculation
- Fix type overflows by upgrading to int64_t
- Fix setFormatFromCorrelation loop to test 24/32-bit formats
- Use bytesPerSample consistently instead of hardcoded (bps > 8) checks
@ChristianFeldmann

Copy link
Copy Markdown
Member

This is quite a big change in the whole app and I doubt that it would be done with this PR. Additionally, this is not attached to a new feature request. I currently do not see any application for this. I have never encountered YUV files with >16 bit. Have you encountered any? If yes, could you please provide a use-case and a sample file?

For now I will close this. Please reopen if there is a use-case.

@for13to1

for13to1 commented Aug 7, 2026

Copy link
Copy Markdown
Contributor Author

This is quite a big change in the whole app and I doubt that it would be done with this PR. Additionally, this is not attached to a new feature request. I currently do not see any application for this. I have never encountered YUV files with >16 bit. Have you encountered any? If yes, could you please provide a use-case and a sample file?

For now I will close this. Please reopen if there is a use-case.

The matter is as follows:

In #576, I mentioned supporting the opening of raw (Bayer or other CFA) by mapping it as YUV400 (they are all mono).
Generally, in actual scenarios, we do not encounter YUV data with too large bit depth.
However, we often encounter Bayer raw data with a bit depth of over 20 bits (HDR).
To be able to open this type of data in this tool, I considered expanding the bit depth of YUV (its theory has always allowed for any bit depth to exist).
Considering practical circumstances, it is also difficult for Bayer raw HDR data to exceed 32 bits, so I am temporarily only considering expanding to 32 bits (data over 16 bits can gernerally be stored in standard 32-bit as well, if no specific data storage design, like v210).

@for13to1

for13to1 commented Aug 7, 2026

Copy link
Copy Markdown
Contributor Author

I tried, but only the repository's maintainer can reopen it. @ChristianFeldmann

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

Successfully merging this pull request may close these issues.

2 participants