Credit Andrew+Rob - correct QuantizeBuffer ifdef and add const to color variables
authorGood Guy <good1.2guy@gmail.com>
Fri, 5 Dec 2025 22:35:27 +0000 (15:35 -0700)
committerGood Guy <good1.2guy@gmail.com>
Fri, 5 Dec 2025 22:35:27 +0000 (15:35 -0700)
cinelerra-5.1/cinelerra/filegif.C

index 85a18721c67bb1e023c65cfe98657bac48694f07..e6a54cac4d74902a133a75652862167027d89880 100644 (file)
@@ -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.