LibGfx/WebP: Move TransformType to WebPSharedLossless.h

This commit is contained in:
Nico Weber 2024-05-29 18:24:41 -04:00 committed by Jelle Raaijmakers
parent 804e85265e
commit 633f509eb4
Notes: sideshowbarker 2024-07-17 04:57:23 +09:00
2 changed files with 14 additions and 14 deletions

View file

@ -875,20 +875,6 @@ ErrorOr<NonnullRefPtr<Bitmap>> decode_webp_chunk_VP8L_contents(VP8LHeader const&
// transform = predictor-tx / color-tx / subtract-green-tx
// transform =/ color-indexing-tx
enum TransformType {
// predictor-tx = %b00 predictor-image
PREDICTOR_TRANSFORM = 0,
// color-tx = %b01 color-image
COLOR_TRANSFORM = 1,
// subtract-green-tx = %b10
SUBTRACT_GREEN_TRANSFORM = 2,
// color-indexing-tx = %b11 color-indexing-image
COLOR_INDEXING_TRANSFORM = 3,
};
TransformType transform_type = static_cast<TransformType>(TRY(bit_stream.read_bits(2)));
dbgln_if(WEBP_DEBUG, "transform type {}", (int)transform_type);

View file

@ -66,4 +66,18 @@ enum class ImageKind {
EntropyCoded,
};
enum TransformType {
// predictor-tx = %b00 predictor-image
PREDICTOR_TRANSFORM = 0,
// color-tx = %b01 color-image
COLOR_TRANSFORM = 1,
// subtract-green-tx = %b10
SUBTRACT_GREEN_TRANSFORM = 2,
// color-indexing-tx = %b11 color-indexing-image
COLOR_INDEXING_TRANSFORM = 3,
};
}