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 E75E346B81 for ; Mon, 3 Jul 2023 23:21:45 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 49F4868C5B7; Tue, 4 Jul 2023 02:21:43 +0300 (EEST) Received: from mail-pg1-f179.google.com (mail-pg1-f179.google.com [209.85.215.179]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 392BE68C579 for ; Tue, 4 Jul 2023 02:21:37 +0300 (EEST) Received: by mail-pg1-f179.google.com with SMTP id 41be03b00d2f7-553b2979fceso1896791a12.3 for ; Mon, 03 Jul 2023 16:21:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1688426494; x=1691018494; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=QcdAyOVTTyDyMUuzjt9tqzTYMHuAO+52mUh6ghWlpwQ=; b=GsudbuARe5RwHLPriT23Ef92OSVkJXoP4fBC21jrTC7kbWhWuzM6+thW1amrQcV8EC eUlJrr4ikRNHyhy45hUhmM+K7GJfXsGOLAdknwUCGTs35hGJUtBd5EyRQJAZLyAPF2uh DWzutlSkI4OPEQrJFaq8f4kILt6bi3g8BA2QS4/ZXw4nShDIXb1P6KQorETK5uCofzom ndIWBmwMOvTQpZ29IwSkJqQtHwHIjmbMV44oP0BQ5Jo5EiJS+4PNoWO3IsNiVZSPQB1J MR4wdMs6Uja3YqmadBm/itj3joBOakrU3YibcIhEdG5fonWlH+mFAkUy3cR+JBcUAJkQ AaUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688426494; x=1691018494; h=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=QcdAyOVTTyDyMUuzjt9tqzTYMHuAO+52mUh6ghWlpwQ=; b=fHZH3MGYYCCOoD6YsnfFXTC8SDw86lse5AkpB+1R6UwX3sLiAD2X/IGm3kAjd6Hj90 H7eWI7IX2npwFmlY680WeOUrq2SOQtXXecFQE/pThbc7Gl4W1UAM+Dxu/UTwMoEwGEeH kJtkuIAigRIwT3BgHJjc1IPfLmfbtdf1bdNtX7DY6zxsJl/qd2WqHRpB2m/pByQRV/ih rsSGS/yaLC5i9gBmZEwINpIlISRv5PkeKxSuaw9YuAaRTl7EUUMRla8KzHJMUIq6aRSo nLVhJHZrNUInBsIeVHC4Tbfon40lJeynRZqHxsG4v+AbAxUPPDAoyDqqruJQlUO16S5r mU1Q== X-Gm-Message-State: ABy/qLZZZ6sWJ9AiNr7UPLmWyRxatR8ZtrxRy9l+JpIu73U9wP5+52uu yaLMpV6virkAVSQaWMXRqfGqxqFeWk85iByew3X/tLnE X-Google-Smtp-Source: APBJJlFdvlnG41l5RHahnZRBnfkLpf3Sq4ZKEEqgBP2CtnBwsWoW2POc/uAoypOuLwNYT0yMadJv2sIFet1cS5U1ujs= X-Received: by 2002:a17:90a:1947:b0:262:c6ad:6463 with SMTP id 7-20020a17090a194700b00262c6ad6463mr9685091pjh.2.1688426494028; Mon, 03 Jul 2023 16:21:34 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Thomas Mundt Date: Tue, 4 Jul 2023 01:21:22 +0200 Message-ID: To: FFmpeg development discussions and patches 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 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: Lynne schrieb am Di., 4. Juli 2023, 00:54: > Jul 4, 2023, 00:08 by tmundt75@gmail.com: > > > Am So., 2. Juli 2023 um 20:58 Uhr schrieb Lynne : > > > >> Jul 2, 2023, 20:41 by tmundt75@gmail.com: > >> > >> > 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. > >> > > >> > >> Could you post examples? I've been unable to find any that look worse > >> with the patch. > >> > > > > Unfortunately, I no longer have most of the test material that I used > years > > ago at the development of the bwdif. > > But on the quick I have this clip with an "Archiv" insert. With your > patch > > the letters are jumping. Without your patch they stay static. > > https://www.dropbox.com/s/jzoezjbi3ho9nja/bwdif-test.mov?dl=1 > > ffmpeg.exe -cpuflags 0 -i "bwdif-test.mov" -vf "bwdif=1:-1:1, > > scale=1920:1080" -sws_flags lanczos -aspect 16:9 -c:v libx264 -crf 21 > > "bwdif_original.mp4" > > ffmpeg_lynne_patch.exe -cpuflags 0 -i "bwdif-test.mov" -vf "bwdif=1:-1:1, > > scale=1920:1080" -sws_flags lanczos -aspect 16:9 -c:v libx264 -crf 21 > > "bwdif_lynne_patch.mp4" > > https://www.dropbox.com/s/tonsomtkhyaha91/bwdif_original.mp4?dl=1 > > https://www.dropbox.com/s/aaj8o5yzlocu55z/bwdif_lynne_patch.mp4?dl=1 > > > > Can confirm the letters are jumping with my patch. > Fair enough, consider this patch dropped. I've added the check > in Vulkan to make that version exact to C. > Thanks for testing and writing the filter! > Thanks > _______________________________________________ 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".