can someone please create a crop() function in avisynth ?
i'm pulling my hair out. now matter how many times i have to crop something through avisynth (rare occasions) i can't remember how to set up, calculate, add, subtract, or what the f..k, and its driving me crazy. anyway. i am looking for a crop that works exactly the way virtualdub does it. that is the way i remember always.
you can explain it all you want to me till the cows come home. i don't use it all the time in avisynth. its rare. i forget, and the logic (someone once told it that is the proper way to crop) i don't care about logic. i only care about how i do it in the way i easily recall..the virtualdub way.
+ Reply to Thread
Results 1 to 6 of 6
it is too frustrating to get the numbers correct. whenever i have to do it, it is not the same, even or odd number, 2/4/8 bouderies, and so on. from my experience, it takes too many tries to figure it out, by then i just give up and dump the file in virtualdub, crop it in an instant and then frameserve it into avisynth and encode it. it does not have to be perfect. i'm not picky like i used to be. but, nevermind. i gave up again and dump it into virtualdub and took care of it. i can't be bother, yet again. i was trying to do something real quick and i lost my mind, got mad, and...anyway, forget about it, nobody's gonna do it anyway. thanks.
whenver i have trouble, i will point to your # 2 post thank you.
The rules are simple to remember:
YUV 4:2:2 (eg YUY2) requires even values along the width because the chroma planes are half the width of the luma plane -- ie, you can't have half a pixel in the chroma planes.
YUV 4:2:0 (eg YV12) requires even values along both the width and height because the chroma planes are half the width and height of the luma plane. Again, you can't have half pixels in the chroma planes. In addition, interlaced YUV 4:2:0 requires mod 4 for the height because the chroma planes are 1/4 the height of the luma plane.