0007-Fix-the-libcamera-still-bug-at-low-resolution-redmin.patch 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. From de29362501b331f640a3d1d1f18722b229044873 Mon Sep 17 00:00:00 2001
  2. From: "zejian.su" <zejian.su@starfivetech.com>
  3. Date: Wed, 15 Nov 2023 12:00:25 +0800
  4. Subject: [PATCH] Fix the libcamera-still bug at low resolution (redmine
  5. #8306).
  6. Set the raw stream's resolution too.
  7. Signed-off-by: zejian.su <zejian.su@starfivetech.com>
  8. ---
  9. core/libcamera_app.cpp | 8 ++++++--
  10. 1 file changed, 6 insertions(+), 2 deletions(-)
  11. diff --git a/core/libcamera_app.cpp b/core/libcamera_app.cpp
  12. index a49e31d..27d5c44 100644
  13. --- a/core/libcamera_app.cpp
  14. +++ b/core/libcamera_app.cpp
  15. @@ -349,10 +349,14 @@ void LibcameraApp::ConfigureStill(unsigned int flags)
  16. configuration_->at(0).bufferCount = 3;
  17. else if (options_->buffer_count > 0)
  18. configuration_->at(0).bufferCount = options_->buffer_count;
  19. - if (options_->width)
  20. + if (options_->width) {
  21. configuration_->at(0).size.width = options_->width;
  22. - if (options_->height)
  23. + configuration_->at(1).size.width = options_->width;
  24. + }
  25. + if (options_->height) {
  26. configuration_->at(0).size.height = options_->height;
  27. + configuration_->at(1).size.height = options_->height;
  28. + }
  29. configuration_->at(0).colorSpace = libcamera::ColorSpace::Sycc;
  30. configuration_->transform = options_->transform;
  31. --
  32. 2.34.1