feat(jpegenc): honor the encode restart interval

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Adrià FranchandClaude committed 2026-10-06 14:16:07 +02:00
1 parent 5895ea721a
commit 263cb6626c
6 files changed
+99 -5

No files matched your search

+3
View File
@@ -100,6 +100,9 @@ int main() {
Require(ReadFrame(highQuality).components == 3 && ReadFrame(highQuality).sampling == factor);
}
Require(ThrowsInvalidArgument([&] { Decoder::Jpeg::Encode(rgb, width, height, 3, 90, static_cast<Decoder::Jpeg::Sampling>(3)); }));
Require(ThrowsInvalidArgument([&] { Decoder::Jpeg::Encode(rgb, width, height, 3, 90, Decoder::Jpeg::Sampling::Yuv444, 1, 1); }));
Require(ThrowsInvalidArgument([&] { Decoder::Jpeg::Encode(rgb, width, height, 3, 90, Decoder::Jpeg::Sampling::Yuv444, 0x10000, 0); }));
Require(ThrowsInvalidArgument([&] { Decoder::Jpeg::Encode(rgb, width, height, 3, 90, Decoder::Jpeg::Sampling::Yuv444, 0, 0x10000); }));
Require(!Decoder::Jpeg::Decode({}).has_value());
const std::vector<std::uint8_t> garbage{1, 2, 3, 4, 5, 6, 7, 8};