Skip to content

Instantly share code, notes, and snippets.

View Yank-225's full-sized avatar
:octocat:

Yank Yank-225

:octocat:
View GitHub Profile
@gouravd
gouravd / rotateYUVImage.java
Created September 26, 2015 20:40
Rotate YUVimage
public static byte[] rotateYUV420Degree90(byte[] data, int imageWidth, int imageHeight) {
byte[] yuv = new byte[imageWidth * imageHeight * 3 / 2];
// Rotate the Y luma
int i = 0;
for (int x = 0; x < imageWidth; x++) {
for (int y = imageHeight - 1; y >= 0; y--) {
yuv[i] = data[y * imageWidth + x];
i++;
}
}