[{"id":11226,"web_url":"https://patchwork.libcamera.org/comment/11226/","msgid":"<27952cc1-c71e-cd89-0f06-570e4534efe4@uajain.com>","date":"2020-07-06T17:55:50","subject":"Re: [libcamera-devel] [PATCH v2] Create libcamera overview document\n\tand glossary","submitter":{"id":1,"url":"https://patchwork.libcamera.org/api/people/1/","name":"Umang Jain","email":"email@uajain.com"},"content":"Hi Chris,\n\nOn 7/2/20 4:15 PM, chris@gregariousmammal.com wrote:\n> From: Chris Chinchilla <chris@gregariousmammal.com>\n>\n> Creates a libcamera architecture overview guide and glossary.\n>\n> Signed-off-by: Chris Chinchilla <chris@gregariousmammal.com>\n> ---\n>   Documentation/introduction.rst | 197 +++++++++++++++++++++++++++++++++\n>   1 file changed, 197 insertions(+)\n>   create mode 100644 Documentation/introduction.rst\n>\n> diff --git a/Documentation/introduction.rst b/Documentation/introduction.rst\n> new file mode 100644\n> index 0000000..cf914c7\n> --- /dev/null\n> +++ b/Documentation/introduction.rst\n> @@ -0,0 +1,197 @@\n> +An introduction to libcamera\n> +============================\n> +\n> +The Video for Linux 2 (`V4L2 <https://www.linuxtv.org/downloads/v4l-dvb-apis-new/userspace-api/v4l/v4l2.html>`_) API provides kernel drivers for devices that provide and manipulate\n> +images and video. However, Linux was missing a convenient way for application developers to take\n> +advantage of these kernel drivers in userspace. Vendors of devices that provide image input sources\n> +referred to as \"image signal processors\" (ISPs) sometimes contribute open-source V4L2 drivers.\n> +However, ISPs vary so much, and it's a hard task for developers to write portable ISP-based\n> +applications.\n> +\n> +The libcamera library aims to fill this gap by providing a complete userspace camera\n> +stack for Linux-based systems that supports a wide variety of ISPs, including systems with multiple ISPs attached.\n> +\n> +The library currently supports:\n> +\n> +-  Hardware\n> +\n> +   -  Intel IPU3\n> +   -  Rockchip RK3399\n> +   -  RaspberryPi 3 and 4\n> +   -  USB video device class (UVC) cameras\n> +   -  Virtual media controller (vimc) driver\n> +\n> +-  Software\n> +\n> +   - ChromeOS support through an Android HAL3 adaptation layer\nnit: `ChromeOS` alignment not in line with other points below.\n> +   -  Image processing algorithms\n> +   -  A V4L2 compatibility layer for existing V4L2 based applications\n> +   -  A gstreamer element for gstreamer pipeline based applications.\n> +\n> +The library provides a public API for managing ISPs, frame capture, video streams, frame and\n> +request metadata, events and callbacks, image processing, and more.\n> +\n> +Where libcamera sits in the camera stack\n> +----------------------------------------\n> +\n> +The libcamera library sits in userspace, just on top of the kernel drivers that directly interact\n> +with hardware and the V4L2 family of APIs (Media Controller, V4L2 Video Device, and V4L2 sub-device APIs).\n> +\n> +When using libcamera in a camera stack, it is the core component, taking control of all camera\n> +devices, and exposing a native C++ API to upper layers of the framework. Other language bindings are in development.\n> +\n> +Compatibility Layers\n> +~~~~~~~~~~~~~~~~~~~~\n> +\n> +In a layer above the core framework are compatibility libraries to help existing applications and their developers.\n> +\n> +V4L2 Compatibility Layer\n> +^^^^^^^^^^^^^^^^^^^^^^^^\n> +\n> +To emulate high-level V4L2 camera devices and capture all access to camera devices, libcamera uses\n> +a shared library. The shared library is transparent to libcamera-based applications and injected\n> +into a process address space using dynamic linking with \"LD_PRELOAD \".\n> +\n> +The compatibility layer exposes camera device features on a best-effort basis and aims for the\n> +level of features traditionally available from a UVC camera designed for video conferencing.\n> +\n> +Android Camera HAL\n> +^^^^^^^^^^^^^^^^^^\n> +\n> +The libcamera library offers Android camera support through a generic `hardware abstraction layer (HAL) <https://source.android.com/devices/camera/camera3_requests_hal>`_ implementation.\n> +The HAL focuses on supporting features required by Android that are missing from libcamera, such as JPEG encoding.\n> +\n> +The Android camera HAL implementation initially targets the \"LIMITED \"\n> +`hardware level <https://source.android.com/devices/camera/versioning#camera_api2>`_,\n> +with support for the \"FULL \"level then gradually implemented.\n\nHere I feel we should mention that ChromeOS actually uses Android HAL \nlayer for it's camera\nto re-iterate the point above (\"ChromeOS support through an Android HAL3 \nadaptation layer\").\n\nThis is why libcamera ventures into Android's HAL layer (for now atleast).\n> +\n> +gstreamer element\n> +^^^^^^^^^^^^^^^^^\n> +\n> +The library provides `a gstreamer element <https://gstreamer.freedesktop.org/documentation/application-development/basics/elements.html?gi-language=c>`_ that routes libcamera data for\n> +further processing in a gstreamer pipeline.\n> +\n> +libcamera Architecture\n> +----------------------\n> +\n> +The libcamera library exposes one unified API, but behind that is built from\n> +re-usable components that provide hardware specific support and configuration\n> +with a device agnostic API.\n> +\n> +Camera Manager\n> +~~~~~~~~~~~~~~\n> +\n> +It enumerates cameras at runtime and instantiates a `Pipeline Handler`_ to manage each Camera\n> +device that libcamera supports. The Camera Manager supports hotplug detection\n> +and notification events when supported by the underlying kernel devices.\n> +\n> +There is only ever one instance of the Camera Manager running per application. Each application's\n> +instance of the Camera Manager ensures that only a single application can take control of a camera\n> +device at once.\n> +\n> +`Read the Camera Manager API documentation for more details <http://libcamera.org/api-html/classlibcamera_1_1CameraManager.html>`_\n> +\n> +Camera Device\n> +~~~~~~~~~~~~~\n> +\n> +The camera class represents a single item of camera hardware that is capable of producing one or more image streams, and provides the API to interact with the underlying device.\n> +\n> +If a system has multiple instances of the same hardware attached, each has it's own instance of the camera class.\n> +\n> +The API exposes full control of the device to upper layers of libcamera through the public API,\n> +making it the highest level object libcamera exposes, and the object that all other API operations\n> +interact with from configuration to capture.\n> +\n> +`Read the Camera API documentation for more details <http://libcamera.org/api-html/classlibcamera_1_1Camera.html>`_\n> +\n> +Frame controls\n> +^^^^^^^^^^^^^^\n> +\n> +Depending on the capabilities of a camera device and the hardware it is connected\n> +to, libcamera supports controlling capture parameters for each stream on a per-frame basis.\n> +\n> +These controls include auto exposure, gain, brightness, contrast, lux, white balance, color\n> +temperature, and saturation.\n> +\n> +`Read the Control API documentation for more details <http://libcamera.org/api-html/classlibcamera_1_1Control.html>`_\n> +\n> +Pipeline Handler\n> +~~~~~~~~~~~~~~~~\n> +\n> +Pipeline handlers are the abstraction layer for platform-specific hardware configuration. They\n> +access and control hardware through the V4L2 and Media Controller kernel interfaces, and implement\n> +an internal API to control the ISP and Capture components of a pipeline directly.\n> +\n> +Pipeline handlers' create' Camera device instances based on the devices they detect and support on\n> +the running system.\n> +A pipeline handler manages most aspects of interacting with a camera device including:\n> +\n> +-  frame controls\n> +-  pipelines and stream configuration\n> +-  the data the camera produces, and the buffers it needs to hold the data\n> +-  granting access to camera data\n> +\n> +Pipeline handlers form part of the libcamera codebase, and developers need to implement them for\n> +complex hardware with an ISP that requires device-specific configurations.\n> +\n> +`Read the PipelineHandler API documentation for more details <http://libcamera.org/api-html/classlibcamera_1_1PipelineHandler.html>`_\n> +\n> +Image Processing Algorithms\n> +~~~~~~~~~~~~~~~~~~~~~~~~~~~\n> +\n> +An image processing algorithm (IPA) component is a private API that implements\n> +3A (Auto-Exposure, Auto-White Balance, and Auto-Focus) algorithms.\n> +\n> +Each supported camera device has its own IPA component that runs on the CPU and\n> +interacts with the kernel camera devices to control hardware image processing\n> +based on the parameters supplied by upper layers, and helps maintain state,\n> +closing the control loop of the ISP.\n> +\n> +An IPA component can be part of the libcamera code base, in which case the same\n> +license covers it, or provided externally as an open-source or closed-source component.\n> +\n> +The component is sandboxed and can only interact with libcamera through specifically\n> +marked APIs. A component has no direct access to kernel camera devices, and dmabuf\n> +instances explicitly passed to the component control its access to image data and\n> +metadata. The component should run in a process separate from the main libcamera\n> +process, and has a restricted view of the system, including no access to networking APIs\n> +and limited access to file systems.\n> +\n> +While libcamera requires sandboxing, the implementation is platform-specific, and handled by\n> +platform-specific plugins.\n> +\n> +To support this security and sandboxing model, libcamera provides an IPC mechanism\n> +for an IPA and Pipeline Handler to communicate, but developers need to create the\n> +API themselves. Platform vendors can also use any other IPC mechanism that supports\n> +passing file descriptors.\n> +\n> +3A and Image Enhancement Algorithms\n> +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n> +\n> +Camera devices should implement auto exposure, auto gain, and auto white balance,\n> +and those that include a focus lens should also implement autofocus.\n> +\n> +Device vendors implement the control methods required to control these algorithms in hardware or\n> +firmware outside of libcamera, or in an IPA component.\n> +\n> +.. TODO: Add link to guide when completed\n> +\n> +Helpers and Support Classes\n> +~~~~~~~~~~~~~~~~~~~~~~~~~~~\n> +\n> +.. TODO: Feel like this is implied in other places of the doc\n> +\n> +To help developers create device-specific pipeline handlers and image processing\n> +algorithms, libcamera provides helpers and support classes that sit on top of the\n> +Media Controller and V4L2 APIs.\n> +\n> +Glossary\n> +--------\n> +\n> +-  **ISP**: Image Signal Processor.\n> +-  **Media controller API**: `The Linux Kernel API <https://www.kernel.org/doc/html/v4.10/media/uapi/mediactl/media-controller-intro.html>`_ that handles audio and video input and output.\nSmall question: Anything specific to do with v4.10 version of the \ndocument here? Shouldn't we point to something newer / latest?\nA quick search gave me v5.6 \nhttps://www.kernel.org/doc/html/v5.6/media/uapi/mediactl/media-controller-intro.html \nbased on the release I guess?\nI don't know what to do here specifically? Maybe asking a bit around but \ngenerally something > v5.0 should be used I guess.\n> +-  **V4L2**: `Video for Linux API version 2 <https://www.linuxtv.org/downloads/v4l-dvb-apis-new/userspace-api/v4l/v4l2.html>`_. Device drivers and API for video capture on Linux.\n> +-  **UVC camera**: `USB Video Class <https://en.wikipedia.org/wiki/USB_video_device_class>`_ that describes devices capable of streaming video over the UVC protocol.\n> +-  **3A**: Common algorithms used by camera devices for auto-exposure, auto-white balance and auto-focus).\n> +-  **IPC**: `Inter-process communications based protocol <https://en.wikipedia.org/wiki/Inter-process_communication>`_.\n\n\nThanks for the work.\n\nReviewed-by: Umang Jain <email@uajain.com>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 3FD8DBD792\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  6 Jul 2020 17:55:54 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id C635D60E14;\n\tMon,  6 Jul 2020 19:55:53 +0200 (CEST)","from o1.f.az.sendgrid.net (o1.f.az.sendgrid.net [208.117.55.132])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id A6E1E603B4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  6 Jul 2020 19:55:52 +0200 (CEST)","by filterdrecv-p3iad2-5b55dcd864-blwjn with SMTP id\n\tfilterdrecv-p3iad2-5b55dcd864-blwjn-19-5F0365A6-49\n\t2020-07-06 17:55:50.93421727 +0000 UTC m=+866794.978043989","from mail.uajain.com (unknown)\n\tby ismtpd0002p1hnd1.sendgrid.net (SG) with ESMTP\n\tid HMCWWnilR9i2JMIoVbC8hg Mon, 06 Jul 2020 17:55:50.482 +0000 (UTC)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=uajain.com header.i=@uajain.com\n\theader.b=\"gM4Mc1Mh\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=uajain.com;\n\th=subject:references:from:mime-version:in-reply-to:to:content-type:\n\tcontent-transfer-encoding;\n\ts=s1; bh=TGby1MD/dZu2N8GLbc/FOMvhLs96p4W0xMqcZRO+Z1U=;\n\tb=gM4Mc1MhIhADMpMR2MuXPX2i620gUtuFp/WRWsbIvpHMAQ1yiDYPZ6Lwvbq45kG/+BgA\n\tg2V5Ht4ELC0bmLIGZJq+whoYw4i/QKSLFlQOnI40u8QZ0iEelg48SRrEPXKDbnsFJ6E1DP\n\tngXIZ89o8houLc51BDb7Tr/YKvG53jXu0=","References":"<20200702104542.19998-1-chris@gregariousmammal.com>","From":"Umang Jain <email@uajain.com>","Message-ID":"<27952cc1-c71e-cd89-0f06-570e4534efe4@uajain.com>","Date":"Mon, 06 Jul 2020 17:55:50 +0000 (UTC)","Mime-Version":"1.0","In-Reply-To":"<20200702104542.19998-1-chris@gregariousmammal.com>","X-SG-EID":"1Q40EQ7YGir8a9gjSIAdTjhngY657NMk9ckeo4dbHZDiOpywc/L3L9rFqlwE4KPcBLpXFhl3+P87RHKL8hWvbOmodE+I9SFpFX5u2bqvhdZRe/i5lHiiGTjFzZM4VaeDl17L7tm5zetQNXmCLR3x2QTgVVsLkddhHdhdgfKjOgZGDXBlUUPo/4svaBa8oBfcybm1aizyeeBx2bJklb+acJsxQnzvRTvv9Sk+6l7IOZslH+tE8uHUUsryelZIFsbjxSR/TeTY5p/qT/4DZ+/JmQ==","To":"chris@gregariousmammal.com, libcamera-devel@lists.libcamera.org","Content-Language":"en-US","Subject":"Re: [libcamera-devel] [PATCH v2] Create libcamera overview document\n\tand glossary","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>","Content-Transfer-Encoding":"7bit","Content-Type":"text/plain; charset=\"us-ascii\"; Format=\"flowed\"","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":11318,"web_url":"https://patchwork.libcamera.org/comment/11318/","msgid":"<31e7715b-99f6-42a5-8b7f-1083c81cff0e@Spark>","date":"2020-07-10T10:29:56","subject":"Re: [libcamera-devel] [PATCH v2] Create libcamera overview document\n\tand glossary","submitter":{"id":55,"url":"https://patchwork.libcamera.org/api/people/55/","name":"Chris Chinchilla","email":"chris@gregariousmammal.com"},"content":"Thanks Umang, some great small clarifications, just about to send a new patch\n\nChris\nOn 6 Jul 2020, 19:55 +0200, Umang Jain <email@uajain.com>, wrote:\n> Hi Chris,\n>\n> On 7/2/20 4:15 PM, chris@gregariousmammal.com wrote:\n> > From: Chris Chinchilla <chris@gregariousmammal.com>\n> >\n> > Creates a libcamera architecture overview guide and glossary.\n> >\n> > Signed-off-by: Chris Chinchilla <chris@gregariousmammal.com>\n> > ---\n> > Documentation/introduction.rst | 197 +++++++++++++++++++++++++++++++++\n> > 1 file changed, 197 insertions(+)\n> > create mode 100644 Documentation/introduction.rst\n> >\n> > diff --git a/Documentation/introduction.rst b/Documentation/introduction.rst\n> > new file mode 100644\n> > index 0000000..cf914c7\n> > --- /dev/null\n> > +++ b/Documentation/introduction.rst\n> > @@ -0,0 +1,197 @@\n> > +An introduction to libcamera\n> > +============================\n> > +\n> > +The Video for Linux 2 (`V4L2 <https://www.linuxtv.org/downloads/v4l-dvb-apis-new/userspace-api/v4l/v4l2.html>`_) API provides kernel drivers for devices that provide and manipulate\n> > +images and video. However, Linux was missing a convenient way for application developers to take\n> > +advantage of these kernel drivers in userspace. Vendors of devices that provide image input sources\n> > +referred to as \"image signal processors\" (ISPs) sometimes contribute open-source V4L2 drivers.\n> > +However, ISPs vary so much, and it's a hard task for developers to write portable ISP-based\n> > +applications.\n> > +\n> > +The libcamera library aims to fill this gap by providing a complete userspace camera\n> > +stack for Linux-based systems that supports a wide variety of ISPs, including systems with multiple ISPs attached.\n> > +\n> > +The library currently supports:\n> > +\n> > +- Hardware\n> > +\n> > + - Intel IPU3\n> > + - Rockchip RK3399\n> > + - RaspberryPi 3 and 4\n> > + - USB video device class (UVC) cameras\n> > + - Virtual media controller (vimc) driver\n> > +\n> > +- Software\n> > +\n> > + - ChromeOS support through an Android HAL3 adaptation layer\n> nit: `ChromeOS` alignment not in line with other points below.\n> > + - Image processing algorithms\n> > + - A V4L2 compatibility layer for existing V4L2 based applications\n> > + - A gstreamer element for gstreamer pipeline based applications.\n> > +\n> > +The library provides a public API for managing ISPs, frame capture, video streams, frame and\n> > +request metadata, events and callbacks, image processing, and more.\n> > +\n> > +Where libcamera sits in the camera stack\n> > +----------------------------------------\n> > +\n> > +The libcamera library sits in userspace, just on top of the kernel drivers that directly interact\n> > +with hardware and the V4L2 family of APIs (Media Controller, V4L2 Video Device, and V4L2 sub-device APIs).\n> > +\n> > +When using libcamera in a camera stack, it is the core component, taking control of all camera\n> > +devices, and exposing a native C++ API to upper layers of the framework. Other language bindings are in development.\n> > +\n> > +Compatibility Layers\n> > +~~~~~~~~~~~~~~~~~~~~\n> > +\n> > +In a layer above the core framework are compatibility libraries to help existing applications and their developers.\n> > +\n> > +V4L2 Compatibility Layer\n> > +^^^^^^^^^^^^^^^^^^^^^^^^\n> > +\n> > +To emulate high-level V4L2 camera devices and capture all access to camera devices, libcamera uses\n> > +a shared library. The shared library is transparent to libcamera-based applications and injected\n> > +into a process address space using dynamic linking with \"LD_PRELOAD \".\n> > +\n> > +The compatibility layer exposes camera device features on a best-effort basis and aims for the\n> > +level of features traditionally available from a UVC camera designed for video conferencing.\n> > +\n> > +Android Camera HAL\n> > +^^^^^^^^^^^^^^^^^^\n> > +\n> > +The libcamera library offers Android camera support through a generic `hardware abstraction layer (HAL) <https://source.android.com/devices/camera/camera3_requests_hal>`_ implementation.\n> > +The HAL focuses on supporting features required by Android that are missing from libcamera, such as JPEG encoding.\n> > +\n> > +The Android camera HAL implementation initially targets the \"LIMITED \"\n> > +`hardware level <https://source.android.com/devices/camera/versioning#camera_api2>`_,\n> > +with support for the \"FULL \"level then gradually implemented.\n>\n> Here I feel we should mention that ChromeOS actually uses Android HAL\n> layer for it's camera\n> to re-iterate the point above (\"ChromeOS support through an Android HAL3\n> adaptation layer\").\n>\n> This is why libcamera ventures into Android's HAL layer (for now atleast).\n> > +\n> > +gstreamer element\n> > +^^^^^^^^^^^^^^^^^\n> > +\n> > +The library provides `a gstreamer element <https://gstreamer.freedesktop.org/documentation/application-development/basics/elements.html?gi-language=c>`_ that routes libcamera data for\n> > +further processing in a gstreamer pipeline.\n> > +\n> > +libcamera Architecture\n> > +----------------------\n> > +\n> > +The libcamera library exposes one unified API, but behind that is built from\n> > +re-usable components that provide hardware specific support and configuration\n> > +with a device agnostic API.\n> > +\n> > +Camera Manager\n> > +~~~~~~~~~~~~~~\n> > +\n> > +It enumerates cameras at runtime and instantiates a `Pipeline Handler`_ to manage each Camera\n> > +device that libcamera supports. The Camera Manager supports hotplug detection\n> > +and notification events when supported by the underlying kernel devices.\n> > +\n> > +There is only ever one instance of the Camera Manager running per application. Each application's\n> > +instance of the Camera Manager ensures that only a single application can take control of a camera\n> > +device at once.\n> > +\n> > +`Read the Camera Manager API documentation for more details <http://libcamera.org/api-html/classlibcamera_1_1CameraManager.html>`_\n> > +\n> > +Camera Device\n> > +~~~~~~~~~~~~~\n> > +\n> > +The camera class represents a single item of camera hardware that is capable of producing one or more image streams, and provides the API to interact with the underlying device.\n> > +\n> > +If a system has multiple instances of the same hardware attached, each has it's own instance of the camera class.\n> > +\n> > +The API exposes full control of the device to upper layers of libcamera through the public API,\n> > +making it the highest level object libcamera exposes, and the object that all other API operations\n> > +interact with from configuration to capture.\n> > +\n> > +`Read the Camera API documentation for more details <http://libcamera.org/api-html/classlibcamera_1_1Camera.html>`_\n> > +\n> > +Frame controls\n> > +^^^^^^^^^^^^^^\n> > +\n> > +Depending on the capabilities of a camera device and the hardware it is connected\n> > +to, libcamera supports controlling capture parameters for each stream on a per-frame basis.\n> > +\n> > +These controls include auto exposure, gain, brightness, contrast, lux, white balance, color\n> > +temperature, and saturation.\n> > +\n> > +`Read the Control API documentation for more details <http://libcamera.org/api-html/classlibcamera_1_1Control.html>`_\n> > +\n> > +Pipeline Handler\n> > +~~~~~~~~~~~~~~~~\n> > +\n> > +Pipeline handlers are the abstraction layer for platform-specific hardware configuration. They\n> > +access and control hardware through the V4L2 and Media Controller kernel interfaces, and implement\n> > +an internal API to control the ISP and Capture components of a pipeline directly.\n> > +\n> > +Pipeline handlers' create' Camera device instances based on the devices they detect and support on\n> > +the running system.\n> > +A pipeline handler manages most aspects of interacting with a camera device including:\n> > +\n> > +- frame controls\n> > +- pipelines and stream configuration\n> > +- the data the camera produces, and the buffers it needs to hold the data\n> > +- granting access to camera data\n> > +\n> > +Pipeline handlers form part of the libcamera codebase, and developers need to implement them for\n> > +complex hardware with an ISP that requires device-specific configurations.\n> > +\n> > +`Read the PipelineHandler API documentation for more details <http://libcamera.org/api-html/classlibcamera_1_1PipelineHandler.html>`_\n> > +\n> > +Image Processing Algorithms\n> > +~~~~~~~~~~~~~~~~~~~~~~~~~~~\n> > +\n> > +An image processing algorithm (IPA) component is a private API that implements\n> > +3A (Auto-Exposure, Auto-White Balance, and Auto-Focus) algorithms.\n> > +\n> > +Each supported camera device has its own IPA component that runs on the CPU and\n> > +interacts with the kernel camera devices to control hardware image processing\n> > +based on the parameters supplied by upper layers, and helps maintain state,\n> > +closing the control loop of the ISP.\n> > +\n> > +An IPA component can be part of the libcamera code base, in which case the same\n> > +license covers it, or provided externally as an open-source or closed-source component.\n> > +\n> > +The component is sandboxed and can only interact with libcamera through specifically\n> > +marked APIs. A component has no direct access to kernel camera devices, and dmabuf\n> > +instances explicitly passed to the component control its access to image data and\n> > +metadata. The component should run in a process separate from the main libcamera\n> > +process, and has a restricted view of the system, including no access to networking APIs\n> > +and limited access to file systems.\n> > +\n> > +While libcamera requires sandboxing, the implementation is platform-specific, and handled by\n> > +platform-specific plugins.\n> > +\n> > +To support this security and sandboxing model, libcamera provides an IPC mechanism\n> > +for an IPA and Pipeline Handler to communicate, but developers need to create the\n> > +API themselves. Platform vendors can also use any other IPC mechanism that supports\n> > +passing file descriptors.\n> > +\n> > +3A and Image Enhancement Algorithms\n> > +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n> > +\n> > +Camera devices should implement auto exposure, auto gain, and auto white balance,\n> > +and those that include a focus lens should also implement autofocus.\n> > +\n> > +Device vendors implement the control methods required to control these algorithms in hardware or\n> > +firmware outside of libcamera, or in an IPA component.\n> > +\n> > +.. TODO: Add link to guide when completed\n> > +\n> > +Helpers and Support Classes\n> > +~~~~~~~~~~~~~~~~~~~~~~~~~~~\n> > +\n> > +.. TODO: Feel like this is implied in other places of the doc\n> > +\n> > +To help developers create device-specific pipeline handlers and image processing\n> > +algorithms, libcamera provides helpers and support classes that sit on top of the\n> > +Media Controller and V4L2 APIs.\n> > +\n> > +Glossary\n> > +--------\n> > +\n> > +- **ISP**: Image Signal Processor.\n> > +- **Media controller API**: `The Linux Kernel API <https://www.kernel.org/doc/html/v4.10/media/uapi/mediactl/media-controller-intro.html>`_ that handles audio and video input and output.\n> Small question: Anything specific to do with v4.10 version of the\n> document here? Shouldn't we point to something newer / latest?\n> A quick search gave me v5.6\n> https://www.kernel.org/doc/html/v5.6/media/uapi/mediactl/media-controller-intro.html\n> based on the release I guess?\n> I don't know what to do here specifically? Maybe asking a bit around but\n> generally something > v5.0 should be used I guess.\n> > +- **V4L2**: `Video for Linux API version 2 <https://www.linuxtv.org/downloads/v4l-dvb-apis-new/userspace-api/v4l/v4l2.html>`_. Device drivers and API for video capture on Linux.\n> > +- **UVC camera**: `USB Video Class <https://en.wikipedia.org/wiki/USB_video_device_class>`_ that describes devices capable of streaming video over the UVC protocol.\n> > +- **3A**: Common algorithms used by camera devices for auto-exposure, auto-white balance and auto-focus).\n> > +- **IPC**: `Inter-process communications based protocol <https://en.wikipedia.org/wiki/Inter-process_communication>`_.\n>\n>\n> Thanks for the work.\n>\n> Reviewed-by: Umang Jain <email@uajain.com>\n>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id EAC81BD790\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 10 Jul 2020 10:30:05 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 447C2613BE;\n\tFri, 10 Jul 2020 12:30:05 +0200 (CEST)","from mail-ed1-x543.google.com (mail-ed1-x543.google.com\n\t[IPv6:2a00:1450:4864:20::543])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 9399461186\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 10 Jul 2020 12:30:04 +0200 (CEST)","by mail-ed1-x543.google.com with SMTP id dm19so4228244edb.13\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 10 Jul 2020 03:30:04 -0700 (PDT)","from [192.168.1.25] (business-90-187-212-1.pool2.vodafone-ip.de.\n\t[90.187.212.1]) by smtp.gmail.com with ESMTPSA id\n\tn2sm3960623edq.73.2020.07.10.03.30.02\n\t(version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);\n\tFri, 10 Jul 2020 03:30:02 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gregariousmammal.com\n\theader.i=@gregariousmammal.com header.b=\"NaTpYFgB\"; \n\tdkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=gregariousmammal.com; s=google;\n\th=date:from:to:message-id:in-reply-to:references:subject:mime-version;\n\tbh=h27JF5/g2m20HmkQEmFQWO9m9uPht9QnNW78YUm9leY=;\n\tb=NaTpYFgBn1bWV/xzYoYUy0RSmE0RORHKSOutFl/k0wCRUDe+/xDB+J02C2cWaXZwy4\n\tHzhCC9nF5M7+Q49P26VXKL/oCHbTCHCGzhiZd52DUUyJyqhIoy4Hb91oLmOa8FX64tPC\n\tW9TyyNGaXP7UnysDO4XWUQQ6t0OPDoBkoBXM4Ki5JVyLkZfE2C71zrDk+V4BzOr21+oj\n\tSgkGuZiyj+FNCJDcSuc0rtKFl473WndLdVuRDN+vzpiBUXcPndCGp5tXsWdfsmMe7ETB\n\tcI10fn4W5Kt7onYFgSBK2RxxwirSTR3oaNL5Fa7S+athHtRGxHSfZDI9reNlPyxRfeKp\n\t2EXQ==","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:message-id:in-reply-to:references\n\t:subject:mime-version;\n\tbh=h27JF5/g2m20HmkQEmFQWO9m9uPht9QnNW78YUm9leY=;\n\tb=O1E1j/dd/noMbm6Ipvf3Fl9Ju/MgQ6iu+RGgJgA454mXftHuaAs0Lt2gbbZsdZGVZZ\n\tiZlgIt92GedJRHH5j8XrcEtnba9z1r94wKVYPnhH2h+zNmkV2MlKwmSOGYBk1HpWOjTb\n\tLZ4XRqn1kgAtgRFNSidJJNYLjKdnFL466boiOGJvH8XwbuMQKj8XeCnDze+Nq1hTadBV\n\t+Wv7B/iBam7WisFEv62qgfT7By/rWIJK6MpMFxUEPP2iW/EMm/dKrv46KgscQsCT/qr6\n\tIzsAzM5WM5glxpA+QPdwwTX7YbbADKbkBRsb3ISW/rDa4LxZipPQPjTiJYYHuv1+d4ez\n\te4WA==","X-Gm-Message-State":"AOAM532Lr+mn518s0eYlEjV6IL7eIbfyDE9UEMAo4fPwasXTagF2cGI1\n\tYXTGKiq2DllQpbz/0XOKq2IXnFzcvIRzAAll","X-Google-Smtp-Source":"ABdhPJwibyk6M5+T+zns85cXPNtXxyt8Wdbhzttc5fyfcaFBZsEEKs/Wc3QFn6ujMNts9geYdGtFHg==","X-Received":"by 2002:a50:9605:: with SMTP id\n\ty5mr24328972eda.388.1594377003617; \n\tFri, 10 Jul 2020 03:30:03 -0700 (PDT)","Date":"Fri, 10 Jul 2020 12:29:56 +0200","From":"Chris Chinchilla <chris@gregariousmammal.com>","To":"libcamera-devel@lists.libcamera.org, Umang Jain <email@uajain.com>","Message-ID":"<31e7715b-99f6-42a5-8b7f-1083c81cff0e@Spark>","In-Reply-To":"<27952cc1-c71e-cd89-0f06-570e4534efe4@uajain.com>","References":"<20200702104542.19998-1-chris@gregariousmammal.com>\n\t<27952cc1-c71e-cd89-0f06-570e4534efe4@uajain.com>","X-Readdle-Message-ID":"31e7715b-99f6-42a5-8b7f-1083c81cff0e@Spark","MIME-Version":"1.0","Subject":"Re: [libcamera-devel] [PATCH v2] Create libcamera overview document\n\tand glossary","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>","Content-Type":"multipart/mixed;\n\tboundary=\"===============3488510241671286689==\"","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]