Originally committed as revision 32424 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
| ... | ... |
@@ -1555,10 +1555,15 @@ struct SwsContext *sws_getCachedContext(struct SwsContext *context, |
| 1555 | 1555 |
context->srcW = srcW; |
| 1556 | 1556 |
context->srcH = srcH; |
| 1557 | 1557 |
context->srcFormat = srcFormat; |
| 1558 |
+ context->dstW = dstW; |
|
| 1559 |
+ context->dstH = dstH; |
|
| 1558 | 1560 |
context->dstFormat = dstFormat; |
| 1559 | 1561 |
context->flags = flags; |
| 1560 | 1562 |
context->param[0] = param[0]; |
| 1561 | 1563 |
context->param[1] = param[1]; |
| 1564 |
+ context->srcRange = handle_jpeg(&srcFormat); |
|
| 1565 |
+ context->dstRange = handle_jpeg(&dstFormat); |
|
| 1566 |
+ sws_setColorspaceDetails(context, ff_yuv2rgb_coeffs[SWS_CS_DEFAULT], context->srcRange, ff_yuv2rgb_coeffs[SWS_CS_DEFAULT] /* FIXME*/, context->dstRange, 0, 1<<16, 1<<16); |
|
| 1562 | 1567 |
if (sws_init_context(context, srcFilter, dstFilter) < 0) {
|
| 1563 | 1568 |
sws_freeContext(context); |
| 1564 | 1569 |
return NULL; |