Skip to content

Commit 3a80dd5

Browse files
committed
vc04_services: isp: Report input node as wanting full range RAW color space
RAW color spaces are more usually reported as having full range quantization. Tested using libcamera. Signed-off-by: David Plowman <[email protected]>
1 parent 9ce5bad commit 3a80dd5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/staging/vc04_services/bcm2835-isp/bcm2835-v4l2-isp.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1032,7 +1032,9 @@ static int bcm2835_isp_node_try_fmt(struct file *file, void *priv,
10321032
/* In all cases, we only support the defaults for these: */
10331033
f->fmt.pix.ycbcr_enc = V4L2_MAP_YCBCR_ENC_DEFAULT(f->fmt.pix.colorspace);
10341034
f->fmt.pix.xfer_func = V4L2_MAP_XFER_FUNC_DEFAULT(f->fmt.pix.colorspace);
1035-
is_rgb = f->fmt.pix.colorspace == V4L2_COLORSPACE_SRGB;
1035+
/* RAW counts as sRGB here so that we get full range. */
1036+
is_rgb = f->fmt.pix.colorspace == V4L2_COLORSPACE_SRGB ||
1037+
f->fmt.pix.colorspace == V4L2_COLORSPACE_RAW;
10361038
f->fmt.pix.quantization = V4L2_MAP_QUANTIZATION_DEFAULT(is_rgb, f->fmt.pix.colorspace,
10371039
f->fmt.pix.ycbcr_enc);
10381040

0 commit comments

Comments
 (0)