Recognize YCbCr/Chomra subsampling tags

In particular we avoid mistaking the absence of this tag for an absence
of subsampling. The specification instead requires it to mean half the
samples in both directions—a mode that we do not support yet. Instead of
returning erroneous samples or an error in the data stream (which would
appear too short) we return an error when asked to layout the read
buffer for these images.
This commit is contained in:
A. Molzer committed 2026-01-05 21:14:40 +01:00
1 parent d38fba4268
commit 23d1867f75
4 files changed
+40

No files matched your search

+1
View File
@@ -860,6 +860,7 @@ impl<R: Read + Seek> Decoder<R> {
tile_attributes: None,
chunk_offsets: Vec::new(),
chunk_bytes: Vec::new(),
chroma_subsampling: (2, 2),
},
};
decoder.next_image()?;