[libcamera-devel,v2,1/2] android: jpeg: Drop "libcamera::" namespace from functions' arguments
diff mbox series

Message ID 20201023053150.84411-1-email@uajain.com
State Accepted
Commit f9e7f55f3b2cdee93a51cf7f39a2e72b4c453e00
Headers show
Series
  • [libcamera-devel,v2,1/2] android: jpeg: Drop "libcamera::" namespace from functions' arguments
Related show

Commit Message

Umang Jain Oct. 23, 2020, 5:31 a.m. UTC
Drop "libcamera::" from functions' arguments for *.cpp files as they
have

	using namespace libcamera;

directive in the beginning.

Signed-off-by: Umang Jain <email@uajain.com>
---
 src/android/jpeg/encoder_libjpeg.cpp     | 9 ++++-----
 src/android/jpeg/post_processor_jpeg.cpp | 4 ++--
 2 files changed, 6 insertions(+), 7 deletions(-)

Comments

Kieran Bingham Oct. 23, 2020, 8:55 a.m. UTC | #1
Hi Umang,

On 23/10/2020 06:31, Umang Jain wrote:
> Drop "libcamera::" from functions' arguments for *.cpp files as they
> have
> 
> 	using namespace libcamera;
> 
> directive in the beginning.
> 
> Signed-off-by: Umang Jain <email@uajain.com>

Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>

> ---
>  src/android/jpeg/encoder_libjpeg.cpp     | 9 ++++-----
>  src/android/jpeg/post_processor_jpeg.cpp | 4 ++--
>  2 files changed, 6 insertions(+), 7 deletions(-)
> 
> diff --git a/src/android/jpeg/encoder_libjpeg.cpp b/src/android/jpeg/encoder_libjpeg.cpp
> index 5a2f88f..4bea10c 100644
> --- a/src/android/jpeg/encoder_libjpeg.cpp
> +++ b/src/android/jpeg/encoder_libjpeg.cpp
> @@ -104,7 +104,7 @@ int EncoderLibJpeg::configure(const StreamConfiguration &cfg)
>  	return 0;
>  }
>  
> -void EncoderLibJpeg::compressRGB(const libcamera::MappedBuffer *frame)
> +void EncoderLibJpeg::compressRGB(const MappedBuffer *frame)
>  {
>  	unsigned char *src = static_cast<unsigned char *>(frame->maps()[0].data());
>  	/* \todo Stride information should come from buffer configuration. */
> @@ -122,7 +122,7 @@ void EncoderLibJpeg::compressRGB(const libcamera::MappedBuffer *frame)
>   * Compress the incoming buffer from a supported NV format.
>   * This naively unpacks the semi-planar NV12 to a YUV888 format for libjpeg.
>   */
> -void EncoderLibJpeg::compressNV(const libcamera::MappedBuffer *frame)
> +void EncoderLibJpeg::compressNV(const MappedBuffer *frame)
>  {
>  	uint8_t tmprowbuf[compress_.image_width * 3];
>  
> @@ -179,9 +179,8 @@ void EncoderLibJpeg::compressNV(const libcamera::MappedBuffer *frame)
>  	}
>  }
>  
> -int EncoderLibJpeg::encode(const FrameBuffer &source,
> -			   libcamera::Span<uint8_t> dest,
> -			   const libcamera::Span<const uint8_t> &exifData)
> +int EncoderLibJpeg::encode(const FrameBuffer &source, Span<uint8_t> dest,
> +			   const Span<const uint8_t> &exifData)
>  {
>  	MappedFrameBuffer frame(&source, PROT_READ);
>  	if (!frame.isValid()) {
> diff --git a/src/android/jpeg/post_processor_jpeg.cpp b/src/android/jpeg/post_processor_jpeg.cpp
> index fd1c7be..93acfe5 100644
> --- a/src/android/jpeg/post_processor_jpeg.cpp
> +++ b/src/android/jpeg/post_processor_jpeg.cpp
> @@ -44,8 +44,8 @@ int PostProcessorJpeg::configure(const StreamConfiguration &inCfg,
>  	return encoder_->configure(inCfg);
>  }
>  
> -int PostProcessorJpeg::process(const libcamera::FrameBuffer &source,
> -			       libcamera::Span<uint8_t> destination,
> +int PostProcessorJpeg::process(const FrameBuffer &source,
> +			       Span<uint8_t> destination,
>  			       CameraMetadata *metadata)
>  {
>  	if (!encoder_)
>

Patch
diff mbox series

diff --git a/src/android/jpeg/encoder_libjpeg.cpp b/src/android/jpeg/encoder_libjpeg.cpp
index 5a2f88f..4bea10c 100644
--- a/src/android/jpeg/encoder_libjpeg.cpp
+++ b/src/android/jpeg/encoder_libjpeg.cpp
@@ -104,7 +104,7 @@  int EncoderLibJpeg::configure(const StreamConfiguration &cfg)
 	return 0;
 }
 
-void EncoderLibJpeg::compressRGB(const libcamera::MappedBuffer *frame)
+void EncoderLibJpeg::compressRGB(const MappedBuffer *frame)
 {
 	unsigned char *src = static_cast<unsigned char *>(frame->maps()[0].data());
 	/* \todo Stride information should come from buffer configuration. */
@@ -122,7 +122,7 @@  void EncoderLibJpeg::compressRGB(const libcamera::MappedBuffer *frame)
  * Compress the incoming buffer from a supported NV format.
  * This naively unpacks the semi-planar NV12 to a YUV888 format for libjpeg.
  */
-void EncoderLibJpeg::compressNV(const libcamera::MappedBuffer *frame)
+void EncoderLibJpeg::compressNV(const MappedBuffer *frame)
 {
 	uint8_t tmprowbuf[compress_.image_width * 3];
 
@@ -179,9 +179,8 @@  void EncoderLibJpeg::compressNV(const libcamera::MappedBuffer *frame)
 	}
 }
 
-int EncoderLibJpeg::encode(const FrameBuffer &source,
-			   libcamera::Span<uint8_t> dest,
-			   const libcamera::Span<const uint8_t> &exifData)
+int EncoderLibJpeg::encode(const FrameBuffer &source, Span<uint8_t> dest,
+			   const Span<const uint8_t> &exifData)
 {
 	MappedFrameBuffer frame(&source, PROT_READ);
 	if (!frame.isValid()) {
diff --git a/src/android/jpeg/post_processor_jpeg.cpp b/src/android/jpeg/post_processor_jpeg.cpp
index fd1c7be..93acfe5 100644
--- a/src/android/jpeg/post_processor_jpeg.cpp
+++ b/src/android/jpeg/post_processor_jpeg.cpp
@@ -44,8 +44,8 @@  int PostProcessorJpeg::configure(const StreamConfiguration &inCfg,
 	return encoder_->configure(inCfg);
 }
 
-int PostProcessorJpeg::process(const libcamera::FrameBuffer &source,
-			       libcamera::Span<uint8_t> destination,
+int PostProcessorJpeg::process(const FrameBuffer &source,
+			       Span<uint8_t> destination,
 			       CameraMetadata *metadata)
 {
 	if (!encoder_)