mirror of
https://github.com/opencv/opencv.git
synced 2025-06-07 17:44:04 +08:00
Merge pull request #21165 from utibenkei:fix_android_ndk_camera_order_of_u_and_v
This commit is contained in:
commit
f61883b227
@ -313,7 +313,7 @@ public:
|
||||
if (fourCC == FOURCC_UNKNOWN) {
|
||||
fourCC = FOURCC_NV21;
|
||||
}
|
||||
} else if ( (uvPixelStride == 1) && (vPixel == uPixel + uLen) && (yLen == frameWidth * frameHeight) && (uLen == yLen / 4) && (vLen == uLen) ) {
|
||||
} else if ( (uvPixelStride == 1) && (uPixel == vPixel + vLen) && (yLen == frameWidth * frameHeight) && (uLen == yLen / 4) && (vLen == uLen) ) {
|
||||
colorFormat = COLOR_FormatYUV420Planar;
|
||||
if (fourCC == FOURCC_UNKNOWN) {
|
||||
fourCC = FOURCC_YV12;
|
||||
@ -327,7 +327,7 @@ public:
|
||||
|
||||
buffer.clear();
|
||||
buffer.insert(buffer.end(), yPixel, yPixel + yLen);
|
||||
buffer.insert(buffer.end(), uPixel, uPixel + yLen / 2);
|
||||
buffer.insert(buffer.end(), vPixel, vPixel + yLen / 2);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user