From patchwork Tue Aug 11 15:19:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lance Wang X-Patchwork-Id: 21600 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id BF2C9449C14 for ; Tue, 11 Aug 2020 18:21:55 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 92C0D68AEE4; Tue, 11 Aug 2020 18:21:55 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pg1-f193.google.com (mail-pg1-f193.google.com [209.85.215.193]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 6BA6E68ADF1 for ; Tue, 11 Aug 2020 18:21:49 +0300 (EEST) Received: by mail-pg1-f193.google.com with SMTP id 128so6873144pgd.5 for ; Tue, 11 Aug 2020 08:21:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=cdAHkfR/YrHIiNK2VTR2ZKHdU1aWRJd2ktPVQ/YimTM=; b=VFI+TDqEkpZCKS6HP6qg9jdaKIfm4paJ43lAJX3bKxaMPRJXGJe7WWsvDq//Ah6qTo lsZ/JSLG4rgBP0xdzdL9/4S+mE9SzLtIDsAbnIE0qlGs+CSEzhsOJrpW5y9Ioi4gip7F /FY9xvxuL4oNMWupahlxkO/Q7gqBk5+ah6DC/CEcaLwfYmhEjib8W9c+oncUbRCT7TGD +ihg+ZbomSFvkGUgvZWa+aOIhQU/l4OjUi3QCUPsMU2rI2D/S4CKBnhc6sCkK/ID0JSl jztnyE9mXD7p2uj8Ty/8nPhTkVnirTtno6Qvo6T7m2yjkfOnFwcBhLoHc+cVrsjJ1uSU zhGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=cdAHkfR/YrHIiNK2VTR2ZKHdU1aWRJd2ktPVQ/YimTM=; b=pMkJzpHhbKtI3ep198gHrAZj3R3Fis2p9u+KYDstb2rumZJBL/WPumfbDCKmPOADtX YmORY2oqSgs1vhNG2/57nwx3zMGZ/Kz7UHe911D94nWO9c6X6M1BKzTvadgpRz0ghH8v yWGsf8e9TgP4+vGeC6aRqWnSdyTDJ4swhnVNNLlm6LbUYUJc1NjKLP3Pv/APhLJooiXK 1DdZZiSDhEVha3uCdBnIvx/pkrsByAwuY4MdK4hHTJucYdnk2mCvpzCjKdRZFYydo/7F BPTmKsYNpWUzI1lHA+LQ2A5uXG//uJXIX6IqBurmN3pueORSLYjUY0pzlC7cWQoGz3vX wTiA== X-Gm-Message-State: AOAM532BHIipXXmUblOXqniZnf/wVsTlmRnLwkiqgymS1p9BJ+aSy0EW 4MihveBJGjtQBO1yh/DLcFsCqMIH X-Google-Smtp-Source: ABdhPJziLR0WFNavjLBSHlAFyQS+xQV67/aJqqi2q8M5fYWj7F5fOdSDXgQEnkw0uN8uH9y/3FkqqQ== X-Received: by 2002:a63:9256:: with SMTP id s22mr1200778pgn.75.1597159307333; Tue, 11 Aug 2020 08:21:47 -0700 (PDT) Received: from vpn2.localdomain ([161.117.202.209]) by smtp.gmail.com with ESMTPSA id nu14sm3179269pjb.19.2020.08.11.08.21.45 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Aug 2020 08:21:46 -0700 (PDT) From: lance.lmwang@gmail.com To: ffmpeg-devel@ffmpeg.org Date: Tue, 11 Aug 2020 23:19:29 +0800 Message-Id: <1597159169-2380-1-git-send-email-lance.lmwang@gmail.com> X-Mailer: git-send-email 1.8.3.1 Subject: [FFmpeg-devel] [PATCH] avfilter/vf_w3fdif: 255 * 256 * 128 -> max X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 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: Limin Wang MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" From: Limin Wang max is initialized to ((1 << depth) - 1) * 256 * 128 before. Signed-off-by: Limin Wang --- libavfilter/vf_w3fdif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavfilter/vf_w3fdif.c b/libavfilter/vf_w3fdif.c index 5d64dbd..0f9efbf 100644 --- a/libavfilter/vf_w3fdif.c +++ b/libavfilter/vf_w3fdif.c @@ -163,7 +163,7 @@ static void filter_scale(uint8_t *out_pixel, const int32_t *work_pixel, int line int j; for (j = 0; j < linesize; j++, out_pixel++, work_pixel++) - *out_pixel = av_clip(*work_pixel, 0, 255 * 256 * 128) >> 15; + *out_pixel = av_clip(*work_pixel, 0, max) >> 15; } static void filter16_simple_low(int32_t *work_line,