question: private void NV21toI420SemiPlanar ( byte [ ] nv21bytes , byte [ ] i420bytes , int width , int height ) { System . arraycopy ( nv21bytes , 0 , i420bytes , 0 , width * height ) ; for ( int i = width * height ; i < nv21bytes . length ; i += 2 ) { i420bytes [ i ] = nv21bytes [ i + 1 ] ; i420bytes [ i + 1 ] = nv21bytes [ i ] ; } }
target:  NV21 is a 4:2:0 YCbCr, For 1 NV21 pixel: YYYYYYYY VUVU I420YUVSemiPlanar is a 4:2:0 YUV, For a single I420 pixel: YYYYYYYY UVUV Apply NV21 to I420YUVSemiPlanar(NV12) Refer to https://wiki.videolan.org/YUV/