From 5133d3b06a8f526e2b5ecfc857af461b66322718 Mon Sep 17 00:00:00 2001 From: Wan-Teh Chang Date: Fri, 11 Sep 2026 15:03:24 -0700 Subject: [PATCH] gainmap.c: Omit unneeded avifImageAllocatePlanes Omit the unneeded avifImageAllocatePlanes() call in avifRGBImageComputeGainMap(). The avifImage is passed to avifImageRGBToYUV(), which will call avifImageAllocatePlanes(). --- src/gainmap.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/gainmap.c b/src/gainmap.c index eee9e7b5aa..30c1f3799e 100644 --- a/src/gainmap.c +++ b/src/gainmap.c @@ -793,10 +793,6 @@ avifResult avifRGBImageComputeGainMap(const avifRGBImage * baseRgbImage, gainMapImage->height = height; avifImageFreePlanes(gainMapImage, AVIF_PLANES_ALL); // Free planes in case they were already allocated. - res = avifImageAllocatePlanes(gainMapImage, AVIF_PLANES_YUV); - if (res != AVIF_RESULT_OK) { - goto cleanup; - } avifRGBImageSetDefaults(&gainMapRGB, gainMapImage); res = avifRGBImageAllocatePixels(&gainMapRGB);