i am a little confused about the NV12 format. i am looking the this page to understand the format.
What i currently understand is that if you have an image or video of 640 x 480
diminsion then the Y plane will be having 640 x 480
bytes and U and V both planes have 640/2 x 480/2
. It does not mean that U plane have 640/2 x 480/2
and V plane have 640/2 x 480/2
both have only 640/2 x 480/2
bytes. so the total number of bytes in out buffer array will be.
2 is multiplied with (640/2) * (480/2)
because uv plane will take two bytes.
byte [] myArray new byte[(640 * 480) + (2 * (640/2) * (480/2)) ];
so the question is that i am understanding it in a right way? and am i making the byte array in the format that specify the NV12 format.