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
This commit is contained in:
James Zern 2022-11-21 10:51:14 -08:00
parent 786497e48a
commit f853685e13
5 changed files with 5 additions and 5 deletions

View File

@ -217,7 +217,7 @@ type. There are four types of transforms.
enum TransformType { enum TransformType {
PREDICTOR_TRANSFORM = 0, PREDICTOR_TRANSFORM = 0,
COLOR_TRANSFORM = 1, COLOR_TRANSFORM = 1,
SUBTRACT_GREEN = 2, SUBTRACT_GREEN_TRANSFORM = 2,
COLOR_INDEXING_TRANSFORM = 3, COLOR_INDEXING_TRANSFORM = 3,
}; };
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

View File

@ -1336,7 +1336,7 @@ static int ReadTransform(int* const xsize, int const* ysize,
ok = ok && ExpandColorMap(num_colors, transform); ok = ok && ExpandColorMap(num_colors, transform);
break; break;
} }
case SUBTRACT_GREEN: case SUBTRACT_GREEN_TRANSFORM:
break; break;
default: default:
assert(0); // can't happen assert(0); // can't happen

View File

@ -395,7 +395,7 @@ void VP8LInverseTransform(const VP8LTransform* const transform,
assert(row_start < row_end); assert(row_start < row_end);
assert(row_end <= transform->ysize_); assert(row_end <= transform->ysize_);
switch (transform->type_) { switch (transform->type_) {
case SUBTRACT_GREEN: case SUBTRACT_GREEN_TRANSFORM:
VP8LAddGreenToBlueAndRed(in, (row_end - row_start) * width, out); VP8LAddGreenToBlueAndRed(in, (row_end - row_start) * width, out);
break; break;
case PREDICTOR_TRANSFORM: case PREDICTOR_TRANSFORM:

View File

@ -1355,7 +1355,7 @@ static int EncodeImageInternal(
static void ApplySubtractGreen(VP8LEncoder* const enc, int width, int height, static void ApplySubtractGreen(VP8LEncoder* const enc, int width, int height,
VP8LBitWriter* const bw) { VP8LBitWriter* const bw) {
VP8LPutBits(bw, TRANSFORM_PRESENT, 1); VP8LPutBits(bw, TRANSFORM_PRESENT, 1);
VP8LPutBits(bw, SUBTRACT_GREEN, 2); VP8LPutBits(bw, SUBTRACT_GREEN_TRANSFORM, 2);
VP8LSubtractGreenFromBlueAndRed(enc->argb_, width * height); VP8LSubtractGreenFromBlueAndRed(enc->argb_, width * height);
} }

View File

@ -55,7 +55,7 @@
typedef enum { typedef enum {
PREDICTOR_TRANSFORM = 0, PREDICTOR_TRANSFORM = 0,
CROSS_COLOR_TRANSFORM = 1, CROSS_COLOR_TRANSFORM = 1,
SUBTRACT_GREEN = 2, SUBTRACT_GREEN_TRANSFORM = 2,
COLOR_INDEXING_TRANSFORM = 3 COLOR_INDEXING_TRANSFORM = 3
} VP8LImageTransformType; } VP8LImageTransformType;