From patchwork Wed Jul 10 22:50:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 50459 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:b968:0:b0:482:c625:d099 with SMTP id w8csp706621vqx; Wed, 10 Jul 2024 15:50:27 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVujHb4mWbSWpemgag/w7wOZ37f4HHcR5wMrkl07kpjxXtkLA0fJQVMjiqqIZcH9QCKTHyLKij67D09c3d/7TaCSqhQXW6CwrLH4Q== X-Google-Smtp-Source: AGHT+IH/Hedx2pmoKPYn/YBxZsvfkxLKiDJoEq0s/5of/lc+EScFSkWyxtOCozKyPdaikIXvOZxY X-Received: by 2002:a17:906:1c0b:b0:a77:de2a:aef3 with SMTP id a640c23a62f3a-a780b6b1698mr428609266b.19.1720651827344; Wed, 10 Jul 2024 15:50:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1720651827; cv=none; d=google.com; s=arc-20160816; b=HSU2imd/dFllMjq60HSnlRHibvZASwyPSkdyBvykMQ/La/uk+8nu8bUfeNxABzF8Pg kOOoClb1CvOsheEajfhwrpXD8/umUHBDtXvZ2AJCtadXx2h4L5w7i1wPZRAf9bGbvs3e 7aI1nFXv+JPjW9c3wLa0zNqEyjtrs0J1T6+foZSaqxWU4c5xdCI3/X2SMHBFwhBADCIN HM2E28X72CE8ssEXxuG0cJ+JhpwjxhM/i37g9IBA0Dz8n28Y50LPJgzi10b9HFO0dUr1 uEfT36Ykn+agNPCn9Ys51DuELZJcNyj2d/Qqkqdsy1P2y21w/h4x187jnSYncS/d924S 8Z2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:message-id:date:to:from :dkim-signature:delivered-to; bh=c/cgHuCeJTUv9TjOBhODo1Iq8jcNHlnlnV+I3813XJg=; fh=e5zN9xSzcxLA6bGo3lF+CqTbY/oLwzApV03EO/RBfgQ=; b=c6FzbFEKvYUkPielEYZVEZ5vQusMOHUt1VqeOD+ydd4F+ywB19opxFZKLyZ+jDJbb7 PvcEY+yEA52qQYyD554U+tjn8C7DkYTTIO4f/+osEM/fNtgOq1EtK9MpPwwVPCP4oMgg M6rl0UScvtSztLr9NPCSmQo1kFJqz59Z2QoAI7RPVc+b9ZGiowBFnNgtWfS6LATT9jM2 S15ck0mhv2h3BoJwaY2b3zhPp2AL2UlXnG8YPAQkt7voJrZdaEotafmsGDF8AWYjnvIg EZiYzJOl+uueodlFrNczL5mGpRaZgxi63H1aOg4jHxIZPVT/Bht2nF8IxHPUk37q6lHx 1rnw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@niedermayer.cc header.s=gm1 header.b=oPlrphMY; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id a640c23a62f3a-a780a9c88cfsi250598066b.165.2024.07.10.15.50.26; Wed, 10 Jul 2024 15:50:27 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@niedermayer.cc header.s=gm1 header.b=oPlrphMY; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 65DEA68DB3A; Thu, 11 Jul 2024 01:50:22 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [217.70.183.194]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C563D68DA82 for ; Thu, 11 Jul 2024 01:50:14 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 96F0B40004 for ; Wed, 10 Jul 2024 22:50:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1720651813; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=FB2oTq5lWTsSHDQpMV8eKJjI+gDX5eAjUgEYj8fSuD8=; b=oPlrphMYS2CLYprZGMElxAxWyZnFm8fN1f773xjeOaJRwa8mNn2xyH6sanPty+TY0mgs+s 3sNevRH76KWQArH92Z8QxWbkAkGzjLbQdEeV4EmyqV1HNL36mj121W+xKafyygVLcCw4Qd Jr/nXQbpXN9jeOjyNz3yX3/O/xmrPDyBKk1MyPBIaUFfRWjBfzpfAgrodiSXBrVgt4Nqwj vB/zw97WFk7e/4kqYXoV1uC2+uE8XV6eB/lTpvMGPUFux+JvAYU/lnVcx/IJkhabgdHKOl OjoSaQ5OOZ4LUiAggXJqhyMqOJXNIYGVoVSc4tQQ5bDqHhxStiKodl63kk8v6Q== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Thu, 11 Jul 2024 00:50:07 +0200 Message-ID: <20240710225012.691594-1-michael@niedermayer.cc> X-Mailer: git-send-email 2.45.2 MIME-Version: 1.0 X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH 1/6] avfilter/vf_tiltandshift: Free dst on error X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: ZJFipcx+e9Tz Fixes: CID1559901 Resource leak Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer --- libavfilter/vf_tiltandshift.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavfilter/vf_tiltandshift.c b/libavfilter/vf_tiltandshift.c index b49a713339d..08bcb062473 100644 --- a/libavfilter/vf_tiltandshift.c +++ b/libavfilter/vf_tiltandshift.c @@ -237,8 +237,10 @@ static int output_frame(AVFilterLink *outlink) // set correct timestamps and props as long as there is proper input ret = av_frame_copy_props(dst, s->input); - if (ret < 0) + if (ret < 0) { + av_frame_free(&dst); return ret; + } // discard frame at the top of the list since it has been fully processed list_remove_head(s); From patchwork Wed Jul 10 22:50:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 50460 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:b968:0:b0:482:c625:d099 with SMTP id w8csp706692vqx; Wed, 10 Jul 2024 15:50:40 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWMV0hO8GkHH1NVIngSdbv93rv0S7KS3EkY7pYwNCMd8EQe1CR6DcEgCHMVQ6UFKzBWo/o+Zaz/W39HAmxamrzVT6pDur56TR8GLQ== X-Google-Smtp-Source: AGHT+IGM4fRGcYIjlVx+BhE1qRF45sgYHw4Mb7X9cWJSI8dJhEBgHOtM2WbISsRo3pcs6dk3r6WH X-Received: by 2002:a19:5f44:0:b0:52e:99fd:e3d2 with SMTP id 2adb3069b0e04-52eb99d4fe9mr3598319e87.66.1720651840369; Wed, 10 Jul 2024 15:50:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1720651840; cv=none; d=google.com; s=arc-20160816; b=A0S2Hdx6FVGmDeUafolhCS/37K3SAAKrQpdfl1PJrmIlxEPpsxNHWCObh+AahvvPAI 4qp/QoPNvl+pP0iI4GxtU9KPW/ScEoEYODGpFNdH84IM2KfHG/0U2LYzBESkE3uU5ZCo dF3KKjnmDBS4kVqVLbpyNbCjHrIVBdJq54GMUgtdUVExn5oG6XQAjMuuiv6BV2jJpNNe FdKpxw7gLlMuytYVTMhOkQXqUtFsTZyToMgB+qoQCjurKOPqC3AZaQI1O2OMx6jKTEC8 oYZUONa/+ZuFImyrOtM5siSEiqnoIWsZT9KIHeh2eap7N2khvezdkSo7MudEvCMFFkEX Ez8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:dkim-signature:delivered-to; bh=Zce8LzitK5CRq66YAsHDog8AikV0138JATf1s8/59XY=; fh=e5zN9xSzcxLA6bGo3lF+CqTbY/oLwzApV03EO/RBfgQ=; b=cImYk2YTrJ01p0aMHmzXgzskN1rj/2UbotYbuIdysDImfwXQk7t7Y0MflpVn3mpTp4 n+wjGOQZMdJVv3EI/80IHUaIi7iVRWl8QLQSwgFeP3njCkpZtMJ0HyJhyAMJA+iMJaiN ud3vLbRhfu99C8ZXZLjOB07tNkZnHJMyPKWG0JSTLY1URguxmm71KdDvkwbUZGq0giB7 IFg5hEIwaFBfoIW39Xt4V7eyOLuHnhmYtVV580w6EY5UN5RHvOxXbtV0RDswROwkYY+y y8v1WIDuu62BavJY2OWGnz6FbVn5tuBk0bgBFSat2x0nXXMQ7jGbX1N8y+HC2VLzBjRu CrVQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@niedermayer.cc header.s=gm1 header.b=gTKQQ41C; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id 2adb3069b0e04-52eb8e599besi1505777e87.80.2024.07.10.15.50.39; Wed, 10 Jul 2024 15:50:40 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@niedermayer.cc header.s=gm1 header.b=gTKQQ41C; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 1711368DB9B; Thu, 11 Jul 2024 01:50:24 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [217.70.183.197]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 8231E68DA82 for ; Thu, 11 Jul 2024 01:50:15 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id B65C81C0004 for ; Wed, 10 Jul 2024 22:50:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1720651814; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zNzzzpCkKg7XMZ7jAH/lpvY4MqJPeJgcws3/DEfazuw=; b=gTKQQ41CRuRqHOkdqhlAMCsU+nr9h9EveeZFii3usfIfMXyew9hfqxP20XK1cU1zP7CcIl 5wQSbcP3Pc7w53Oh8ptoLZs9s7+3m0tATgo5CBdOcD4XGzLH/mq+vXo57OxaPTRHy175Oi y1JEYd1CumD86eeHlS//ByjLPiBTvgJdS4KadC66pgipZHZcqsk5CQZmrNc4bgze2pjhHI 7xN6Ld3NUfv6KR0MLJ/1qW2NfuHSBT7ZITuaxeM285Z4nzt0FEWPFYpUTAtPVMhpt2t4t0 Wr/+knbJnDkYmphlQ9Aj3agb4iF0eHOK45WO/6/Uk7MiMWKkHMbvEgJI/JAevg== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Thu, 11 Jul 2024 00:50:08 +0200 Message-ID: <20240710225012.691594-2-michael@niedermayer.cc> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240710225012.691594-1-michael@niedermayer.cc> References: <20240710225012.691594-1-michael@niedermayer.cc> MIME-Version: 1.0 X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH 2/6] avfilter/vf_tonemap_opencl: Dereference after NULL check X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: c8lyR6+3lIX8 Fixes: CID1437472 Dereference before null check Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer --- libavfilter/vf_tonemap_opencl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavfilter/vf_tonemap_opencl.c b/libavfilter/vf_tonemap_opencl.c index a2a27307b48..03219857d46 100644 --- a/libavfilter/vf_tonemap_opencl.c +++ b/libavfilter/vf_tonemap_opencl.c @@ -343,8 +343,7 @@ static int tonemap_opencl_filter_frame(AVFilterLink *inlink, AVFrame *input) int err; double peak = ctx->peak; - AVHWFramesContext *input_frames_ctx = - (AVHWFramesContext*)input->hw_frames_ctx->data; + AVHWFramesContext *input_frames_ctx; av_log(ctx, AV_LOG_DEBUG, "Filter input: %s, %ux%u (%"PRId64").\n", av_get_pix_fmt_name(input->format), @@ -352,6 +351,7 @@ static int tonemap_opencl_filter_frame(AVFilterLink *inlink, AVFrame *input) if (!input->hw_frames_ctx) return AVERROR(EINVAL); + input_frames_ctx = (AVHWFramesContext*)input->hw_frames_ctx->data; output = ff_get_video_buffer(outlink, outlink->w, outlink->h); if (!output) { From patchwork Wed Jul 10 22:50:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 50462 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:b968:0:b0:482:c625:d099 with SMTP id w8csp706734vqx; Wed, 10 Jul 2024 15:50:48 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVpM989NJY1Ht1ee4yGM8X9p9XIXmObFSHtDOBy4T+KnS5B6GjE4P47UINMXMmYYomuXWtCyrn5ZZ6g5DO0HOgK0rd2WaLFDwLSiA== X-Google-Smtp-Source: AGHT+IEgEiEGy4EwU/RIipUW5g9YAyhm6GumliOWs3TpeVFHuCgP7PtJrGvhdl+5t6l7jPkKQt7U X-Received: by 2002:a17:906:b748:b0:a77:eddf:a49c with SMTP id a640c23a62f3a-a780b6fef57mr389928866b.41.1720651848547; Wed, 10 Jul 2024 15:50:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1720651848; cv=none; d=google.com; s=arc-20160816; b=zQ0anyGDfif39SMJIeF+MkRAlyaRvmXHvAVQ+m0MgEEmzjeSiHFRiSK1PXjKwhupR0 rdYl7VXUuarfJOyh23djOlrgsftL9EEnPu6VoFBtlUbxbQURqv1lgcKU/sWxXtm2Yn8k XHu0XVD0sT6f2voeAbJ236HL+D3Lww4YmhIEu1H1P2YPyVWTqg4XSDNqgzlExUVDgX8P 8nLFac8DOPj9O/e62kd4c/gNYRAPsnzGTeZU+H3lY9MUB2SN3qu92/7tkjgUegol4Cbj 1j+XiB8wVlJqQha8zn8YpLDUrpFD2eoupX7/Q+/UIYxqZQGQokRnC7+DxO4GjCEcjgVH yHjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:dkim-signature:delivered-to; bh=MlteVnybz6hbhxWAgRJ3QbpGIdybYNlZMZ2XUahyiyk=; fh=e5zN9xSzcxLA6bGo3lF+CqTbY/oLwzApV03EO/RBfgQ=; b=ICQIsyxwBpv9BoYO1I8g6QF9jUb+pmNPXqwKIGQwHGglw7iCh/CqPOReB8UwFygbPm /3lpvMqh4BorYBiQzcHbOgPR6Bjt6kas2/Ahb97EJW+wTJHHxebZ/NxwPwIcQjUMMW4u ovKsXb0Gc38TrqjVt7a5GwNNbn1OTIcMNGq/DptLTtnryD+QMjiOocmxkho89Ac37bOQ s4YXK1VHMCvBrGqjWdQqqFcIZCF+Awk7H46euIHbOQ6Vo+BFrq9LVfpv5cGzg6c0VqQb XEym6CIGZw+EMeJ/Zm0MCrSCjYm7XRXgxrJrNoy+YFbRqf4BRILN5WTfvKJdjp3PJ622 XNGw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@niedermayer.cc header.s=gm1 header.b=auTZzRQh; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id a640c23a62f3a-a780a9c8481si246513666b.148.2024.07.10.15.50.48; Wed, 10 Jul 2024 15:50:48 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@niedermayer.cc header.s=gm1 header.b=auTZzRQh; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 3DE2768DBA6; Thu, 11 Jul 2024 01:50:25 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 5DDE768D87E for ; Thu, 11 Jul 2024 01:50:16 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id B9B1760002 for ; Wed, 10 Jul 2024 22:50:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1720651815; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=3dQXnunaoRuuveibvCeCAZMNQlcBD7O7jU4/XWg1mQw=; b=auTZzRQhDzt+JhcN4opcld+VsNezC7xscxNKBwaBWWpWy+8T+el1rs4hMIJdCliAkwEdU6 ZKN1JJJgGefJN3mlxbixOUsuxg8jiG0UrZDRDLwaTZeBP2YYkItKNV5n9UGjeyP+4Bv1GU +JkyfyMbgdjlgo5uCo68DFqVUFGtKTJlI/HmhXtn/DX5xeWukvNmnlQhOGhZitWvpMA9C4 CAVQ+mxGiFjhbSkquT2fwtRwzCScO7vHKE2fzp8Xfq1snrAXI3WPXtFAE7XR59kGlcbY+0 DbhhmlX0fQdUhTJJnMH8T7nZ4N4MjoGzeRk7kGBEY/FH1FiLXWY2MTsb/lraWg== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Thu, 11 Jul 2024 00:50:09 +0200 Message-ID: <20240710225012.691594-3-michael@niedermayer.cc> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240710225012.691594-1-michael@niedermayer.cc> References: <20240710225012.691594-1-michael@niedermayer.cc> MIME-Version: 1.0 X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH 3/6] avfilter/vf_tpad: Dont clone NULL X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: J30OynUo9nij untested Fixes: CID1440836 Dereference after null check Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer --- libavfilter/vf_tpad.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavfilter/vf_tpad.c b/libavfilter/vf_tpad.c index 72d0bf338fe..a230a50022c 100644 --- a/libavfilter/vf_tpad.c +++ b/libavfilter/vf_tpad.c @@ -132,6 +132,7 @@ static int activate(AVFilterContext *ctx) s->cache_start = ff_inlink_peek_frame(inlink, 0); } else if (!s->cache_start) { FF_FILTER_FORWARD_WANTED(outlink, inlink); + return FFERROR_NOT_READY; } frame = av_frame_clone(s->cache_start); if (!frame) From patchwork Wed Jul 10 22:50:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 50463 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:b968:0:b0:482:c625:d099 with SMTP id w8csp706791vqx; Wed, 10 Jul 2024 15:50:58 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUUYqcMwQShcG4Sq5UDpizyg5QhoUuKkmV+GzMginlsEmRswY9/wwxFt/mN8L9E3GKEr05HNLtFXK4lMTKdsV8ojoFZoyXo3dcI4w== X-Google-Smtp-Source: AGHT+IFpp8GmqGqVbZcY/mvCzg9FM1sjY2dm1K/ZJ5L4mh4MJ2bT7tsx7I0NNOOQyuE4U1hj8Rof X-Received: by 2002:a2e:6a05:0:b0:2ec:2d75:509c with SMTP id 38308e7fff4ca-2eeb31977c3mr43711621fa.46.1720651857977; Wed, 10 Jul 2024 15:50:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1720651857; cv=none; d=google.com; s=arc-20160816; b=grqhJMEpjzkIMw/S7CpLQuO0JE1wFlqMfwoZWKtVtc0eUOygLi7ZBQly6W7tQcTmbS Zum2LHXXrbHGZEbPjk/SER/+eIKJNe14W3ZBKW6J6sNR4MVf/Wp0vUUzDivPbUKTFHe7 8oCpN2GV/msw4O+alC3YUtNierFo7dlzndxnG1JudXAwIqHjBdAMTwjojU1jHTyu73WO IQhGEblbeL5Vs8qvIfIHeFYuUtJSWatoY7CTycPOlrprcrsLsN+F2fhPkYLo1RR+afEF RE3jvrfbFFZmScwSs+PA3NMvW1b6oMYeRJl/WjaJDGKN/U5CqFrwXFrCN1Uvt20+Cgh2 AiQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:dkim-signature:delivered-to; bh=Po+Vl8bl/KG7w2oqxSLcab0/TZ/EuIa3bpoTPd3k1qE=; fh=e5zN9xSzcxLA6bGo3lF+CqTbY/oLwzApV03EO/RBfgQ=; b=ZlNl0YeAqM4XNWEtfIHKcp4v+Pi5GbhYzMT9DfwKgkDogoU+CfI6SNAJV9w06zHrSo hnNqSmiT6v2LMllIPghePhVf9H6thudYt38bJ+9BMubImkKlSmv2m5JCnoMfZFBKRox6 DfuvZn9T15b8BgY/rr/dd6tzIT3ovbqcYAe66LJxP1qBLCW3TqJSQk02oiQG0/PqCx8v 8u8toSxVVUbCMvhoTQPJxBm0TyIyS6tvHEbT02RqhHpPfbZSge9KriMqUoeKwPIweFAd osVamamNnRCUHABeWGDgo7pMwtJvVxPEKg7LutAhQqeZkOFts1LPaiKBGYra8+Q/0n/C 0UcQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@niedermayer.cc header.s=gm1 header.b=hjCorRCr; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id 4fb4d7f45d1cf-594bc3efac5si2639449a12.157.2024.07.10.15.50.57; Wed, 10 Jul 2024 15:50:57 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@niedermayer.cc header.s=gm1 header.b=hjCorRCr; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 4D57768DBAE; Thu, 11 Jul 2024 01:50:26 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [217.70.183.197]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 06BDB68DB3D for ; Thu, 11 Jul 2024 01:50:16 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 633811C0003 for ; Wed, 10 Jul 2024 22:50:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1720651816; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zgZHPBayCwo7xxR1g2ayqxipyC5xiBA/7SlhMnMfm0I=; b=hjCorRCrGiLS4eWjvWsn1WI1IxlDTHe/V2lsQJzgqvdyvTMXClYb7w8gXHbQyyDiszImc5 AegsqvEj1sTCFvdhmfGyXs0bM40G8r3uA+hVxGrhHNj1h5hpQzkiugYbQJ39rnqW1xn1AE NeaXFGxig+9e3qN05jA74Vbm4hUCSBf245pPbDc5Hn5d3/2pCUkOQQVx50z2Kh4BEso5GM 1gbr5OqzDWqeXGmpltcuX+wsfwH3RDaoz/Z4ihVxo7H2zwSNs/b/gKywOFRdUnWzKUveSQ /0nXjGfTD5GzyzAi+ofHaFc+G+pHFEcELqeCHsVOZV4zp8+RZgZVj2VOEUbsmw== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Thu, 11 Jul 2024 00:50:10 +0200 Message-ID: <20240710225012.691594-4-michael@niedermayer.cc> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240710225012.691594-1-michael@niedermayer.cc> References: <20240710225012.691594-1-michael@niedermayer.cc> MIME-Version: 1.0 X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH 4/6] avfilter/vf_unsharp_opencl: Use AV_VIDEO_MAX_PLANES X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: iUNYaAZa0nNe Related: CID1423281 Out-of-bounds read Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer --- libavfilter/vf_unsharp_opencl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavfilter/vf_unsharp_opencl.c b/libavfilter/vf_unsharp_opencl.c index 09398464ca3..1b7cbde9fdb 100644 --- a/libavfilter/vf_unsharp_opencl.c +++ b/libavfilter/vf_unsharp_opencl.c @@ -59,7 +59,7 @@ typedef struct UnsharpOpenCLContext { cl_int size_y; cl_float amount; cl_float threshold; - } plane[4]; + } plane[AV_VIDEO_MAX_PLANES]; } UnsharpOpenCLContext; From patchwork Wed Jul 10 22:50:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 50464 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:b968:0:b0:482:c625:d099 with SMTP id w8csp706835vqx; Wed, 10 Jul 2024 15:51:08 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWNZyJib9hzKqEhPNiskugEj5eUFbvIB0EQ+Qaua2+JL5cialrFL1BJ025srXfBY7FzH5pLgOeW40qrMecyPO3Y8pa/9BASzUJOtw== X-Google-Smtp-Source: AGHT+IEojBMwXf1f38s0VAfa4JmdYorGHKlMqavUuqNAnBDB8LCBAA44B8A++3vdPWimmloojtr1 X-Received: by 2002:a17:906:6d8:b0:a77:eb34:3b4f with SMTP id a640c23a62f3a-a780b6b1db8mr436672166b.17.1720651868023; Wed, 10 Jul 2024 15:51:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1720651868; cv=none; d=google.com; s=arc-20160816; b=FSwpkRzTbU3Oly8c+1Ac+XIwVnWVXimkfr45HRnmDRQRLMnFhKnBgQu2CQzlR+Af6R FfH8Iip5v4MBzsV196M4pyzABvNcXSp7oRJnm17LeuBttu22Ki876Er5p5ne0iLVkVG7 OmQZGyCMANQjhbXdGMvGsSDK/44bEirwoSXrI7RRJQagXvEpGoS7ShWcKNBb/o38I6eY 76CmZYBlfBDhJmrqaNKJpXGz+GjXaFVhXVPU0oydMDZtQvc7kjdy8rKQoKZaOIR/e8zp OTOmA0ABRP5YoNNSH4hef5Wo3y6xnhTdXuICIdS9uFpccw/3EDEEpbgsSklcUIi+tJwC wXuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:dkim-signature:delivered-to; bh=+ZlyI7rhagG1tTMH8ssF+jpIYjaaJ1ve6HWrGltOSHQ=; fh=e5zN9xSzcxLA6bGo3lF+CqTbY/oLwzApV03EO/RBfgQ=; b=u7Lzx8hSNG07ncVgWlwEpLGjR11KmQQWeSDEXKJek1SGd7Ntmt3e8ngmNYO+6woyiS eKpYmAq3EtQZKHW9KnvkTfZmP3JHGwr6mP3UNywym98XFDa6ls3QcjD/HvWlJ7OjGwj+ m5Zp2kLcnmJsEhfcV1NrdzSgcSwle2wK+NJvBiaC3Q7DNzpyu86O+oal5dfdDATg+4uF Aumj/e4aJrqX+1Zco23JyLPwdeidgjnbFhAmqbCL4yD9RCprfdMApi/+Q+vGxNHfxr1N 644Nri4xa+dISGxFUVr+D2UHCSqN7UYcBpol2PhaYg3+/Xyb6gAKtRu/V52l3LkX5+lh K2ag==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@niedermayer.cc header.s=gm1 header.b=k2ubUZ9K; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id a640c23a62f3a-a780a9c854esi252246066b.177.2024.07.10.15.51.07; Wed, 10 Jul 2024 15:51:08 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@niedermayer.cc header.s=gm1 header.b=k2ubUZ9K; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 10E1368DC09; Thu, 11 Jul 2024 01:50:28 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [217.70.183.197]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id B84DE68DB3D for ; Thu, 11 Jul 2024 01:50:17 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 2831A1C0005 for ; Wed, 10 Jul 2024 22:50:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1720651817; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=f41iMDoTU1ewHFf+MQGM89CK5JTiy5oz+Hsi6BUvnIw=; b=k2ubUZ9KfC/5TPz5zDMcx4x1gZHsOFMNTIDQMuhMkrTxpJMhrfes/1ggivVL8/01HnUC+q EUYR7RUMQtPktTAYhcrhlPIWq6kgyxYYwIOlLGbnpcAVK6aiWUuZae8W80swJSuwLaU1Hj 2AQqOyXhv+4VPdtgeok3WRLOYR72XHk5B+C5UYSUNEAE/IpdJMkMt3d/8UeCvdgUR9mDAd L4vatgXsKZvfaMucsdJiFYI+ykINWBrwxB4DM5TnGpQIwS7FScrTT2lPizjDMHrgMfFsNB 4cXpmrARJIZmxqoeiEo4Raj8OIsW99sLzKucuK3iQSubWRNduEOoMLqaDAzdSQ== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Thu, 11 Jul 2024 00:50:11 +0200 Message-ID: <20240710225012.691594-5-michael@niedermayer.cc> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240710225012.691594-1-michael@niedermayer.cc> References: <20240710225012.691594-1-michael@niedermayer.cc> MIME-Version: 1.0 X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH 5/6] avfilter/vf_v360: Assert that vf was initialized X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: hrvpkLmBoxmh Maybe helps: CID1504571 Uninitialized scalar variable Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer --- libavfilter/vf_v360.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavfilter/vf_v360.c b/libavfilter/vf_v360.c index 299dbe9ff54..9a6c31228d3 100644 --- a/libavfilter/vf_v360.c +++ b/libavfilter/vf_v360.c @@ -3789,6 +3789,8 @@ static int barrelsplit_to_xyz(const V360Context *s, case 3: // back bottom vf = (y * 2.f - 1.5f) / scaleh + 3.f - facef; break; + default: + av_assert0(0); } l_x = (0.5f - uf) / scalew; l_y = 0.5f * dir_vert; From patchwork Wed Jul 10 22:50:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 50461 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:b968:0:b0:482:c625:d099 with SMTP id w8csp709109vqx; Wed, 10 Jul 2024 15:59:11 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXfhknAEUEI+F2QP2cIUFNgoHMMde037aaSwx97e9eZXwsxF0dce5+dzcQFavfyW/DXMLlnHwjnj6TkYzFtQ/DfnktsQImHajjXiw== X-Google-Smtp-Source: AGHT+IEo5J0HuBGqlwRvAqiQzuuI35P1cNY8p3PcU2Pzc2B8GVkjybEWHjJXrh6jgCRLEnnXaBV7 X-Received: by 2002:a17:906:c7c9:b0:a77:aa6d:e0c7 with SMTP id a640c23a62f3a-a780b6b1e25mr394003366b.30.1720652351672; Wed, 10 Jul 2024 15:59:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1720652351; cv=none; d=google.com; s=arc-20160816; b=v9pY7l250avSCP4Kht0A7yv/9fb+Z9Huqi+HtgqqQM3KzRQp+jFwASw1TxHKDxWlat 4ea1G9Nht40j8Sa9T+BiTeaUmIEPzexMkNCDsNHI1kI2XRl83BiOi+KRHtgZPAAs/5FJ ZoaURjrf82pVQN5SnvI9qSLz3GpSfkfBg1CH55QdcHdrL2hzcj6RXaph+FdvA0u2/12E Uq6v0IlRyg9l5PqWmtwSmXRpX1Lsl1eh7gi6AO5uFvH+K+BDcFyJNpKwJGPMxnmN1HiL yvnHp46kmjoTVRJ3REEMDkotr8eNsc4TvWxnD0XRe8XdJCLB4KyeX3+L5InSap0A3S+2 ZNqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:dkim-signature:delivered-to; bh=jK6b2V+zDAlz7kayxp838UDnSmLRkOPrRqg45bNvFw0=; fh=e5zN9xSzcxLA6bGo3lF+CqTbY/oLwzApV03EO/RBfgQ=; b=mcnumb/F4Ruo7E+OgGim038TqInjeOjLOZNNOsjziDPFUFCB8mCJsKYboBPYwgyqiB 1Ypn/qC3rdfK04b8UOW3CqF8Mq5w7w0REZ9f+bVmx2sswktqQ4yUYA17a8I2YO5Sosup lwbuwLj/EdYIpxbJCGlKOPBQLDCmH+SDRgzFqXf7XLbi+DVGhp6+51N70d+6eNRkRXnQ IzC8GdKGU1NBPZvmI9pcUi48eGgnuSSH6Ei/ibRXQ17VxWzreOnUcNIuaD4maLvrgJij CHBwNlXFzAHTVK3U6kTuVkcKvsXR9W9M8KSmwBnqrrZR45NFkct3cOr6rjCSNVdYdeYb tzOw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@niedermayer.cc header.s=gm1 header.b=c1dFihc+; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id a640c23a62f3a-a780ab2c914si243977266b.724.2024.07.10.15.59.11; Wed, 10 Jul 2024 15:59:11 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@niedermayer.cc header.s=gm1 header.b=c1dFihc+; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 8D29E68DC1A; Thu, 11 Jul 2024 01:50:29 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [217.70.183.193]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 086B868DB68 for ; Thu, 11 Jul 2024 01:50:18 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 4E504240003 for ; Wed, 10 Jul 2024 22:50:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1720651818; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=WFOImKDFQOjs2rbEnJhYJP2cTX004CLaRbho7zEe1uk=; b=c1dFihc+i486hqhyI2OmE6SQPppyVWt6H8S7Q/1Mc9WVCIT8sf93kTHPdnq6kdEp8Ey/2W X6Gq6RudliwW8Ejqcuj8yk2TZMJ4uA8N2Vze2HxnMhxtO5ITSEizWpySFHgiV3aUyWQMIC EHu0yPL4xiXn0aEIQc6zDrW/3AWzzJLLMOVjvaitXPPABVUDfKofHU/j76RqBXFSWhoxUI /mkBNgZgF7aLc/oUUSk30wx3vmUJkUFuS75yN8c7w3ARvjDgq3b3RdV6sOWmk7ClXhZt65 NJ7YGJekyVH14a6+zEeH581T5W8JMLkGWqO3nijdNN3pJIaeYWV72aLaFt+Pig== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Thu, 11 Jul 2024 00:50:12 +0200 Message-ID: <20240710225012.691594-6-michael@niedermayer.cc> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240710225012.691594-1-michael@niedermayer.cc> References: <20240710225012.691594-1-michael@niedermayer.cc> MIME-Version: 1.0 X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH 6/6] avfilter/vf_xfade: Compute w2, h2 with float X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: HNMKqpkseQaI Fixes: CID1458148 Result is not floating-point Fixes: CID1458149 Result is not floating-point Fixes: CID1458150 Result is not floating-point Fixes: CID1458151 Result is not floating-point Fixes: CID1458152 Result is not floating-point Fixes: CID1458154 Result is not floating-point Fixes: CID1458155 Result is not floating-point Fixes: CID1458156 Result is not floating-point Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer --- libavfilter/vf_xfade.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libavfilter/vf_xfade.c b/libavfilter/vf_xfade.c index 4eea761dac6..e67a917d14f 100644 --- a/libavfilter/vf_xfade.c +++ b/libavfilter/vf_xfade.c @@ -956,7 +956,7 @@ static void vertopen##name##_transition(AVFilterContext *ctx, { \ XFadeContext *s = ctx->priv; \ const int width = out->width; \ - const float w2 = out->width / 2; \ + const float w2 = out->width / 2.0; \ \ for (int y = slice_start; y < slice_end; y++) { \ for (int x = 0; x < width; x++) { \ @@ -984,7 +984,7 @@ static void vertclose##name##_transition(AVFilterContext *ctx, XFadeContext *s = ctx->priv; \ const int nb_planes = s->nb_planes; \ const int width = out->width; \ - const float w2 = out->width / 2; \ + const float w2 = out->width / 2.0; \ \ for (int y = slice_start; y < slice_end; y++) { \ for (int x = 0; x < width; x++) { \ @@ -1012,7 +1012,7 @@ static void horzopen##name##_transition(AVFilterContext *ctx, XFadeContext *s = ctx->priv; \ const int nb_planes = s->nb_planes; \ const int width = out->width; \ - const float h2 = out->height / 2; \ + const float h2 = out->height / 2.0; \ \ for (int y = slice_start; y < slice_end; y++) { \ const float smooth = 2.f - fabsf((y - h2) / h2) - progress * 2.f; \ @@ -1040,7 +1040,7 @@ static void horzclose##name##_transition(AVFilterContext *ctx, XFadeContext *s = ctx->priv; \ const int nb_planes = s->nb_planes; \ const int width = out->width; \ - const float h2 = out->height / 2; \ + const float h2 = out->height / 2.0; \ \ for (int y = slice_start; y < slice_end; y++) { \ const float smooth = 1.f + fabsf((y - h2) / h2) - progress * 2.f; \