I420Copy
Copy I420 Buffer to a contiguously allocated buffer.
In Android, MediaCodec can request a buffer of a specific layout with the stride and slice-height (or plane height), and this function is used in this case.
For more information, see https://cs.android.com/android/platform/superproject/+/64fea7e5726daebc40f46890100837c01091100d:frameworks/base/media/java/android/media/MediaFormat.java;l=568
Parameters
the stride of output buffers' Y plane.
the slice-height of output buffer's Y plane.
the stride of output buffers' U (and V) plane.
the slice-height of output buffer's U (and V) plane
Helper method for copying I420 to tightly packed destination buffer.
Helper method for copying I420 to buffer with the given stride and slice height.
Copies I420 to the I420 dst buffer.
Unlike `libyuv::I420Copy`, this function checks if the height <= 0, so flipping is not supported.