Message ID | 20231031145450.94975-2-ffmpeg@haasn.xyz |
---|---|
State | New |
Headers | show |
Series | [FFmpeg-devel,v3,1/8] swscale: fix sws_setColorspaceDetails after sws_init_context | expand |
Context | Check | Description |
---|---|---|
yinshiyou/make_loongarch64 | success | Make finished |
yinshiyou/make_fate_loongarch64 | success | Make fate finished |
andriy/make_x86 | success | Make finished |
andriy/make_fate_x86 | success | Make fate finished |
On Tue, Oct 31, 2023 at 03:54:44PM +0100, Niklas Haas wrote: > From: Niklas Haas <git@haasn.dev> > > This was a complete hack seemingly designed to work around a different > bug, which was fixed in the previous commit. As such, there is no more > reason not to do this, as it simply breaks changing color range in > sws_setColorspaceDetails for no reason. > --- > libswscale/utils.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) less hack LGTM thx [...]
diff --git a/libswscale/utils.c b/libswscale/utils.c index 0a55657800..ec822ff5d9 100644 --- a/libswscale/utils.c +++ b/libswscale/utils.c @@ -1049,9 +1049,7 @@ int sws_setColorspaceDetails(struct SwsContext *c, const int inv_table[4], c->srcRange = srcRange; c->dstRange = dstRange; - //The srcBpc check is possibly wrong but we seem to lack a definitive reference to test this - //and what we have in ticket 2939 looks better with this check - if (need_reinit && (c->srcBpc == 8 || !isYUV(c->srcFormat))) + if (need_reinit) ff_sws_init_range_convert(c); c->dstFormatBpp = av_get_bits_per_pixel(desc_dst);
From: Niklas Haas <git@haasn.dev> This was a complete hack seemingly designed to work around a different bug, which was fixed in the previous commit. As such, there is no more reason not to do this, as it simply breaks changing color range in sws_setColorspaceDetails for no reason. --- libswscale/utils.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)