View Full Version : 2.5 vs 2.6 & Display 4 pixel YV12 video problem
jmac698
12th October 2011, 01:45
Hi,
I just realize *blush* that 2.5 plugins work fine with 2.6, I can even use the 2.5 or 2.6 versions of plugins that offer both. I had been avoiding 2.6 for that reason.
So the question now is, is 2.6 perfectly safe and compatible to use with 2.5 scripts and plugins, especially if I don't use any of the new features? And in fact better, because 2.5 bugs are fixed and it's faster?
I really, really rely on cropping/stacking/resizers and levels being bug free.
StainlessS
12th October 2011, 05:28
I would say that 2.6 is 2.5 compliant & perfectly safe to use, and has also had some of the 2.5 bugs squashed.
Of the filters you specifically mention, Levels has had a bug fixed in 2.6.
On the plugin side, 2.5 plugins work just fine in 2.6, however, might be a good idea to avoid (some) 2.6 plugs
until they are all/mostly 2.6 compatible. Some of the 2.6 plugs have eg dropped Planar YUY2 as they now
deem it unnecessary because of eg YV16, but as not all plugs support 2.6 YV16, you are in a position of
having to swap backwards and forwards beteen multiple colorspaces. Best to just forget some 2.6 plugs
for the time being until all plugs catch up, or the ones that have dropped Planar YUY2 support, re-introduce
it again (at least until most plugs support new colorspaces).
jmac698
12th October 2011, 05:39
Sure enough, I just ran into a bug in crop.
crop(0,0,4,0)
gives me an error with avspmod2.2, "error loading avisynth" which I take to mean that it crashed.
crop(0,0,6,0) gives me a 6x480 image (from 720x480 in YV12)
StainlessS
12th October 2011, 06:28
I see pretty much the same problem in both 2.5 and 2.6 with:
colorbars().convertToYV12().crop(0,0,4,0)
In Media Player via AVSEdit,
come up with error in xvidcore.dll (the YV12 colorspace converter).
No error produced in VitualDubMod for same script (although the clip produced is a weird three bars above one another in sequence):
Yellowy-Lime Green
Chestnut Brown,
nasty Kharki.
Which dont exist in colorbars, ???
EDIT: I dont see errors in either 2.5 or 2.6 source for Crop (Transform.cpp).
jmac698
12th October 2011, 06:40
It seems to be a problem with displaying 4 pixel wide YV12 video.
See the avsPmod thread.
Also you could have used colorbars(pixel_type="YV12").crop(0,0,4,0)
Also try colorbars(pixel_type="YV12",width=4)
The colors should be grey, blue, dark blue (in the first version, which leaves the leftmost 4 pixels).
Other displays are useless to me unless I can seek to a specific frame and view the pixel colors with a pointer. I spot check colors all the time, to see that my pixels are in the right spot or right levels.
Oh ya, and this shows that crop works:
pointresize(crop(0,0,4,0),width,height)
I just wanna sell a Hall'o'ween faint paint color as "Nasty Kharki" :)
(Maybe you meant Khaki? the color of camoflauge)
StainlessS
12th October 2011, 07:28
Yep, I meant Nasty Khaki, equally as nice as Putrid Puce.
'pixel_type="YV12"', well, can never remember what it is and it's simply
easier to do a convert than go looking for the correct specifier.
StainlessS
12th October 2011, 13:23
http://img171.imageshack.us/img171/9843/34059325.th.jpg (http://imageshack.us/photo/my-images/171/34059325.jpg/)
1 ) ColorBars() # cropped, wide (about 32) in VD & resized
2 ) ColorBars(Pixel_Type="YV12",width=4) # VDMod
3 ) ColorBars().convertToYV12().crop(0,0,4,0) # VDMod
4 ) ColorBars(Pixel_Type="YV12",width=4) # VD v1.9.11
5 ) ColorBars().convertToYV12().crop(0,0,4,0) # VD v1.9.11
EDIT: 4 & 5 look to be about right, and 2 & 3 look wrong.
VDMod, shows itself to be using the XVID Mpeg4 Codec.
VD9 says "Internal DIB Decoder (YV12)".
Images above were originally 4x480 and resized in VD to make better visible.
jmac698
12th October 2011, 13:41
I had that problem too, you could use www.screenshotcomparison.com
When I used gimp, I had specify options for bmp I think? Search for my or others messages with attachments, verify no scripts are blocked, and check if you have permission to add attachments.
I'm not sure where this new topic belongs, I'll update the thread header.
In avspmod thread, Gavino reports that it actually worked for him, but you guys used slightly different commands.
StainlessS
12th October 2011, 14:16
Image file added two posts above.
EDIT: Jmac698, I used ImageShack, thanks.
My Nasty Khaki, report was on image (3).
Gavino report was on image (4).
Gavino
12th October 2011, 15:10
5 ) Shows the correct colors (Same as 1) and the others are all wrong.
How do you know that 4) (or even 2)) is 'wrong'?
It's not clear to me what ColorBars(width=4) should look like.
Perhaps it should be illegal, as it's impossible to show all the colors in 4 pixels.
StainlessS
12th October 2011, 15:23
Oh dear, got it in my head it was cropping rather than resizing, what a silly billy I am. :stupid:
Colorbars()
BilinearResize(4,480)
BilinearResize(64,128)
http://img717.imageshack.us/img717/6021/80714306.jpg (http://imageshack.us/photo/my-images/717/80714306.jpg/)
jmac698
12th October 2011, 20:53
Nasty Khaki is always 'wrong' :)
IanB
12th October 2011, 21:57
This all appear to be bad code fighting for alignment with small widths.
Within Avisynth internals data is arranged for the default pitch to always be mod16 aligned (2.5.5 and before had chroma as only mod8). However for export we follow the rules for DIB which wants most things DWORD aligned, i.e. only mod4. However there is an oddity for YV12, PitchUV = PitchY/2 so chroma is only 16 bit aligned.
The exported data for YV12 with width==4 has the Y plane as 4 byte elements and the chroma as 2 byte elements, i.e. RowSizeY=4, PitchY=4, RowsizeUV=2, PitchUV=2
The exported data for YV12 with width==6 has the Y plane as 8 byte elements and the chroma as 4 byte elements, i.e. RowSizeY=6, PitchY=8, RowsizeUV=3, PitchUV=4
Xvid as a YV12 codec still chokes whenever PitchUV is not mod4. There probably is much other code that similarly does not cope.
____________
If you turn over rocks, you occasionally will find creepy crawlies, some times they will be aggressive and venomous. :devil:
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.