[libcamera-devel] [PATCH 0/5] Improve/Clean up post processors code in android

Hirokazu Honda hiroh at chromium.org
Tue Aug 31 08:34:33 CEST 2021


This patch series basically improves and clean ups by some variable
types with MappedBuffer. I also introduce a new MappedBuffer class for
planes that are originated in heap i.e. std::vector<uint8_t>.

Although this is not done in the patch, ideally we should remove all
the stride computation in the post processor code. Even though the
plane address is acquired by MappedBuffer::planes(), the post
processing is done with the manual stride computation. It might be
different from the actual stride of the plane.
I think MappedBuffer should provide strides() like CameraBuffer.

Hirokazu Honda (5):
  android: yuv: Use CameraBuffer::stride() in PostProcessorYuv
  android: jpeg: thumbnailer: Use MappedFrameBuffer::planes()
  mapped_framebuffer: Introduce MappedVectorBuffer
  thumbnailer: Change the type of thumbnail to MappedBuffer
  android: encoder_libjpeg: Use MappedBuffer for the source frame

 .../libcamera/internal/mapped_framebuffer.h   |  9 ++++++
 src/android/jpeg/encoder_libjpeg.cpp          | 28 +++++++++++--------
 src/android/jpeg/encoder_libjpeg.h            |  7 +++--
 src/android/jpeg/post_processor_jpeg.cpp      | 14 ++++++----
 src/android/jpeg/thumbnailer.cpp              | 14 ++++++----
 src/android/jpeg/thumbnailer.h                |  6 +++-
 src/android/yuv/post_processor_yuv.cpp        | 13 +++++----
 src/android/yuv/post_processor_yuv.h          |  1 -
 src/libcamera/mapped_framebuffer.cpp          | 17 +++++++++++
 9 files changed, 75 insertions(+), 34 deletions(-)

--
2.33.0.259.gc128427fd7-goog


More information about the libcamera-devel mailing list