Libcamera-cpp-demo capturing fails after increasing resolution with resetCamera method

Using edwards libcamera-cpp-demo code

  1. capture image with 4624x3472 res
  2. user resetCamera to decrease resolution to 1280x720
  3. capture image and observe it was captured
  4. use resetCamera to increase resolution to 3840x2160
  5. observe that application is unable to read frame and gets stuck

My modified code to illustrate this

I ran several resolution change scenarios and concluded that the problem is only when next resolution is equal or larger than previous:

How to fix this?


There is indeed a problem of switching resolutions stuck at the minimum resolution. I’m sorry for that. There are some problems with the minimum resolution configuration of the camera. We have fixed the relevant problems and will release the latest driver in the latest version and the next version of the kernel.
You can try 3840x2160 → 4624x3472

3840x2160 → 4624x3472 → success

This is fine. I dont really need the 1280x720 anyways. I thought the bug happens all the time when switching to lower res, i see its only the lowest res now thats the problem. I should have done more testing in the first place.


It is completely correct, only the configuration of one line of registers caused this situation, it will not affect the camera output, but there will be problems when switching resolutions. This problem has been fixed in the latest version. Don’t worry at all.