|
|
|
@ -816,27 +816,30 @@ static int scale_gamma(SwsContext *c, |
|
|
|
|
int srcSliceY, int srcSliceH, |
|
|
|
|
uint8_t * const dst[], const int dstStride[]) |
|
|
|
|
{ |
|
|
|
|
int ret = sws_scale(c->cascaded_context[0], |
|
|
|
|
srcSlice, srcStride, srcSliceY, srcSliceH, |
|
|
|
|
c->cascaded_tmp, c->cascaded_tmpStride); |
|
|
|
|
int ret = sws_scale(c->cascaded_context[0], |
|
|
|
|
srcSlice, srcStride, srcSliceY, srcSliceH, |
|
|
|
|
c->cascaded_tmp, c->cascaded_tmpStride); |
|
|
|
|
|
|
|
|
|
if (ret < 0) |
|
|
|
|
return ret; |
|
|
|
|
if (ret < 0) |
|
|
|
|
return ret; |
|
|
|
|
|
|
|
|
|
if (c->cascaded_context[2]) |
|
|
|
|
ret = sws_scale(c->cascaded_context[1], (const uint8_t * const *)c->cascaded_tmp, c->cascaded_tmpStride, srcSliceY, srcSliceH, c->cascaded1_tmp, c->cascaded1_tmpStride); |
|
|
|
|
else |
|
|
|
|
ret = sws_scale(c->cascaded_context[1], (const uint8_t * const *)c->cascaded_tmp, c->cascaded_tmpStride, srcSliceY, srcSliceH, dst, dstStride); |
|
|
|
|
if (c->cascaded_context[2]) |
|
|
|
|
ret = sws_scale(c->cascaded_context[1], (const uint8_t * const *)c->cascaded_tmp, |
|
|
|
|
c->cascaded_tmpStride, srcSliceY, srcSliceH, c->cascaded1_tmp, |
|
|
|
|
c->cascaded1_tmpStride); |
|
|
|
|
else |
|
|
|
|
ret = sws_scale(c->cascaded_context[1], (const uint8_t * const *)c->cascaded_tmp, |
|
|
|
|
c->cascaded_tmpStride, srcSliceY, srcSliceH, dst, dstStride); |
|
|
|
|
|
|
|
|
|
if (ret < 0) |
|
|
|
|
return ret; |
|
|
|
|
|
|
|
|
|
if (c->cascaded_context[2]) { |
|
|
|
|
ret = sws_scale(c->cascaded_context[2], |
|
|
|
|
(const uint8_t * const *)c->cascaded1_tmp, c->cascaded1_tmpStride, c->cascaded_context[1]->dstY - ret, c->cascaded_context[1]->dstY, |
|
|
|
|
dst, dstStride); |
|
|
|
|
} |
|
|
|
|
if (ret < 0) |
|
|
|
|
return ret; |
|
|
|
|
|
|
|
|
|
if (c->cascaded_context[2]) { |
|
|
|
|
ret = sws_scale(c->cascaded_context[2], (const uint8_t * const *)c->cascaded1_tmp, |
|
|
|
|
c->cascaded1_tmpStride, c->cascaded_context[1]->dstY - ret, |
|
|
|
|
c->cascaded_context[1]->dstY, dst, dstStride); |
|
|
|
|
} |
|
|
|
|
return ret; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|