[libcamera-devel] [PATCH v5 0/2] Initial EXIF metadata support

Umang Jain email at uajain.com
Thu Sep 3 18:32:14 CEST 2020


Changes in v5:
- Drop return type 'int'  of setString, setShort, setLong
  helpers because of improved error handling and exif
  validity check in createEntry().
- Check if EXIF instance is acutally valid before generate().
- Document API usage briefly.

Changes in v4:
 - No major changes expect few alphabetically sort fixes,
   commit amend, fix coding/variable style etc.

Changes in v3:
- setTimestamp() now follows the EXIF standard format
  "YYYY:MM:DD hh:mm:ss"
- Strip re-use of EXIF object for every frame.
  A new EXIF object is created and each tag is set for it,
  for each frame while encoding.
- Exif::generate() returns a int code and Exif::data() will
  now return a const libcamera::Span of { exif_data_, size_ }.
- Null terminate strings in Exif::setString().
- Make setLong, setShort, setString etc. helpers private.

Changes in v2:
- Patch 2/3 and 3/3 in v1 are merged.
- We ignore the Frame Metadata timestamp, instead use the 'time of
  encoding' as the frame timestamp for EXIF data. Since the resolution
  is only 1s, this seems to be fine (consensus over IRC).
- EXIF data placeholder is now wrapper inside CameraStream.
  This prevents setting static metadata repeatedly in v1, like
  Make/Model etc.
- Jpeg Encoder encodes the EXIF generated Span<> directly into the
  image. This avoids JPEG encoder dealing with EXIF specifics inside
  itself. 
- Orientation tag value is rectified and is similar to how it's done
  in Chrome HAL.
- Exif::setWidth() and Exif::setHeight() are merged to achieve common
  Exif::setSize(libcamera::Size) for setting frame sizes.

Kieran Bingham (1):
  libcamera: android: Add EXIF infrastructure

Umang Jain (1):
  android: jpeg: Support an initial set of  EXIF metadata tags

 src/android/camera_device.cpp        |  18 +-
 src/android/jpeg/encoder.h           |   3 +-
 src/android/jpeg/encoder_libjpeg.cpp |   9 +-
 src/android/jpeg/encoder_libjpeg.h   |   3 +-
 src/android/jpeg/exif.cpp            | 235 +++++++++++++++++++++++++++
 src/android/jpeg/exif.h              |  54 ++++++
 src/android/meson.build              |   2 +
 7 files changed, 320 insertions(+), 4 deletions(-)
 create mode 100644 src/android/jpeg/exif.cpp
 create mode 100644 src/android/jpeg/exif.h

-- 
2.25.1



More information about the libcamera-devel mailing list