[libcamera-devel,v3,0/5] 2D transforms
mbox series

Message ID 20200821155641.11839-1-david.plowman@raspberrypi.com
Headers show
Series
  • 2D transforms
Related show

Message

David Plowman Aug. 21, 2020, 3:56 p.m. UTC
Hi everyone

Here's the latest version of the implementation of 2D transforms,
taking feedback on board and adding the missing documentation. It's
set out in the same 5 commits as before, and the functionality is
basically identical, just a couple of changes to point out.

Firstly, in the third patch there was a question about what to do if
the camera is listed as having a rotation that's not 0 or 180 degrees.

If a 90/270 rotation is found, the code will expect a user transform
to be specified that "undoes" the transposition. If the combined
rotation and user transform _doesn't_ undo the transposition, then the
user transform will be "adjusted" so that it does.

If there's a non-90-degree rotation (it seems to be possible, if a bit
hard to imagine), I wasn't sure what to do about that. Failing
would seem unhelpful as there's nothing the application can do to make
it work. There's no "adjustment" we can perform to make it valid. So
I've ended up printing a warning and ignoring the rotation. Under the
circumstances maybe that's the most reasonable thing to do?

Finally, the documentation ran into a Doxygen problem with
strongly-typed enums. The table of enumeration values simply vanishes,
so instead I've just included that as text in the description. It's
easy to change if the Doxygen situation improves.

I think that's everything! Improvements - especially to the new
documentation - welcome as always.

Thanks and best regards
David

David Plowman (5):
  libcamera: Add Transform enum to represet 2D plane transforms.
  libcamera: Add user Transform to CameraConfiguration
  libcamera: raspberrypi: Set camera flips correctly from user transform
  libcamera: raspberrypi: Plumb user transform through to IPA
  libcamera: ipa: raspberrypi: ALSC: Handle user transform

 include/libcamera/camera.h                    |   3 +
 include/libcamera/meson.build                 |   1 +
 include/libcamera/transform.h                 |  73 +++++
 src/ipa/raspberrypi/controller/camera_mode.h  |   4 +
 src/ipa/raspberrypi/controller/rpi/alsc.cpp   |  13 +-
 src/ipa/raspberrypi/raspberrypi.cpp           |  48 +--
 src/libcamera/camera.cpp                      |  16 +-
 src/libcamera/meson.build                     |   1 +
 src/libcamera/pipeline/ipu3/ipu3.cpp          |   5 +
 .../pipeline/raspberrypi/raspberrypi.cpp      |  40 ++-
 src/libcamera/pipeline/rkisp1/rkisp1.cpp      |   5 +
 src/libcamera/pipeline/simple/simple.cpp      |   5 +
 src/libcamera/pipeline/uvcvideo/uvcvideo.cpp  |   5 +
 src/libcamera/pipeline/vimc/vimc.cpp          |   5 +
 src/libcamera/transform.cpp                   | 301 ++++++++++++++++++
 15 files changed, 499 insertions(+), 26 deletions(-)
 create mode 100644 include/libcamera/transform.h
 create mode 100644 src/libcamera/transform.cpp