View Full Version : YV12 cropping question (Not in FAQ)
Daijoubu
28th March 2005, 18:20
The source is 720x480
Why does this:
Crop(8,106,-6,-102) or Crop(8,106,706,272)
LanczosResize(640,278)
Miss 2 pixels on the right border?
While this works:
Crop(8,106,-6,-102)
LanczosResize(640,272)
And this:
LanczosResize(640,278,8,106,706,272)
Took me some times to figure out how to fix it but I still don't understand why it's happening...Avisynth gurus? :D
Edit: Uploaded image didn't work, here's it:
http://ptprophecy.com/daij/avisynth.jpg
Kintaro
28th March 2005, 18:49
cant reproduce that problem here, works fine.
that height=278 was a typo I suppose? why would you use a non mod4 height anyways... sure you didnt use a -4 crop in the same manner? :p
one of the best musicvid's ever btw :)
Daijoubu
28th March 2005, 20:09
No no, the AR of this is 4:3
(Original) 720x480 -> 720x540
(Cropped) 706x272 -> 706x306 (272 * (540 / 480))
306 / 706 = 0.4334
640 * 0.4334 = 277.4
640x278 is pretty close :p
How do you know it's Sakura Drops? :D
What's wrong with height non mod4?
Docs says In width mod-2, height mod-2 (progressive)/mod-4 (interlaced)
DGIndex reports interlaced NTSC 29.97 MPEG2 but I don't see any combing effects and all the deinterlacers did more harm than good on the video quality
IanB
29th March 2005, 09:00
Daijoubu,
What are you viewing the output of the script with? Many apps, like VirtualDub*, use either DivX or Xvid codecs to convert YV12 to RGB for display and both get it wrong (differently).
For viewing/testing append a ConvertToRGB() to the end of your script, this will provide an accurate display of your script output.
IanB
Daijoubu
29th March 2005, 11:34
Using VDubMod
DGIndex+DGDecode's MPEG2Source followed by the lines I posted
Wilbert
29th March 2005, 11:47
Did you see it also when
For viewing/testing append a ConvertToRGB() to the end of your script, this will provide an accurate display of your script output.
Btw, what avs version do you use?
Daijoubu
29th March 2005, 22:10
Just tried with ConvertToRGB(), same thing
The 2 pixels on the right border are missing
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.