mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-13 15:29:45 +03:00
libcamera: rpi: Change default stream formats
Switch to XRGB8888 as a default Viewfinder role output format, this is a more correct description of the ISP hardware output, and what is accepted by the Raspberry Pi hardware. Switch to YUV420 as a default output format for everything else, as this format is best supported by encoding (e.g. H.264, JPEG) sinks on the Raspberry Pi platform. Signed-off-by: Naushir Patuck <naush@raspberrypi.com> Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
parent
723c0abb40
commit
b60a5c34fb
1 changed files with 3 additions and 3 deletions
|
@ -268,7 +268,7 @@ CameraConfiguration::Status RPiCameraConfiguration::validate()
|
||||||
|
|
||||||
if (fmts.find(out.dev->toV4L2PixelFormat(cfgPixFmt)) == fmts.end()) {
|
if (fmts.find(out.dev->toV4L2PixelFormat(cfgPixFmt)) == fmts.end()) {
|
||||||
/* If we cannot find a native format, use a default one. */
|
/* If we cannot find a native format, use a default one. */
|
||||||
cfgPixFmt = formats::NV12;
|
cfgPixFmt = formats::YUV420;
|
||||||
status = Adjusted;
|
status = Adjusted;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -431,7 +431,7 @@ PipelineHandlerBase::generateConfiguration(Camera *camera, Span<const StreamRole
|
||||||
|
|
||||||
case StreamRole::StillCapture:
|
case StreamRole::StillCapture:
|
||||||
fmts = data->ispFormats();
|
fmts = data->ispFormats();
|
||||||
pixelFormat = formats::NV12;
|
pixelFormat = formats::YUV420;
|
||||||
/*
|
/*
|
||||||
* Still image codecs usually expect the sYCC color space.
|
* Still image codecs usually expect the sYCC color space.
|
||||||
* Even RGB codecs will be fine as the RGB we get with the
|
* Even RGB codecs will be fine as the RGB we get with the
|
||||||
|
@ -465,7 +465,7 @@ PipelineHandlerBase::generateConfiguration(Camera *camera, Span<const StreamRole
|
||||||
|
|
||||||
case StreamRole::Viewfinder:
|
case StreamRole::Viewfinder:
|
||||||
fmts = data->ispFormats();
|
fmts = data->ispFormats();
|
||||||
pixelFormat = formats::ARGB8888;
|
pixelFormat = formats::XRGB8888;
|
||||||
colorSpace = ColorSpace::Sycc;
|
colorSpace = ColorSpace::Sycc;
|
||||||
size = { 800, 600 };
|
size = { 800, 600 };
|
||||||
bufferCount = 4;
|
bufferCount = 4;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue