Log in

View Full Version : AviSynth 2.5.7 [Jan 7th] (was RC-3 [Dec 31st])


Pages : 1 [2]

IanB
16th January 2007, 23:25
@tsp, As you already know the pitch will be 2 byte aligned in this case, and you will have a lot of unhappy filter users.

Yes you can abuse the privilege of being able to force a pitch but you the filter author are responsible for making sure your filters conform to the expectation of the API.

A filter that subsequently unused 4/16 bytes off the end of it's rows would be quite okay to initially ask for 16 bit alignment as an interim work frame.

Note also! I have said nothing about the alignment of the read/write pointers, this issue is just about the spare space at the end of each row and how it is aligned.

------------------------------------------------------------
:Edit: One point not mentioned above is the effect of the Crop filter and it's internal implementer SubFrame(). This can result in a pitch many times greater than the rowsize.BlankClip(Width=10240, Pixel_Type="YV12")
Crop(0, 0, 16, 0)
# Pitch >= 10240 bytes, rowsize 16 bytes

tsp
17th January 2007, 21:24
IanB: Don't worry I wouldn't do such a thing. It doesn't look like the SetPlanarLegacyAlignment in 2.5.7 change the pitch to be mod32. Maybe adding it as an option to convert the plane to be mod32 aligned so that filters that relies on the chroma plane to be mod16 aligned and doesn't check if it is the case doesn't crash.

IanB
19th January 2007, 03:20
@tsp,

To clarify, a SetPlanarLegacyAlignment(True) would smack NewVideoFrame to give old mod 8 chroma to make badly written plugins work as it does now and in addition then do a BitBlt to a brand new mod 16 chroma VideoFrameBuffer just in case.

I am not sure if always doing the blit is a good tradeoff. I can see the need to allow 2 badly written plugins to work together, but as most plugins have there pitch processing correct is it good overall value?

Perhaps if I had remembered to fix Crop(..., align=true) :( this might be a mote point as a crop(0,0,0,0,True) would be a way to make it right.

tsp
19th January 2007, 22:39
yes crop(0,0,0,0,true) would be a good solution. But that will have to wait till 2.5.8 :)