Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
16th December 2020, 07:40 | #1 | Link |
Registered User
Join Date: Jul 2020
Posts: 5
|
CropVD.avsi - Virtualdub2 style cropping
I don't know how everyone handles the standard Crop parameters with the negative numbers and bizarre ordering. My brain won't work with it so, here's my first function for Avisynth. The parameters are just like in Virtuadub2's crop with left, right, top, bottom.
Example: Crop 2 pixels left, 4 pixels right, 0 on the top, and 10 on the bottom: CropVD(2,4,0,10) CropVD.avsi Code:
# CropVD 1.0 by videogeek # # VirtualDub style cropping- pixels from the border # with the VDub order left,right,top,bottom and no negative numbers # Note as this is using the Avisynth Crop function, the same Mod rules apply: # #Colorspace Width Progressive Height Interlaced Height #-------------------------------------------------------------- # RGB no restriction no restriction mod-2 # YUY2 mod-2 no restriction mod-2 # YV12 mod-2 mod-2 mod-4 # YV411 mod-4 no restriction mod-2 # YV16 mod-2 no restriction mod-2 # YV24 no restriction no restriction mod-2 # # version 1.0 2020-11-20 first release function CropVD(clip C, int "left", int "right", int "top", int "bottom" ) { C = default(C, C) left = default(left, 0) right = default(right, 0) top = default(top, 0) bottom = default(bottom,0) return Crop( C, left, top, -right, -bottom ) } https://mega.nz/file/lxc3nIZY#qXGyyT...4U_7OXYt_t7N68 |
Thread Tools | Search this Thread |
Display Modes | |
|
|