|
|
|
@ -207,7 +207,7 @@ int NdkCamera::selfTest(const std::string& cameraId, int32_t& maxResolutionX, in
|
|
|
|
|
int32_t format = e.data.i32[i + 0];
|
|
|
|
|
if (input) continue;
|
|
|
|
|
|
|
|
|
|
if (format == AIMAGE_FORMAT_YUV_420_888 || format == AIMAGE_FORMAT_JPEG)
|
|
|
|
|
if (format == AIMAGE_FORMAT_YUV_420_888/* || format == AIMAGE_FORMAT_JPEG*/)
|
|
|
|
|
{
|
|
|
|
|
if (e.data.i32[i + 1] * e.data.i32[i + 2] > (maxResolutionX * maxResolutionY))
|
|
|
|
|
{
|
|
|
|
@ -286,15 +286,15 @@ int NdkCamera::open(const std::string& cameraId) {
|
|
|
|
|
|
|
|
|
|
for (int i = 0; i < e.count; i += 4)
|
|
|
|
|
{
|
|
|
|
|
int32_t input = e.data.i32[i + 3];
|
|
|
|
|
int32_t format = e.data.i32[i + 0];
|
|
|
|
|
if (input) continue;
|
|
|
|
|
|
|
|
|
|
// if (format == AIMAGE_FORMAT_YUV_420_888 || format == AIMAGE_FORMAT_JPEG)
|
|
|
|
|
if (format == AIMAGE_FORMAT_YUV_420_888/* || format == AIMAGE_FORMAT_JPEG*/)
|
|
|
|
|
{
|
|
|
|
|
DisplayDimension res(e.data.i32[i + 1], e.data.i32[i + 2]);
|
|
|
|
|
XYLOG(XYLOG_SEVERITY_DEBUG, "CameraId=%s CX=%d CY=%d", cameraId.c_str(), res.width(), res.height());
|
|
|
|
|
if (!disp.IsSameRatio(res))
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
if (res.width() >= mWidth && res.height() >= mHeight)
|
|
|
|
|
{
|
|
|
|
|
temp = res;
|
|
|
|
|