Created
July 29, 2012 04:05
-
-
Save hatt/3195998 to your computer and use it in GitHub Desktop.
AVISynth planeswap.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const int pitch = dst->GetPitch(PLANAR_U)/4; | |
const int myx = (dst->GetRowSize(PLANAR_U)+3)/4; | |
const int myy = dst->GetHeight(PLANAR_U); | |
int *srcpUV = (int*)dst->GetWritePtr(PLANAR_U); | |
for (int y=0; y<myy; y++) { | |
for (int x=0; x<myx; x++) { | |
srcpUV[x] = 0x80808080; // mod 8 | |
} | |
srcpUV += pitch; | |
} | |
srcpUV = (int*)dst->GetWritePtr(PLANAR_V); | |
for (int y=0; y<myy; ++y) { | |
for (int x=0; x<myx; x++) { | |
srcpUV[x] = 0x80808080; // mod 8 | |
} | |
srcpUV += pitch; | |
} | |
return dst; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment