public void dummyConvertYUV420ImageToPackedNV21(byte[] dataCopy,final int w,final int h){
  final int y_size=w * h;
  final int data_offset=w * h;
  for (int i=0; i < y_size; i++) {
    dataCopy[i]=(byte)((((i % w) * 255) / w) & 255);
    dataCopy[i]=0;
  }
  for (int i=0; i < h / 2; i++) {
    for (int j=0; j < w / 2; j++) {
      int offset=data_offset + w * i + j * 2;
      dataCopy[offset]=(byte)((255 * i) / (h / 2) & 255);
      dataCopy[offset + 1]=(byte)((255 * j) / (w / 2) & 255);
    }
  }
}

public void dummyConvertYUV420ImageToPackedNV21 ( byte [ ] dataCopy , final int w , final int h ) { final int y_size = w * h ; final int data_offset = w * h ; for ( int i = 0 ; i < y_size ; i ++ ) { dataCopy [ i ] = ( byte ) ( ( ( ( i % w ) * 255 ) / w ) & 255 ) ; dataCopy [ i ] = 0 ; } for ( int i = 0 ; i < h / 2 ; i ++ ) { for ( int j = 0 ; j < w / 2 ; j ++ ) { int offset = data_offset + w * i + j * 2 ; dataCopy [ offset ] = ( byte ) ( ( 255 * i ) / ( h / 2 ) & 255 ) ; dataCopy [ offset + 1 ] = ( byte ) ( ( 255 * j ) / ( w / 2 ) & 255 ) ; } } }
creates a dummy shaded image for testing in packed nv21 format .
