OK, I have solved it.
The answer from @Rabbid76 is great, so we know .r and .a are from {r, g, b, a}.
My question is not just what is .r.a, it's why is .r.a .
I solved the problem starting from this answer enter link description here
glTexImage2D(GL20.GL_TEXTURE_2D, 0, GL20.GL_LUMINANCE,
width, height, 0, GL20.GL_LUMINANCE, GL20.GL_UNSIGNED_BYTE, buffer_y);
by setting GL_LUMINANCE, OpenGL puts this byte into R,G and B components of the texture. So we can use .r to get Y values, also .g or .b.
glTexImage2D(GL20.GL_TEXTURE_2D, 0, GL20.GL_LUMINANCE_ALPHA,
width/2, height/2, 0, GL20.GL_LUMINANCE_ALPHA, GL20.GL_UNSIGNED_BYTE,
buffer_uv);
by setting GL_LUMINANCE_ALPHA, OpenGL puts the first byte 'V' into r/g/b components, and puts the second byte 'U' into a component. So we can use .a to get U, and .r to get V(.g or .b is ok).
As we know that NV21 format is like YYYY...UVUV... It seems like 'U' is the first byte in UV texture.
buffer_uv = ByteBuffer.allocateDirect(width * height * 4)
.order(ByteOrder.nativeOrder());
buffer_uv is order with ByteOrder.nativeOrder(), retrieves the native byte order of the underlying platform. From enter link description here
That means the UV values(...UVUV...) are read from native buffer by native byte order like ...VUVU... , it's reverse.