|
|
|
@ -633,20 +633,18 @@ void NdkCamera::on_image(const unsigned char* nv21, int nv21_width, int nv21_hei
|
|
|
|
|
cv::Mat nv21_rotated(h + h / 2, w, CV_8UC1);
|
|
|
|
|
ncnn::kanna_rotate_yuv420sp(nv21, nv21_width, nv21_height, nv21_rotated.data, w, h, rotate_type);
|
|
|
|
|
|
|
|
|
|
#ifdef _DEBUG
|
|
|
|
|
if (nv21_rotated.empty())
|
|
|
|
|
{
|
|
|
|
|
int aa = 0;
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
// nv21_rotated to rgb
|
|
|
|
|
cv::Mat rgb(h, w, CV_8UC3);
|
|
|
|
|
// ncnn::yuv420sp2rgb(nv21_rotated.data, w, h, rgb.data);
|
|
|
|
|
ncnn::yuv420sp2rgb_nv12(nv21_rotated.data, w, h, rgb.data);
|
|
|
|
|
|
|
|
|
|
if (rgb.empty())
|
|
|
|
|
{
|
|
|
|
|
int aa = 0;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
// cv::Mat rgb(h, w, CV_8UC3);
|
|
|
|
|
// ncnn::yuv420sp2rgb_nv12(nv21, w, h, rgb.data);
|
|
|
|
|
|
|
|
|
|