PR #25093 opened by romainhedouin URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/25093 Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/25093.patch
!(colorspace == 0 && fmt != YA8) && fmt != YA8 is the same as colorspace != 0 && fmt != YA8. Tested to make sure there's no change in behaviour. Found during a code review sweep of ffmpeg using an LLM. <!-- If this PR requires new FATE test samples, attach them to the PR and list their target paths below (relative to the fate-suite root). Attached filenames must match the sample's filename: ```fate-samples # e.g. vorbis/new-sample.ogg ``` --> >From f2e1d6771723766b8c3826653bd0c3c8249993f6 Mon Sep 17 00:00:00 2001 From: romainhedouin <[email protected]> Date: Thu, 15 Oct 2026 13:02:31 +0200 Subject: [PATCH] ffv1_vulkan: simplify the is_rgb expression !(colorspace == 0 && fmt != YA8) && fmt != YA8 is the same as colorspace != 0 && fmt != YA8. No change in behaviour. Found during a code review sweep of ffmpeg using an LLM. --- libavcodec/ffv1_vulkan.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libavcodec/ffv1_vulkan.c b/libavcodec/ffv1_vulkan.c index fb67cf0d07..abe3653c19 100644 --- a/libavcodec/ffv1_vulkan.c +++ b/libavcodec/ffv1_vulkan.c @@ -27,8 +27,7 @@ void ff_ffv1_vk_set_common_sl(AVCodecContext *avctx, FFV1Context *f, { const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(sw_format); int color_planes = av_pix_fmt_desc_get(sw_format)->nb_components; - int is_rgb = !(f->colorspace == 0 && sw_format != AV_PIX_FMT_YA8) && - !(sw_format == AV_PIX_FMT_YA8); + int is_rgb = f->colorspace != 0 && sw_format != AV_PIX_FMT_YA8; SPEC_LIST_ADD(sl, 2, 32, f->version); SPEC_LIST_ADD(sl, 3, 32, f->quant_table_count); -- 2.52.0 _______________________________________________ ffmpeg-devel mailing list -- [email protected] To unsubscribe send an email to [email protected]
