Log in

View Full Version : When is it good to convert to square pixels first?


fvisagie
1st March 2013, 15:16
Hi All,

I've seen suggestions that distance-based operations like blurring work better with square pixels. What are the operations for which it is best to convert to square pixels first?

Many thanks,
Francois

TheSkiller
1st March 2013, 18:55
A filter doesn't necessarily work better in case of square pixels. To a computer all the pixels are the same anyway, no matter what shape they are supposed to be.

Whenever you are converting to square pixels you are resizing and thus, in case of upsizing, create interpolated pixels.

I honestly cannot think of any fiter operation which *works better* just because of square pixels, not even blurring since Blur() has two controls to blur the x and y axis independently.


In my opinion you should resize to square pixels only if you are going for any kind of encode that ends up in AVI or for upscaling to HD...

fvisagie
4th March 2013, 07:53
Thanks. I think I grasp the issues involved, but what I need some help with is identifying exactly which filters to watch out for when working with non-square pixels?

Mole
4th March 2013, 13:24
"Converting to square pixels" is just another word for resize.

Same rules more or less applies for what you should before or after resize and whether you'll resize up or down to get square pixel.

See in your other thread for my thoughts regarding this:
http://forum.doom9.org/showthread.php?p=1618259

fvisagie
4th March 2013, 14:50
"Converting to square pixels" is just another word for resize.

Thanks for putting this excellent perspective to it! :goodpost:

2Bdecided
4th March 2013, 18:41
Compositing or working with square pixels graphics. (even then, I'd prefer to resize the graphics to match the non-square-pixel video)
Outputting to a square pixel encode.
Previewing sensibly on a PC screen.

I have never needed to work with square pixels for anything else. Ever.

Few filters "assume" square pixel because until HD, native broadcast/DVD/ITU/SMPTE-standard video was never square pixel.

fvisagie
4th March 2013, 18:56
Thanks, that makes a lot of sense.

But, so does this (http://en.wikipedia.org/wiki/Pixel_aspect_ratio#Issues_of_non-square_pixels):

Special effects software products must also take the pixel aspect ratio into consideration, since some special effects require calculation of the distances from a certain point so that they look visually correct. An example of such effects would be radial blur, motion blur, or even a simple image rotation.

Why I think this might be an issue (but help me if I'm wrong), as far as I know Avisynth doesn't propagate the source display (or pixel) aspect ratio, so filters have no way of knowing or determining the pixel aspect ratio. In addition to these and the ones you mentioned, are there other operations that require one to think about pixel aspect ratio beforehand?

StainlessS
4th March 2013, 21:21
but what I need some help with is identifying exactly which filters to watch out for when working with non-square pixels?

I guess the ones that mention such a requirement in their documentation are the main ones (:devil:), they would I think
usually have an arg to supply the pixel aspect ratio {EDIT or DAR} (or like blur have an h/v type setting).

Cant think offhand of any other Avisynth filters with pixel AR arg but eg VDub's Delogo has a pixel AR setting.

EDIT: A question thats always been in the back of my mind is, if pixel AR is pertinent to 2D filters with a radius,
how would that transfer to a 3D filter, ie what 'temporal Aspect ratio' would apply ??? {EDIT: 1.0 seems a cop out}.

Poutnik
5th March 2013, 08:40
A filter doesn't necessarily work better in case of square pixels. To a computer all the pixels are the same anyway, no matter what shape they are supposed to be..........I honestly cannot think of any fiter operation which *works better* just because of square pixels, not even blurring since Blur() has two controls to blur the x and y axis independently.

In my opinion you should resize to square pixels only if you are going for any kind of encode that ends up in AVI or for upscaling to HD...

For filters the pixel shape does not matter. But without independent axis settings it can IMHO matter for final visual effect because of different visual distances. One may want to have the effect the same in both directions.

Resize to square pixels makes sense in downsizing. I often resample 16:9 720/576 PAL to square 640/352, if I need to compress my record-view-delete DVB-T queue.
( There are no too big harddisks, are there ? :-) )

Wilbert
6th March 2013, 19:07
For filters the pixel shape does not matter.
Sometimes it does. Subtitle for example (want to apply to 'square' pixels).

paradoxical
6th March 2013, 19:13
Sometimes it does. Subtitle for example (want to apply to 'square' pixels).

Yes, which is why the very next sentence they wrote outlined a case where it would matter...

fvisagie
8th March 2013, 13:28
Many thanks for all the informative responses.

fvisagie
10th March 2013, 08:28
Sometimes it does. Subtitle for example (want to apply to 'square' pixels).

A work-around for non-square pixels in this case would then be using SSA subtitles - where you can set pixel resolution and display aspect ratio - with TextSub(), right?