[libcamera-devel,0/6] Digital zoom
mbox series

Message ID 20200922100400.30766-1-david.plowman@raspberrypi.com
Headers show
Series
  • Digital zoom
Related show

Message

David Plowman Sept. 22, 2020, 10:03 a.m. UTC
Hi everyone

Here's an attempt at a workable digital zoom implementation, following
the lines of my previous set of patches plus all of Jacopo's
suggestions (unless I missed any!).

The differences from last time are:

* The first patch has been broken up and now only adds the
  SensorOutputSize property. A new second patch initialises it (now to
  non-zero values). The initialisation within the RPi pipeline handler
  has been moved to the later patch that contains the RPi
  implementation. Now all the patches except that RPi specific one are
  "RPi-free".

* The SensorCrop control has been renamed again!! This time it's
  IspCrop.

* I've renamed and updated the documentation for those geometry helper
  functions.

* There's a new final patch where I've added a command line parameter
  to qcam that lets you set the digital zoom. I don't mind whether we
  do or don't use this patch, but I thought it might be helpful when
  other pipelines want to implement digital zoom. I don't do anything
  "clever" like worry about aspect ratios or anything, you just get
  what you request.

One final question on all this. I wrote some sample application code
in my previous discussion which I think would be helpful to include
somewhere. Otherwise it's quite a difficult leap from the
function-level documentation to the "proper" way to use them. What do
people think? Where might something like that go?

Thanks and best regards
David

David Plowman (6):
  libcamera: Add SensorOutputSize property
  libcamera: Initialise the SensorOutputSize property
  libcamera: Add IspCrop control
  libcamera: Add geometry helper functions
  libcamera: pipeline: raspberrypi: Implementation of digital zoom
  qcam: Add command line option to test IspCrop control

 include/libcamera/geometry.h                  |  20 +++
 include/libcamera/ipa/raspberrypi.h           |   1 +
 src/ipa/raspberrypi/raspberrypi.cpp           |   7 +
 src/libcamera/camera_sensor.cpp               |   6 +
 src/libcamera/control_ids.yaml                |   9 ++
 src/libcamera/geometry.cpp                    | 131 ++++++++++++++++++
 .../pipeline/raspberrypi/raspberrypi.cpp      |  47 +++++++
 src/libcamera/property_ids.yaml               |  12 ++
 src/qcam/main.cpp                             |   3 +
 src/qcam/main_window.cpp                      |  20 +++
 src/qcam/main_window.h                        |   1 +
 11 files changed, 257 insertions(+)