From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.ffmpeg.org (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id 119BD48276 for ; Fri, 19 Dec 2025 19:21:10 +0000 (UTC) Authentication-Results: ffbox; dkim=fail (body hash mismatch (got b'JuuQ/KIYP/H4lRqVvFqC+qi/1kB4U2Uj/shmUyRGbP0=', expected b'gQZtNMkVXVa1nKVt9KylXn1OK3IN5punM6Q8jn2DyMY=')) header.d=ffmpeg.org header.i=@ffmpeg.org header.a=rsa-sha256 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ffmpeg.org; i=@ffmpeg.org; q=dns/txt; s=mail; t=1766172061; h=mime-version : to : date : message-id : reply-to : subject : list-id : list-archive : list-archive : list-help : list-owner : list-post : list-subscribe : list-unsubscribe : from : cc : content-type : content-transfer-encoding : from; bh=JuuQ/KIYP/H4lRqVvFqC+qi/1kB4U2Uj/shmUyRGbP0=; b=sgfcIyy9E0Vgd/BdFE+wV/Ir9kHlZ5fhnCDa8ecYKKz8L1DSEP3i59cuJ/IWensyN2jw+ 66OCKra8EE+fhbHYptDwG7uZMAK/QjPCZ0xos+sJde26fLhRz+ZciIdBxFfB8DwRjFj2oqW 8V5XPPQzd1P0J2Y9Ca7c24b4f1c3CaLSynG1l5naV5IdotwIjaoOV1VchXAxXvVgyhKM3hY C9hSj9/yFDtQgaabpwGmXWTbYVVO3qzlUQcMlmyYb+p0w13lPPRtZ34JCv/ksaalHDGovVs i4mDNfl7tkmorUnsinMi6mP217gI2xXziFq3U7eFaoqNHHsdxSZZzGC1ZXHA== Received: from [172.20.0.2] (unknown [172.19.0.4]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id 7E792690A16; Fri, 19 Dec 2025 21:21:01 +0200 (EET) ARC-Seal: i=1; cv=none; a=rsa-sha256; d=ffmpeg.org; s=arc; t=1766172053; b=QrLX4GyKgcKCbIUNm4nl8jEKAF3QEuVH/Qplv9ykgEMQCw+tqSAN9RIfBqRzD3fb8lxIS M0nW51NN63ql5rhpQ9EKGOjCEte+q3b+kqq0FVtcRclrxks0sPloZ8PAjqLCV68sHtipZcr Uo+ALzq5HwPZmv/FDNfmMkYqUdTMbpz9xlmvhBVWWT9fIZE90EYZAIFkzYFQMUReaEUEWme wt2VYnuQ5xRwR0CLHIRQ7ZO6ozvHL50bIndmeMH1th6KZWAJK+x+dQHes4tMHDkzY7Z/Da9 iUZnXTE+2W+jts8cVUFFKAuClRdp/Zf9eNO5BOAF3r2AVWVlyorn+ke5MfPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=ffmpeg.org; s=arc; t=1766172053; h=from : sender : reply-to : subject : date : message-id : to : cc : mime-version : content-type : content-transfer-encoding : content-id : content-description : resent-date : resent-from : resent-sender : resent-to : resent-cc : resent-message-id : in-reply-to : references : list-id : list-help : list-unsubscribe : list-subscribe : list-post : list-owner : list-archive; bh=294XikTSSZCoY9Z43t2pyK61Dt0JMLIfI73KVB4kLJs=; b=gu7J7oVtKjkWkBUdJupIuEyE5VGVFPRO/9miWoFGxjm4N9gxxd3o50kdNlttEdRkuGo5B fvCsB2nRa0LX7w30GPNhSAmWjdTPuS1p2gpSzAkVWUy9FY+usp8whjCG/pkg2m/A2GZTVAR PUzbCqKlKmcQnAaGAAta2Iwsx433lAow82u+94Ub2lSuYP1quU/ZFom0mcJwcNDfGCqoAPO HVX/Vw8NbvWZwGjc7GGbsKhtzFn5wbO20jnX2cc5ovsFvvWXyovaHsxDhP2MSLQ0rXK9l2K g8aPrN/1LtBxbkbSvK4F4qsyUoqWLPCKmpBfixf7VmAfIJHuUJ9U0rVre/pw== ARC-Authentication-Results: i=1; ffmpeg.org; dkim=pass header.d=ffmpeg.org header.i=@ffmpeg.org; arc=none; dmarc=pass header.from=ffmpeg.org policy.dmarc=quarantine Authentication-Results: ffmpeg.org; dkim=pass header.d=ffmpeg.org header.i=@ffmpeg.org; arc=none (Message is not ARC signed); dmarc=pass (Used From Domain Record) header.from=ffmpeg.org policy.dmarc=quarantine DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ffmpeg.org; i=@ffmpeg.org; q=dns/txt; s=mail; t=1766172045; h=content-type : mime-version : content-transfer-encoding : from : to : reply-to : subject : date : from; bh=gQZtNMkVXVa1nKVt9KylXn1OK3IN5punM6Q8jn2DyMY=; b=mF0n6cIFF1yG6tdlYKUDFo96jccHC8/zQWl4Tp0T0M2Rs9V28oCKZoJZ8DBpvI3uiqCWS UTuQADGacecJdhGsoTJDAd81mKTieL5I3RiKmHuq8pfcOcxDaKxE4jeqTol1Un/1Qc9UuZq Jc4pEUvVCuRn0iF4hpPaJ6lulJd5MwASjstc2GsK6qmUhuUSmfN5XIN4p2EpubxE9+GME06 gCUv3ouvFbKSkNoNyoX8+xvCCGjF6LG5hck0gnVvdwJnd9A9/cQ22ORAVw5SQVfcJdqdoAq QjZoEtgAcIHh/kD+MinBxjPFabtz/TEd98Vr31BLzK0hZ1X/awYRUVNMSxDg== Received: from 55ca25703178 (code.ffmpeg.org [188.245.149.3]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id 32FCC6909CC for ; Fri, 19 Dec 2025 21:20:45 +0200 (EET) MIME-Version: 1.0 To: ffmpeg-devel@ffmpeg.org Date: Fri, 19 Dec 2025 19:20:44 -0000 Message-ID: <176617204535.60.16496829032412283367@2cb04c0e5124> Message-ID-Hash: 27YJ6R2RAYMJUWHH75FMPW3XQEKZGO5H X-Message-ID-Hash: 27YJ6R2RAYMJUWHH75FMPW3XQEKZGO5H X-MailFrom: code@ffmpeg.org X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-ffmpeg-devel.ffmpeg.org-0; header-match-ffmpeg-devel.ffmpeg.org-1; header-match-ffmpeg-devel.ffmpeg.org-2; header-match-ffmpeg-devel.ffmpeg.org-3; emergency; member-moderation X-Mailman-Version: 3.3.10 Precedence: list Reply-To: FFmpeg development discussions and patches Subject: [FFmpeg-devel] [PATCH] avfilter/vf_libplacebo: replace preproc directive in function-like macros (PR #21247) List-Id: FFmpeg development discussions and patches Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: nikitalita via ffmpeg-devel Cc: nikitalita Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Archived-At: List-Archive: List-Post: PR #21247 opened by nikitalita URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/21247 Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/21247.patch Fixes #21246 MSVC build was failing due to preprocessor directives being used within function-like macro argument lists, which is undefined behavior according to the C11 spec. Fixed by replacing the directive blocks with macro definitions outside of the macro invocations. >>From e5dc07cc8eef02ba388c7518e19058997a501edc Mon Sep 17 00:00:00 2001 From: nikitalita <69168929+nikitalita@users.noreply.github.com> Date: Fri, 19 Dec 2025 11:10:55 -0800 Subject: [PATCH] avfilter/vf_libplacebo: replace preproc directive in function-like macros MSVC build was failing due to preprocessor directives being used within function-like macro argument lists, which is undefined behavior according to the C11 spec. Fixed by replacing the directive blocks with macro definitions outside of the macro invocations. --- libavfilter/vf_libplacebo.c | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/libavfilter/vf_libplacebo.c b/libavfilter/vf_libplacebo.c index c8015a9641..d42a20cf71 100644 --- a/libavfilter/vf_libplacebo.c +++ b/libavfilter/vf_libplacebo.c @@ -451,24 +451,31 @@ static int update_settings(AVFilterContext *ctx) .temperature = (s->temperature - 6500.0) / 3500.0, }; +#if PL_API_VER >= 263 +#define pl_peak_detect_params_extra .percentile = s->percentile, +#else +#define pl_peak_detect_params_extra +#endif + opts->peak_detect_params = *pl_peak_detect_params( .smoothing_period = s->smoothing, .scene_threshold_low = s->scene_low, .scene_threshold_high = s->scene_high, -#if PL_API_VER >= 263 - .percentile = s->percentile, -#endif + pl_peak_detect_params_extra ); +#if PL_API_VER >= 285 +#define pl_color_map_params_extra .contrast_recovery = s->contrast_recovery, .contrast_smoothness = s->contrast_smoothness, +#else +#define pl_color_map_params_extra +#endif + opts->color_map_params = *pl_color_map_params( .tone_mapping_function = get_tonemapping_func(s->tonemapping), .tone_mapping_param = s->tonemapping_param, .inverse_tone_mapping = s->inverse_tonemapping, .lut_size = s->tonemapping_lut_size, -#if PL_API_VER >= 285 - .contrast_recovery = s->contrast_recovery, - .contrast_smoothness = s->contrast_smoothness, -#endif + pl_color_map_params_extra ); set_gamut_mode(&opts->color_map_params, gamut_mode); @@ -484,6 +491,12 @@ static int update_settings(AVFilterContext *ctx) .strength = s->cone_str, ); +#if PL_API_VER >= 277 +#define pl_render_params_extra .corner_rounding = s->corner_rounding, +#else +#define pl_render_params_extra +#endif + opts->params = *pl_render_params( .antiringing_strength = s->antiringing, .background_transparency = 1.0f - (float) s->fillcolor[3] / UINT8_MAX, @@ -492,9 +505,7 @@ static int update_settings(AVFilterContext *ctx) (float) s->fillcolor[1] / UINT8_MAX, (float) s->fillcolor[2] / UINT8_MAX, }, -#if PL_API_VER >= 277 - .corner_rounding = s->corner_rounding, -#endif + pl_render_params_extra .deinterlace_params = &opts->deinterlace_params, .deband_params = s->deband ? &opts->deband_params : NULL, -- 2.49.1 _______________________________________________ ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org