From 6827b6657aa153daebb31638b0d2ef76e9782284 Mon Sep 17 00:00:00 2001 From: Good Guy Date: Fri, 5 Dec 2025 15:35:27 -0700 Subject: [PATCH] Credit Andrew+Rob - correct QuantizeBuffer ifdef and add const to color variables --- cinelerra-5.1/cinelerra/filegif.C | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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. -- 2.34.1