From 738a5fc6d5b00bcf6764ca633c3112476149f517 Mon Sep 17 00:00:00 2001
From: Martin Vignali <martin.vignali@gmail.com>
Date: Sun, 19 Aug 2018 20:55:02 +0200
Subject: [PATCH 2/2] swscale : hScale16To19 : limit shift for float(32bits)
 input

---
 libswscale/swscale.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libswscale/swscale.c b/libswscale/swscale.c
index 7f3e22355f..7163eb8c5c 100644
--- a/libswscale/swscale.c
+++ b/libswscale/swscale.c
@@ -71,7 +71,7 @@ static void hScale16To19_c(SwsContext *c, int16_t *_dst, int dstW,
     int i;
     int32_t *dst        = (int32_t *) _dst;
     const uint16_t *src = (const uint16_t *) _src;
-    int bits            = desc->comp[0].depth - 1;
+    int bits            = FFMIN(desc->comp[0].depth, 16) - 1;
     int sh              = bits - 4;
 
     if((isAnyRGB(c->srcFormat) || c->srcFormat==AV_PIX_FMT_PAL8) && desc->comp[0].depth<16)
-- 
2.14.3 (Apple Git-98)

