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 F192546AA0 for ; Sun, 2 Jul 2023 18:41:37 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id C306A68C398; Sun, 2 Jul 2023 21:41:34 +0300 (EEST) Received: from mail-pj1-f52.google.com (mail-pj1-f52.google.com [209.85.216.52]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id BC87468C2AB for ; Sun, 2 Jul 2023 21:41:27 +0300 (EEST) Received: by mail-pj1-f52.google.com with SMTP id 98e67ed59e1d1-263121cd04eso1734177a91.2 for ; Sun, 02 Jul 2023 11:41:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1688323286; x=1690915286; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=OfgfBJDlLjEFFkrj/lIDECtwAgUeznoSoQ7OqkeLTG0=; b=ge8viJAiZofTXywNDLyFtJBLAOCeLWZXkP4pOglGzgYmXtDx53NIIpRXqD7FeKehJX nyBbufUjOF430wKCR+KM13gkaAqH/CUGIZPISHlJzR0scu7LzBSfJwumkzFZVeBxkpFo G1LvtQWSiT7PiQImTD+u8I2fLokXDHzk0XQoTDGcOVq765EvIZUoggeEQK2OEiNKdhTx L2fqmFzH495vtYpQ7JNEDtVWCzGp0dvm4c5yWiy6Cxi8dSMArwab79zU/Noae1iDj8Q0 wzz2Uf78Wu93ozAbrR1wwRxlAckUheQf+XBkJbCeijPimw+MCwKYOvVfRgorDB+xzlA+ o94A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688323286; x=1690915286; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=OfgfBJDlLjEFFkrj/lIDECtwAgUeznoSoQ7OqkeLTG0=; b=HkZRsegsDAuLSSxUXjC2yEaB/ukqEO8m0s5tT22kQio3qNErwehils2eM/OSOw6w6o oZSB6p4s/iqYO/AXIlhKgn/oau1ymbrbak9SiXzLRmUm1MvMfQbTXTUzNMuwCckgM+qD OdZSUtY+TKjKg6Y2k74+pmp+BuEcSJjZxQyYFHkvuj6yScklyj5ZE6ukTkYmgCBCfV/x XiL/yE/i0ZM/cP7UbcA9+bMfEr0GJKSGdzIKWUGmZBn4iyI0mmqpSAEC/EdEb2uO8+gU 2UO0+xubBXJjSiwo/8deS558Pz/dOC3qfYVziK7QZwilA1TNGX29PaB5riDHolEcHFA3 Y1rQ== X-Gm-Message-State: ABy/qLY4ry72c7eJzeidmhkYDS+Wr0/ylRytpweBRjMyktY0G7nL8UYZ /0hNwWsLY5A2k0VuzkhsO83FhaTkOP60pFZZE1Wc7nVGX0UDlQ== X-Google-Smtp-Source: APBJJlGySHIQ6nggVJ+pp6M0JXej/XOQtTAigYe3UdlTej9jL6ZawFmL8vXzr7uwNE0+ZKiI3hR9x1FCxQuduCqiks0= X-Received: by 2002:a17:90a:520c:b0:262:db59:3e29 with SMTP id v12-20020a17090a520c00b00262db593e29mr6950333pjh.34.1688323285707; Sun, 02 Jul 2023 11:41:25 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Thomas Mundt Date: Sun, 2 Jul 2023 20:41:14 +0200 Message-ID: To: Lynne X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: Re: [FFmpeg-devel] [PATCH] lavfi/bwdif: remove interpolated sample clipping 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: FFmpeg development discussions and patches 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: Am So., 2. Juli 2023 um 18:57 Uhr schrieb Lynne : > Jul 2, 2023, 18:54 by dev@lynne.ee: > > > The issue is that clipping the interpolated temporal sample against > > the spatially predicted sample causes artifacts to appear. > > > > Discovered while writing the Vulkan version (where I omitted the > > same check). > > > > The clipping in the code is carried over from yadif. Removing the > > same code in yadif does not make any difference to the output. > > I think that the check was simply ill-adapted to the new prediction > > code and does more harm. > > > > I tested replacing the range clip with only an FFMAX, and only an > > FFMIN, but in both cases, artifacts still appeared. > > > > Test sample 1: > https://files.lynne.ee/testsamples/mbaff_1080i60_idx.mkvTest sample 2: > https://files.lynne.ee/testsamples/mbaff_bdmv_1080i60_8slice.mkv > > > > Command line: > > ./ffmpeg_g -cpuflags 0 -i -vf bwdif=mode=send_field -c:v > rawvideo -y .nut > > Make sure to disable the assembly. > > > > Comparisons: > > https://files.lynne.ee/bwdif_01_before.png > > https://files.lynne.ee/bwdif_01_after.png > > Generated from sample 1 via: > > ffmpeg -ss 00:00:00.184 -i .nut -vf > crop=w=420:h=240:x=700:y=300,scale=iw*2:ih*2 -y .png > > > > https://files.lynne.ee/bwdif_02_before.png > > https://files.lynne.ee/bwdif_02_after.pngffmpeg -ss 00:00:00.417 -i > .nut -vf crop=w=420:h=240:x=1100:y=200,scale=iw*2:ih*2 -y > .png > > > > Corrected links for the second sample: > > https://files.lynne.ee/bwdif_02_before.png > https://files.lynne.ee/bwdif_02_after.png > ffmpeg -ss 00:00:00.417 -i .nut -vf > crop=w=420:h=240:x=1100:y=200,scale=iw*2:ih*2 -y .png > > I'm sure I hit a newline. The artifacts are a lot more noticeable in the > second sample. > I developed the bwdif to achieve the best possible balance between speed and quality of all different image contents from the broadcast point of view. This includes moving video as well as moving and static graphic elements. Unfortunately, the improvement of one image content often leads to the degradation of another. The code you removed fundamentally stabilizes the static graphic elements. This outweighs the slightly more frequent artifacts in moving video considering the general purpose of the filter. For noisy pure motion video content, for example, the w3fdif is better suited, since it does not make if/else decisions and thus does not produce artifacts. Regards, Thomas _______________________________________________ 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".