In my Android application, I get Camera output in NV21 format as a byte array. On the native side, I need to convert this array to I420 format using libyuv's NV21ToI420 function. Here is its definition:
LIBYUV_API
int NV21ToI420(const uint8* src_y, int src_stride_y,
const uint8* src_vu, int src_stride_vu,
uint8* dst_y, int dst_stride_y,
uint8* dst_u, int dst_stride_u,
uint8* dst_v, int dst_stride_v,
int width, int height);
All I have is a pointer to NV21 data, the width and the height. I am wondering how one can compute the values for src_stride_y, src_stride_vu, etc. Appreciate it if someone can share some sample code on how to properly use this function. Searching the net for NV21ToI420 did not result in any example. Regards.