[FFmpeg-devel] [PATCH] lavfi/bwdif: remove interpolated sample clipping
Paul B Mahol
onemda at gmail.com
Sun Jul 2 22:45:23 EEST 2023
On Sun, Jul 2, 2023 at 9:13 PM Lynne <dev at lynne.ee> wrote:
> Jul 2, 2023, 20:48 by onemda at gmail.com:
>
> > On Sun, Jul 2, 2023 at 6:57 PM Lynne <dev at lynne.ee> wrote:
> >
> >> Jul 2, 2023, 18:54 by dev at 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 <INPUT> -vf bwdif=mode=send_field -c:v
> >> rawvideo -y <OUTPUT>.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 <INPUT>.nut -vf
> >> crop=w=420:h=240:x=700:y=300,scale=iw*2:ih*2 -y <OUTPUT>.png
> >> >
> >> > https://files.lynne.ee/bwdif_02_before.png
> >> > https://files.lynne.ee/bwdif_02_after.pngffmpeg -ss 00:00:00.417 -i
> >> <INPUT>.nut -vf crop=w=420:h=240:x=1100:y=200,scale=iw*2:ih*2 -y
> >> <OUTPUT>.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 <INPUT>.nut -vf
> >> crop=w=420:h=240:x=1100:y=200,scale=iw*2:ih*2 -y <OUTPUT>.png
> >>
> >> I'm sure I hit a newline. The artifacts are a lot more noticeable in the
> >> second sample.
> >>
> >
> > Single png images are not way to prove something.
> >
> > Please provide videos and not just single file that exhibit this issue.
> > (Keep showing same file over and over is not going to help show that it
> > helps)
> >
> > Also how PSNR/SSIM/VMAF changes before after not just in single sample
> but
> > in more samples.
> >
>
> I posted samples and instructions. Enough for a discussion.
> I'm not posting gigabytes of uncompressed samples.
> PSNR is irrelevant if there are visible artifacts.
>
Nope, you havent.
Some strange samples.
PSNR is relevant as also SSIM and VMAF.
Ignoring this does not help project, but just force tyrannic behavior.
_______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
>
More information about the ffmpeg-devel
mailing list