correct alpha_dithering_strength ABI check
the ABI wasn't bumped with this addition, but it's more correct to say it was added with 0x0205 rather than 0x0204 Change-Id: I2ba12a33b612fac16bdfeb8272e76b0ea84f3938
This commit is contained in:
parent
6c83157524
commit
57a7e73d27
@ -557,7 +557,7 @@ static void Help(void) {
|
||||
" -nofilter .... disable in-loop filtering\n"
|
||||
" -nodither .... disable dithering\n"
|
||||
" -dither <d> .. dithering strength (in 0..100)\n"
|
||||
#if WEBP_DECODER_ABI_VERSION > 0x0203
|
||||
#if WEBP_DECODER_ABI_VERSION > 0x0204
|
||||
" -alpha_dither use alpha-plane dithering if needed\n"
|
||||
#endif
|
||||
" -mt .......... use multi-threading\n"
|
||||
@ -628,7 +628,7 @@ int main(int argc, const char *argv[]) {
|
||||
format = YUV;
|
||||
} else if (!strcmp(argv[c], "-mt")) {
|
||||
config.options.use_threads = 1;
|
||||
#if WEBP_DECODER_ABI_VERSION > 0x0203
|
||||
#if WEBP_DECODER_ABI_VERSION > 0x0204
|
||||
} else if (!strcmp(argv[c], "-alpha_dither")) {
|
||||
config.options.alpha_dithering_strength = 100;
|
||||
#endif
|
||||
|
@ -377,7 +377,7 @@ static void Help(void) {
|
||||
" -nofancy ..... don't use the fancy YUV420 upscaler\n"
|
||||
" -nofilter .... disable in-loop filtering\n"
|
||||
" -dither <int> dithering strength (0..100), default=50\n"
|
||||
#if WEBP_DECODER_ABI_VERSION > 0x0203
|
||||
#if WEBP_DECODER_ABI_VERSION > 0x0204
|
||||
" -noalphadither disable alpha plane dithering\n"
|
||||
#endif
|
||||
" -mt .......... use multi-threading\n"
|
||||
@ -402,7 +402,7 @@ int main(int argc, char *argv[]) {
|
||||
return -1;
|
||||
}
|
||||
config->options.dithering_strength = 50;
|
||||
#if WEBP_DECODER_ABI_VERSION > 0x0203
|
||||
#if WEBP_DECODER_ABI_VERSION > 0x0204
|
||||
config->options.alpha_dithering_strength = 100;
|
||||
#endif
|
||||
kParams.use_color_profile = 1;
|
||||
@ -417,7 +417,7 @@ int main(int argc, char *argv[]) {
|
||||
config->options.no_fancy_upsampling = 1;
|
||||
} else if (!strcmp(argv[c], "-nofilter")) {
|
||||
config->options.bypass_filtering = 1;
|
||||
#if WEBP_DECODER_ABI_VERSION > 0x0203
|
||||
#if WEBP_DECODER_ABI_VERSION > 0x0204
|
||||
} else if (!strcmp(argv[c], "-noalphadither")) {
|
||||
config->options.alpha_dithering_strength = 0;
|
||||
#endif
|
||||
|
@ -177,7 +177,7 @@ void VP8InitDithering(const WebPDecoderOptions* const options,
|
||||
dec->dither_ = 1;
|
||||
}
|
||||
}
|
||||
#if WEBP_DECODER_ABI_VERSION > 0x0203
|
||||
#if WEBP_DECODER_ABI_VERSION > 0x0204
|
||||
// potentially allow alpha dithering
|
||||
dec->alpha_dithering_ = options->alpha_dithering_strength;
|
||||
if (dec->alpha_dithering_ > 100) {
|
||||
|
@ -444,16 +444,20 @@ struct WebPDecoderOptions {
|
||||
int dithering_strength; // dithering strength (0=Off, 100=full)
|
||||
#if WEBP_DECODER_ABI_VERSION > 0x0203
|
||||
int flip; // flip output vertically
|
||||
#endif
|
||||
#if WEBP_DECODER_ABI_VERSION > 0x0204
|
||||
int alpha_dithering_strength; // alpha dithering strength in [0..100]
|
||||
#endif
|
||||
|
||||
// Unused for now:
|
||||
int force_rotation; // forced rotation (to be applied _last_)
|
||||
int no_enhancement; // if true, discard enhancement layer
|
||||
#if WEBP_DECODER_ABI_VERSION > 0x0203
|
||||
uint32_t pad[3]; // padding for later use
|
||||
#else
|
||||
#if WEBP_DECODER_ABI_VERSION < 0x0203
|
||||
uint32_t pad[5]; // padding for later use
|
||||
#elif WEBP_DECODER_ABI_VERSION < 0x0204
|
||||
uint32_t pad[4]; // padding for later use
|
||||
#else
|
||||
uint32_t pad[3]; // padding for later use
|
||||
#endif
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user