As a simple question: to copy every other byte immediately Is there any way to an array in Java? Disclaimer : My code is already quite fast, but I myself was wondering if any basic method is faster than loop. Extension of the problem (for those interested): I am dividing a YUV byte array into three different byte arrays (Y, U, and V). If you have not seen YUV arrays before (in the Android standard NV21 format), then structures bytes of width (height * width) / 2 bytes of UV data (Our eyes are less sensitive towards chrominance resolution) Interleave. It is possible that Although I am copying UV portions in a dedicated array as follows: Is there a method that can somehow "straddle" variable or something that can allow elements to choose at a known interval? No systems Arrayopyi is fast because it can map mammies directly, which in turn is doing a block copy of some memory from one place to another with zero processing. Your case needs processing and it should be somewhere. You can do it in C (JNI) but in my experience it is not worth it, the JIT compiler will do a good job of optimizing such a simple case. arrapp / to customize the transfer of Y bytes using
System.arraycopy (yuvs, 0, yArray, 0, imgSize) > Using. Width * imgSize.height);
for
(bt_y = 544; bt_y
Comments
Post a Comment