Skip to content

Commit

Permalink
Merge pull request intel#140 from hao-yao/main
Browse files Browse the repository at this point in the history
Linux: Delete unreasonable log processing flow
  • Loading branch information
hao-yao authored Dec 18, 2024
2 parents b7fa841 + d32a54a commit b6f6eeb
Showing 1 changed file with 8 additions and 19 deletions.
27 changes: 8 additions & 19 deletions src/core/CameraBuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,28 +54,17 @@ CameraBuffer::CameraBuffer(int cameraId, int usage, int memory, uint32_t size, i
mU->flags = BUFFER_FLAG_INTERNAL;
mU->sequence = -1;

switch (usage) {
case BUFFER_USAGE_PSYS_INPUT:
// follow through
case BUFFER_USAGE_PSYS_INTERNAL:
case BUFFER_USAGE_GENERAL:
if (PlatformData::isIsysEnabled(cameraId) &&
PlatformData::isCSIFrontEndCapture(cameraId)) {
num_plane = CameraUtils::getNumOfPlanes(format);
}
break;
case BUFFER_USAGE_MIPI_CAPTURE:
case BUFFER_USAGE_METADATA:
num_plane = CameraUtils::getNumOfPlanes(format);
break;
default:
LOGE("Not supported Usage");
break;
}

CLEAR(mMmapAddrs);
CLEAR(mDmaFd);

if ((usage == BUFFER_USAGE_PSYS_INPUT || usage == BUFFER_USAGE_PSYS_INTERNAL ||
usage == BUFFER_USAGE_GENERAL) &&
(PlatformData::isIsysEnabled(cameraId) && PlatformData::isCSIFrontEndCapture(cameraId))) {
num_plane = CameraUtils::getNumOfPlanes(format);
} else if (usage == BUFFER_USAGE_MIPI_CAPTURE || usage == BUFFER_USAGE_METADATA) {
num_plane = CameraUtils::getNumOfPlanes(format);
}

initBuffer(memory, v4l2BufType, size, index, num_plane);
}

Expand Down

0 comments on commit b6f6eeb

Please sign in to comment.