From f853685e13e441540b260e991a08857da593be4a Mon Sep 17 00:00:00 2001 From: James Zern Date: Mon, 21 Nov 2022 10:51:14 -0800 Subject: [PATCH] lossless: SUBTRACT_GREEN -> SUBTRACT_GREEN_TRANSFORM this makes the name of the TransformType enum value match the other members Bug: webp:448 Change-Id: I85b2f615f97b40fc6d544197cccfb7189dcf4fc0 --- doc/webp-lossless-bitstream-spec.txt | 2 +- src/dec/vp8l_dec.c | 2 +- src/dsp/lossless.c | 2 +- src/enc/vp8l_enc.c | 2 +- src/webp/format_constants.h | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/webp-lossless-bitstream-spec.txt b/doc/webp-lossless-bitstream-spec.txt index 80968029..450bc050 100644 --- a/doc/webp-lossless-bitstream-spec.txt +++ b/doc/webp-lossless-bitstream-spec.txt @@ -217,7 +217,7 @@ type. There are four types of transforms. enum TransformType { PREDICTOR_TRANSFORM = 0, COLOR_TRANSFORM = 1, - SUBTRACT_GREEN = 2, + SUBTRACT_GREEN_TRANSFORM = 2, COLOR_INDEXING_TRANSFORM = 3, }; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/src/dec/vp8l_dec.c b/src/dec/vp8l_dec.c index 13480551..c0ea0181 100644 --- a/src/dec/vp8l_dec.c +++ b/src/dec/vp8l_dec.c @@ -1336,7 +1336,7 @@ static int ReadTransform(int* const xsize, int const* ysize, ok = ok && ExpandColorMap(num_colors, transform); break; } - case SUBTRACT_GREEN: + case SUBTRACT_GREEN_TRANSFORM: break; default: assert(0); // can't happen diff --git a/src/dsp/lossless.c b/src/dsp/lossless.c index 0ed79d1d..fb86e58d 100644 --- a/src/dsp/lossless.c +++ b/src/dsp/lossless.c @@ -395,7 +395,7 @@ void VP8LInverseTransform(const VP8LTransform* const transform, assert(row_start < row_end); assert(row_end <= transform->ysize_); switch (transform->type_) { - case SUBTRACT_GREEN: + case SUBTRACT_GREEN_TRANSFORM: VP8LAddGreenToBlueAndRed(in, (row_end - row_start) * width, out); break; case PREDICTOR_TRANSFORM: diff --git a/src/enc/vp8l_enc.c b/src/enc/vp8l_enc.c index 713adddf..0b07e529 100644 --- a/src/enc/vp8l_enc.c +++ b/src/enc/vp8l_enc.c @@ -1355,7 +1355,7 @@ static int EncodeImageInternal( static void ApplySubtractGreen(VP8LEncoder* const enc, int width, int height, VP8LBitWriter* const bw) { VP8LPutBits(bw, TRANSFORM_PRESENT, 1); - VP8LPutBits(bw, SUBTRACT_GREEN, 2); + VP8LPutBits(bw, SUBTRACT_GREEN_TRANSFORM, 2); VP8LSubtractGreenFromBlueAndRed(enc->argb_, width * height); } diff --git a/src/webp/format_constants.h b/src/webp/format_constants.h index eca6981a..999035c5 100644 --- a/src/webp/format_constants.h +++ b/src/webp/format_constants.h @@ -55,7 +55,7 @@ typedef enum { PREDICTOR_TRANSFORM = 0, CROSS_COLOR_TRANSFORM = 1, - SUBTRACT_GREEN = 2, + SUBTRACT_GREEN_TRANSFORM = 2, COLOR_INDEXING_TRANSFORM = 3 } VP8LImageTransformType;