|
|
@ -1120,13 +1120,14 @@ av_cold int sws_init_context(SwsContext *c, SwsFilter *srcFilter, |
|
|
|
c->srcRange |= handle_jpeg(&c->srcFormat); |
|
|
|
c->srcRange |= handle_jpeg(&c->srcFormat); |
|
|
|
c->dstRange |= handle_jpeg(&c->dstFormat); |
|
|
|
c->dstRange |= handle_jpeg(&c->dstFormat); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(srcFormat!=c->srcFormat || dstFormat!=c->dstFormat) |
|
|
|
|
|
|
|
av_log(c, AV_LOG_WARNING, "deprecated pixel format used, make sure you did set range correctly\n"); |
|
|
|
|
|
|
|
|
|
|
|
if (!c->contrast && !c->saturation && !c->dstFormatBpp) |
|
|
|
if (!c->contrast && !c->saturation && !c->dstFormatBpp) |
|
|
|
sws_setColorspaceDetails(c, ff_yuv2rgb_coeffs[SWS_CS_DEFAULT], c->srcRange, |
|
|
|
sws_setColorspaceDetails(c, ff_yuv2rgb_coeffs[SWS_CS_DEFAULT], c->srcRange, |
|
|
|
ff_yuv2rgb_coeffs[SWS_CS_DEFAULT], |
|
|
|
ff_yuv2rgb_coeffs[SWS_CS_DEFAULT], |
|
|
|
c->dstRange, 0, 1 << 16, 1 << 16); |
|
|
|
c->dstRange, 0, 1 << 16, 1 << 16); |
|
|
|
|
|
|
|
|
|
|
|
if(srcFormat!=c->srcFormat || dstFormat!=c->dstFormat) |
|
|
|
|
|
|
|
av_log(c, AV_LOG_WARNING, "deprecated pixel format used, make sure you did set range correctly\n"); |
|
|
|
|
|
|
|
handle_formats(c); |
|
|
|
handle_formats(c); |
|
|
|
srcFormat = c->srcFormat; |
|
|
|
srcFormat = c->srcFormat; |
|
|
|
dstFormat = c->dstFormat; |
|
|
|
dstFormat = c->dstFormat; |
|
|
|