Message ID | 20211124115738.84650-1-werner.robitza@gmail.com |
---|---|
State | New |
Headers | show |
Series | [FFmpeg-devel] swscale: fix deprecation message for JPEG | expand |
Context | Check | Description |
---|---|---|
andriy/make_x86 | success | Make finished |
andriy/make_fate_x86 | success | Make fate finished |
andriy/make_ppc | success | Make finished |
andriy/make_fate_ppc | success | Make fate finished |
On Wed, Nov 24, 2021 at 12:57 PM Werner Robitza <werner.robitza@gmail.com> wrote: > > This message frequently confuses end users, making them think that they are > doing something wrong [1]. > > The fact that the "J" format itself is deprecated should not be bothering > the end users. > > Since the format can only be changed when the handle_jpeg() function is > called, this means we can tell the users about the fact that the JPEG > conversion is causing this, and that they should check the range. > > [1]: https://superuser.com/q/1273920/48078 > [2]: https://superuser.com/q/1663477/48078 > > Signed-off-by: Werner Robitza <werner.robitza@gmail.com> > --- > libswscale/utils.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libswscale/utils.c b/libswscale/utils.c > index c726922527..78f84d990a 100644 > --- a/libswscale/utils.c > +++ b/libswscale/utils.c > @@ -1291,7 +1291,7 @@ av_cold int sws_init_context(SwsContext *c, SwsFilter *srcFilter, > c->dstRange |= handle_jpeg(&c->dstFormat); > > if(srcFormat!=c->srcFormat || dstFormat!=c->dstFormat) > - av_log(c, AV_LOG_WARNING, "deprecated pixel format used, make sure you did set range correctly\n"); > + av_log(c, AV_LOG_WARNING, "pixel format was changed automatically for JPEG, make sure the color range is set correctly\n"); > > if (!c->contrast && !c->saturation && !c->dstFormatBpp) > sws_setColorspaceDetails(c, ff_yuv2rgb_coeffs[SWS_CS_DEFAULT], c->srcRange, > -- > 2.33.1 > Any feedback would be much appreciated.
diff --git a/libswscale/utils.c b/libswscale/utils.c index c726922527..78f84d990a 100644 --- a/libswscale/utils.c +++ b/libswscale/utils.c @@ -1291,7 +1291,7 @@ av_cold int sws_init_context(SwsContext *c, SwsFilter *srcFilter, c->dstRange |= handle_jpeg(&c->dstFormat); if(srcFormat!=c->srcFormat || dstFormat!=c->dstFormat) - av_log(c, AV_LOG_WARNING, "deprecated pixel format used, make sure you did set range correctly\n"); + av_log(c, AV_LOG_WARNING, "pixel format was changed automatically for JPEG, make sure the color range is set correctly\n"); if (!c->contrast && !c->saturation && !c->dstFormatBpp) sws_setColorspaceDetails(c, ff_yuv2rgb_coeffs[SWS_CS_DEFAULT], c->srcRange,
This message frequently confuses end users, making them think that they are doing something wrong [1]. The fact that the "J" format itself is deprecated should not be bothering the end users. Since the format can only be changed when the handle_jpeg() function is called, this means we can tell the users about the fact that the JPEG conversion is causing this, and that they should check the range. [1]: https://superuser.com/q/1273920/48078 [2]: https://superuser.com/q/1663477/48078 Signed-off-by: Werner Robitza <werner.robitza@gmail.com> --- libswscale/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)