summaryrefslogtreecommitdiff
path: root/src/cam/capture_script.cpp
diff options
context:
space:
mode:
authorJacopo Mondi <jacopo@jmondi.org>2022-07-15 10:50:41 +0200
committerJacopo Mondi <jacopo@jmondi.org>2022-08-03 15:07:20 +0200
commit45736468c8395de02f004f6543dab91ff43dd71c (patch)
tree90655b7a9d7b7a26e07256e1033f652b868fb836 /src/cam/capture_script.cpp
parent83e0cee0ba065cad005c0a4329d696ac407f7771 (diff)
libcamera: v4l2_videodevice: Reintroduce toV4L2PixelFormat()
This is a partial revert of commit 395d43d6d75b ("libcamera: v4l2_videodevice: Drop toV4L2PixelFormat()") The function was removed because it incorrectly maps non-contiguous V4L2 format variants (ie V4L2_PIX_FMT_YUV420M) to the API version supported by the video device (singleplanar API and multiplanar API). It was decided at the time to remove the function and let its users call directly V4L2PixelFormat::fromPixelFormat() which accepts a 'multiplanar' flags. As we aim to associate multiple V4L2PixelFormat to a single libcamera format, the next patches will verify which of them is actually supported by the video device. For now, return the contiguous version unconditionally. Re-introduce V4L2VideoDevice::toV4L2PixelFormat() and convert all the V4L2PixelFormat::fromPixelFormat() users to use it. The V4L2 compatibility layer is the only outlier as it doesn't have a video device to poke, hence it still uses V4L2PixelFormat::fromPixelFormat(). Next patches will implement the device format matching logic and handle the non-contiguous plane issue in V4L2VideoDevice::toV4L2PixelFormat(). Signed-off-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Tested-by: Paul Elder <paul.elder@ideasonboard.com>
Diffstat (limited to 'src/cam/capture_script.cpp')
0 files changed, 0 insertions, 0 deletions
ss="hl opt">-1; } const struct IPAModuleInfo &info = ll->info(); if (memcmp(&info, &testInfo, sizeof(info))) { cerr << "IPA module information mismatch: expected:" << endl << "moduleAPIVersion = " << testInfo.moduleAPIVersion << endl << "pipelineVersion = " << testInfo.pipelineVersion << endl << "pipelineName = " << testInfo.pipelineName << endl << "name = " << testInfo.name << "got: " << endl << "moduleAPIVersion = " << info.moduleAPIVersion << endl << "pipelineVersion = " << info.pipelineVersion << endl << "pipelineName = " << info.pipelineName << endl << "name = " << info.name << endl; } delete ll; return ret; } int run() override { int count = 0; const struct IPAModuleInfo testInfo = { IPA_MODULE_API_VERSION, 0, "PipelineHandlerVimc", "vimc", }; count += runTest("src/ipa/vimc/ipa_vimc.so", testInfo); if (count < 0) return TestFail; return TestPass; } }; TEST_REGISTER(IPAModuleTest)