Re: [FFmpeg-devel] [PATCH 1/2] swscale/swscale_internal: interpret RGB paletted pixel formats as RGB
On Wed, Oct 7, 2020 at 8:34 PM Michael Niedermayer wrote: > > On Wed, Oct 07, 2020 at 02:03:16AM +0300, Jan Ekström wrote: > > This makes isAnyRGB return true for AV_PIX_FMT_PAL8 which is currently > > the only pixel format with this flag. > > > > This lets us have a single query for formats where we need to force > > range as only full range content is supported. > > --- > > libswscale/swscale_internal.h| 2 +- > > tests/ref/fate/sws-pixdesc-query | 1 + > > 2 files changed, 2 insertions(+), 1 deletion(-) > > This breaks: > > ./ffmpeg -i ~/tickets/3464/DEMO.HNM -vframes 5 out.avi > The output looks like the chroma plane is significantly shifted horizontally > > file should be here: > https://trac.ffmpeg.org/raw-attachment/ticket/3464/DEMO.HNM > > thx OK, thank you. I will move back to !isYUV() && !isGray() instead of isAnyRGB() then because while latter is IMHO easier to read, this was not noticed in FATE and swscale is not what I am trying to work on more than absolutely necessary right now. Jan ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH 1/2] swscale/swscale_internal: interpret RGB paletted pixel formats as RGB
On Wed, Oct 07, 2020 at 02:03:16AM +0300, Jan Ekström wrote: > This makes isAnyRGB return true for AV_PIX_FMT_PAL8 which is currently > the only pixel format with this flag. > > This lets us have a single query for formats where we need to force > range as only full range content is supported. > --- > libswscale/swscale_internal.h| 2 +- > tests/ref/fate/sws-pixdesc-query | 1 + > 2 files changed, 2 insertions(+), 1 deletion(-) This breaks: ./ffmpeg -i ~/tickets/3464/DEMO.HNM -vframes 5 out.avi The output looks like the chroma plane is significantly shifted horizontally file should be here: https://trac.ffmpeg.org/raw-attachment/ticket/3464/DEMO.HNM thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Everything should be made as simple as possible, but not simpler. -- Albert Einstein signature.asc Description: PGP signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH 1/2] swscale/swscale_internal: interpret RGB paletted pixel formats as RGB
This makes isAnyRGB return true for AV_PIX_FMT_PAL8 which is currently the only pixel format with this flag. This lets us have a single query for formats where we need to force range as only full range content is supported. --- libswscale/swscale_internal.h| 2 +- tests/ref/fate/sws-pixdesc-query | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/libswscale/swscale_internal.h b/libswscale/swscale_internal.h index d207d3beff..013ad51299 100644 --- a/libswscale/swscale_internal.h +++ b/libswscale/swscale_internal.h @@ -775,7 +775,7 @@ static av_always_inline int isAnyRGB(enum AVPixelFormat pix_fmt) { const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt); av_assert0(desc); -return (desc->flags & AV_PIX_FMT_FLAG_RGB) || +return (desc->flags & (AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_PAL)) || pix_fmt == AV_PIX_FMT_MONOBLACK || pix_fmt == AV_PIX_FMT_MONOWHITE; } diff --git a/tests/ref/fate/sws-pixdesc-query b/tests/ref/fate/sws-pixdesc-query index c3cccfa492..42e82389af 100644 --- a/tests/ref/fate/sws-pixdesc-query +++ b/tests/ref/fate/sws-pixdesc-query @@ -570,6 +570,7 @@ AnyRGB: gbrpf32le monob monow + pal8 rgb0 rgb24 rgb32 -- 2.26.2 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".