summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-09-15qcam: Add ViewFinderGL class to accelerate the format conversionShow Liu
The viewfinderGL accelerates the format conversion by using OpenGL ES shader. The minimum Qt version is bumped to v5.4, as QOpenGLWidget wasn't available before that. Signed-off-by: Show Liu <show.liu@linaro.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-09-15qcam: New viewfinder hierarchyShow Liu
Create ViewFinder base class and rename the original ViewFinder as QPainter-based ViewFinder. Signed-off-by: Show Liu <show.liu@linaro.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-09-15qcam: Add OpenGL shader code as Qt resourceShow Liu
Add OpenGL fragment and vertex shaders to convert two- and tri-planar YUV formats to RGB. This will be used to accelerate YUV image rendering. Signed-off-by: Show Liu <show.liu@linaro.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-09-14libcamera: pipeline: rkisp1: Fix line length typoNiklas Söderlund
The function declaration is unnecessarily broken on two lines as it fits on 80 characters, which makes reading the code nicer. Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2020-09-12qcam: format_converter: Support R8 GreyscaleKieran Bingham
Support Greyscale images in the format converter by expanding the R8 component to each of the output RGB components. Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
2020-09-10android: jpeg: Support an initial set of EXIF metadata tagsUmang Jain
Create a Exif object with various metadata tags set, just before the encoder starts to encode the frame. The object is passed directly as libcamera::Span<> to make sure EXIF tags can be set in a single place i.e. in CameraDevice and the encoder only has the job to write the data in the final output. Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Umang Jain <email@uajain.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-09-10android: jpeg: Add EXIF infrastructureKieran Bingham
Provide helper classes to utilise the libexif interfaces and link against libexif to support tag additions when creating JPEG images. Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Umang Jain <email@uajain.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-09-10android: camera_device: Fix value of orientation metadataUmang Jain
Android's orientation metadata cannot have identical numerical value to libcamera's rotation property. This is due to the fact that libcamera's rotation property specifies the correction angle in anticlockwise direction whereas Android's orientation metadata specifies the value in clockwise direction. Fix that by computing corresponding value for clockwise direction from libcamera's rotation property. Signed-off-by: Umang Jain <email@uajain.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-09-08android: camera_device: Fix spelling in commentJacopo Mondi
Just a small spelling fix: s/re-allcoation/reallocation Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
2020-09-07meson: Provide build configuration summaryKieran Bingham
Report the enabled pipelines when configuring the meson build hierarchy. This helps clarify what pipelines are used when building, and is useful when looking back through build-traces to see what was actually configured. This can be expanded upon to report other options, and ideally will be replaced by mesons summary() functionality when it is available. Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
2020-09-06libcamera: buffer: Fix MappedBuffer::maps_ documentationUmang Jain
Complete the brief for MappedBuffer::maps_ documentation. Fixes: b3383da79f1d ("libcamera: buffer: Create a MappedBuffer") Signed-off-by: Umang Jain <email@uajain.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-08-29libcamera: media_object: Make MediaLink::setEnabled() account for existing flagsDan Scally
The MediaDevice::setupLink() function fails (ioctl returns EINVAL) when it passes only the MEDIA_LNK_FL_ENABLE flag to a link that is already flagged with MEDIA_LNK_FL_ENABLE and MEDIA_LNK_FL_IMMUTABLE. Contrast to media-ctl's equivalent media_setup_link() which ORs the new flags with the existing values. Fix this by preserving all flags but MEDIA_LNK_FL_ENABLED in MediaLink::setEnabled(). Signed-off-by: Dan Scally <djrscally@gmail.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-08-28libcamera: raspberrypi: Check dma heap allocatorJacopo Mondi
Check if the dmaHeap_ allocator is valid at match() time to fail earlier if its construction failed. Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
2020-08-28libcamera: raspberrypi: dmaheaps: Add isValid()Jacopo Mondi
Add isValid() method to verify the allocator device has been open correctly. Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
2020-08-28libcamera: raspberrypi: dmaheaps: Improve device openJacopo Mondi
Improve the device opening at class construction time by testing all the available device paths and printout the appropriate error message. While at it, initialize dmaHeapHandle_ to -1 and check for its value at destruction time. Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
2020-08-27pipeline: raspberrypi: Set sensor default orientation before configure()Naushir Patuck
The default sensor orientation must be set early on in match() to ensure generateConfiguration() and configure() return out the correct Bayer ordering to the application. This is particularly important for RAW capture streams. Signed-off-by: Naushir Patuck <naush@raspberrypi.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2020-08-26libcamera: pipeline: vimc: Fix configuration validationLaurent Pinchart
The sensor aligns the width and height to multiples of two pixels, and the scaler has a x3 hardcoded factor. The output size must thus be aligned to 6 pixels, not 3. Fix it. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2020-08-25cam: Limit file write to payload sizeLaurent Pinchart
The payload size in a captured framebuffer is usually equal to the buffer size. However, for compressed formats, the payload may be smaller Only write the payload when capturing to a file. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2020-08-25v4l2: camera: Merge getStreamConfig() with open()Laurent Pinchart
The V4L2CameraProxy always calls V4L2Camera::getStreamConfig() right after V4L2Camera::open(), and never afterwards. Simplify the code by returning the initial configuration from V4L2Camera::open() and removing V4L2Camera::getStreamConfig(). Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
2020-08-25v4l2: camera_proxy: Store v4l2_pix_format instead of v4l2_formatLaurent Pinchart
The V4L2 compatibility layer only uses the fmt.pix field of curV4L2Format_. There's no need to cache the full v4l2_format, store v4l2_pix_format only and rename the member variable from curV4L2Format_ to v4l2PixFormat_. While at it, group the V4L2-related member variables together in the V4L2CameraProxy class. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
2020-08-25v4l2: camera_proxy: Pass const reference to setFmtFromConfig()Laurent Pinchart
The setFmtFromConfig() method doesn't modify its parameter, make it const. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
2020-08-25cam: Print timestamp of captured buffersLaurent Pinchart
Print the timestamp of the captured buffer in addition to the frame rate, as this is more precise information that can help debugging issue. The log changes from Using camera \_SB_.PCI0.XHC_.RHUB.HS05-5:1.0-0bda:58f4 Capture until user interrupts by SIGINT fps: 0.00 stream0 seq: 000000 bytesused: 169968 fps: 28.57 stream0 seq: 000002 bytesused: 170352 fps: 31.25 stream0 seq: 000003 bytesused: 170428 fps: 32.26 stream0 seq: 000004 bytesused: 170672 fps: 27.78 stream0 seq: 000005 bytesused: 170568 to Using camera \_SB_.PCI0.XHC_.RHUB.HS05-5:1.0-0bda:58f4 Capture until user interrupts by SIGINT 93473.942525 (0.00 fps) stream0 seq: 000000 bytesused: 183940 93474.006528 (15.62 fps) stream0 seq: 000002 bytesused: 183512 93474.038525 (31.25 fps) stream0 seq: 000003 bytesused: 183760 93474.074530 (27.77 fps) stream0 seq: 000004 bytesused: 182704 93474.106581 (31.20 fps) stream0 seq: 000005 bytesused: 182768 While at it, compute the frame rate on the buffer timestamps instead of sampling the clock in the request completion handler. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
2020-08-25ipa: raspberrypi: Replace void cast with [[maybe_unused]]Laurent Pinchart
The standard way in C++17 to specify that a function or function argument may be unused it to specify the [[maybe_unused]] attribute. Replace manual void casts to silence compiler warnings. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
2020-08-25meson: Remove -Wno-unused-parameterLaurent Pinchart
We build libcamera with -Wno-unused-parameter and this doesn't cause much issue internally. However, it prevents catching unused parameters in inline functions defined in public headers. This can lead to compilation warnings for applications compiled without -Wno-unused-parameter. To catch those issues, remove -Wno-unused-parameter and fix all the related warnings with [[maybe_unused]]. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
2020-08-25libcamera: Drop explicit construction of std::queueLaurent Pinchart
Now that libcamera is using C++17 and requires gcc 7 or newer, we can use the implicit std::queue constructor. Simplify the code accordingly. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
2020-08-25libcamera: Replace utils::clamp() with std::clamp()Laurent Pinchart
Now that libcamera uses C++17, the C++ standard library provides std::clamp(). Drop our custom utils::clamp() function. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
2020-08-25meson: Switch to C++17Laurent Pinchart
Due to popular request, move from C++14 to C++17. This will allow dropping some custom constructs (such as a custom utils::clamp), benefiting from new language features, and dropping gcc 5 and 6 from the compilation tests. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
2020-08-25libcamera: Remove void specifier for functions that take no argumentsLaurent Pinchart
In C++, unlike in C, a function that takes no argument doesn't need to specify void in the arguments list. Drop the unnecessary specifiers. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
2020-08-25libcamera: pipeline: ipu3: Remove stray "imgu." fileLaurent Pinchart
Commit 15df621fb9a7 ("libcamera: ipu3: Configure ImgU with the computed parameters") added an empty "imgu." file by mistake. Remove it. Fixes: 15df621fb9a7 ("libcamera: ipu3: Configure ImgU with the computed parameters") Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
2020-08-24libcamera: object: Fix deleteLater() sample codeUmang Jain
Instead of using "delete obj" in the custom deleter of the shared object, we should have been using the "obj->deleteLater()" to explain how the deleteLater() API should be used in practice. Fixes: 9558886f7a85 ("libcamera: object: Add deleteLater() support) Signed-off-by: Umang Jain <email@uajain.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-08-23android: camera_hal_manager: Support camera hotplugUmang Jain
Extend the support for camera hotplug from libcamera's CameraManager to CameraHalManager. Use camera module callbacks to let the framework know about the hotplug events and change the status of cameras being hotplugged or unplugged via camera_device_status_change(). Introduce a map cameraIdsMap_ which book-keeps all cameras seen in the past by the CameraHalManager. If the camera is seen for the first time, a new id is assigned to it. If the camera has been seen before by the manager, its old id is reused. IDs for internal cameras start with '0' and for external cameras, they start with '1000'. Accesses to cameraIdsMap_ and cameras_ are protected by a mutex. Signed-off-by: Umang Jain <email@uajain.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-08-23android: camera_device: Add a getter to get libcamera::Camera pointerUmang Jain
Add a public member function to get the libcamera::Camera pointer associated with the CameraDevice. This will help to find the CameraDevice object in CameraHalManager when the hotplug support is extended in the Android layer. Signed-off-by: Umang Jain <email@uajain.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-08-23android: camera_device: Make CameraDevice a shared objectUmang Jain
CameraDevice needs to be wrapper into the std::shared_ptr instead of std::unique_ptr to enable refcounting. The refcounting will help us to support hotplug and hot-unplug CameraHalManager operations in the subsequent commit. Signed-off-by: Umang Jain <email@uajain.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-08-23android: camera_hal_manager: Set camera module callbacksUmang Jain
camera_module_callbacks are invoked to inform the framework about the events occurring module-wide. Allow to set these callbacks in camera_hal_manager as this will be used to integration camera hotplug support via camera_module_callbacks::camera_device_status_change in subsequent commit. Signed-off-by: Umang Jain <email@uajain.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-08-23libcamera: pipeline: uvcvideo: Treat all UVC cameras as externalUmang Jain
We currently have no way to identify if the UVC device is external or internal(i.e. non-removable) to the system to set this property. Until we have a starting point to resolve this, treat all UVC cameras. Add a \todo explaining the situation for the same. Signed-off-by: Umang Jain <email@uajain.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-08-20Documentation: Guides: Pipeline Handler Writer's GuideChris Chinchilla
Introduce a pipeline-handler writers guide to provide a walk through of the steps and concepts required to implement a new Pipeline Handler. Signed-off-by: Chris Chinchilla <chris@gregariousmammal.com> [Reflow/Rework, update to mainline API] Signed-off-by: Jacopo Mondi <jacopo@jmondi.org> [Further reworks and review] Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-08-20Documentation: Guides: Application Writer's GuideChris Chinchilla
Provide a tutorial and walk through guide for writing an applications with libcamera. Signed-off-by: Chris Chinchilla <chris@gregariousmammal.com> [Reflow/Rework, update to mainline API] Signed-off-by: Jacopo Mondi <jacopo@jmondi.org> [Further reworks and review] Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-08-20Documentation: Guides: Developer's Guide to libcameraChris Chinchilla
Create an introduction and overview for new developers to libcamera. Provide an overview of the Camera Stack, and Architecture of libcamera and introduce the main concepts of libcamera. Signed-off-by: Chris Chinchilla <chris@gregariousmammal.com> [Kieran: Rework/Reflow, add diagrams, licensing] Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-08-16libcamera: camera: Mark controls() and properties() as const operationsNiklas Söderlund
Reading the controls and properties does not modify the camera's state and can be marked as const operations. Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2020-08-16libcamera: pipeline_handler: Mark controls() and properties() as const ↵Niklas Söderlund
operations Reading the controls and properties does not modify the pipeline's state and can be marked as const operations. Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2020-08-16libcamera: pipeline_handler: Add const version of cameraData()Niklas Söderlund
Add a version of cameraData() that returns a const pointer and mark it as a const operation. The assert in the non-const version of the function already enforces that a std::map::at() operation would always succeed so there is no change in operation from the non-const version. Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2020-08-14libcamera: request: Make Stream pointer constNiklas Söderlund
The Stream pointer just acts as a key in the Request object. There is no good use-case to modify a stream from a pointer retrieved from the Request, make it const. This allows pipeline handlers to better express that the Stream pointer is retrieved in a Request should just be treated as a key. Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2020-08-14libcamera: request: Declare a using directive for map of buffersNiklas Söderlund
Declare a using directive for the map of Stream to FrameBuffer. Update all users of Request::buffers() to use the new usage directive. Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2020-08-13test: ipc: unixsocket: Close open fds on error pathsUmang Jain
Reported-by: Coverity CID=279099 Signed-off-by: Umang Jain <email@uajain.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2020-08-10cam: Rename cameraName variableNiklas Söderlund
When converting Camera::name() to Camera::id() one variable in cam was left unnoticed, rename it to cameraId. Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-08-10libcamera: pipeline: rkisp1: Fix array size of formatsNiklas Söderlund
When switching from V4L2 to DRM pixel formats V4L2_PIX_FMT_GREY was dropped form the list of supported formats but the arrays size was never decreased, fix this. Fixes: 448716d8f7518579 ("libcamera: Switch PixelFormat to DRM FourCC values") Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Acked-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2020-08-06android: camera_device: Support MJPEG stream constructionKieran Bingham
MJPEG streams must be created referencing a libcamera stream. This stream may already be provided by the request configuration, in which case the existing stream is utilised. If no compatible stream is available to encode, a new stream is requested from the libcamera configuration. Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2020-08-06android: Introduce JPEG encodingKieran Bingham
Provide an encoder interface and implement a JPEG encoder using libjpeg. Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2020-08-06android: camera_device: Generate ResultMetadata earlierKieran Bingham
Generate the ResultMetadata before performing JPEG compression so that JPEG specific metadata can be added to the metadata when it has been processed. Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2020-08-06android: camera_device: Report configuration changes from validate()Kieran Bingham
When we call validate on a configuration, if there are any adjustments on the configuration, we fail without showing why. Display the stream configuration after the validate stage to aid debugging stream startup failures. Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>