Message ID | 20210910104729.542779-2-umang.jain@ideasonboard.com |
---|---|
State | Superseded |
Delegated to: | Umang Jain |
Headers | show |
Series |
|
Related | show |
Hi Umang, On Fri, Sep 10, 2021 at 7:47 PM Umang Jain <umang.jain@ideasonboard.com> wrote: > > Rectify variable renaming style for YPlaneSize, UVPlaneSize. > libcamera uses camelCase where first letter should be in lower case. > > Fixes: e355ca0087cd9("android: jpeg: Split and pass the thumbnail planes to encoder") > Signed-off-by: Umang Jain <umang.jain@ideasonboard.com> Sorry for capitalized names in my suggestion. Reviewed-by: Hirokazu Honda <hiroh@chromium.org> > --- > src/android/jpeg/post_processor_jpeg.cpp | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/src/android/jpeg/post_processor_jpeg.cpp b/src/android/jpeg/post_processor_jpeg.cpp > index ef2d98cc..f6d47f63 100644 > --- a/src/android/jpeg/post_processor_jpeg.cpp > +++ b/src/android/jpeg/post_processor_jpeg.cpp > @@ -82,10 +82,10 @@ void PostProcessorJpeg::generateThumbnail(const FrameBuffer &source, > */ > std::vector<Span<uint8_t>> thumbnailPlanes; > const PixelFormatInfo &formatNV12 = PixelFormatInfo::info(formats::NV12); > - size_t YPlaneSize = formatNV12.planeSize(targetSize, 0); > - size_t UVPlaneSize = formatNV12.planeSize(targetSize, 1); > - thumbnailPlanes.push_back({ rawThumbnail.data(), YPlaneSize }); > - thumbnailPlanes.push_back({ rawThumbnail.data() + YPlaneSize, UVPlaneSize }); > + size_t yPlaneSize = formatNV12.planeSize(targetSize, 0); > + size_t uvPlaneSize = formatNV12.planeSize(targetSize, 1); > + thumbnailPlanes.push_back({ rawThumbnail.data(), yPlaneSize }); > + thumbnailPlanes.push_back({ rawThumbnail.data() + yPlaneSize, uvPlaneSize }); > > int jpeg_size = thumbnailEncoder_.encode(thumbnailPlanes, > *thumbnail, {}, quality); > -- > 2.31.0 >
Hi Umang, Thank you for the patch. On Fri, Sep 10, 2021 at 04:17:28PM +0530, Umang Jain wrote: > Rectify variable renaming style for YPlaneSize, UVPlaneSize. > libcamera uses camelCase where first letter should be in lower case. > > Fixes: e355ca0087cd9("android: jpeg: Split and pass the thumbnail planes to encoder") > Signed-off-by: Umang Jain <umang.jain@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > --- > src/android/jpeg/post_processor_jpeg.cpp | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/src/android/jpeg/post_processor_jpeg.cpp b/src/android/jpeg/post_processor_jpeg.cpp > index ef2d98cc..f6d47f63 100644 > --- a/src/android/jpeg/post_processor_jpeg.cpp > +++ b/src/android/jpeg/post_processor_jpeg.cpp > @@ -82,10 +82,10 @@ void PostProcessorJpeg::generateThumbnail(const FrameBuffer &source, > */ > std::vector<Span<uint8_t>> thumbnailPlanes; > const PixelFormatInfo &formatNV12 = PixelFormatInfo::info(formats::NV12); > - size_t YPlaneSize = formatNV12.planeSize(targetSize, 0); > - size_t UVPlaneSize = formatNV12.planeSize(targetSize, 1); > - thumbnailPlanes.push_back({ rawThumbnail.data(), YPlaneSize }); > - thumbnailPlanes.push_back({ rawThumbnail.data() + YPlaneSize, UVPlaneSize }); > + size_t yPlaneSize = formatNV12.planeSize(targetSize, 0); > + size_t uvPlaneSize = formatNV12.planeSize(targetSize, 1); > + thumbnailPlanes.push_back({ rawThumbnail.data(), yPlaneSize }); > + thumbnailPlanes.push_back({ rawThumbnail.data() + yPlaneSize, uvPlaneSize }); > > int jpeg_size = thumbnailEncoder_.encode(thumbnailPlanes, > *thumbnail, {}, quality);
diff --git a/src/android/jpeg/post_processor_jpeg.cpp b/src/android/jpeg/post_processor_jpeg.cpp index ef2d98cc..f6d47f63 100644 --- a/src/android/jpeg/post_processor_jpeg.cpp +++ b/src/android/jpeg/post_processor_jpeg.cpp @@ -82,10 +82,10 @@ void PostProcessorJpeg::generateThumbnail(const FrameBuffer &source, */ std::vector<Span<uint8_t>> thumbnailPlanes; const PixelFormatInfo &formatNV12 = PixelFormatInfo::info(formats::NV12); - size_t YPlaneSize = formatNV12.planeSize(targetSize, 0); - size_t UVPlaneSize = formatNV12.planeSize(targetSize, 1); - thumbnailPlanes.push_back({ rawThumbnail.data(), YPlaneSize }); - thumbnailPlanes.push_back({ rawThumbnail.data() + YPlaneSize, UVPlaneSize }); + size_t yPlaneSize = formatNV12.planeSize(targetSize, 0); + size_t uvPlaneSize = formatNV12.planeSize(targetSize, 1); + thumbnailPlanes.push_back({ rawThumbnail.data(), yPlaneSize }); + thumbnailPlanes.push_back({ rawThumbnail.data() + yPlaneSize, uvPlaneSize }); int jpeg_size = thumbnailEncoder_.encode(thumbnailPlanes, *thumbnail, {}, quality);
Rectify variable renaming style for YPlaneSize, UVPlaneSize. libcamera uses camelCase where first letter should be in lower case. Fixes: e355ca0087cd9("android: jpeg: Split and pass the thumbnail planes to encoder") Signed-off-by: Umang Jain <umang.jain@ideasonboard.com> --- src/android/jpeg/post_processor_jpeg.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)