gainmap.c: Omit unneeded avifImageAllocatePlanes
Omit the unneeded avifImageAllocatePlanes() call in
avifRGBImageComputeGainMap(). The avifImage is passed to
avifImageRGBToYUV(), which will call avifImageAllocatePlanes().
diff --git a/src/gainmap.c b/src/gainmap.c
index a8d6288..e2e8b65 100644
--- a/src/gainmap.c
+++ b/src/gainmap.c
@@ -801,10 +801,6 @@
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);