swscale/unscaled : add grayf32 le to be
authorMartin Vignali <martin.vignali@gmail.com>
Mon, 22 Oct 2018 21:05:29 +0000 (23:05 +0200)
committerMartin Vignali <martin.vignali@gmail.com>
Wed, 24 Oct 2018 19:21:14 +0000 (21:21 +0200)
libswscale/swscale_unscaled.c

index 4b3cd71..54f27e0 100644 (file)
@@ -1821,6 +1821,14 @@ static int planarCopyWrapper(SwsContext *c, const uint8_t *src[],
                     srcPtr += srcStride[plane];
                     dstPtr += dstStride[plane];
                 }
+            } else if (isFloat(c->srcFormat) && isFloat(c->dstFormat) &&
+                       isBE(c->srcFormat) != isBE(c->dstFormat)) { /* swap float plane */
+                for (i = 0; i < height; i++) {
+                    for (j = 0; j < length; j++)
+                        ((uint32_t *) dstPtr)[j] = av_bswap32(((const uint32_t *) srcPtr)[j]);
+                    srcPtr += srcStride[plane];
+                    dstPtr += dstStride[plane];
+                }
             } else if (dstStride[plane] == srcStride[plane] &&
                        srcStride[plane] > 0 && srcStride[plane] == length) {
                 memcpy(dst[plane] + dstStride[plane] * y, src[plane],