SkewRows(clip clip, int skew)
Skews the rows of a clip. It can be used to correct (deskew) problem clips such as the error message shown below.
The amount, skew, can be positive or negative. For YUY2 sources, skew should be even (divisible by 2).
All of the input rows are joined together as one very long row, then sliced up based on the new width (= input width + skew).
The width and height of the output clip are therefore altered slightly, as follows:
- OutWidth = InWidth + skew (signed skew values acceptable)
- OutHeight=(InHeight*InWidth+OutWidth-1)/OutWidth (rounded up to nearest integer)
The last line is padded with grey pixels when required.
|(original with skew problem)|