PDA

View Full Version : irritation in avisynth2.5 crop requirements


jarthel
8th March 2003, 11:36
Well It's my first try on using avisynth2.5. The only problem I'm having right now is the even number requirement for crop (both length and width). And to compound the problem, the mod4 width requirement of decomb.

maybe shodan can fix it? or it's a yv12 requirement?

Thanks

jayel

bilu
8th March 2003, 12:18
From the AVS 2.5 docs on ConvertToYV12:



YUY2: The picture is stored as a luma value Y and two color values U, V. For two horizontal pixels there is only one chroma value and two luma values (two Y's, one U, one V). Therefore the width has to be a multiple of two.

YV12: The same as YUY2 but there is only one chroma value for 4 pixels (a 2x2 square). Both image dimensions have to be a multiple of two, if the video is interlaced the height has to be a multiple of four because the 2x2 square is taken from a field, not from a frame.



Best regards,
Bilu

DJ Bobo
8th March 2003, 12:20
and I don't see where the problem is ¬.¬

sh0dan
8th March 2003, 12:25
YV12 will always require mod 2 on both width and height. As will it always require mod4 height for interlaced sources.

I don't actually know why decomb requires mod4 width - there will always be a mod16 rosize available. But I'm currently looking at decomb, with Donald, so we'll hopefully be able to remove that limitation.

(Moved thread to dev. forum)

bilu
8th March 2003, 12:32
Sorry, but I can't see the point.

Decomb is used on interlaced/telecined videos. Since these videos need to be MOD4 for YV12, MOD4 on Decomb is just the same limitations as YV12, so it's not constraining anything :confused:

Best regards,
Bilu

jarthel
8th March 2003, 13:26
thanks for the replies. :)

jayel

sh0dan
8th March 2003, 15:32
Originally posted by bilu
Decomb is used on interlaced/telecined videos. Since these videos need to be MOD4 for YV12, MOD4 on Decomb is just the same limitations as YV12, so it's not constraining anything :confused:

Decomb requires mod 4 WIDTH. YV12 only requires mod 2 width - no matter if the material is interlaced or not.

bilu
8th March 2003, 16:12
Sorry for badly reading my own post :rolleyes:

Bilu

neuron2
8th March 2003, 23:05
I think I made it mod 4 because DivX bombs if it isn't and I was getting a lot of complaints blaming Decomb.

jarthel
9th March 2003, 02:44
maybe it's time to make it mod2 as it's not a decomb problem. :)

jayel

sh0dan
9th March 2003, 18:14
@neuron2: AviSynth 2.5.0 beta bombs out if width is not mod4, when the final frame is being handled to the codec - so it shouldn't actually be a problem anymore!

neuron2
9th March 2003, 22:10
All codecs? Or does it know which ones require mod 4? If it does it for all codecs, is there any point to changing Decomb?

sh0dan
9th March 2003, 22:53
Both DivX and AFAIR XviD cannot decode non-mod4. Just as huffyuv wrongly decodes non-mod4 YUY2 (noise chroma being written into the two leftmost pixels).

Neither XviD nor DivX can encode non-mod2 (XviD seems to (at least in some versions) to have issues on non-mod8 resolutions - at least those that require a colorspace conversion).

trbarry
10th March 2003, 16:38
Xvid used to have problems with non mod 16. I don't know if that's still true but I still try to stick to 16.

- Tom