From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id D82944632C for ; Mon, 13 May 2024 19:43:20 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 6F9C568D6CA; Mon, 13 May 2024 22:43:17 +0300 (EEST) Received: from iq.passwd.hu (iq.passwd.hu [217.27.212.140]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 37B8768D539 for ; Mon, 13 May 2024 22:43:11 +0300 (EEST) Received: from localhost (localhost [127.0.0.1]) by iq.passwd.hu (Postfix) with ESMTP id 61FD9EA620 for ; Mon, 13 May 2024 21:43:10 +0200 (CEST) X-Virus-Scanned: amavisd-new at passwd.hu Received: from iq.passwd.hu ([127.0.0.1]) by localhost (iq.passwd.hu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id VJoMZzSOsZtL for ; Mon, 13 May 2024 21:43:06 +0200 (CEST) Received: from iq (iq [217.27.212.140]) by iq.passwd.hu (Postfix) with ESMTPS id F352EEA61F for ; Mon, 13 May 2024 21:43:05 +0200 (CEST) Date: Mon, 13 May 2024 21:43:05 +0200 (CEST) From: Marton Balint To: FFmpeg development discussions and patches In-Reply-To: <20240511015700.GS6420@pb2> Message-ID: <08bddf91-000c-0162-77fc-932a74796785@passwd.hu> References: <20240509064918.6654-1-cus@passwd.hu> <20240509064918.6654-4-cus@passwd.hu> <20240511015700.GS6420@pb2> MIME-Version: 1.0 Subject: Re: [FFmpeg-devel] [PATCH 4/4] avfilter/vf_geq: fix interpolation with 1 pixel width/height 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 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On Sat, 11 May 2024, Michael Niedermayer wrote: > On Thu, May 09, 2024 at 08:49:18AM +0200, Marton Balint wrote: >> Fixes ticket #9740. >> >> Signed-off-by: Marton Balint >> --- >> libavfilter/vf_geq.c | 20 ++++++++++++-------- >> 1 file changed, 12 insertions(+), 8 deletions(-) >> >> diff --git a/libavfilter/vf_geq.c b/libavfilter/vf_geq.c >> index dbe50e5250..12604d44a2 100644 >> --- a/libavfilter/vf_geq.c >> +++ b/libavfilter/vf_geq.c >> @@ -112,8 +112,12 @@ static inline double getpix(void *priv, double x, double y, int plane) >> return 0; >> >> if (geq->interpolation == INTERP_BILINEAR) { >> - xi = x = av_clipd(x, 0, w - 2); >> - yi = y = av_clipd(y, 0, h - 2); >> + int xn, yn; >> + >> + xi = x = av_clipd(x, 0, w - 1); >> + yi = y = av_clipd(y, 0, h - 1); >> + xn = av_clip(xi + 1, 0, w - 1); >> + yn = av_clip(yi + 1, 0, h - 1); > > xi + 1 should not need cliping, a FFMIN() should be enough Ok, will apply the series with that change. Thanks, Marton _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".