X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libswscale%2Futils.c;h=5406e199270bef4cc913b86dee552280c996d701;hb=2268db2cd052674fde55c7d48b7a5098ce89b4ba;hp=f5b251136a5f3e0ab10422a71bcaff6320f3978a;hpb=6b3ef7f080293956b2e5212b83135c6b051212e9;p=ffmpeg diff --git a/libswscale/utils.c b/libswscale/utils.c index f5b251136a5..5406e199270 100644 --- a/libswscale/utils.c +++ b/libswscale/utils.c @@ -1039,10 +1039,10 @@ av_cold int sws_init_context(SwsContext *c, SwsFilter *srcFilter, } } - c->srcBpc = 1 + desc_src->comp[0].depth_minus1; + c->srcBpc = desc_src->comp[0].depth; if (c->srcBpc < 8) c->srcBpc = 8; - c->dstBpc = 1 + desc_dst->comp[0].depth_minus1; + c->dstBpc = desc_dst->comp[0].depth; if (c->dstBpc < 8) c->dstBpc = 8; if (c->dstBpc == 16)