Revert "swscale: fix sws_setColorspaceDetails after sws_init_context"
Suggested by: Niklas Haas in Ticket10824 Fixes: Assertion failure Fixes: Ticket10824 This reverts commit cedf589c09c567b72bf4c1a58db53d94622567e1.
This commit is contained in:
parent
8caa84cec7
commit
f9906911f0
@ -1017,7 +1017,7 @@ static int scale_internal(SwsContext *c,
|
||||
reset_ptr(src2, c->srcFormat);
|
||||
reset_ptr((void*)dst2, c->dstFormat);
|
||||
|
||||
if (c->convert_unscaled && !c->lumConvertRange && !c->chrConvertRange) {
|
||||
if (c->convert_unscaled) {
|
||||
int offset = srcSliceY_internal;
|
||||
int slice_h = srcSliceH;
|
||||
|
||||
|
@ -1713,26 +1713,30 @@ static av_cold int sws_init_single_context(SwsContext *c, SwsFilter *srcFilter,
|
||||
if (unscaled && !usesHFilter && !usesVFilter &&
|
||||
c->alphablend != SWS_ALPHA_BLEND_NONE &&
|
||||
isALPHA(srcFormat) &&
|
||||
(c->srcRange == c->dstRange || isAnyRGB(dstFormat)) &&
|
||||
alphaless_fmt(srcFormat) == dstFormat
|
||||
) {
|
||||
c->convert_unscaled = ff_sws_alphablendaway;
|
||||
|
||||
if (flags & SWS_PRINT_INFO)
|
||||
av_log(c, AV_LOG_INFO,
|
||||
"alpha blendaway %s -> %s special converter is available\n",
|
||||
"using alpha blendaway %s -> %s special converter\n",
|
||||
av_get_pix_fmt_name(srcFormat), av_get_pix_fmt_name(dstFormat));
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* unscaled special cases */
|
||||
if (unscaled && !usesHFilter && !usesVFilter) {
|
||||
if (unscaled && !usesHFilter && !usesVFilter &&
|
||||
(c->srcRange == c->dstRange || isAnyRGB(dstFormat) ||
|
||||
isFloat(srcFormat) || isFloat(dstFormat))){
|
||||
ff_get_unscaled_swscale(c);
|
||||
|
||||
if (c->convert_unscaled) {
|
||||
if (flags & SWS_PRINT_INFO)
|
||||
av_log(c, AV_LOG_INFO,
|
||||
"unscaled %s -> %s special converter is available\n",
|
||||
"using unscaled %s -> %s special converter\n",
|
||||
av_get_pix_fmt_name(srcFormat), av_get_pix_fmt_name(dstFormat));
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user