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 BE3CB401F8 for ; Wed, 20 Jul 2022 04:41:32 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 4646C68B7CC; Wed, 20 Jul 2022 07:41:29 +0300 (EEST) Received: from mail-pg1-f178.google.com (mail-pg1-f178.google.com [209.85.215.178]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 5A14C68B495 for ; Wed, 20 Jul 2022 07:41:23 +0300 (EEST) Received: by mail-pg1-f178.google.com with SMTP id 23so15348558pgc.8 for ; Tue, 19 Jul 2022 21:41:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=O87wVmR7M7BeqGWY6sT2yeYJi/0sVKg81MI7tuW4Rjs=; b=LicMFOkP0L1pjqDSzL9+qH0RZaPLPow8pL3X0EmdGu2jtCsuypPmiUBXnrB22DFpKA GfaG7z3Us9bTL6bf3wqF0blbwXkbwAvzNJ149kMpJDjkupyB8WlOcn6M+uMVa6rcJMUa H/mtCeskSi6UiC7c8ZHDpIei3T0L76IVg2v9DUXLMn/tSzHJwrNYWCW+RskI7uJjvwLC NsCV6oAOsiLhIFYJdbeF7fC/2TnfDc3HvKloh/o3S1IIyzVj+woRnplsC/nDLVCcTAxw MwtAUkK6eSNHhg3uOm0earxNiSJOspvliXUzvq460n+af+zKbCbMCdkfvWsdbaVTu5yV QNkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=O87wVmR7M7BeqGWY6sT2yeYJi/0sVKg81MI7tuW4Rjs=; b=2iTyCdm1gXnTk5SHBAb1GJVefSiM0Qew8IFz5SJAGAOht55U4/GjRjj6b/CK5Nq1RW EvbbCxeJGOujNv8s0JXzjIbYGaDtPLGS+eKC3e2VMXxR2DrmsayWNzc/H5MO02IIxVXc aqiLBvHSDBnsfyO1isujzHiOHvkwmXcrAuTxHF/BBgC3bX2hktP2j4bSlQ9fXl1cGmw+ TJCumDYFrbiNNZxshFu4HYgktmk8iZ1jt5UeD7VW14azK2hWVikfQpwTazMfBRMsdGlc p1Z9BRk6FLUlijKDuHPwngfvvC+UompNkSGmoAbh79siuzCPbZMB0/RlQBd2JgI/3sXf EOYg== X-Gm-Message-State: AJIora+/uuGoEd0CLKoW1W00U6eGjcyL1M7MaYTy0crN8rZL213P/C/7 nHQ2/O+9hzmjw2FSTQzffQN6uQf4R3vNkw== X-Google-Smtp-Source: AGRyM1v2Hkk0lhSnFqHpcZLvSoaPQsXur+lHn7TV9YnjjA5W/DmBcpNu17NFsiCXnqKy70hNCI11AQ== X-Received: by 2002:a05:6a00:1a0f:b0:52b:13f0:6ab1 with SMTP id g15-20020a056a001a0f00b0052b13f06ab1mr35482228pfv.60.1658292081068; Tue, 19 Jul 2022 21:41:21 -0700 (PDT) Received: from localhost.localdomain (23-121-159-29.lightspeed.sntcca.sbcglobal.net. [23.121.159.29]) by smtp.googlemail.com with ESMTPSA id f16-20020a635110000000b003fba1a97c49sm10855907pgb.61.2022.07.19.21.41.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Jul 2022 21:41:20 -0700 (PDT) From: Chris Phlipot To: ffmpeg-devel@ffmpeg.org Date: Tue, 19 Jul 2022 21:41:13 -0700 Message-Id: <20220720044117.1282961-1-cphlipot0@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 1/5] avfilter/vf_yadif: Fix edge size when MAX_ALIGN is < 4 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 Cc: Chris Phlipot Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: If alignment is set to less than 4 filter_edges will produce incorrect output and not filter the entire edge. To fix this, make sure that the edge size is at least 3. Signed-off-by: Chris Phlipot --- libavfilter/vf_yadif.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavfilter/vf_yadif.c b/libavfilter/vf_yadif.c index afa4d1d53d..055327d7a4 100644 --- a/libavfilter/vf_yadif.c +++ b/libavfilter/vf_yadif.c @@ -120,7 +120,7 @@ static void filter_edges(void *dst1, void *prev1, void *cur1, void *next1, uint8_t *prev2 = parity ? prev : cur ; uint8_t *next2 = parity ? cur : next; - const int edge = MAX_ALIGN - 1; + const int edge = FFMAX(MAX_ALIGN - 1, 3); int offset = FFMAX(w - edge, 3); /* Only edge pixels need to be processed here. A constant value of false @@ -169,7 +169,7 @@ static void filter_edges_16bit(void *dst1, void *prev1, void *cur1, void *next1, uint16_t *prev2 = parity ? prev : cur ; uint16_t *next2 = parity ? cur : next; - const int edge = MAX_ALIGN / 2 - 1; + const int edge = FFMAX(MAX_ALIGN / 2 - 1, 3); int offset = FFMAX(w - edge, 3); mrefs /= 2; -- 2.25.1 _______________________________________________ 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".