summaryrefslogtreecommitdiff
path: root/test/camera
diff options
context:
space:
mode:
authorNiklas Söderlund <niklas.soderlund@ragnatech.se>2019-08-05 13:58:28 +0200
committerNiklas Söderlund <niklas.soderlund@ragnatech.se>2019-08-11 02:16:21 +0200
commit4debc71ffa7ffe92d23189c9157855ba89fccfea (patch)
tree93da6298e414ee6212e6bacd5f8d873384eeddbf /test/camera
parentf5d3a956cc968478b5e10a6a71ef58c10bf05333 (diff)
libcamera: pipeline: vimc: Switch to using the RGB/YUV Capture video node
Linux commit 85ab1aa1fac17bcd ("media: vimc: deb: fix default sink bayer format") which is part of v5.2 changes the default media bus format for the debayer subdevices. This leads to a -EPIPE error when trying to use the raw capture video device nodes. Fix this by moving the vimc pipeline to use the RGB/YUV Capture capture video node. As a consequence of this change the scaler in the vimc pipeline is used and a hard coded upscale of 3 is present in the video pipeline. This limits the sizes exposed and accepted by libcamera to multiples of 3. Update the buffer import test case to match this new format constraint by setting the resolution to 1920x1080, a resolution which works with both vimc and vivid. With this new resolution the buffer import test takes a bit more time to complete 60 buffers and it's runtime also needs to be increased. The raw capture video node still needs to be handled by the pipeline as its format needs to be updated to allow the pipeline format validation to pass. Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'test/camera')
-rw-r--r--test/camera/buffer_import.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/camera/buffer_import.cpp b/test/camera/buffer_import.cpp
index 400d02b3..98786469 100644
--- a/test/camera/buffer_import.cpp
+++ b/test/camera/buffer_import.cpp
@@ -72,12 +72,12 @@ public:
return ret;
}
- format_.size.width = 640;
- format_.size.height = 480;
+ format_.size.width = 1920;
+ format_.size.height = 1080;
format_.fourcc = V4L2_PIX_FMT_RGB24;
format_.planesCount = 1;
- format_.planes[0].size = 640 * 480 * 3;
- format_.planes[0].bpl = 640 * 3;
+ format_.planes[0].size = 1920 * 1080 * 3;
+ format_.planes[0].bpl = 1920 * 3;
if (video_->setFormat(&format_)) {
cleanup();
@@ -378,7 +378,7 @@ protected:
EventDispatcher *dispatcher = CameraManager::instance()->eventDispatcher();
Timer timer;
- timer.start(3000);
+ timer.start(5000);
while (timer.isRunning() && !sink_.done())
dispatcher->processEvents();