You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
swscale/utils: reindent
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
This commit is contained in:
@@ -1575,41 +1575,42 @@ av_cold int sws_init_context(SwsContext *c, SwsFilter *srcFilter,
|
|||||||
if (CONFIG_SWSCALE_ALPHA && isALPHA(srcFormat) && !isALPHA(dstFormat)) {
|
if (CONFIG_SWSCALE_ALPHA && isALPHA(srcFormat) && !isALPHA(dstFormat)) {
|
||||||
enum AVPixelFormat tmpFormat = alphaless_fmt(srcFormat);
|
enum AVPixelFormat tmpFormat = alphaless_fmt(srcFormat);
|
||||||
|
|
||||||
if (tmpFormat != AV_PIX_FMT_NONE && c->alphablend != SWS_ALPHA_BLEND_NONE)
|
if (tmpFormat != AV_PIX_FMT_NONE && c->alphablend != SWS_ALPHA_BLEND_NONE) {
|
||||||
if (!unscaled ||
|
if (!unscaled ||
|
||||||
dstFormat != tmpFormat ||
|
dstFormat != tmpFormat ||
|
||||||
usesHFilter || usesVFilter ||
|
usesHFilter || usesVFilter ||
|
||||||
c->srcRange != c->dstRange
|
c->srcRange != c->dstRange
|
||||||
) {
|
) {
|
||||||
c->cascaded_mainindex = 1;
|
c->cascaded_mainindex = 1;
|
||||||
ret = av_image_alloc(c->cascaded_tmp, c->cascaded_tmpStride,
|
ret = av_image_alloc(c->cascaded_tmp, c->cascaded_tmpStride,
|
||||||
srcW, srcH, tmpFormat, 64);
|
srcW, srcH, tmpFormat, 64);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
c->cascaded_context[0] = sws_alloc_set_opts(srcW, srcH, srcFormat,
|
c->cascaded_context[0] = sws_alloc_set_opts(srcW, srcH, srcFormat,
|
||||||
srcW, srcH, tmpFormat,
|
srcW, srcH, tmpFormat,
|
||||||
flags, c->param);
|
flags, c->param);
|
||||||
if (!c->cascaded_context[0])
|
if (!c->cascaded_context[0])
|
||||||
return -1;
|
return -1;
|
||||||
c->cascaded_context[0]->alphablend = c->alphablend;
|
c->cascaded_context[0]->alphablend = c->alphablend;
|
||||||
ret = sws_init_context(c->cascaded_context[0], NULL , NULL);
|
ret = sws_init_context(c->cascaded_context[0], NULL , NULL);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
c->cascaded_context[1] = sws_alloc_set_opts(srcW, srcH, tmpFormat,
|
c->cascaded_context[1] = sws_alloc_set_opts(srcW, srcH, tmpFormat,
|
||||||
dstW, dstH, dstFormat,
|
dstW, dstH, dstFormat,
|
||||||
flags, c->param);
|
flags, c->param);
|
||||||
if (!c->cascaded_context[1])
|
if (!c->cascaded_context[1])
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
c->cascaded_context[1]->srcRange = c->srcRange;
|
c->cascaded_context[1]->srcRange = c->srcRange;
|
||||||
c->cascaded_context[1]->dstRange = c->dstRange;
|
c->cascaded_context[1]->dstRange = c->dstRange;
|
||||||
ret = sws_init_context(c->cascaded_context[1], srcFilter , dstFilter);
|
ret = sws_init_context(c->cascaded_context[1], srcFilter , dstFilter);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user