summaryrefslogtreecommitdiff
path: root/libswscale/swscale.c
diff options
context:
space:
mode:
authorLuca Barbato <lu_zero@gentoo.org>2016-09-25 16:23:20 +0200
committerLuca Barbato <lu_zero@gentoo.org>2016-09-27 17:17:54 +0200
commite87a501e7d03ac68b58520108fe24ad9d0b36765 (patch)
treec3ac47c76015203beedb4b63f660dbf8fa8a7166 /libswscale/swscale.c
parentde8e096c7eda2bce76efd0a1c1c89d37348c2414 (diff)
swscale: Update bitdepth range check
Make sure the scaling functions for the 9-15bits are used for 9-15bits bit depths correctly.
Diffstat (limited to 'libswscale/swscale.c')
-rw-r--r--libswscale/swscale.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libswscale/swscale.c b/libswscale/swscale.c
index 131980855c..142c79c14a 100644
--- a/libswscale/swscale.c
+++ b/libswscale/swscale.c
@@ -731,7 +731,7 @@ static av_cold void sws_init_swscale(SwsContext *c)
ff_sws_init_input_funcs(c);
if (c->srcBpc == 8) {
- if (c->dstBpc <= 10) {
+ if (c->dstBpc <= 15) {
c->hyScale = c->hcScale = hScale8To15_c;
if (c->flags & SWS_FAST_BILINEAR) {
c->hyscale_fast = hyscale_fast_c;
@@ -741,12 +741,12 @@ static av_cold void sws_init_swscale(SwsContext *c)
c->hyScale = c->hcScale = hScale8To19_c;
}
} else {
- c->hyScale = c->hcScale = c->dstBpc > 10 ? hScale16To19_c
+ c->hyScale = c->hcScale = c->dstBpc > 15 ? hScale16To19_c
: hScale16To15_c;
}
if (c->srcRange != c->dstRange && !isAnyRGB(c->dstFormat)) {
- if (c->dstBpc <= 10) {
+ if (c->dstBpc <= 15) {
if (c->srcRange) {
c->lumConvertRange = lumRangeFromJpeg_c;
c->chrConvertRange = chrRangeFromJpeg_c;