staging: vc04_services: ISP: Add a more complex ISP processing component

Driver for the BCM2835 ISP hardware block.  This driver uses the MMAL
component to program the ISP hardware through the VC firmware.

The ISP component can produce two video stream outputs, and Bayer
image statistics. This can't be encompassed in a simple V4L2
M2M device, so create a new device that registers 4 video nodes.

This patch squashes all the development patches from the earlier
rpi-5.4.y branch into one

Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
This commit is contained in:
Naushir Patuck
2020-04-23 10:17:37 +01:00
committed by Dom Cobley
parent 590a7cab7b
commit 1a91d8ecda
10 changed files with 2305 additions and 1 deletions

View File

@@ -4114,6 +4114,15 @@ S: Maintained
F: drivers/media/platform/bcm2835/ F: drivers/media/platform/bcm2835/
F: Documentation/devicetree/bindings/media/brcm,bcm2835-unicam.yaml F: Documentation/devicetree/bindings/media/brcm,bcm2835-unicam.yaml
BROADCOM BCM2835 ISP DRIVER
M: Raspberry Pi Kernel Maintenance <kernel-list@raspberrypi.com>
L: linux-media@vger.kernel.org
S: Maintained
F: Documentation/media/uapi/v4l/pixfmt-meta-bcm2835-isp-stats.rst
F: Documentation/media/v4l-drivers/bcm2835-isp.rst
F: drivers/staging/vc04_services/bcm2835-isp
F: include/uapi/linux/bcm2835-isp.h
BROADCOM BCM47XX MIPS ARCHITECTURE BROADCOM BCM47XX MIPS ARCHITECTURE
M: Hauke Mehrtens <hauke@hauke-m.de> M: Hauke Mehrtens <hauke@hauke-m.de>
M: Rafał Miłecki <zajec5@gmail.com> M: Rafał Miłecki <zajec5@gmail.com>

View File

@@ -46,6 +46,7 @@ source "drivers/staging/vc04_services/bcm2835-camera/Kconfig"
source "drivers/staging/vc04_services/vc-sm-cma/Kconfig" source "drivers/staging/vc04_services/vc-sm-cma/Kconfig"
source "drivers/staging/vc04_services/bcm2835-codec/Kconfig" source "drivers/staging/vc04_services/bcm2835-codec/Kconfig"
source "drivers/staging/vc04_services/bcm2835-isp/Kconfig"
source "drivers/staging/vc04_services/vchiq-mmal/Kconfig" source "drivers/staging/vc04_services/vchiq-mmal/Kconfig"

View File

@@ -16,6 +16,7 @@ obj-$(CONFIG_VIDEO_BCM2835) += bcm2835-camera/
obj-$(CONFIG_BCM2835_VCHIQ_MMAL) += vchiq-mmal/ obj-$(CONFIG_BCM2835_VCHIQ_MMAL) += vchiq-mmal/
obj-$(CONFIG_BCM_VC_SM_CMA) += vc-sm-cma/ obj-$(CONFIG_BCM_VC_SM_CMA) += vc-sm-cma/
obj-$(CONFIG_VIDEO_CODEC_BCM2835) += bcm2835-codec/ obj-$(CONFIG_VIDEO_CODEC_BCM2835) += bcm2835-codec/
obj-$(CONFIG_VIDEO_ISP_BCM2835) += bcm2835-isp/
ccflags-y += -I $(srctree)/$(src)/include ccflags-y += -I $(srctree)/$(src)/include

View File

@@ -0,0 +1,14 @@
config VIDEO_ISP_BCM2835
tristate "BCM2835 ISP support"
depends on MEDIA_SUPPORT
depends on VIDEO_DEV && (ARCH_BCM2835 || COMPILE_TEST)
depends on MEDIA_CONTROLLER
select BCM2835_VCHIQ_MMAL
select VIDEOBUF2_DMA_CONTIG
help
This is the V4L2 driver for the Broadcom BCM2835 ISP hardware.
This operates over the VCHIQ interface to a service running on
VideoCore.
To compile this driver as a module, choose M here: the module
will be called bcm2835-isp.

View File

@@ -0,0 +1,8 @@
# SPDX-License-Identifier: GPL-2.0
bcm2835-isp-objs := bcm2835-v4l2-isp.o
obj-$(CONFIG_VIDEO_ISP_BCM2835) += bcm2835-isp.o
ccflags-y += \
-I$(srctree)/drivers/staging/vc04_services \
-D__VCCOREVER__=0x04000000

View File

@@ -0,0 +1,67 @@
/* SPDX-License-Identifier: GPL-2.0 */
/*
* Broadcom BCM2835 ISP driver
*
* Copyright © 2019-2020 Raspberry Pi (Trading) Ltd.
*
* Author: Naushir Patuck (naush@raspberrypi.com)
*
*/
#ifndef BCM2835_ISP_CTRLS
#define BCM2835_ISP_CTRLS
#include <linux/bcm2835-isp.h>
struct bcm2835_isp_custom_ctrl {
const char *name;
u32 id;
u32 size;
u32 flags;
};
static const struct bcm2835_isp_custom_ctrl custom_ctrls[] = {
{
.name = "Colour Correction Matrix",
.id = V4L2_CID_USER_BCM2835_ISP_CC_MATRIX,
.size = sizeof(struct bcm2835_isp_custom_ccm),
.flags = 0
}, {
.name = "Lens Shading",
.id = V4L2_CID_USER_BCM2835_ISP_LENS_SHADING,
.size = sizeof(struct bcm2835_isp_lens_shading),
.flags = V4L2_CTRL_FLAG_EXECUTE_ON_WRITE
}, {
.name = "Black Level",
.id = V4L2_CID_USER_BCM2835_ISP_BLACK_LEVEL,
.size = sizeof(struct bcm2835_isp_black_level),
.flags = 0
}, {
.name = "Green Equalisation",
.id = V4L2_CID_USER_BCM2835_ISP_GEQ,
.size = sizeof(struct bcm2835_isp_geq),
.flags = 0
}, {
.name = "Gamma",
.id = V4L2_CID_USER_BCM2835_ISP_GAMMA,
.size = sizeof(struct bcm2835_isp_gamma),
.flags = 0
}, {
.name = "Sharpen",
.id = V4L2_CID_USER_BCM2835_ISP_SHARPEN,
.size = sizeof(struct bcm2835_isp_sharpen),
.flags = 0
}, {
.name = "Denoise",
.id = V4L2_CID_USER_BCM2835_ISP_DENOISE,
.size = sizeof(struct bcm2835_isp_denoise),
.flags = 0
}, {
.name = "Defective Pixel Correction",
.id = V4L2_CID_USER_BCM2835_ISP_DPC,
.size = sizeof(struct bcm2835_isp_dpc),
.flags = 0
}
};
#endif

View File

@@ -0,0 +1,353 @@
/* SPDX-License-Identifier: GPL-2.0 */
/*
* Broadcom BCM2835 ISP driver
*
* Copyright © 2019-2020 Raspberry Pi (Trading) Ltd.
*
* Author: Naushir Patuck (naush@raspberrypi.com)
*
*/
#ifndef BCM2835_ISP_FMTS
#define BCM2835_ISP_FMTS
#include <linux/videodev2.h>
#include "vchiq-mmal/mmal-encodings.h"
struct bcm2835_isp_fmt {
u32 fourcc;
int depth;
int bytesperline_align;
u32 mmal_fmt;
int size_multiplier_x2;
enum v4l2_colorspace colorspace;
unsigned int step_size;
};
static const struct bcm2835_isp_fmt supported_formats[] = {
{
/* YUV formats */
.fourcc = V4L2_PIX_FMT_YUV420,
.depth = 8,
.bytesperline_align = 32,
.mmal_fmt = MMAL_ENCODING_I420,
.size_multiplier_x2 = 3,
.colorspace = V4L2_COLORSPACE_SMPTE170M,
.step_size = 2,
}, {
.fourcc = V4L2_PIX_FMT_YVU420,
.depth = 8,
.bytesperline_align = 32,
.mmal_fmt = MMAL_ENCODING_YV12,
.size_multiplier_x2 = 3,
.colorspace = V4L2_COLORSPACE_SMPTE170M,
.step_size = 2,
}, {
.fourcc = V4L2_PIX_FMT_NV12,
.depth = 8,
.bytesperline_align = 32,
.mmal_fmt = MMAL_ENCODING_NV12,
.size_multiplier_x2 = 3,
.colorspace = V4L2_COLORSPACE_SMPTE170M,
.step_size = 2,
}, {
.fourcc = V4L2_PIX_FMT_NV21,
.depth = 8,
.bytesperline_align = 32,
.mmal_fmt = MMAL_ENCODING_NV21,
.size_multiplier_x2 = 3,
.colorspace = V4L2_COLORSPACE_SMPTE170M,
.step_size = 2,
}, {
.fourcc = V4L2_PIX_FMT_YUYV,
.depth = 16,
.bytesperline_align = 64,
.mmal_fmt = MMAL_ENCODING_YUYV,
.size_multiplier_x2 = 2,
.colorspace = V4L2_COLORSPACE_SMPTE170M,
.step_size = 2,
}, {
.fourcc = V4L2_PIX_FMT_UYVY,
.depth = 16,
.bytesperline_align = 64,
.mmal_fmt = MMAL_ENCODING_UYVY,
.size_multiplier_x2 = 2,
.colorspace = V4L2_COLORSPACE_SMPTE170M,
.step_size = 2,
}, {
.fourcc = V4L2_PIX_FMT_YVYU,
.depth = 16,
.bytesperline_align = 64,
.mmal_fmt = MMAL_ENCODING_YVYU,
.size_multiplier_x2 = 2,
.colorspace = V4L2_COLORSPACE_SMPTE170M,
.step_size = 2,
}, {
.fourcc = V4L2_PIX_FMT_VYUY,
.depth = 16,
.bytesperline_align = 64,
.mmal_fmt = MMAL_ENCODING_VYUY,
.size_multiplier_x2 = 2,
.colorspace = V4L2_COLORSPACE_SMPTE170M,
.step_size = 2,
}, {
/* RGB formats */
.fourcc = V4L2_PIX_FMT_RGB24,
.depth = 24,
.bytesperline_align = 32,
.mmal_fmt = MMAL_ENCODING_RGB24,
.size_multiplier_x2 = 2,
.colorspace = V4L2_COLORSPACE_SRGB,
.step_size = 1,
}, {
.fourcc = V4L2_PIX_FMT_RGB565,
.depth = 16,
.bytesperline_align = 32,
.mmal_fmt = MMAL_ENCODING_RGB16,
.size_multiplier_x2 = 2,
.colorspace = V4L2_COLORSPACE_SRGB,
.step_size = 1,
}, {
.fourcc = V4L2_PIX_FMT_BGR24,
.depth = 24,
.bytesperline_align = 32,
.mmal_fmt = MMAL_ENCODING_BGR24,
.size_multiplier_x2 = 2,
.colorspace = V4L2_COLORSPACE_SRGB,
.step_size = 1,
}, {
.fourcc = V4L2_PIX_FMT_XBGR32,
.depth = 32,
.bytesperline_align = 64,
.mmal_fmt = MMAL_ENCODING_BGRA,
.size_multiplier_x2 = 2,
.colorspace = V4L2_COLORSPACE_SRGB,
.step_size = 1,
}, {
.fourcc = V4L2_PIX_FMT_RGBX32,
.depth = 32,
.bytesperline_align = 64,
.mmal_fmt = MMAL_ENCODING_RGBA,
.size_multiplier_x2 = 2,
.colorspace = V4L2_COLORSPACE_SRGB,
.step_size = 1,
}, {
/* Bayer formats */
/* 8 bit */
.fourcc = V4L2_PIX_FMT_SRGGB8,
.depth = 8,
.bytesperline_align = 32,
.mmal_fmt = MMAL_ENCODING_BAYER_SRGGB8,
.size_multiplier_x2 = 2,
.colorspace = V4L2_COLORSPACE_RAW,
.step_size = 2,
}, {
.fourcc = V4L2_PIX_FMT_SBGGR8,
.depth = 8,
.bytesperline_align = 32,
.mmal_fmt = MMAL_ENCODING_BAYER_SBGGR8,
.size_multiplier_x2 = 2,
.colorspace = V4L2_COLORSPACE_RAW,
.step_size = 2,
}, {
.fourcc = V4L2_PIX_FMT_SGRBG8,
.depth = 8,
.bytesperline_align = 32,
.mmal_fmt = MMAL_ENCODING_BAYER_SGRBG8,
.size_multiplier_x2 = 2,
.colorspace = V4L2_COLORSPACE_RAW,
.step_size = 2,
}, {
.fourcc = V4L2_PIX_FMT_SGBRG8,
.depth = 8,
.bytesperline_align = 32,
.mmal_fmt = MMAL_ENCODING_BAYER_SGBRG8,
.size_multiplier_x2 = 2,
.colorspace = V4L2_COLORSPACE_RAW,
.step_size = 2,
}, {
/* 10 bit */
.fourcc = V4L2_PIX_FMT_SRGGB10P,
.depth = 10,
.bytesperline_align = 32,
.mmal_fmt = MMAL_ENCODING_BAYER_SRGGB10P,
.size_multiplier_x2 = 2,
.colorspace = V4L2_COLORSPACE_RAW,
.step_size = 2,
}, {
.fourcc = V4L2_PIX_FMT_SBGGR10P,
.depth = 10,
.bytesperline_align = 32,
.mmal_fmt = MMAL_ENCODING_BAYER_SBGGR10P,
.size_multiplier_x2 = 2,
.colorspace = V4L2_COLORSPACE_RAW,
.step_size = 2,
}, {
.fourcc = V4L2_PIX_FMT_SGRBG10P,
.depth = 10,
.bytesperline_align = 32,
.mmal_fmt = MMAL_ENCODING_BAYER_SGRBG10P,
.size_multiplier_x2 = 2,
.colorspace = V4L2_COLORSPACE_RAW,
.step_size = 2,
}, {
.fourcc = V4L2_PIX_FMT_SGBRG10P,
.depth = 10,
.bytesperline_align = 32,
.mmal_fmt = MMAL_ENCODING_BAYER_SGBRG10P,
.size_multiplier_x2 = 2,
.colorspace = V4L2_COLORSPACE_RAW,
.step_size = 2,
}, {
/* 12 bit */
.fourcc = V4L2_PIX_FMT_SRGGB12P,
.depth = 12,
.bytesperline_align = 32,
.mmal_fmt = MMAL_ENCODING_BAYER_SRGGB12P,
.size_multiplier_x2 = 2,
.colorspace = V4L2_COLORSPACE_RAW,
.step_size = 2,
}, {
.fourcc = V4L2_PIX_FMT_SBGGR12P,
.depth = 12,
.bytesperline_align = 32,
.mmal_fmt = MMAL_ENCODING_BAYER_SBGGR12P,
.size_multiplier_x2 = 2,
.colorspace = V4L2_COLORSPACE_RAW,
.step_size = 2,
}, {
.fourcc = V4L2_PIX_FMT_SGRBG12P,
.depth = 12,
.bytesperline_align = 32,
.mmal_fmt = MMAL_ENCODING_BAYER_SGRBG12P,
.size_multiplier_x2 = 2,
.colorspace = V4L2_COLORSPACE_RAW,
.step_size = 2,
}, {
.fourcc = V4L2_PIX_FMT_SGBRG12P,
.depth = 12,
.bytesperline_align = 32,
.mmal_fmt = MMAL_ENCODING_BAYER_SGBRG12P,
.size_multiplier_x2 = 2,
.colorspace = V4L2_COLORSPACE_RAW,
.step_size = 2,
}, {
/* 14 bit */
.fourcc = V4L2_PIX_FMT_SRGGB14P,
.depth = 14,
.bytesperline_align = 32,
.mmal_fmt = MMAL_ENCODING_BAYER_SRGGB14P,
.size_multiplier_x2 = 2,
.colorspace = V4L2_COLORSPACE_RAW,
.step_size = 2,
}, {
.fourcc = V4L2_PIX_FMT_SBGGR14P,
.depth = 14,
.bytesperline_align = 32,
.mmal_fmt = MMAL_ENCODING_BAYER_SBGGR14P,
.size_multiplier_x2 = 2,
.colorspace = V4L2_COLORSPACE_RAW,
.step_size = 2,
}, {
.fourcc = V4L2_PIX_FMT_SGRBG14P,
.depth = 14,
.bytesperline_align = 32,
.mmal_fmt = MMAL_ENCODING_BAYER_SGRBG14P,
.size_multiplier_x2 = 2,
.colorspace = V4L2_COLORSPACE_RAW,
.step_size = 2,
}, {
.fourcc = V4L2_PIX_FMT_SGBRG14P,
.depth = 14,
.bytesperline_align = 32,
.mmal_fmt = MMAL_ENCODING_BAYER_SGBRG14P,
.size_multiplier_x2 = 2,
.colorspace = V4L2_COLORSPACE_RAW,
.step_size = 2,
}, {
/* 16 bit */
.fourcc = V4L2_PIX_FMT_SRGGB16,
.depth = 16,
.bytesperline_align = 32,
.mmal_fmt = MMAL_ENCODING_BAYER_SRGGB16,
.size_multiplier_x2 = 2,
.colorspace = V4L2_COLORSPACE_RAW,
.step_size = 2,
}, {
.fourcc = V4L2_PIX_FMT_SBGGR16,
.depth = 16,
.bytesperline_align = 32,
.mmal_fmt = MMAL_ENCODING_BAYER_SBGGR16,
.size_multiplier_x2 = 2,
.colorspace = V4L2_COLORSPACE_RAW,
.step_size = 2,
}, {
.fourcc = V4L2_PIX_FMT_SGRBG16,
.depth = 16,
.bytesperline_align = 32,
.mmal_fmt = MMAL_ENCODING_BAYER_SGRBG16,
.size_multiplier_x2 = 2,
.colorspace = V4L2_COLORSPACE_RAW,
.step_size = 2,
}, {
.fourcc = V4L2_PIX_FMT_SGBRG16,
.depth = 16,
.bytesperline_align = 32,
.mmal_fmt = MMAL_ENCODING_BAYER_SGBRG16,
.size_multiplier_x2 = 2,
.colorspace = V4L2_COLORSPACE_RAW,
.step_size = 2,
}, {
/* Monochrome MIPI formats */
/* 8 bit */
.fourcc = V4L2_PIX_FMT_GREY,
.depth = 8,
.bytesperline_align = 32,
.mmal_fmt = MMAL_ENCODING_GREY,
.size_multiplier_x2 = 2,
.colorspace = V4L2_COLORSPACE_RAW,
.step_size = 2,
}, {
/* 10 bit */
.fourcc = V4L2_PIX_FMT_Y10P,
.depth = 10,
.bytesperline_align = 32,
.mmal_fmt = MMAL_ENCODING_Y10P,
.size_multiplier_x2 = 2,
.colorspace = V4L2_COLORSPACE_RAW,
.step_size = 2,
}, {
/* 12 bit */
.fourcc = V4L2_PIX_FMT_Y12P,
.depth = 12,
.bytesperline_align = 32,
.mmal_fmt = MMAL_ENCODING_Y12P,
.size_multiplier_x2 = 2,
.colorspace = V4L2_COLORSPACE_RAW,
.step_size = 2,
}, {
/* 14 bit */
.fourcc = V4L2_PIX_FMT_Y14P,
.depth = 14,
.bytesperline_align = 32,
.mmal_fmt = MMAL_ENCODING_Y14P,
.size_multiplier_x2 = 2,
.colorspace = V4L2_COLORSPACE_RAW,
.step_size = 2,
}, {
/* 16 bit */
.fourcc = V4L2_PIX_FMT_Y16,
.depth = 16,
.bytesperline_align = 32,
.mmal_fmt = MMAL_ENCODING_Y16,
.size_multiplier_x2 = 2,
.colorspace = V4L2_COLORSPACE_RAW,
.step_size = 2,
}, {
.fourcc = V4L2_META_FMT_BCM2835_ISP_STATS,
.mmal_fmt = MMAL_ENCODING_BRCM_STATS,
/* The rest are not valid fields for stats. */
}
};
#endif

File diff suppressed because it is too large Load Diff

View File

@@ -113,6 +113,10 @@
*/ */
#define MMAL_ENCODING_EGL_IMAGE MMAL_FOURCC('E', 'G', 'L', 'I') #define MMAL_ENCODING_EGL_IMAGE MMAL_FOURCC('E', 'G', 'L', 'I')
/** ISP image statistics format
*/
#define MMAL_ENCODING_BRCM_STATS MMAL_FOURCC('S', 'T', 'A', 'T')
/* }@ */ /* }@ */
/** \name Pre-defined audio encodings */ /** \name Pre-defined audio encodings */

View File

@@ -223,6 +223,62 @@ enum mmal_parameter_camera_type {
MMAL_PARAMETER_SHUTTER_SPEED, MMAL_PARAMETER_SHUTTER_SPEED,
/**< Takes a @ref MMAL_PARAMETER_AWB_GAINS_T */ /**< Takes a @ref MMAL_PARAMETER_AWB_GAINS_T */
MMAL_PARAMETER_CUSTOM_AWB_GAINS, MMAL_PARAMETER_CUSTOM_AWB_GAINS,
/**< Takes a @ref MMAL_PARAMETER_CAMERA_SETTINGS_T */
MMAL_PARAMETER_CAMERA_SETTINGS,
/**< Takes a @ref MMAL_PARAMETER_PRIVACY_INDICATOR_T */
MMAL_PARAMETER_PRIVACY_INDICATOR,
/**< Takes a @ref MMAL_PARAMETER_BOOLEAN_T */
MMAL_PARAMETER_VIDEO_DENOISE,
/**< Takes a @ref MMAL_PARAMETER_BOOLEAN_T */
MMAL_PARAMETER_STILLS_DENOISE,
/**< Takes a @ref MMAL_PARAMETER_CAMERA_ANNOTATE_T */
MMAL_PARAMETER_ANNOTATE,
/**< Takes a @ref MMAL_PARAMETER_STEREOSCOPIC_MODE_T */
MMAL_PARAMETER_STEREOSCOPIC_MODE,
/**< Takes a @ref MMAL_PARAMETER_CAMERA_INTERFACE_T */
MMAL_PARAMETER_CAMERA_INTERFACE,
/**< Takes a @ref MMAL_PARAMETER_CAMERA_CLOCKING_MODE_T */
MMAL_PARAMETER_CAMERA_CLOCKING_MODE,
/**< Takes a @ref MMAL_PARAMETER_CAMERA_RX_CONFIG_T */
MMAL_PARAMETER_CAMERA_RX_CONFIG,
/**< Takes a @ref MMAL_PARAMETER_CAMERA_RX_TIMING_T */
MMAL_PARAMETER_CAMERA_RX_TIMING,
/**< Takes a @ref MMAL_PARAMETER_UINT32_T */
MMAL_PARAMETER_DPF_CONFIG,
/* 0x50 */
/**< Takes a @ref MMAL_PARAMETER_UINT32_T */
MMAL_PARAMETER_JPEG_RESTART_INTERVAL,
/**< Takes a @ref MMAL_PARAMETER_UINT32_T */
MMAL_PARAMETER_CAMERA_ISP_BLOCK_OVERRIDE,
/**< Takes a @ref MMAL_PARAMETER_LENS_SHADING_T */
MMAL_PARAMETER_LENS_SHADING_OVERRIDE,
/**< Takes a @ref MMAL_PARAMETER_UINT32_T */
MMAL_PARAMETER_BLACK_LEVEL,
/**< Takes a @ref MMAL_PARAMETER_RESIZE_T */
MMAL_PARAMETER_RESIZE_PARAMS,
/**< Takes a @ref MMAL_PARAMETER_CROP_T */
MMAL_PARAMETER_CROP,
/**< Takes a @ref MMAL_PARAMETER_INT32_T */
MMAL_PARAMETER_OUTPUT_SHIFT,
/**< Takes a @ref MMAL_PARAMETER_INT32_T */
MMAL_PARAMETER_CCM_SHIFT,
/**< Takes a @ref MMAL_PARAMETER_CUSTOM_CCM_T */
MMAL_PARAMETER_CUSTOM_CCM,
/**< Takes a @ref MMAL_PARAMETER_RATIONAL_T */
MMAL_PARAMETER_ANALOG_GAIN,
/**< Takes a @ref MMAL_PARAMETER_RATIONAL_T */
MMAL_PARAMETER_DIGITAL_GAIN,
/**< Takes a @ref MMAL_PARAMETER_DENOISE_T */
MMAL_PARAMETER_DENOISE,
/**< Takes a @ref MMAL_PARAMETER_SHARPEN_T */
MMAL_PARAMETER_SHARPEN,
/**< Takes a @ref MMAL_PARAMETER_GEQ_T */
MMAL_PARAMETER_GEQ,
/**< Tales a @ref MMAP_PARAMETER_DPC_T */
MMAL_PARAMETER_DPC,
/**< Tales a @ref MMAP_PARAMETER_GAMMA_T */
MMAL_PARAMETER_GAMMA,
/**< Takes a @ref MMAL_PARAMETER_BOOLEAN_T */ /**< Takes a @ref MMAL_PARAMETER_BOOLEAN_T */
MMAL_PARAMETER_JPEG_IJG_SCALING, MMAL_PARAMETER_JPEG_IJG_SCALING,
}; };
@@ -791,7 +847,102 @@ struct mmal_parameter_camera_info {
struct mmal_parameter_camera_info_camera struct mmal_parameter_camera_info_camera
cameras[MMAL_PARAMETER_CAMERA_INFO_MAX_CAMERAS]; cameras[MMAL_PARAMETER_CAMERA_INFO_MAX_CAMERAS];
struct mmal_parameter_camera_info_flash struct mmal_parameter_camera_info_flash
flashes[MMAL_PARAMETER_CAMERA_INFO_MAX_FLASHES]; flashes[MMAL_PARAMETER_CAMERA_INFO_MAX_FLASHES];
};
struct mmal_parameter_ccm {
struct s32_fract ccm[3][3];
s32 offsets[3];
};
struct mmal_parameter_custom_ccm {
u32 enabled; /**< Enable the custom CCM. */
struct mmal_parameter_ccm ccm; /**< CCM to be used. */
};
struct mmal_parameter_lens_shading {
u32 enabled;
u32 grid_cell_size;
u32 grid_width;
u32 grid_stride;
u32 grid_height;
u32 mem_handle_table;
u32 ref_transform;
};
enum mmal_parameter_ls_gain_format_type {
MMAL_PARAMETER_LS_GAIN_FORMAT_TYPE_U0P8_1 = 0,
MMAL_PARAMETER_LS_GAIN_FORMAT_TYPE_U1P7_0 = 1,
MMAL_PARAMETER_LS_GAIN_FORMAT_TYPE_U1P7_1 = 2,
MMAL_PARAMETER_LS_GAIN_FORMAT_TYPE_U2P6_0 = 3,
MMAL_PARAMETER_LS_GAIN_FORMAT_TYPE_U2P6_1 = 4,
MMAL_PARAMETER_LS_GAIN_FORMAT_TYPE_U3P5_0 = 5,
MMAL_PARAMETER_LS_GAIN_FORMAT_TYPE_U3P5_1 = 6,
MMAL_PARAMETER_LS_GAIN_FORMAT_TYPE_U4P10 = 7,
MMAL_PARAMETER_LS_GAIN_FORMAT_TYPE_DUMMY = 0x7FFFFFFF
};
struct mmal_parameter_lens_shading_v2 {
u32 enabled;
u32 grid_cell_size;
u32 grid_width;
u32 grid_stride;
u32 grid_height;
u32 mem_handle_table;
u32 ref_transform;
u32 corner_sampled;
enum mmal_parameter_ls_gain_format_type gain_format;
};
struct mmal_parameter_black_level {
u32 enabled;
u16 black_level_r;
u16 black_level_g;
u16 black_level_b;
u8 pad_[2]; /* Unused */
};
struct mmal_parameter_geq {
u32 enabled;
u32 offset;
struct s32_fract slope;
};
#define MMAL_NUM_GAMMA_PTS 33
struct mmal_parameter_gamma {
u32 enabled;
u16 x[MMAL_NUM_GAMMA_PTS];
u16 y[MMAL_NUM_GAMMA_PTS];
};
struct mmal_parameter_denoise {
u32 enabled;
u32 constant;
struct s32_fract slope;
struct s32_fract strength;
};
struct mmal_parameter_sharpen {
u32 enabled;
struct s32_fract threshold;
struct s32_fract strength;
struct s32_fract limit;
};
enum mmal_dpc_mode {
MMAL_DPC_MODE_OFF = 0,
MMAL_DPC_MODE_NORMAL = 1,
MMAL_DPC_MODE_STRONG = 2,
MMAL_DPC_MODE_MAX = 0x7FFFFFFF,
};
struct mmal_parameter_dpc {
u32 enabled;
u32 strength;
};
struct mmal_parameter_crop {
struct vchiq_mmal_rect rect;
}; };
#endif #endif