格式不介绍了,看代码:
public final static void NV21_TO_YUV420SP(int width, int height, byte[] in)
{
int pixels = width * height;
byte s;
int count = (pixels / 2);
for (int i = 0; i < count; i += 2)
{
s = in[pixels + i];
in[pixels + i] = in[pixels + i + 1];
in[pixels + i + 1] = s;
}
}