[libcamera-devel] [PATCH 2/5] android: jpeg: thumbnailer: Use MappedFrameBuffer::planes()
Hirokazu Honda
hiroh at chromium.org
Tue Aug 31 08:34:35 CEST 2021
Thumbnailer gets the address of NV12 UV Plane by computing the
first plane size. MappedFrameBuffer::planes() returns the plane
address. This replaces the address computation with
MappedFrameBuffer::planes() in Thumbnailer.
Signed-off-by: Hirokazu Honda <hiroh at chromium.org>
---
src/android/jpeg/thumbnailer.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/android/jpeg/thumbnailer.cpp b/src/android/jpeg/thumbnailer.cpp
index 043c7b33..fe2c4969 100644
--- a/src/android/jpeg/thumbnailer.cpp
+++ b/src/android/jpeg/thumbnailer.cpp
@@ -63,7 +63,7 @@ void Thumbnailer::createThumbnail(const FrameBuffer &source,
/* Image scaling block implementing nearest-neighbour algorithm. */
unsigned char *src = static_cast<unsigned char *>(frame.planes()[0].data());
- unsigned char *srcC = src + sh * sw;
+ unsigned char *srcC = static_cast<unsigned char *>(frame.planes()[1].data());
unsigned char *srcCb, *srcCr;
unsigned char *dstY, *srcY;
--
2.33.0.259.gc128427fd7-goog
More information about the libcamera-devel
mailing list