[{"id":5066,"web_url":"https://patchwork.libcamera.org/comment/5066/","msgid":"<20200605195734.GO5864@oden.dyn.berto.se>","date":"2020-06-05T19:57:34","subject":"Re: [libcamera-devel] [PATCH/RFC 01/11] libcamera: Rename\n\tpixelformats.{cpp, h} to pixel_format.{cpp, h}","submitter":{"id":5,"url":"https://patchwork.libcamera.org/api/people/5/","name":"Niklas Söderlund","email":"niklas.soderlund@ragnatech.se"},"content":"Hi Laurent,\n\nThanks for your patch.\n\nOn 2020-05-22 17:54:48 +0300, Laurent Pinchart wrote:\n> The libcamera source files are named after class names, using\n> snake_case. pixelformats.h and pixelformats.cpp don't comply with that\n> rule. Fix them.\n> \n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\nReviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n\n> ---\n>  include/libcamera/internal/formats.h                 | 2 +-\n>  include/libcamera/internal/v4l2_pixelformat.h        | 2 +-\n>  include/libcamera/internal/v4l2_videodevice.h        | 2 +-\n>  include/libcamera/meson.build                        | 2 +-\n>  include/libcamera/{pixelformats.h => pixel_format.h} | 8 ++++----\n>  include/libcamera/stream.h                           | 2 +-\n>  src/libcamera/meson.build                            | 2 +-\n>  src/libcamera/pipeline/simple/converter.h            | 2 +-\n>  src/libcamera/{pixelformats.cpp => pixel_format.cpp} | 8 ++++----\n>  src/libcamera/v4l2_pixelformat.cpp                   | 2 +-\n>  src/qcam/format_converter.h                          | 2 +-\n>  src/qcam/viewfinder.h                                | 2 +-\n>  12 files changed, 18 insertions(+), 18 deletions(-)\n>  rename include/libcamera/{pixelformats.h => pixel_format.h} (82%)\n>  rename src/libcamera/{pixelformats.cpp => pixel_format.cpp} (95%)\n> \n> diff --git a/include/libcamera/internal/formats.h b/include/libcamera/internal/formats.h\n> index 4092a93ef973..4455b0f9b050 100644\n> --- a/include/libcamera/internal/formats.h\n> +++ b/include/libcamera/internal/formats.h\n> @@ -12,7 +12,7 @@\n>  #include <vector>\n>  \n>  #include <libcamera/geometry.h>\n> -#include <libcamera/pixelformats.h>\n> +#include <libcamera/pixel_format.h>\n>  \n>  #include \"libcamera/internal/v4l2_pixelformat.h\"\n>  \n> diff --git a/include/libcamera/internal/v4l2_pixelformat.h b/include/libcamera/internal/v4l2_pixelformat.h\n> index 0fe8a017de34..4d0e034b8b51 100644\n> --- a/include/libcamera/internal/v4l2_pixelformat.h\n> +++ b/include/libcamera/internal/v4l2_pixelformat.h\n> @@ -13,7 +13,7 @@\n>  \n>  #include <linux/videodev2.h>\n>  \n> -#include <libcamera/pixelformats.h>\n> +#include <libcamera/pixel_format.h>\n>  \n>  namespace libcamera {\n>  \n> diff --git a/include/libcamera/internal/v4l2_videodevice.h b/include/libcamera/internal/v4l2_videodevice.h\n> index dc259523599c..c93cf816373b 100644\n> --- a/include/libcamera/internal/v4l2_videodevice.h\n> +++ b/include/libcamera/internal/v4l2_videodevice.h\n> @@ -17,7 +17,7 @@\n>  \n>  #include <libcamera/buffer.h>\n>  #include <libcamera/geometry.h>\n> -#include <libcamera/pixelformats.h>\n> +#include <libcamera/pixel_format.h>\n>  #include <libcamera/signal.h>\n>  \n>  #include \"libcamera/internal/formats.h\"\n> diff --git a/include/libcamera/meson.build b/include/libcamera/meson.build\n> index 27760c19f9b9..73c5b999acf4 100644\n> --- a/include/libcamera/meson.build\n> +++ b/include/libcamera/meson.build\n> @@ -13,7 +13,7 @@ libcamera_public_headers = files([\n>      'geometry.h',\n>      'logging.h',\n>      'object.h',\n> -    'pixelformats.h',\n> +    'pixel_format.h',\n>      'request.h',\n>      'signal.h',\n>      'span.h',\n> diff --git a/include/libcamera/pixelformats.h b/include/libcamera/pixel_format.h\n> similarity index 82%\n> rename from include/libcamera/pixelformats.h\n> rename to include/libcamera/pixel_format.h\n> index 89966e5e664c..e3b371ef92bb 100644\n> --- a/include/libcamera/pixelformats.h\n> +++ b/include/libcamera/pixel_format.h\n> @@ -2,10 +2,10 @@\n>  /*\n>   * Copyright (C) 2019, Google Inc.\n>   *\n> - * pixelformats.h - libcamera pixel formats\n> + * pixel_format.h - libcamera Pixel Format\n>   */\n> -#ifndef __LIBCAMERA_PIXEL_FORMATS_H__\n> -#define __LIBCAMERA_PIXEL_FORMATS_H__\n> +#ifndef __LIBCAMERA_PIXEL_FORMAT_H__\n> +#define __LIBCAMERA_PIXEL_FORMAT_H__\n>  \n>  #include <set>\n>  #include <stdint.h>\n> @@ -40,4 +40,4 @@ private:\n>  \n>  } /* namespace libcamera */\n>  \n> -#endif /* __LIBCAMERA_PIXEL_FORMATS_H__ */\n> +#endif /* __LIBCAMERA_PIXEL_FORMAT_H__ */\n> diff --git a/include/libcamera/stream.h b/include/libcamera/stream.h\n> index b3cbea3d5229..1a68bd23a81a 100644\n> --- a/include/libcamera/stream.h\n> +++ b/include/libcamera/stream.h\n> @@ -14,7 +14,7 @@\n>  \n>  #include <libcamera/buffer.h>\n>  #include <libcamera/geometry.h>\n> -#include <libcamera/pixelformats.h>\n> +#include <libcamera/pixel_format.h>\n>  \n>  namespace libcamera {\n>  \n> diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build\n> index b88f295d251d..611fc061e1cf 100644\n> --- a/src/libcamera/meson.build\n> +++ b/src/libcamera/meson.build\n> @@ -34,7 +34,7 @@ libcamera_sources = files([\n>      'message.cpp',\n>      'object.cpp',\n>      'pipeline_handler.cpp',\n> -    'pixelformats.cpp',\n> +    'pixel_format.cpp',\n>      'process.cpp',\n>      'pub_key.cpp',\n>      'request.cpp',\n> diff --git a/src/libcamera/pipeline/simple/converter.h b/src/libcamera/pipeline/simple/converter.h\n> index 1f770eb844b5..ef18cf73a2ed 100644\n> --- a/src/libcamera/pipeline/simple/converter.h\n> +++ b/src/libcamera/pipeline/simple/converter.h\n> @@ -12,7 +12,7 @@\n>  #include <queue>\n>  #include <vector>\n>  \n> -#include <libcamera/pixelformats.h>\n> +#include <libcamera/pixel_format.h>\n>  #include <libcamera/signal.h>\n>  \n>  namespace libcamera {\n> diff --git a/src/libcamera/pixelformats.cpp b/src/libcamera/pixel_format.cpp\n> similarity index 95%\n> rename from src/libcamera/pixelformats.cpp\n> rename to src/libcamera/pixel_format.cpp\n> index 1330dc5ab3d9..d8718739152d 100644\n> --- a/src/libcamera/pixelformats.cpp\n> +++ b/src/libcamera/pixel_format.cpp\n> @@ -2,14 +2,14 @@\n>  /*\n>   * Copyright (C) 2019, Google Inc.\n>   *\n> - * pixelformats.cpp - libcamera pixel formats\n> + * pixel_format.cpp - libcamera Pixel Format\n>   */\n>  \n> -#include <libcamera/pixelformats.h>\n> +#include <libcamera/pixel_format.h>\n>  \n>  /**\n> - * \\file pixelformats.h\n> - * \\brief libcamera pixel formats\n> + * \\file pixel_format.h\n> + * \\brief libcamera pixel format\n>   */\n>  \n>  namespace libcamera {\n> diff --git a/src/libcamera/v4l2_pixelformat.cpp b/src/libcamera/v4l2_pixelformat.cpp\n> index 36776be99e59..94fae470f926 100644\n> --- a/src/libcamera/v4l2_pixelformat.cpp\n> +++ b/src/libcamera/v4l2_pixelformat.cpp\n> @@ -14,7 +14,7 @@\n>  \n>  #include <linux/drm_fourcc.h>\n>  \n> -#include <libcamera/pixelformats.h>\n> +#include <libcamera/pixel_format.h>\n>  \n>  #include \"libcamera/internal/formats.h\"\n>  #include \"libcamera/internal/log.h\"\n> diff --git a/src/qcam/format_converter.h b/src/qcam/format_converter.h\n> index 5e28adf0ef63..e389b24a69f7 100644\n> --- a/src/qcam/format_converter.h\n> +++ b/src/qcam/format_converter.h\n> @@ -11,7 +11,7 @@\n>  \n>  #include <QSize>\n>  \n> -#include <libcamera/pixelformats.h>\n> +#include <libcamera/pixel_format.h>\n>  \n>  class QImage;\n>  \n> diff --git a/src/qcam/viewfinder.h b/src/qcam/viewfinder.h\n> index b3f1d25d9d60..26a1320537d2 100644\n> --- a/src/qcam/viewfinder.h\n> +++ b/src/qcam/viewfinder.h\n> @@ -17,7 +17,7 @@\n>  #include <QWidget>\n>  \n>  #include <libcamera/buffer.h>\n> -#include <libcamera/pixelformats.h>\n> +#include <libcamera/pixel_format.h>\n>  \n>  #include \"format_converter.h\"\n>  \n> -- \n> Regards,\n> \n> Laurent Pinchart\n> \n> _______________________________________________\n> libcamera-devel mailing list\n> libcamera-devel@lists.libcamera.org\n> https://lists.libcamera.org/listinfo/libcamera-devel","headers":{"Return-Path":"<niklas.soderlund@ragnatech.se>","Received":["from mail-lf1-x131.google.com (mail-lf1-x131.google.com\n\t[IPv6:2a00:1450:4864:20::131])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id E472F603CA\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri,  5 Jun 2020 21:57:36 +0200 (CEST)","by mail-lf1-x131.google.com with SMTP id w15so6484105lfe.11\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 05 Jun 2020 12:57:36 -0700 (PDT)","from localhost (h-209-203.A463.priv.bahnhof.se. [155.4.209.203])\n\tby smtp.gmail.com with ESMTPSA id\n\tf19sm1330015lfk.24.2020.06.05.12.57.35\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 05 Jun 2020 12:57:35 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected)\n\theader.d=ragnatech-se.20150623.gappssmtp.com\n\theader.i=@ragnatech-se.20150623.gappssmtp.com header.b=\"iuYf0F6Y\"; \n\tdkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=ragnatech-se.20150623.gappssmtp.com; s=20150623;\n\th=date:from:to:cc:subject:message-id:references:mime-version\n\t:content-disposition:content-transfer-encoding:in-reply-to;\n\tbh=k7m1+SFoPjTKmALL1OoZli3R6GBqGTdo66J2fOIqYQU=;\n\tb=iuYf0F6Ywg7avvRcgKpfDYaNldS1d6b5rHy7WvtaA29j/9D9rnpGqrzdwM3quEo8Xf\n\tYtAkv+Lhu+z0BFccMhPPEFDhtOWYZ35IKgDmkV6n8Xg4LSZOCLi0qBQ8spRHXseILyCp\n\t0mY2KzcgT2mqE1TZ/y9tIXOyDmgfc2Ccxh2Rlow309yxJThYgyj7As3MW5UhsN+Ajbgo\n\tV7NBqCCnRpJjhCq4VWvJQoOWgIhrcGJBcx3YbUQYpjDg78oQYgHm5h7cjicn/qCoTMiy\n\tlB9OjZkNYcfnyN7ibSB984kpMS2pU5s4QkBUJV88rj/b/hYveTEIa5toUHw3ZNag5MYv\n\tGnOg==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:references\n\t:mime-version:content-disposition:content-transfer-encoding\n\t:in-reply-to;\n\tbh=k7m1+SFoPjTKmALL1OoZli3R6GBqGTdo66J2fOIqYQU=;\n\tb=nrG47ipZrFwM9cKC+qIcfq3feHnoSHUTxZuQ6E3cicc2M1rDZlEPvv1nnvv2fdyxKK\n\tGZz9sdOnaClqI4/TsE/WXNGzv/aQqf6jB8/HzNYE/Kk+VentKboJeBOq5Q+C8xQ6xo8V\n\tK3n2bahX/b8iL9Hy/GQZhgWVXmXfp6iTqbmkNivkyaWmw3ewjolCCTq9PKsjn00l1uke\n\tr4h3OBQi3N5f77f5j5Z9E3ko5TBZaXf+RkDK2KFILq8OQnk/BjPaH3s+zfWzjaa+rFuq\n\t9ZJ+hLfVxTcgP/45Wls0glCjOwTBpWYW6Jy4WNRCydwARj8R6FBT4CwqaHvlQQUUwPx9\n\tXJgw==","X-Gm-Message-State":"AOAM53366sN+5LnnsuMKruDBRpJg/mm6FXu+aCw9xsSBK5RxDLCWVGYD\n\tUbnWV7A49CTUk9eVy4aH9R29hCGbLd+96Q==","X-Google-Smtp-Source":"ABdhPJx3expKoAmlrHGFaKIkkOdLVyg6S7FersrCoKQ5aRIWQ4kPuXcKHxr6r4lU0f2JMOp1W7jc2w==","X-Received":"by 2002:a19:550e:: with SMTP id n14mr6258642lfe.81.1591387056231;\n\tFri, 05 Jun 2020 12:57:36 -0700 (PDT)","Date":"Fri, 5 Jun 2020 21:57:34 +0200","From":"Niklas =?iso-8859-1?q?S=F6derlund?= <niklas.soderlund@ragnatech.se>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Message-ID":"<20200605195734.GO5864@oden.dyn.berto.se>","References":"<20200522145459.16836-1-laurent.pinchart@ideasonboard.com>\n\t<20200522145459.16836-2-laurent.pinchart@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=iso-8859-1","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<20200522145459.16836-2-laurent.pinchart@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH/RFC 01/11] libcamera: Rename\n\tpixelformats.{cpp, h} to pixel_format.{cpp, h}","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","X-List-Received-Date":"Fri, 05 Jun 2020 19:57:37 -0000"}}]