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 D750C430B9 for ; Thu, 21 Jul 2022 02:25:50 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 525FD68B369; Thu, 21 Jul 2022 05:25:48 +0300 (EEST) Received: from mail-pg1-f169.google.com (mail-pg1-f169.google.com [209.85.215.169]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 73B1C68818E for ; Thu, 21 Jul 2022 05:25:42 +0300 (EEST) Received: by mail-pg1-f169.google.com with SMTP id r186so378112pgr.2 for ; Wed, 20 Jul 2022 19:25:42 -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=g+XtXBEbpMRCOKy2D/y+W+Dvdlj3uHp/Erjxr49Mo8CxwZJjXteL1IoLU5pk/2qoTF MW4oaYkclMIA0DE8jNuKk0d+mklKfR6u6CIl1QowKkxtNXSK9B9+qy0sUyleaCQAngQR v7HjelycwckLtyjFW4H4i8v6lsyMwaOmCQGM6NGyr+WQFb4lk9AIDBhbXvmOf5QQEcWg xomXmVk6W022dulUVrNi2t+qb1wMbPWD1WWTgd7zwb5gYiid+oN95/bTb+XhNC6B4Kqo Oy+Fmp7Vm+NJSXxOYisaq3Mxdi2BgifLDFwJuzWFO91KwNnxGxvu/cKi3VOVoNUsOUSB 3pNg== 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=D2pLwk20LZEUn0yd9cnxRmEzC8OscGCBCpgVL7sVgqm5zr6Il+uas/0EBAFGqvQZK0 lRn6n6is4iIvqMJ8XNnHzQuSWwWmmzf+q0h4H8tPwgrtCIMzhmbdV+j8oez7l3ZFmoW0 EugoHsyiShWs/LyL9OD2soclhw6VOURitbCRdxo+8DmZSr/KHtWYZngkEj7dJ+WL/svI QYInbFStY91nY/sJAoqR0Tew38fOABE02zpmBQkkKpx4XUzPJYlod4k+LymVtBkw8yS9 ZmLOuMB3WZvXMfZTWNKWjuyCiz/BYFAGXA8l2dGEY4qGRWxqq3OQcFRf09vNVNJeg+tb tPRw== X-Gm-Message-State: AJIora9O/lvT5RMQFVoXU1F4YsTlYmPQ/7i63cSYzTqRqUi8kLAMld0N ubiQxk9whtXqddqem8D2HwkM6nsRKsO5qA== X-Google-Smtp-Source: AGRyM1v3x+OHqqR8uex2zPBLNELlScCMN3nsG7PMDBu4NIpKSf6vxAGxQvWAoF/fIoThXvVMzQgVeQ== X-Received: by 2002:a05:6a00:ad4:b0:52b:5db8:f36c with SMTP id c20-20020a056a000ad400b0052b5db8f36cmr23235712pfl.18.1658370339958; Wed, 20 Jul 2022 19:25:39 -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 j3-20020a62c503000000b005251c6fbd0csm340079pfg.29.2022.07.20.19.25.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Jul 2022 19:25:39 -0700 (PDT) From: Chris Phlipot To: ffmpeg-devel@ffmpeg.org Date: Wed, 20 Jul 2022 19:25:10 -0700 Message-Id: <20220721022514.1466331-1-cphlipot0@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v2 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".