byte[] y = new byte[width * height];
byte[] u = new byte[width * height / 4];
byte[] v = new byte[width * height / 4];
byte[] nu = new byte[width * height / 4]; //
byte[] nv = new byte[width * height / 4];
System.arraycopy(yuvFrame, 0, y, 0, y.length);
for (int i = 0; i < u.length; i++) {
v[i] = yuvFrame[y.length + 2 * i];
u[i] = yuvFrame[y.length + 2 * i + 1];
}
The code above seems that the YUV data received from the UVA is already encoded by NV21, the array u and array v represent the data U and V respectively. So I'm confused about the function of the following code due to I don't know what the variables "nu" and "nv" are for.
The code above seems that the YUV data received from the UVA is already encoded by NV21, the array u and array v represent the data U and V respectively. So I'm confused about the function of the following code due to I don't know what the variables "nu" and "nv" are for.