buildImgVarpYuvNV21 function
Implementation
VARP buildImgVarpYuvNV21(Uint8List img, int height, int width, {int flags = IMREAD_COLOR}) {
final pImg = calloc<ffi.Uint8>(img.length)..asTypedList(img.length).setAll(0, img);
// This uses `_Const` internally, which will copy data, so it's safe to free `pImg` after calling.
final pOut = c.mnn_cv_buildImgVarpYuvNV21(pImg, height, width, flags);
final rval = VARP.fromPointer(pOut);
calloc.free(pImg);
return rval;
}