fromYuv420

fun fromYuv420(width: Int, height: Int, yPlane: ByteArray, yRowStride: Int, uPlane: ByteArray, vPlane: ByteArray, uvRowStride: Int, uvPixelStride: Int, uOffset: Int = 0, vOffset: Int = 0): RgbImage

From separate YUV 4:2:0 planes, e.g. Android ImageProxy YUV_420_888 (planes[0..2]) or an iOS bi-planar NV12 buffer (pass the interleaved UV plane as both uPlane and vPlane with vOffset = 1).

Parameters

uvRowStride

bytes between consecutive chroma rows

uvPixelStride

bytes between consecutive chroma samples in a row (1 planar, 2 semi-planar)