qctools icon indicating copy to clipboard operation
qctools copied to clipboard

Preview: Fit to screen introduces grid pattern in waveform

Open pjotrek-b opened this issue 3 years ago • 1 comments

Hi everyone!

Not necessarily an issue, but maybe good to know (*)? The mechanism used to rescale the preview window size may add grid-like artefacts into the waveform filter (and maybe others, too?)

Example here: waveform-rescale_alias

  • On the left side: "fit to screen"
  • On the right side: "100%"

The red box is just to indicate one square of the slightly "ghosty" grid. Do you see it?

(*) I just noticed this, assuming these were "interesting" compression artefacts :wink:

In case someone's interested, here are the full, original screenshots: waveform-fit_to_screen waveform-no_resize

pjotrek-b avatar Dec 13 '20 15:12 pjotrek-b

Hi @pjotrek-b, when scaling I used the neighbor scalar as I thought this would be the most authentic, however the downside is that a grid can be introduced depending on the amount of scale.

Potentially another scalar could be used, recommendations welcome.

For instance, this command:

ffplay -f lavfi -i mandelbrot -vf "format=yuv444p,waveform=i=0.1,crop=w=120:h=120,split[a][b];[a]scale=300:300:sws_flags=neighbor[a1];[b]scale=300:300[b1];[a1][b1]xstack"

Takes the center 120x120 of the waveform of the mandelbrot filter and scales two copies of it to 300x300 with neighbor and the default scalar (bicubic).

dericed avatar Dec 17 '20 16:12 dericed