[FFmpeg-cvslog] swscale/unscaled : add grayf32 le to be

Martin Vignali git at videolan.org
Wed Oct 24 22:22:56 EEST 2018


ffmpeg | branch: master | Martin Vignali <martin.vignali at gmail.com> | Mon Oct 22 23:05:29 2018 +0200| [26bf4a40507dd8d313073c33c2696413eb63d2c5] | committer: Martin Vignali

swscale/unscaled : add grayf32 le to be

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=26bf4a40507dd8d313073c33c2696413eb63d2c5
---

 libswscale/swscale_unscaled.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/libswscale/swscale_unscaled.c b/libswscale/swscale_unscaled.c
index 4b3cd71e90..54f27e0ac2 100644
--- a/libswscale/swscale_unscaled.c
+++ b/libswscale/swscale_unscaled.c
@@ -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],



More information about the ffmpeg-cvslog mailing list