diff --git a/examples/cwebp.c b/examples/cwebp.c index 040e804e..8b305266 100644 --- a/examples/cwebp.c +++ b/examples/cwebp.c @@ -615,10 +615,8 @@ static void HelpLong(void) { " green=0xe0 and blue=0xd0\n"); printf(" -noalpha ............... discard any transparency information\n"); printf(" -lossless .............. encode image losslessly\n"); -#ifdef WEBP_EXPERIMENTAL_FEATURES - printf(" -near_lossless ......... use near-lossless image\n" + printf(" -near_lossless ... use near-lossless image\n" " preprocessing (0=off..100)\n"); -#endif printf(" -hint ......... specify image characteristics hint,\n"); printf(" one of: photo, picture or graph\n"); diff --git a/man/cwebp.1 b/man/cwebp.1 index d5a3beb2..8460fa45 100644 --- a/man/cwebp.1 +++ b/man/cwebp.1 @@ -218,12 +218,12 @@ Using this option will discard the alpha channel. .B \-lossless Encode the image without any loss. .TP -.\" .B \-near_lossless " int -.\" Use near-lossless image preprocessing. This option adjusts pixel values -.\" to help compressibility, but has minimal impact on the visual quality. -.\" It triggers lossless compression mode automatically. -.\" Range is 0 (no preprocessing, the default) to 100. -.\" .TP +.BI \-near_lossless " int +Use near-lossless image preprocessing. This option adjusts pixel values +to help compressibility, but has minimal impact on the visual quality. +It triggers lossless compression mode automatically. +Range is 0 (no preprocessing, the default) to 100. +.TP .BI \-hint " string Specify the hint about input image type. Possible values are: \fBphoto\fP, \fBpicture\fP or \fBgraph\fP. diff --git a/src/enc/near_lossless.c b/src/enc/near_lossless.c index 20ac39f6..573b5c74 100644 --- a/src/enc/near_lossless.c +++ b/src/enc/near_lossless.c @@ -20,8 +20,6 @@ #include "../utils/utils.h" #include "./vp8enci.h" -#ifdef WEBP_EXPERIMENTAL_FEATURES - #define MIN_DIM_FOR_NEAR_LOSSLESS 64 #define MAX_LIMIT_BITS 5 @@ -131,15 +129,8 @@ static int QualityToLimitBits(int quality) { // 13..100 -> 4..1 return MAX_LIMIT_BITS - (quality + 12) / 25; } -#endif // WEBP_EXPERIMENTAL_FEATURES int VP8ApplyNearLossless(int xsize, int ysize, uint32_t* argb, int quality) { -#ifndef WEBP_EXPERIMENTAL_FEATURES - (void)xsize; - (void)ysize; - (void)argb; - (void)quality; -#else int i; uint32_t* const copy_buffer = (uint32_t*)WebPSafeMalloc(xsize * 3, sizeof(*copy_buffer)); @@ -160,6 +151,5 @@ int VP8ApplyNearLossless(int xsize, int ysize, uint32_t* argb, int quality) { NearLossless(xsize, ysize, argb, i, copy_buffer); } WebPSafeFree(copy_buffer); -#endif // WEBP_EXPERIMENTAL_FEATURES return 1; }