Skip to content

Commit

Permalink
lossless: SUBTRACT_GREEN -> SUBTRACT_GREEN_TRANSFORM
Browse files Browse the repository at this point in the history
this makes the name of the TransformType enum value match the other
members

Bug: webp:448
Change-Id: I85b2f615f97b40fc6d544197cccfb7189dcf4fc0
  • Loading branch information
jzern committed Nov 22, 2022
1 parent 786497e commit f853685
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion doc/webp-lossless-bitstream-spec.txt
Expand Up @@ -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,
};
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down
2 changes: 1 addition & 1 deletion src/dec/vp8l_dec.c
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/dsp/lossless.c
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion src/enc/vp8l_enc.c
Expand Up @@ -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);
}

Expand Down
2 changes: 1 addition & 1 deletion src/webp/format_constants.h
Expand Up @@ -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;

Expand Down

0 comments on commit f853685

Please sign in to comment.