From: Good Guy Date: Fri, 5 Dec 2025 22:35:27 +0000 (-0700) Subject: Credit Andrew+Rob - correct QuantizeBuffer ifdef and add const to color variables X-Git-Url: https://git.cinelerra-gg.org/?a=commitdiff_plain;h=6827b6657aa153daebb31638b0d2ef76e9782284;p=goodguy%2Fcinelerra.git Credit Andrew+Rob - correct QuantizeBuffer ifdef and add const to color variables --- diff --git a/cinelerra-5.1/cinelerra/filegif.C b/cinelerra-5.1/cinelerra/filegif.C index 85a18721..e6a54cac 100644 --- a/cinelerra-5.1/cinelerra/filegif.C +++ b/cinelerra-5.1/cinelerra/filegif.C @@ -38,8 +38,8 @@ extern "C" #if !defined HAVE_GIFLIB_QUANTIZE int GifQuantizeBuffer(unsigned int Width, unsigned int Height, - int *ColorMapSize, GifByteType * RedInput, - GifByteType * GreenInput, GifByteType * BlueInput, + int *ColorMapSize, const GifByteType * RedInput, + const GifByteType * GreenInput, const GifByteType * BlueInput, GifByteType * OutputBuffer, GifColorType * OutputColorMap); #endif @@ -235,7 +235,7 @@ GifQuantizeBuffer(unsigned int Width, if (MaxRGBError[2] < ABS(OutputColorMap[Index].Blue - BlueInput[i])) MaxRGBError[2] = ABS(OutputColorMap[Index].Blue - BlueInput[i]); } -#endif + #ifdef DEBUG fprintf(stderr, @@ -250,6 +250,8 @@ GifQuantizeBuffer(unsigned int Width, return GIF_OK; } +#endif // HAVE_GIFLIB_QUANTIZE + /****************************************************************************** Routine to subdivide the RGB space recursively using median cut in each axes alternatingly until ColorMapSize different cubes exists.