Re: [FFmpeg-devel] [PATCH 1/7] swscale/tests/swscale: Implement isALPHA() using AVPixFmtDescriptor
On Thu, Feb 15, 2024 at 07:20:32AM +0100, Anton Khirnov wrote: > I remember wondering why was this not run as a FATE test. the full reference file is > 100mb and the full test takes longer than the full fate test. This patchset makes it possibly to run random subsets of the test so its a step toward enabling this for fate i will apply it thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB You can kill me, but you cannot change the truth. 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".
Re: [FFmpeg-devel] [PATCH 1/7] swscale/tests/swscale: Implement isALPHA() using AVPixFmtDescriptor
I remember wondering why was this not run as a FATE test. -- Anton Khirnov ___ 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/7] swscale/tests/swscale: Implement isALPHA() using AVPixFmtDescriptor
Signed-off-by: Michael Niedermayer --- libswscale/tests/swscale.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libswscale/tests/swscale.c b/libswscale/tests/swscale.c index 6c38041ddb8..f853bc4c913 100644 --- a/libswscale/tests/swscale.c +++ b/libswscale/tests/swscale.c @@ -48,12 +48,12 @@ (!(isGray(x)|| \ (x) == AV_PIX_FMT_MONOBLACK || \ (x) == AV_PIX_FMT_MONOWHITE)) -#define isALPHA(x) \ -((x) == AV_PIX_FMT_BGR32 || \ - (x) == AV_PIX_FMT_BGR32_1 || \ - (x) == AV_PIX_FMT_RGB32 || \ - (x) == AV_PIX_FMT_RGB32_1 || \ - (x) == AV_PIX_FMT_YUVA420P) + +static av_always_inline int isALPHA(enum AVPixelFormat pix_fmt) +{ +const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt); +return desc->flags & AV_PIX_FMT_FLAG_ALPHA; +} static uint64_t getSSD(const uint8_t *src1, const uint8_t *src2, int stride1, int stride2, int w, int h) -- 2.17.1 ___ 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".