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 5BB9C4CF32 for ; Mon, 3 Nov 2025 17:33:42 +0000 (UTC) Authentication-Results: ffbox; dkim=fail (body hash mismatch (got b'kZoyUEP8ga99WdTTpJFnzix3XUwF8hwAqaUDOhjchj8=', expected b'yckUz01xVq4BDvYWUQgAtbXLwH8CyKXjG+D+zyyL0q4=')) 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=1762191213; 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=kZoyUEP8ga99WdTTpJFnzix3XUwF8hwAqaUDOhjchj8=; b=vTleV+A6sXpTr4EFbVmk3GFh7jNZqwh5wb2L5F4M0pnA6hsXn6Ti0TospFMkO5Z9mfiEc 4OdMFJ7DiiwwfWoTjmsyLmqCSNEO4ARa+tNNVZNFoIj57ksy52KtAre40B/yRQON8LyMOSL dzUaD19cQRPDxdAqPK5MI1kEvUU6YB4tCIDdFoMK56Jpy+TuVLJyazHg43xa2Mbcf7CsfLW pme22Gkridvk+iiXFidymzjke/A0TjndFhk/rzb3kPU9sCufNEenY/SCSe5SWK+WNVp5jwg 72TrtAkCuoh/3qfq8eI+37/9w3yEtAH6F40zVV1l3lx7C25D0sthXKLvqmdg== Received: from [172.19.0.2] (unknown [172.19.0.2]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id B68A468F9C0; Mon, 3 Nov 2025 19:33:33 +0200 (EET) ARC-Seal: i=1; cv=none; a=rsa-sha256; d=ffmpeg.org; s=arc; t=1762191195; b=kDHxEV7t8WUwebnHr5j0+UYwXv3M/d/ykpj+BPAAt5PuyZwhbNE6a0ufavWW+QS57MFp+ RS0ZAobIVVF207LTGATg3QKK9CVOJeau+UqSzJ4FVwXXs38SRPMOShHdr/ZOOeV3sYE4FPv NkFcIByevZwzaMaBiIFfIQqS1s8ALXOqPY9RmHVJN2T29uoLdvRDeiGqPrgM0XgImphl16S 8Ie4xBCVBBOHw5+doSTYAzZTXY/sROR54uRIE9eYs0LUIkhir8D6coYWAptghRU4yw+FocD hPggk9sX+MpxSY+KvAaIeuiULQjT7NX2g2sq5tI7FvsUbp7rdA95UphfSv2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=ffmpeg.org; s=arc; t=1762191195; 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=GVqbRoWb9AJUCE8lT6f1muSGJym4uicLc+IrMiVkAs4=; b=qc+ezLG6fDuY6AdDq8X4hg5UV3fZ/9gg4J1e8Vqlwdk2+vZ8FeZQ8jq+YG7Xx9eMUX3dm KcC2zuzlUx0x8cE/HhP/Wic3nutXT0mATQmYB48qBo/j+37S6oDjYoc3F/4A9nPDQdfIzhk kIpwpP/LhloMVlmvROb3qXtOFj/p6PBhw+ySMLYAn4dY4+HkOXbzmaOvexbzIr85Dvf9Zhi /m5s7r3t0dzPvhyOOl4RSoqcQpvHHAIViIaSo+MWJOYkuv06160BH6su96LuUMR61nLN0mo LKKj4Tithqh8V1x79a5ZcKabYxBfNMipc7AydJeF7rtxbBGwPeLri7ifnOYA== 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=1762191186; h=content-type : mime-version : content-transfer-encoding : from : to : reply-to : subject : date : from; bh=yckUz01xVq4BDvYWUQgAtbXLwH8CyKXjG+D+zyyL0q4=; b=E9ZCPZMzwryrFeTps4Q1tPsxDcKtY/BVmG8OYzKeLzMz4ZlmLPi5NzP1sANaQoxusqY4p RU3ao7xvO7H5M48vipIrl/dnw3+HboxJrPRi26QWmCefK/yyB0tlhyDZ8staN7OPdpIYTAn 3pv/fqAOxJ806oe7ZCrixhwqVBTo8P5XvRa35YusKG0ahk+EjjoQuGFR52T2RxzCoyzA+eF 0h6TNKWDpJYZhSsV0qR4e93ZPTKPJI++JSaewN1+l2znuwZjmkvDz9FX09Kay0pl13dD0y3 9IiOJwP9FUoWlKdELazTWw2gA4RJgagEejl/Rkj49v7thEyAJtmRxvA8shuA== Received: from 02c22a36bd31 (code.ffmpeg.org [188.245.149.3]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id 17AD568F965 for ; Mon, 3 Nov 2025 19:33:06 +0200 (EET) MIME-Version: 1.0 To: ffmpeg-devel@ffmpeg.org Date: Mon, 03 Nov 2025 17:33:05 -0000 Message-ID: <176219118620.25.2171290940014452449@2cb04c0e5124> Message-ID-Hash: X4DTDWOZWIVL5E6TKIT7TQ3LWCPWJYYW X-Message-ID-Hash: X4DTDWOZWIVL5E6TKIT7TQ3LWCPWJYYW X-MailFrom: code@ffmpeg.org 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; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list Reply-To: FFmpeg development discussions and patches Subject: [FFmpeg-devel] [PATCH] avfilter/vf_libplacebo: don't override existing rotation attribute (PR #20831) 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: Niklas Haas via ffmpeg-devel Cc: Niklas Haas Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Archived-At: List-Archive: List-Post: PR #20831 opened by Niklas Haas (haasn) URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20831 Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20831.patch This is a regression introduced by the addition of the rotation option, which overrode the existing rotation attribute that may have been set to the image. To fix it, add the rotation istead of setting it - however we have to do this directly when mapping, so as to not add it multiple times. Fixes: 4f623b4c59 >>From c42c4cd665d0d79b7ffe3d5a668fbccd8898c905 Mon Sep 17 00:00:00 2001 From: Niklas Haas Date: Mon, 3 Nov 2025 18:18:33 +0100 Subject: [PATCH 1/2] avfilter/vf_libplacebo: don't override existing rotation attribute This is a regression introduced by the addition of the rotation option, which overrode the existing rotation attribute that may have been set to the image. To fix it, add the rotation istead of setting it - however we have to do this directly when mapping, so as to not add it multiple times. Fixes: 4f623b4c59c3c838f588e9def7b59dcc26dee7b9 --- libavfilter/vf_libplacebo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavfilter/vf_libplacebo.c b/libavfilter/vf_libplacebo.c index 87d00519c3..393a0126c1 100644 --- a/libavfilter/vf_libplacebo.c +++ b/libavfilter/vf_libplacebo.c @@ -912,7 +912,6 @@ static void update_crops(AVFilterContext *ctx, LibplaceboInput *in, image->crop.y0 = av_expr_eval(s->crop_y_pexpr, s->var_values, NULL); image->crop.x1 = image->crop.x0 + s->var_values[VAR_CROP_W]; image->crop.y1 = image->crop.y0 + s->var_values[VAR_CROP_H]; - image->rotation = s->rotation; if (s->rotation % PL_ROTATION_180 == PL_ROTATION_90) { /* Libplacebo expects the input crop relative to the actual frame * dimensions, so un-transpose them here */ @@ -1150,6 +1149,7 @@ static bool map_frame(pl_gpu gpu, pl_tex *tex, )); out->lut = s->lut; out->lut_type = s->lut_type; + out->rotation += s->rotation; if (!s->apply_filmgrain) out->film_grain.type = PL_FILM_GRAIN_NONE; -- 2.49.1 >>From 9c6ffeaa08583d1b4d3f325876e4d16f9061bdaa Mon Sep 17 00:00:00 2001 From: Niklas Haas Date: Mon, 3 Nov 2025 18:23:31 +0100 Subject: [PATCH 2/2] avfilter/vf_libplacebo: make rotation check more robust This currently does not make any difference, but it makes the check more robust against possible future changes to the rotation parameter. --- libavfilter/vf_libplacebo.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavfilter/vf_libplacebo.c b/libavfilter/vf_libplacebo.c index 393a0126c1..42501c51f2 100644 --- a/libavfilter/vf_libplacebo.c +++ b/libavfilter/vf_libplacebo.c @@ -912,7 +912,9 @@ static void update_crops(AVFilterContext *ctx, LibplaceboInput *in, image->crop.y0 = av_expr_eval(s->crop_y_pexpr, s->var_values, NULL); image->crop.x1 = image->crop.x0 + s->var_values[VAR_CROP_W]; image->crop.y1 = image->crop.y0 + s->var_values[VAR_CROP_H]; - if (s->rotation % PL_ROTATION_180 == PL_ROTATION_90) { + + const pl_rotation rot_total = image->rotation - target->rotation; + if ((rot_total + PL_ROTATION_360) % PL_ROTATION_180 == PL_ROTATION_90) { /* Libplacebo expects the input crop relative to the actual frame * dimensions, so un-transpose them here */ FFSWAP(float, image->crop.x0, image->crop.y0); -- 2.49.1 _______________________________________________ ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org