2.13.4. V4L2_META_FMT_IPU3_PARAMS (‘ip3p’), V4L2_META_FMT_IPU3_3A (‘ip3s’)

2.13.4.1. 3A 统计

IPU3 ImgU 3A 统计加速器收集输入拜耳帧的不同统计信息。这些统计信息从“ipu3-imgu [01] 3a stat”元数据捕获视频节点获得,使用 v4l2_meta_format 接口。 它们的格式由 ipu3_uapi_stats_3a 结构描述。

收集的统计信息是 AWB(自动白平衡)RGBS(红色、绿色、蓝色和饱和度测量)单元、AWB 滤波器响应、AF(自动对焦)滤波器响应和 AE(自动曝光)直方图。

结构体 ipu3_uapi_4a_config 保存所有可配置的参数。

struct ipu3_uapi_stats_3a {
        struct ipu3_uapi_awb_raw_buffer awb_raw_buffer;
        struct ipu3_uapi_ae_raw_buffer_aligned ae_raw_buffer[IPU3_UAPI_MAX_STRIPES];
        struct ipu3_uapi_af_raw_buffer af_raw_buffer;
        struct ipu3_uapi_awb_fr_raw_buffer awb_fr_raw_buffer;
        struct ipu3_uapi_4a_config stats_4a_config;
        __u32 ae_join_buffers;
        __u8 padding[28];
        struct ipu3_uapi_stats_3a_bubble_info_per_stripe stats_3a_bubble_per_stripe;
        struct ipu3_uapi_ff_status stats_3a_status;
};

2.13.4.2. 流水线参数

流水线参数传递给“ipu3-imgu [01] parameters”元数据输出视频节点,使用 v4l2_meta_format 接口。 它们的格式由 ipu3_uapi_params 结构描述。

此处描述的 3A 统计信息和流水线参数都与底层相机子系统 (CSS) API 紧密相关。它们通常由专用用户空间库使用和生成,这些库包含重要的调整工具,从而使开发人员无需担心低级硬件和算法细节。

struct ipu3_uapi_params {
        /* Flags which of the settings below are to be applied */
        struct ipu3_uapi_flags use;

        /* Accelerator cluster parameters */
        struct ipu3_uapi_acc_param acc_param;

        /* ISP vector address space parameters */
        struct ipu3_uapi_isp_lin_vmem_params lin_vmem_params;
        struct ipu3_uapi_isp_tnr3_vmem_params tnr3_vmem_params;
        struct ipu3_uapi_isp_xnr3_vmem_params xnr3_vmem_params;

        /* ISP data memory (DMEM) parameters */
        struct ipu3_uapi_isp_tnr3_params tnr3_dmem_params;
        struct ipu3_uapi_isp_xnr3_params xnr3_dmem_params;

        /* Optical black level compensation */
        struct ipu3_uapi_obgrid_param obgrid_param;
};

2.13.4.3. Intel IPU3 ImgU uAPI 数据类型

struct ipu3_uapi_grid_config

网格平面配置

定义:

struct ipu3_uapi_grid_config {
    __u8 width;
    __u8 height;
    __u16 block_width_log2:3;
    __u16 block_height_log2:3;
    __u16 height_per_slice:8;
    __u16 x_start;
    __u16 y_start;
    __u16 x_end;
    __u16 y_end;
};

成员

宽度

网格水平尺寸,以网格块(单元格)的数量表示。对于 AWB,范围是 (16, 80)。对于 AF/AE,范围是 (16, 32)。

高度

网格垂直尺寸,以网格单元的数量表示。对于 AWB,范围是 (16, 60)。对于 AF/AE,范围是 (16, 24)。

block_width_log2

每个单元格宽度的 Log2,以像素为单位。对于 AWB,范围是 [3, 6]。对于 AF/AE,范围是 [3, 7]。

block_height_log2

每个单元格高度的 Log2,以像素为单位。对于 AWB,范围是 [3, 6]。对于 AF/AE,范围是 [3, 7]。

height_per_slice

每个切片垂直轴上的块数。默认为 2。

x_start

感兴趣区域 (ROI) 左上角的 X 值。

y_start

ROI 左上角的 Y 值。

x_end

ROI 右下角的 X 值。

y_end

ROI 右下角的 Y 值

描述

由于收集的数据总量的大小,大多数统计信息会创建基于网格的输出,然后将数据分成“切片”。

struct ipu3_uapi_awb_set_item

AWB 中每个单元格的内存布局

定义:

struct ipu3_uapi_awb_set_item {
    __u8 Gr_avg;
    __u8 R_avg;
    __u8 B_avg;
    __u8 Gb_avg;
    __u8 sat_ratio;
    __u8 padding0;
    __u8 padding1;
    __u8 padding2;
};

成员

Gr_avg

单元格中红色线的绿色平均值。

R_avg

单元格中的红色平均值。

B_avg

单元格中的蓝色平均值。

Gb_avg

单元格中蓝色线的绿色平均值。

sat_ratio

超过 ipu3_uapi_awb_config_s 中指定的阈值的像素百分比,编码为 0 到 255。

padding0

用于填充的未使用字节。

padding1

用于填充的未使用字节。

padding2

用于填充的未使用字节。

struct ipu3_uapi_awb_raw_buffer

AWB 原始缓冲区

定义:

struct ipu3_uapi_awb_raw_buffer {
    struct ipu3_uapi_awb_set_item meta_data[IPU3_UAPI_AWB_MAX_BUFFER_SIZE]  ;
};

成员

meta_data

用于保存自动白平衡元数据的缓冲区,这些元数据是每个颜色通道的平均值。

struct ipu3_uapi_awb_config_s

AWB 配置

定义:

struct ipu3_uapi_awb_config_s {
    __u16 rgbs_thr_gr;
    __u16 rgbs_thr_r;
    __u16 rgbs_thr_gb;
    __u16 rgbs_thr_b;
    struct ipu3_uapi_grid_config grid;
};

成员

rgbs_thr_gr

gr 阈值。

rgbs_thr_r

红色阈值。

rgbs_thr_gb

gb 阈值。

rgbs_thr_b

蓝色阈值。

网格

ipu3_uapi_grid_config,默认网格分辨率为 16x16 个单元格。

描述

阈值是饱和度测量范围 [0, 8191],8191 是默认值。可以选择拒绝超过阈值的值进行平均。

struct ipu3_uapi_awb_config

AWB 配置包装器

定义:

struct ipu3_uapi_awb_config {
    struct ipu3_uapi_awb_config_s config  ;
};

成员

配置

自动白平衡的配置,如 ipu3_uapi_awb_config_s 所定义

struct ipu3_uapi_ae_raw_buffer

AE 全局加权直方图

定义:

struct ipu3_uapi_ae_raw_buffer {
    __u32 vals[IPU3_UAPI_AE_BINS * IPU3_UAPI_AE_COLORS];
};

成员

单元格中 IPU3_UAPI_AE_COLORS 的总和

描述

每个直方图包含 IPU3_UAPI_AE_BINS 个 bin。每个 bin 都有 24 位无符号数,用于计算像素数量。

struct ipu3_uapi_ae_raw_buffer_aligned

AE 原始缓冲区

定义:

struct ipu3_uapi_ae_raw_buffer_aligned {
    struct ipu3_uapi_ae_raw_buffer buff  ;
};

成员

buff

ipu3_uapi_ae_raw_buffer 用于保存完整帧元数据。

struct ipu3_uapi_ae_grid_config

AE 权重网格

定义:

struct ipu3_uapi_ae_grid_config {
    __u8 width;
    __u8 height;
    __u8 block_width_log2:4;
    __u8 block_height_log2:4;
    __u8 reserved0:5;
    __u8 ae_en:1;
    __u8 rst_hist_array:1;
    __u8 done_rst_hist_array:1;
    __u16 x_start;
    __u16 y_start;
    __u16 x_end;
    __u16 y_end;
};

成员

宽度

网格水平尺寸。值:[16, 32],默认 16。

高度

网格垂直尺寸。值:[16, 24],默认 16。

block_width_log2

网格单元格宽度的 Log2,值:[3, 7]。

block_height_log2

网格单元格高度的 Log2,值:[3, 7]。默认值为 3(单元格大小 8x8),每个网格 4 个单元格。

reserved0

已保留

ae_en

0:不写入 ipu3_uapi_ae_raw_buffer_aligned 数组,1:正常写入。

rst_hist_array

写入 1 以触发直方图数组重置。

done_rst_hist_array

直方图数组重置完成的标志。

x_start

ROI 左上角的 X 值,默认为 0。

y_start

ROI 左上角的 Y 值,默认为 0。

x_end

ROI 右下角的 X 值。

y_end

ROI 右下角的 Y 值

描述

AE 块在帧内定义的 ROI 上累积 4 个全局加权直方图(R、G、B、Y)。每个像素对直方图的贡献(由 ipu3_uapi_ae_weight_elem LUT 定义)由网格索引。

struct ipu3_uapi_ae_weight_elem

AE 权重 LUT

定义:

struct ipu3_uapi_ae_weight_elem {
    __u32 cell0:4;
    __u32 cell1:4;
    __u32 cell2:4;
    __u32 cell3:4;
    __u32 cell4:4;
    __u32 cell5:4;
    __u32 cell6:4;
    __u32 cell7:4;
};

成员

cell0

加权直方图网格值。

cell1

加权直方图网格值。

cell2

加权直方图网格值。

cell3

加权直方图网格值。

cell4

加权直方图网格值。

cell5

加权直方图网格值。

cell6

加权直方图网格值。

cell7

加权直方图网格值。

描述

使用加权网格值给每个单元格不同的贡献因子。精度 u4,范围 [0, 15]。

struct ipu3_uapi_ae_ccm

WB 和 CCM 的 AE 系数

定义:

struct ipu3_uapi_ae_ccm {
    __u16 gain_gr;
    __u16 gain_r;
    __u16 gain_b;
    __u16 gain_gb;
    __s16 mat[16];
};

成员

gain_gr

gr 通道的 WB 增益因子。默认为 256。

gain_r

r 通道的 WB 增益因子。默认为 256。

gain_b

b 通道的 WB 增益因子。默认为 256。

gain_gb

gb 通道的 WB 增益因子。默认为 256。

将拜耳四路输出从 WB 转换为 RGB+Y 的 4x4 矩阵。

描述

默认

128, 0, 0, 0, 0, 128, 0, 0, 0, 0, 128, 0, 0, 0, 0, 128,

作为原始帧预处理阶段的一部分,需要应用 WB 和颜色转换来暴露这些增益操作的影响。

struct ipu3_uapi_ae_config

AE 配置

定义:

struct ipu3_uapi_ae_config {
    struct ipu3_uapi_ae_grid_config grid_cfg  ;
    struct ipu3_uapi_ae_weight_elem weights[IPU3_UAPI_AE_WEIGHTS]  ;
    struct ipu3_uapi_ae_ccm ae_ccm  ;
};

成员

grid_cfg

自动曝光统计网格的配置。请参见结构体 ipu3_uapi_ae_grid_config,由于 Imgu 不支持输出自动曝光统计信息,因此用户可以忽略此配置,而改用自动白平衡统计信息中的 RGB 表。

权重

IPU3_UAPI_AE_WEIGHTS 基于网格中的 32x24 个块。每个网格单元在称为网格值的权重 LUT 中都有一个对应的值,全局直方图根据网格值和像素值更新。

ae_ccm

颜色转换矩阵预处理块。

描述

从图像分辨率计算 AE 网格,重新采样 ae 权重。

struct ipu3_uapi_af_filter_config

用于对比度测量的 AF 2D 过滤器

定义:

struct ipu3_uapi_af_filter_config {
    struct {
        __u8 a1;
        __u8 a2;
        __u8 a3;
        __u8 a4;
    } y1_coeff_0;
    struct {
        __u8 a5;
        __u8 a6;
        __u8 a7;
        __u8 a8;
    } y1_coeff_1;
    struct {
        __u8 a9;
        __u8 a10;
        __u8 a11;
        __u8 a12;
    } y1_coeff_2;
    __u32 y1_sign_vec;
    struct {
        __u8 a1;
        __u8 a2;
        __u8 a3;
        __u8 a4;
    } y2_coeff_0;
    struct {
        __u8 a5;
        __u8 a6;
        __u8 a7;
        __u8 a8;
    } y2_coeff_1;
    struct {
        __u8 a9;
        __u8 a10;
        __u8 a11;
        __u8 a12;
    } y2_coeff_2;
    __u32 y2_sign_vec;
    struct {
        __u8 y_gen_rate_gr;
        __u8 y_gen_rate_r;
        __u8 y_gen_rate_b;
        __u8 y_gen_rate_gb;
    } y_calc;
    struct {
        __u32 reserved0:8;
        __u32 y1_nf:4;
        __u32 reserved1:4;
        __u32 y2_nf:4;
        __u32 reserved2:12;
    } nf;
};

成员

y1_coeff_0

过滤器 Y1,结构:3x11,支持对称和反对称类型。A12 是中心,A1-A11 是邻居。用于分析低频内容,用于计算 x 方向的梯度和。

y1_coeff_0.a1

过滤器 1 系数 A1,u8,默认 0。

y1_coeff_0.a2

过滤器 1 系数 A2,u8,默认 0。

y1_coeff_0.a3

过滤器 1 系数 A3,u8,默认 0。

y1_coeff_0.a4

过滤器 1 系数 A4,u8,默认 0。

y1_coeff_1

结构体

y1_coeff_1.a5

过滤器 1 系数 A5,u8,默认 0。

y1_coeff_1.a6

过滤器 1 系数 A6,u8,默认 0。

y1_coeff_1.a7

过滤器 1 系数 A7,u8,默认 0。

y1_coeff_1.a8

过滤器 1 系数 A8,u8,默认 0。

y1_coeff_2

结构体

y1_coeff_2.a9

过滤器 1 系数 A9,u8,默认 0。

y1_coeff_2.a10

过滤器 1 系数 A10,u8,默认 0。

y1_coeff_2.a11

过滤器 1 系数 A11,u8,默认 0。

y1_coeff_2.a12

过滤器 1 系数 A12,u8,默认 128。

y1_sign_vec

每个位对应一个系数符号位,0:正,1:负,默认 0。

y2_coeff_0

Y2,与 Y1 相同的结构。用于分析高频内容。

y2_coeff_0.a1

过滤器 2 系数 A1,u8,默认 0。

y2_coeff_0.a2

过滤器 2 系数 A2,u8,默认 0。

y2_coeff_0.a3

过滤器 2 系数 A3,u8,默认 0。

y2_coeff_0.a4

过滤器 2 系数 A4,u8,默认 0。

y2_coeff_1

结构体

y2_coeff_1.a5

过滤器 2 系数 A5,u8,默认 0。

y2_coeff_1.a6

过滤器 2 系数 A6,u8,默认 0。

y2_coeff_1.a7

过滤器 2 系数 A7,u8,默认 0。

y2_coeff_1.a8

过滤器 2 系数 A8,u8,默认 0。

y2_coeff_2

结构体

y2_coeff_2.a9

过滤器 1 系数 A9,u8,默认 0。

y2_coeff_2.a10

过滤器 1 系数 A10,u8,默认 0。

y2_coeff_2.a11

过滤器 1 系数 A11,u8,默认 0。

y2_coeff_2.a12

过滤器 1 系数 A12,u8,默认 128。

y2_sign_vec

每个位对应一个系数符号位,0:正,1:负,默认 0。

y_calc

将拜耳四路转换为 RGB+Y 值以用于构建直方图的预处理。范围 [0, 32],默认 8。

规则:y_gen_rate_gr + y_gen_rate_r + y_gen_rate_b + y_gen_rate_gb = 32 单个 Y 基于 Gr/R/B/Gb 的总和及其贡献率计算。

y_calc.y_gen_rate_gr

Y 的贡献率 Gr

y_calc.y_gen_rate_r

Y 的贡献率 R

y_calc.y_gen_rate_b

Y 的贡献率 B

y_calc.y_gen_rate_gb

Y 的贡献率 Gb

nf

在 Y1/Y2 过滤器期间应应用的右移值,以确保所需的总内存为每个网格单元 2 个字节。

nf.reserved0

已保留

nf.y1_nf

y1 卷积系数的归一化因子,应该是滤波器系数的绝对值之和的 log2,默认 7 (2^7 = 128)。

nf.reserved1

已保留

nf.y2_nf

y2 的归一化因子,应该是滤波器系数的绝对值之和的 log2。

nf.reserved2

已保留

struct ipu3_uapi_af_raw_buffer

AF 元数据

定义:

struct ipu3_uapi_af_raw_buffer {
    __u8 y_table[IPU3_UAPI_AF_Y_TABLE_MAX_SIZE]  ;
};

成员

y_table

每个颜色分量将分别与过滤器 1 和过滤器 2 进行卷积,结果将被求和并对每个单元格进行平均。

struct ipu3_uapi_af_config_s

AF 配置

定义:

struct ipu3_uapi_af_config_s {
    struct ipu3_uapi_af_filter_config filter_config  ;
    __u8 padding[4];
    struct ipu3_uapi_grid_config grid_cfg  ;
};

成员

filter_config

AF 使用 ipu3_uapi_af_filter_config 中配置的 Y1 和 Y2 过滤器

填充

填充

grid_cfg

请参见 ipu3_uapi_grid_config,默认分辨率 16x16。对于大图像使用大网格大小,反之亦然。

struct ipu3_uapi_awb_fr_raw_buffer

AWB 滤波器响应元数据

定义:

struct ipu3_uapi_awb_fr_raw_buffer {
    __u8 meta_data[IPU3_UAPI_AWB_FR_BAYER_TABLE_MAX_SIZE]  ;
};

成员

meta_data

与 1D 过滤器卷积后在网格上输出统计信息。

struct ipu3_uapi_awb_fr_config_s

AWB 滤波器响应配置

定义:

struct ipu3_uapi_awb_fr_config_s {
    struct ipu3_uapi_grid_config grid_cfg;
    __u8 bayer_coeff[6];
    __u16 reserved1;
    __u32 bayer_sign;
    __u8 bayer_nf;
    __u8 reserved2[7];
};

成员

grid_cfg

网格配置,默认 16x16。

拜耳_coeff

1D 过滤器 1x11 中心对称/反对称。系数默认为 { 0, 0, 0, 0, 0, 128 }。通过其 11x1 邻居的加权和单独应用于每个拜耳通道的整个图像。

reserved1

已保留

拜耳_sign

滤波器系数的符号,默认 0。

拜耳_nf

卷积系数的归一化因子,以确保所需的总内存在预定范围内。NF 应该是滤波器系数的绝对值之和的 log2,范围 [7, 14],默认 7。

reserved2

已保留

struct ipu3_uapi_4a_config

4A 配置

定义:

struct ipu3_uapi_4a_config {
    struct ipu3_uapi_awb_config_s awb_config  ;
    struct ipu3_uapi_ae_grid_config ae_grd_config;
    __u8 padding[20];
    struct ipu3_uapi_af_config_s af_config;
    struct ipu3_uapi_awb_fr_config_s awb_fr_config  ;
};

成员

awb_config

ipu3_uapi_awb_config_s,默认分辨率 16x16

ae_grd_config

自动曝光统计 ipu3_uapi_ae_grid_config

填充

填充

af_config

自动对焦配置 ipu3_uapi_af_config_s

awb_fr_config

ipu3_uapi_awb_fr_config_s,默认分辨率 16x16

struct ipu3_uapi_bubble_info

主机端调试的 Bubble 信息

定义:

struct ipu3_uapi_bubble_info {
    __u32 num_of_stripes  ;
    __u8 padding[28];
    __u32 num_sets;
    __u8 padding1[28];
    __u32 size_of_set;
    __u8 padding2[28];
    __u32 bubble_size;
    __u8 padding3[28];
};

成员

num_of_stripes

由于线路缓冲区内存的限制,单帧分为几个称为条带的部分。条带之间的分隔是垂直的。每个这样的条带都被 ISP 管道处理为单帧。

填充

填充字节。

num_sets

集合数。

padding1

填充字节。

size_of_set

集合大小。

padding2

填充字节。

bubble_size

是以“集合”表示的 bubble 中的填充量。

padding3

填充字节。

struct ipu3_uapi_ff_status

每个 3A 固定功能的使能位

定义:

struct ipu3_uapi_ff_status {
    __u32 awb_en  ;
    __u8 padding[28];
    __u32 ae_en;
    __u8 padding1[28];
    __u32 af_en;
    __u8 padding2[28];
    __u32 awb_fr_en;
    __u8 padding3[28];
};

成员

awb_en

自动白平衡使能

填充

填充配置

ae_en

自动曝光使能

padding1

填充配置

af_en

自动对焦使能

padding2

填充配置

awb_fr_en

awb 滤波器响应使能位

padding3

填充配置

struct ipu3_uapi_stats_3a

3A 统计

定义:

struct ipu3_uapi_stats_3a {
    struct ipu3_uapi_awb_raw_buffer awb_raw_buffer;
    struct ipu3_uapi_ae_raw_buffer_aligned ae_raw_buffer[IPU3_UAPI_MAX_STRIPES];
    struct ipu3_uapi_af_raw_buffer af_raw_buffer;
    struct ipu3_uapi_awb_fr_raw_buffer awb_fr_raw_buffer;
    struct ipu3_uapi_4a_config stats_4a_config;
    __u32 ae_join_buffers;
    __u8 padding[28];
    struct ipu3_uapi_stats_3a_bubble_info_per_stripe stats_3a_bubble_per_stripe;
    struct ipu3_uapi_ff_status stats_3a_status;
};

成员

awb_raw_buffer

自动白平衡元数据 ipu3_uapi_awb_raw_buffer

ae_raw_buffer

自动曝光原始数据 ipu3_uapi_ae_raw_buffer_aligned 当前 Imgu 不会向 ae_raw_buffer 输出自动曝光统计信息,3A 算法等用户可以使用 ipu3_uapi_awb_raw_buffer 中的 RGB 表进行自动曝光。

af_raw_buffer

ipu3_uapi_af_raw_buffer 用于自动对焦元数据

awb_fr_raw_buffer

值,由 ipu3_uapi_awb_fr_raw_buffer 指定

stats_4a_config

ipu3_uapi_4a_config 定义的 4a 统计配置。

ae_join_buffers

1 表示使用 ae_raw_buffer。

填充

填充配置

stats_3a_bubble_per_stripe

一个 ipu3_uapi_stats_3a_bubble_info_per_stripe

stats_3a_status

ipu3_uapi_ff_status 中设置的 3a 统计状态

struct ipu3_uapi_bnr_static_config_wb_gains_config

白平衡增益

定义:

struct ipu3_uapi_bnr_static_config_wb_gains_config {
    __u16 gr;
    __u16 r;
    __u16 b;
    __u16 gb;
};

成员

gr

Gr 通道的白平衡增益。

r

R 通道的白平衡增益。

b

B 通道的白平衡增益。

gb

Gb 通道的白平衡增益。

描述

对于 BNR 参数,三个通道 [Ggr, Ggb, Gb, Gr] 的 WB 增益因子。它们的精度为 U3.13,范围为 (0, 8),实际增益为 Gx + 1,通常为 Gx = 1。

Pout = {Pin * (1 + Gx)}。

struct ipu3_uapi_bnr_static_config_wb_gains_thr_config

阈值配置

定义:

struct ipu3_uapi_bnr_static_config_wb_gains_thr_config {
    __u8 gr;
    __u8 r;
    __u8 b;
    __u8 gb;
};

成员

gr

Gr 通道的白平衡阈值增益。

r

R 通道的白平衡阈值增益。

b

B 通道的白平衡阈值增益。

gb

Gb 通道的白平衡阈值增益。

描述

定义一个阈值,该阈值指定缺陷像素与其相邻像素的差异程度(由动态缺陷像素校正子块使用)。精度 u4.4,范围 [0, 8]。

struct ipu3_uapi_bnr_static_config_thr_coeffs_config

控制噪声阈值的噪声模型系数

定义:

struct ipu3_uapi_bnr_static_config_thr_coeffs_config {
    __u32 cf:13;
    __u32 reserved0:3;
    __u32 cg:5;
    __u32 ci:5;
    __u32 reserved1:1;
    __u32 r_nf:5;
};

成员

cf

阈值计算的自由系数,范围 [0, 8191],默认 0。

reserved0

已保留

cg

阈值计算的增益系数,[0, 31],默认 8。

ci

阈值计算的强度系数。范围 [0, 0x1f],默认 6。格式:u3.2(3 个最高有效位表示整数,2 个最低有效位表示小数部分,每个计数表示 0.25),例如,二进制格式的 6 为 00110,转换为 1.5

reserved1

已保留

r_nf

r^2 计算的归一化移位值,范围 [12, 20],其中 r 是像素 [行,列] 从传感器中心到中心的半径。默认 14。

描述

用于区分噪声和细节的阈值。

struct ipu3_uapi_bnr_static_config_thr_ctrl_shd_config

着色配置

定义:

struct ipu3_uapi_bnr_static_config_thr_ctrl_shd_config {
    __u8 gr;
    __u8 r;
    __u8 b;
    __u8 gb;
};

成员

gr

系数定义 gr 通道的镜头着色增益近似

r

系数定义 r 通道的镜头着色增益近似

b

系数定义 b 通道的镜头着色增益近似

gb

系数定义 gb 通道的镜头着色增益近似

描述

由于着色校正,BNR 的噪声模型 (NM) 自适应参数。以上所有参数的精度均为 u3.3,默认为 0。

struct ipu3_uapi_bnr_static_config_opt_center_config

光心配置

定义:

struct ipu3_uapi_bnr_static_config_opt_center_config {
    __s32 x_reset:13;
    __u32 reserved0:3;
    __s32 y_reset:13;
    __u32 reserved2:3;
};

成员

x_reset

X 的重置值(列开始 - X 中心)。精度 s12.0。

reserved0

已保留

y_reset

Y 的重置值(行开始 - Y 中心)。精度 s12.0。

reserved2

已保留

描述

由于着色校正,从角到光心的距离用于 NM 自适应(应基于着色表计算)

struct ipu3_uapi_bnr_static_config_lut_config

BNR 平方根查找表

定义:

struct ipu3_uapi_bnr_static_config_lut_config {
    __u8 values[IPU3_UAPI_BNR_LUT_SIZE];
};

成员

平方根函数的预计算值。

描述

平方根运算的 LUT 实现。

struct ipu3_uapi_bnr_static_config_bp_ctrl_config

检测坏像素 (bp)

定义:

struct ipu3_uapi_bnr_static_config_bp_ctrl_config {
    __u32 bp_thr_gain:5;
    __u32 reserved0:2;
    __u32 defect_mode:1;
    __u32 bp_gain:6;
    __u32 reserved1:18;
    __u32 w0_coeff:4;
    __u32 reserved2:4;
    __u32 w1_coeff:4;
    __u32 reserved3:20;
};

成员

bp_thr_gain

定义一个阈值,该阈值指定缺陷像素与其相邻像素的差异程度。阈值取决于算法计算的去噪阈值。范围 [4, 31],默认 4。

reserved0

已保留

defect_mode

寻址缺陷像素的模式,0 - 预期单个缺陷像素,1 - 预期 2 个相邻缺陷像素,默认 1。

bp_gain

定义通过缺陷像素的二阶导数与通过相邻像素的二阶导数的不同之处。u4.2,范围 [0, 256],默认 8。

reserved1

已保留

w0_coeff

缺陷像素校正的混合系数。精度 u4,范围 [0, 8],默认 8。

reserved2

已保留

w1_coeff

启用以避免不正确的缺陷像素校正的影响。精度 u4,范围 [1, 8],默认 8。

reserved3

已保留

struct ipu3_uapi_bnr_static_config_dn_detect_ctrl_config

去噪配置

定义:

struct ipu3_uapi_bnr_static_config_dn_detect_ctrl_config {
    __u32 alpha:4;
    __u32 beta:4;
    __u32 gamma:4;
    __u32 reserved0:4;
    __u32 max_inf:4;
    __u32 reserved1:7;
    __u32 gd_enable:1;
    __u32 bpc_enable:1;
    __u32 bnr_enable:1;
    __u32 ff_enable:1;
    __u32 reserved2:1;
};

成员

alpha

平滑滤波器的中心元素的权重。

beta

平滑滤波器的外围元素的权重,默认 4。

伽马

平滑滤波器的对角元素的权重,默认 4。

reserved0

已保留

max_inf

外围元素或对角元素影响相对于预定义值的最大增加范围:[0x5, 0xa]

reserved1

已保留

gd_enable

绿色视差使能控制,0 - 禁用,1 - 启用。

bpc_enable

坏像素校正使能控制,0 - 禁用,1 - 启用。

bnr_enable

拜耳噪声消除使能控制,0 - 禁用,1 - 启用。

ff_enable

固定功能使能,0 - 禁用,1 - 启用。

reserved2

已保留

描述

beta 和 gamma 参数定义噪声消除滤波器的强度。

以上所有参数的精度均为 u0.4,范围 [0, 0xf],格式:u0.4(无 / 零位表示整数,4 位表示小数部分,每个计数表示 0.0625),例如,0xf 转换为 0.0625x15 = 0.9375

struct ipu3_uapi_bnr_static_config_opt_center_sqr_config

BNR 光学平方

定义:

struct ipu3_uapi_bnr_static_config_opt_center_sqr_config {
    __u32 x_sqr_reset;
    __u32 y_sqr_reset;
};

成员

x_sqr_reset

X^2 的重置值。

y_sqr_reset

Y^2 的重置值。

描述

请注意

  1. X 和 Y 参考 ipu3_uapi_bnr_static_config_opt_center_config

  2. 两个结构都在阈值公式中用于计算 r^2,其中 r 是像素 [行,列] 从传感器中心到中心的半径。

struct ipu3_uapi_bnr_static_config

BNR 静态配置

定义:

struct ipu3_uapi_bnr_static_config {
    struct ipu3_uapi_bnr_static_config_wb_gains_config wb_gains;
    struct ipu3_uapi_bnr_static_config_wb_gains_thr_config wb_gains_thr;
    struct ipu3_uapi_bnr_static_config_thr_coeffs_config thr_coeffs;
    struct ipu3_uapi_bnr_static_config_thr_ctrl_shd_config thr_ctrl_shd;
    struct ipu3_uapi_bnr_static_config_opt_center_config opt_center;
    struct ipu3_uapi_bnr_static_config_lut_config lut;
    struct ipu3_uapi_bnr_static_config_bp_ctrl_config bp_ctrl;
    struct ipu3_uapi_bnr_static_config_dn_detect_ctrl_config dn_detect_ctrl;
    __u32 column_size;
    struct ipu3_uapi_bnr_static_config_opt_center_sqr_config opt_center_sqr;
};

成员

wb_gains

白平衡增益 ipu3_uapi_bnr_static_config_wb_gains_config

wb_gains_thr

白平衡增益阈值,如 ipu3_uapi_bnr_static_config_wb_gains_thr_config 所定义

thr_coeffs

阈值的系数 ipu3_uapi_bnr_static_config_thr_coeffs_config

thr_ctrl_shd

着色阈值的控制 ipu3_uapi_bnr_static_config_thr_ctrl_shd_config

opt_center

光心 ipu3_uapi_bnr_static_config_opt_center_config

lut

查找表 ipu3_uapi_bnr_static_config_lut_config

bp_ctrl

检测并消除 struct ipu3_uapi_bnr_static_config_bp_ctrl_config 中定义的坏像素

dn_detect_ctrl

检测并消除噪声。ipu3_uapi_bnr_static_config_dn_detect_ctrl_config

column_size

列中的像素数。

opt_center_sqr

r^2 到光心的重置值,请参见 ipu3_uapi_bnr_static_config_opt_center_sqr_config

描述

以上参数和 opt_center_sqr 用于白平衡和着色。

struct ipu3_uapi_bnr_static_config_green_disparity

校正绿色视差

定义:

struct ipu3_uapi_bnr_static_config_green_disparity {
    __u32 gd_red:6;
    __u32 reserved0:2;
    __u32 gd_green:6;
    __u32 reserved1:2;
    __u32 gd_blue:6;
    __u32 reserved2:10;
    __u32 gd_black:14;
    __u32 reserved3:2;
    __u32 gd_shading:7;
    __u32 reserved4:1;
    __u32 gd_support:2;
    __u32 reserved5:1;
    __u32 gd_clip:1;
    __u32 gd_central_weight:4;
};

成员

gd_red

亮红色区域中 gr 视差级别的着色增益系数。精度 u0.6,默认 4(0.0625)。

reserved0

已保留

gd_green

亮绿色区域中 gr 视差级别的着色增益系数。精度 u0.6,默认 4(0.0625)。

reserved1

已保留

gd_blue

亮蓝色区域中 gr 视差级别的着色增益系数。精度 u0.6,默认 4(0.0625)。

reserved2

已保留

gd_black

黑暗区域中的最大绿色视差级别(假设更强的视差是图像细节)。精度 u14,默认 80。

reserved3

已保留

gd_shading

根据距图像中心的平方距离更改最大绿色视差级别。

reserved4

已保留

gd_support

在当前像素邻域中,与它的阈值差小于阈值的第二种绿色像素的数量的下限。

reserved5

已保留

gd_clip

打开/关闭绿色视差剪辑,[0, 1],默认 1。

gd_central_weight

在 9 像素加权和中,中心像素权重。

描述

红色、绿色、蓝色和黑色着色增益系数用于给定像素的颜色值及其在图像中的坐标计算阈值。

struct ipu3_uapi_dm_config

去马赛克参数

定义:

struct ipu3_uapi_dm_config {
    __u32 dm_en:1;
    __u32 ch_ar_en:1;
    __u32 fcc_en:1;
    __u32 reserved0:13;
    __u32 frame_width:16;
    __u32 gamma_sc:5;
    __u32 reserved1:3;
    __u32 lc_ctrl:5;
    __u32 reserved2:3;
    __u32 cr_param1:5;
    __u32 reserved3:3;
    __u32 cr_param2:5;
    __u32 reserved4:3;
    __u32 coring_param:5;
    __u32 reserved5:27;
};

成员

dm_en

去马赛克使能。

ch_ar_en

检查器伪影移除使能标志。默认值为 0。

fcc_en

假彩色校正 (FCC) 使能标志。默认值为 0。

reserved0

已保留

frame_width

不关心

gamma_sc

锐化系数(Hamilton-Adams 插值中互补色的二维导数的系数)。u5,范围 [0, 31],默认值为 8。

reserved1

已保留

lc_ctrl

参数,用于控制色度同质性度量在最终同质性度量计算中的权重。u5,范围 [0, 31],默认值为 7。

reserved2

已保留

cr_param1

定义检查器伪影移除功能增益的第一个参数。精度 u5,范围 [0, 31],默认值为 8。

reserved3

已保留

cr_param2

定义检查器伪影移除功能增益的第二个参数。精度 u5,范围 [0, 31],默认值为 8。

reserved4

已保留

coring_param

定义假彩色校正操作的强度。低表示保留边缘颜色,高表示保留灰色边缘伪影。精度 u1.4,范围 [0, 1.9375],默认值为 4 (0.25)。

reserved5

已保留

描述

demosaic 固定功能块负责根据 demosaicing 算法将 Bayer(马赛克)图像转换为彩色图像。

struct ipu3_uapi_ccm_mat_config

色彩校正矩阵

定义:

struct ipu3_uapi_ccm_mat_config {
    __s16 coeff_m11;
    __s16 coeff_m12;
    __s16 coeff_m13;
    __s16 coeff_o_r;
    __s16 coeff_m21;
    __s16 coeff_m22;
    __s16 coeff_m23;
    __s16 coeff_o_g;
    __s16 coeff_m31;
    __s16 coeff_m32;
    __s16 coeff_m33;
    __s16 coeff_o_b;
};

成员

coeff_m11

CCM 3x3 系数,范围 [-65536, 65535]

coeff_m12

CCM 3x3 系数,范围 [-8192, 8191]

coeff_m13

CCM 3x3 系数,范围 [-32768, 32767]

coeff_o_r

偏差 3x1 系数,范围 [-8191, 8181]

coeff_m21

CCM 3x3 系数,范围 [-32767, 32767]

coeff_m22

CCM 3x3 系数,范围 [-8192, 8191]

coeff_m23

CCM 3x3 系数,范围 [-32768, 32767]

coeff_o_g

偏差 3x1 系数,范围 [-8191, 8181]

coeff_m31

CCM 3x3 系数,范围 [-32768, 32767]

coeff_m32

CCM 3x3 系数,范围 [-8192, 8191]

coeff_m33

CCM 3x3 系数,范围 [-32768, 32767]

coeff_o_b

偏差 3x1 系数,范围 [-8191, 8181]

描述

通过应用 3x3 矩阵并添加偏差向量 O,将传感器特定的颜色空间转换为标准 sRGB。该转换基本上是 3 维颜色空间中的旋转和平移。以下是默认值

9775, -2671, 1087, 0 -1071, 8303, 815, 0 -23, -7887, 16103, 0

struct ipu3_uapi_gamma_corr_ctrl

伽马校正

定义:

struct ipu3_uapi_gamma_corr_ctrl {
    __u32 enable:1;
    __u32 reserved:31;
};

成员

enable

启用伽马校正。

已保留

已保留

struct ipu3_uapi_gamma_corr_lut

作为 LUT 实现的逐像素色调映射。

定义:

struct ipu3_uapi_gamma_corr_lut {
    __u16 lut[IPU3_UAPI_GAMMA_CORR_LUT_ENTRIES];
};

成员

lut

伽马函数的 256 个列表值。LUT[1].. LUT[256] 格式 u13.0,范围 [0, 8191]。

描述

色调映射操作通过分段线性图完成,该图作为查找表 (LUT) 实现。像素分量输入强度是图的 X 轴,也就是表条目。

struct ipu3_uapi_gamma_config

伽马配置

定义:

struct ipu3_uapi_gamma_config {
    struct ipu3_uapi_gamma_corr_ctrl gc_ctrl  ;
    struct ipu3_uapi_gamma_corr_lut gc_lut  ;
};

成员

gc_ctrl

伽马校正的控制 ipu3_uapi_gamma_corr_ctrl

gc_lut

伽马校正的查找表 ipu3_uapi_gamma_corr_lut

struct ipu3_uapi_csc_mat_config

颜色空间转换矩阵配置

定义:

struct ipu3_uapi_csc_mat_config {
    __s16 coeff_c11;
    __s16 coeff_c12;
    __s16 coeff_c13;
    __s16 coeff_b1;
    __s16 coeff_c21;
    __s16 coeff_c22;
    __s16 coeff_c23;
    __s16 coeff_b2;
    __s16 coeff_c31;
    __s16 coeff_c32;
    __s16 coeff_c33;
    __s16 coeff_b3;
};

成员

coeff_c11

转换矩阵值,格式 s0.14,范围 [-16384, 16383]。

coeff_c12

转换矩阵值,格式 s0.14,范围 [-8192, 8191]。

coeff_c13

转换矩阵值,格式 s0.14,范围 [-16384, 16383]。

coeff_b1

偏差 3x1 系数,s13.0 范围 [-8192, 8191]。

coeff_c21

转换矩阵值,格式 s0.14,范围 [-16384, 16383]。

coeff_c22

转换矩阵值,格式 s0.14,范围 [-8192, 8191]。

coeff_c23

转换矩阵值,格式 s0.14,范围 [-16384, 16383]。

coeff_b2

偏差 3x1 系数,s13.0 范围 [-8192, 8191]。

coeff_c31

转换矩阵值,格式 s0.14,范围 [-16384, 16383]。

coeff_c32

转换矩阵值,格式 s0.14,范围 [-8192, 8191]。

coeff_c33

转换矩阵值,格式 s0.14,范围 [-16384, 16383]。

coeff_b3

偏差 3x1 系数,s13.0 范围 [-8192, 8191]。

描述

通过将像素值乘以 3x3 矩阵并添加可选的偏差 3x1 向量,将每个像素从 RGB 转换为 YUV(Y - 亮度/亮度,UV - 色度)。以下是矩阵的默认值

4898, 9617, 1867, 0, -2410, -4732, 7143, 0, 10076, -8437, -1638, 0,

(例如,对于实数 0.299,0.299 * 2^14 变为 4898。)

struct ipu3_uapi_cds_params

色度下采样

定义:

struct ipu3_uapi_cds_params {
    __u32 ds_c00:2;
    __u32 ds_c01:2;
    __u32 ds_c02:2;
    __u32 ds_c03:2;
    __u32 ds_c10:2;
    __u32 ds_c11:2;
    __u32 ds_c12:2;
    __u32 ds_c13:2;
    __u32 ds_nf:5;
    __u32 reserved0:3;
    __u32 csc_en:1;
    __u32 uv_bin_output:1;
    __u32 reserved1:6;
};

成员

ds_c00

范围 [0, 3]

ds_c01

范围 [0, 3]

ds_c02

范围 [0, 3]

ds_c03

范围 [0, 3]

ds_c10

范围 [0, 3]

ds_c11

范围 [0, 3]

ds_c12

范围 [0, 3]

ds_c13

范围 [0, 3]

ds_nf

色度输出下采样滤波器的归一化因子,范围 0,4,默认值为 2。

reserved0

已保留

csc_en

颜色空间转换使能

uv_bin_output

0:输出 YUV 4.2.0,1:输出 YUV 4.2.2(默认)。

reserved1

已保留

描述

如果用户未提供,则上述 4x2 滤波器将使用以下默认值

1, 3, 3, 1, 1, 3, 3, 1,

struct ipu3_uapi_shd_grid_config

Bayer 阴影(变暗)校正

定义:

struct ipu3_uapi_shd_grid_config {
    __u8 width;
    __u8 height;
    __u8 block_width_log2:3;
    __u8 reserved0:1;
    __u8 block_height_log2:3;
    __u8 reserved1:1;
    __u8 grid_height_per_slice;
    __s16 x_start;
    __s16 y_start;
};

成员

宽度

网格水平尺寸,u8,[8, 128],默认值为 73

高度

网格垂直尺寸,u8,[8, 128],默认值为 56

block_width_log2

以像素计数表示的网格单元宽度的 Log2,u4,[0, 15],默认值为 5。

reserved0

已保留

block_height_log2

以像素计数表示的网格单元高度的 Log2,u4,[0, 15],默认值为 6。

reserved1

已保留

grid_height_per_slice

SHD_MAX_CELLS_PER_SET/width。(其中 SHD_MAX_CELLS_PER_SET = 146)。

x_start

传感器左上角相对于 ROI 的 X 值,s13,[-4096, 0],默认值为 0,仅负值。

y_start

传感器左上角相对于 ROI 的 Y 值,s13,[-4096, 0],默认值为 0,仅负值。

struct ipu3_uapi_shd_general_config

阴影通用配置

定义:

struct ipu3_uapi_shd_general_config {
    __u32 init_set_vrt_offst_ul:8;
    __u32 shd_enable:1;
    __u32 gain_factor:2;
    __u32 reserved:21;
};

成员

init_set_vrt_offst_ul

设置垂直偏移,y_start >> block_height_log2 % grid_height_per_slice。

shd_enable

启用阴影。

gain_factor

增益因子。移动计算的反阴影值。精度 u2。0x0 - 增益因子 [1, 5],表示不移动插值值。0x1 - 增益因子 [1, 9],表示插值移动 1。0x2 - 增益因子 [1, 17],表示插值移动 2。

已保留

已保留

描述

校正是通过将 4 个 Bayer 通道中的每一个的增益因子乘以传感器中的像素位置的函数来执行的。

struct ipu3_uapi_shd_black_level_config

黑电平校正

定义:

struct ipu3_uapi_shd_black_level_config {
    __s16 bl_r;
    __s16 bl_gr;
    __s16 bl_gb;
    __s16 bl_b;
};

成员

bl_r

绿色红色的 Bios 值。s11 范围 [-2048, 2047]。

bl_gr

绿色蓝色的 Bios 值。s11 范围 [-2048, 2047]。

bl_gb

红色的 Bios 值。s11 范围 [-2048, 2047]。

bl_b

蓝色的 Bios 值。s11 范围 [-2048, 2047]。

struct ipu3_uapi_shd_config_static

阴影配置静态

定义:

struct ipu3_uapi_shd_config_static {
    struct ipu3_uapi_shd_grid_config grid;
    struct ipu3_uapi_shd_general_config general;
    struct ipu3_uapi_shd_black_level_config black_level;
};

成员

网格

阴影网格配置 ipu3_uapi_shd_grid_config

general

阴影通用配置 ipu3_uapi_shd_general_config

black_level

阴影校正的黑电平配置,由 ipu3_uapi_shd_black_level_config 定义

struct ipu3_uapi_shd_lut

阴影增益因子查找表。

定义:

struct ipu3_uapi_shd_lut {
    struct {
        struct {
            __u16 r;
            __u16 gr;
        } r_and_gr[IPU3_UAPI_SHD_MAX_CELLS_PER_SET];
        __u8 reserved1[24];
        struct {
            __u16 gb;
            __u16 b;
        } gb_and_b[IPU3_UAPI_SHD_MAX_CELLS_PER_SET];
        __u8 reserved2[24];
    } sets[IPU3_UAPI_SHD_MAX_CFG_SETS];
};

成员

sets

array

sets.r_and_gr

红色和绿色 R 查找表。

sets.r_and_gr.r

红色阴影因子。

sets.r_and_gr.gr

绿色 R 阴影因子。

sets.reserved1

已保留

sets.gb_and_b

绿色 B 和蓝色查找表。

sets.gb_and_b.gb

绿色 B 阴影因子。

sets.gb_and_b.b

蓝色阴影因子。

sets.reserved2

已保留

描述

映射到阴影校正 LUT 寄存器集。

struct ipu3_uapi_shd_config

着色配置

定义:

struct ipu3_uapi_shd_config {
    struct ipu3_uapi_shd_config_static shd  ;
    struct ipu3_uapi_shd_lut shd_lut  ;
};

成员

shd

阴影静态配置,请参见 ipu3_uapi_shd_config_static

shd_lut

阴影查找表 ipu3_uapi_shd_lut

struct ipu3_uapi_iefd_cux2

IEFd 配置单元 2 参数

定义:

struct ipu3_uapi_iefd_cux2 {
    __u32 x0:9;
    __u32 x1:9;
    __u32 a01:9;
    __u32 b01:5;
};

成员

x0

配置单元的 X0 点,u9.0,默认值为 0。

x1

配置单元的 X1 点,u9.0,默认值为 0。

a01

配置单元的斜率 A,s4.4,默认值为 0。

b01

斜率 B,始终为 0。

描述

计算权重以混合定向和非定向降噪元素

所有 CU 输入都是无符号的,写入寄存器时将转换为带符号,即 a01 将以 s4.4 格式写入 9 位寄存器。数据精度 s4.4 表示整数部分为 4 位,小数部分为 4 位,第一位表示正值或负值。对于用户空间软件(通常是成像库),CU 斜率值的计算应基于斜率分辨率 1/16(二进制 0.0001 - 最小间隔值),斜率值范围为 [-256, +255]。这适用于 ipu3_uapi_iefd_cux6_edipu3_uapi_iefd_cux2_1ipu3_uapi_iefd_cux2_1ipu3_uapi_iefd_cux4ipu3_uapi_iefd_cux6_rad

注意

配置单元的每个实例都需要 n 个点的 X 坐标以及驱动程序基于校准参数计算的点之间的斜率 A 因子。

struct ipu3_uapi_iefd_cux6_ed

计算非定向锐化元素的强度,边缘细节 (ED) 的配置单元 6。

定义:

struct ipu3_uapi_iefd_cux6_ed {
    __u32 x0:9;
    __u32 x1:9;
    __u32 x2:9;
    __u32 reserved0:5;
    __u32 x3:9;
    __u32 x4:9;
    __u32 x5:9;
    __u32 reserved1:5;
    __u32 a01:9;
    __u32 a12:9;
    __u32 a23:9;
    __u32 reserved2:5;
    __u32 a34:9;
    __u32 a45:9;
    __u32 reserved3:14;
    __u32 b01:9;
    __u32 b12:9;
    __u32 b23:9;
    __u32 reserved4:5;
    __u32 b34:9;
    __u32 b45:9;
    __u32 reserved5:14;
};

成员

x0

点 0 的 X 坐标,u9.0,默认值为 0。

x1

点 1 的 X 坐标,u9.0,默认值为 0。

x2

点 2 的 X 坐标,u9.0,默认值为 0。

reserved0

已保留

x3

点 3 的 X 坐标,u9.0,默认值为 0。

x4

点 4 的 X 坐标,u9.0,默认值为 0。

x5

点 5 的 X 坐标,u9.0,默认值为 0。

reserved1

已保留

a01

斜率 A 点 01,s4.4,默认值为 0。

a12

斜率 A 点 12,s4.4,默认值为 0。

a23

斜率 A 点 23,s4.4,默认值为 0。

reserved2

已保留

a34

斜率 A 点 34,s4.4,默认值为 0。

a45

斜率 A 点 45,s4.4,默认值为 0。

reserved3

已保留

b01

斜率 B 点 01,s4.4,默认值为 0。

b12

斜率 B 点 12,s4.4,默认值为 0。

b23

斜率 B 点 23,s4.4,默认值为 0。

reserved4

已保留

b34

斜率 B 点 34,s4.4,默认值为 0。

b45

斜率 B 点 45,s4.4,默认值为 0。

reserved5

保留。

struct ipu3_uapi_iefd_cux2_1

计算非定向降噪元素的强度应用。

定义:

struct ipu3_uapi_iefd_cux2_1 {
    __u32 x0:9;
    __u32 x1:9;
    __u32 a01:9;
    __u32 reserved1:5;
    __u32 b01:8;
    __u32 reserved2:24;
};

成员

x0

配置单元的 X0 点,u9.0,默认值为 0。

x1

配置单元的 X1 点,u9.0,默认值为 0。

a01

配置单元的斜率 A,s4.4,默认值为 0。

reserved1

已保留

b01

配置单元的偏移量 B0,u7.0,默认值为 0。

reserved2

已保留

struct ipu3_uapi_iefd_cux4

计算非定向锐化元素的强度。

定义:

struct ipu3_uapi_iefd_cux4 {
    __u32 x0:9;
    __u32 x1:9;
    __u32 x2:9;
    __u32 reserved0:5;
    __u32 x3:9;
    __u32 a01:9;
    __u32 a12:9;
    __u32 reserved1:5;
    __u32 a23:9;
    __u32 b01:8;
    __u32 b12:8;
    __u32 reserved2:7;
    __u32 b23:8;
    __u32 reserved3:24;
};

成员

x0

配置单元的 X0 点,u9.0,默认值为 0。

x1

配置单元的 X1 点,u9.0,默认值为 0。

x2

配置单元的 X2 点,u9.0,默认值为 0。

reserved0

已保留

x3

配置单元的 X3 点,u9.0,默认值为 0。

a01

配置单元的斜率 A0,s4.4,默认值为 0。

a12

配置单元的斜率 A1,s4.4,默认值为 0。

reserved1

已保留

a23

配置单元的斜率 A2,s4.4,默认值为 0。

b01

配置单元的偏移量 B0,s7.0,默认值为 0。

b12

配置单元的偏移量 B1,s7.0,默认值为 0。

reserved2

已保留

b23

配置单元的偏移量 B2,s7.0,默认值为 0。

reserved3

已保留

struct ipu3_uapi_iefd_cux6_rad

径向配置单元 (CU)

定义:

struct ipu3_uapi_iefd_cux6_rad {
    __u32 x0:8;
    __u32 x1:8;
    __u32 x2:8;
    __u32 x3:8;
    __u32 x4:8;
    __u32 x5:8;
    __u32 reserved1:16;
    __u32 a01:16;
    __u32 a12:16;
    __u32 a23:16;
    __u32 a34:16;
    __u32 a45:16;
    __u32 reserved2:16;
    __u32 b01:10;
    __u32 b12:10;
    __u32 b23:10;
    __u32 reserved4:2;
    __u32 b34:10;
    __u32 b45:10;
    __u32 reserved5:12;
};

成员

x0

配置单元径向的 x0 点,u8.0

x1

配置单元径向的 x1 点,u8.0

x2

配置单元径向的 x2 点,u8.0

x3

配置单元径向的 x3 点,u8.0

x4

配置单元径向的 x4 点,u8.0

x5

配置单元径向的 x5 点,u8.0

reserved1

已保留

a01

配置单元径向的斜率 A,s7.8

a12

配置单元径向的斜率 A,s7.8

a23

配置单元径向的斜率 A,s7.8

a34

配置单元径向的斜率 A,s7.8

a45

配置单元径向的斜率 A,s7.8

reserved2

已保留

b01

配置单元径向的斜率 B,s9.0

b12

配置单元径向的斜率 B,s9.0

b23

配置单元径向的斜率 B,s9.0

reserved4

已保留

b34

配置单元径向的斜率 B,s9.0

b45

配置单元径向的斜率 B,s9.0

reserved5

已保留

struct ipu3_uapi_yuvp1_iefd_cfg_units

IEFd 配置单元参数

定义:

struct ipu3_uapi_yuvp1_iefd_cfg_units {
    struct ipu3_uapi_iefd_cux2 cu_1;
    struct ipu3_uapi_iefd_cux6_ed cu_ed;
    struct ipu3_uapi_iefd_cux2 cu_3;
    struct ipu3_uapi_iefd_cux2_1 cu_5;
    struct ipu3_uapi_iefd_cux4 cu_6;
    struct ipu3_uapi_iefd_cux2 cu_7;
    struct ipu3_uapi_iefd_cux4 cu_unsharp;
    struct ipu3_uapi_iefd_cux6_rad cu_radial;
    struct ipu3_uapi_iefd_cux2 cu_vssnlm;
};

成员

cu_1

计算权重以混合定向和非定向降噪元素。请参见 ipu3_uapi_iefd_cux2

cu_ed

计算非定向锐化元素的强度,请参见 ipu3_uapi_iefd_cux6_ed

cu_3

计算权重以混合定向和非定向降噪元素。A ipu3_uapi_iefd_cux2

cu_5

计算非定向降噪元素的强度应用,使用 ipu3_uapi_iefd_cux2_1

cu_6

计算非定向锐化元素的强度。请参见 ipu3_uapi_iefd_cux4

cu_7

计算权重以混合定向和非定向降噪元素。使用 ipu3_uapi_iefd_cux2

cu_unsharp

非锐化的配置单元 ipu3_uapi_iefd_cux4

cu_radial

径向的配置单元 ipu3_uapi_iefd_cux6_rad

cu_vssnlm

vssnlm 的配置单元 ipu3_uapi_iefd_cux2

struct ipu3_uapi_yuvp1_iefd_config_s

IEFd 配置

定义:

struct ipu3_uapi_yuvp1_iefd_config_s {
    __u32 horver_diag_coeff:7;
    __u32 reserved0:1;
    __u32 clamp_stitch:6;
    __u32 reserved1:2;
    __u32 direct_metric_update:5;
    __u32 reserved2:3;
    __u32 ed_horver_diag_coeff:7;
    __u32 reserved3:1;
};

成员

horver_diag_coeff

梯度补偿。与垂直/水平(0/90 度)相比,对角线(45/135 度)方向的系数应近似校正 1/sqrt(2)。

reserved0

已保留

clamp_stitch

钳位边缘值和非钳位边缘值之间拼接的斜率

reserved1

已保留

direct_metric_update

更新方向度量的系数

reserved2

已保留

ed_horver_diag_coeff

径向系数,用于补偿垂直/水平梯度计算和对角线梯度计算的不同距离(约 1/sqrt(2))

reserved3

已保留

struct ipu3_uapi_yuvp1_iefd_control

IEFd 控制

定义:

struct ipu3_uapi_yuvp1_iefd_control {
    __u32 iefd_en:1;
    __u32 denoise_en:1;
    __u32 direct_smooth_en:1;
    __u32 rad_en:1;
    __u32 vssnlm_en:1;
    __u32 reserved:27;
};

成员

iefd_en

启用 IEFd

denoise_en

启用降噪

direct_smooth_en

启用方向平滑

rad_en

启用径向更新

vssnlm_en

启用 VSSNLM 输出滤波器

已保留

已保留

struct ipu3_uapi_sharp_cfg

锐化配置

定义:

struct ipu3_uapi_sharp_cfg {
    __u32 nega_lmt_txt:13;
    __u32 reserved0:19;
    __u32 posi_lmt_txt:13;
    __u32 reserved1:19;
    __u32 nega_lmt_dir:13;
    __u32 reserved2:19;
    __u32 posi_lmt_dir:13;
    __u32 reserved3:19;
};

成员

nega_lmt_txt

纹理的负过冲的锐化限制。

reserved0

已保留

posi_lmt_txt

纹理的正过冲的锐化限制。

reserved1

已保留

nega_lmt_dir

方向(边缘)的负过冲的锐化限制。

reserved2

已保留

posi_lmt_dir

方向(边缘)的正过冲的锐化限制。

reserved3

已保留

描述

定点类型 u13.0,范围 [0, 8191]。

struct ipu3_uapi_far_w

远子组的锐化配置

定义:

struct ipu3_uapi_far_w {
    __u32 dir_shrp:7;
    __u32 reserved0:1;
    __u32 dir_dns:7;
    __u32 reserved1:1;
    __u32 ndir_dns_powr:7;
    __u32 reserved2:9;
};

成员

dir_shrp

宽直接锐化的权重,u1.6,范围 [0, 64],默认值为 64。

reserved0

已保留

dir_dns

宽直接降噪的权重,u1.6,范围 [0, 64],默认值为 0。

reserved1

已保留

ndir_dns_powr

非直接降噪的强度,精度 u1.6,范围 [0, 64],默认值为 64。

reserved2

已保留

struct ipu3_uapi_unsharp_cfg

非锐化配置

定义:

struct ipu3_uapi_unsharp_cfg {
    __u32 unsharp_weight:7;
    __u32 reserved0:1;
    __u32 unsharp_amount:9;
    __u32 reserved1:15;
};

成员

unsharp_weight

非锐化蒙版混合权重。u1.6,范围 [0, 64],默认值为 16。0 - 已禁用,64 - 仅使用非锐化。

reserved0

已保留

unsharp_amount

非锐化蒙版量,u4.5,范围 [0, 511],默认值为 0。

reserved1

已保留

struct ipu3_uapi_yuvp1_iefd_shrp_cfg

IEFd 锐度配置

定义:

struct ipu3_uapi_yuvp1_iefd_shrp_cfg {
    struct ipu3_uapi_sharp_cfg cfg;
    struct ipu3_uapi_far_w far_w;
    struct ipu3_uapi_unsharp_cfg unshrp_cfg;
};

成员

cfg

锐度配置 ipu3_uapi_sharp_cfg

far_w

宽范围配置,值由 ipu3_uapi_far_w 指定:5x5 环境分为 2 个子组,3x3 最近邻(8 个像素,称为“近”)以及周围的二阶邻域(16 个像素,称为“远”)。

unshrp_cfg

非锐度配置。ipu3_uapi_unsharp_cfg

struct ipu3_uapi_unsharp_coef0

非锐化蒙版系数

定义:

struct ipu3_uapi_unsharp_coef0 {
    __u32 c00:9;
    __u32 c01:9;
    __u32 c02:9;
    __u32 reserved:5;
};

成员

c00

Coeff11,s0.8,范围 [-255, 255],默认值为 1。

c01

Coeff12,s0.8,范围 [-255, 255],默认值为 5。

c02

Coeff13,s0.8,范围 [-255, 255],默认值为 9。

已保留

已保留

描述

通用锐化支持的可配置寄存器。

struct ipu3_uapi_unsharp_coef1

非锐化蒙版系数

定义:

struct ipu3_uapi_unsharp_coef1 {
    __u32 c11:9;
    __u32 c12:9;
    __u32 c22:9;
    __u32 reserved:5;
};

成员

c11

Coeff22,s0.8,范围 [-255, 255],默认值为 29。

c12

Coeff23,s0.8,范围 [-255, 255],默认值为 55。

c22

Coeff33,s0.8,范围 [-255, 255],默认值为 96。

已保留

已保留

struct ipu3_uapi_yuvp1_iefd_unshrp_cfg

非锐化蒙版配置

定义:

struct ipu3_uapi_yuvp1_iefd_unshrp_cfg {
    struct ipu3_uapi_unsharp_coef0 unsharp_coef0;
    struct ipu3_uapi_unsharp_coef1 unsharp_coef1;
};

成员

unsharp_coef0

非锐化系数 0 配置。请参见 ipu3_uapi_unsharp_coef0

unsharp_coef1

非锐化系数 1 配置。请参见 ipu3_uapi_unsharp_coef1

struct ipu3_uapi_radial_reset_xy

径向坐标重置

定义:

struct ipu3_uapi_radial_reset_xy {
    __s32 x:13;
    __u32 reserved0:3;
    __s32 y:13;
    __u32 reserved1:3;
};

成员

x

径向重置 x 坐标。精度 s12,[-4095, 4095],默认值为 0。

reserved0

已保留

y

径向中心 y 坐标。精度 s12,[-4095, 4095],默认值为 0。

reserved1

已保留

struct ipu3_uapi_radial_reset_x2

径向 X^2 重置

定义:

struct ipu3_uapi_radial_reset_x2 {
    __u32 x2:24;
    __u32 reserved:8;
};

成员

x2

径向重置 x^2 坐标。精度 u24,默认值为 0。

已保留

已保留

struct ipu3_uapi_radial_reset_y2

径向 Y^2 重置

定义:

struct ipu3_uapi_radial_reset_y2 {
    __u32 y2:24;
    __u32 reserved:8;
};

成员

y2

径向重置 y^2 坐标。精度 u24,默认值为 0。

已保留

已保留

struct ipu3_uapi_radial_cfg

径向配置

定义:

struct ipu3_uapi_radial_cfg {
    __u32 rad_nf:4;
    __u32 reserved0:4;
    __u32 rad_inv_r2:7;
    __u32 reserved1:17;
};

成员

rad_nf

径向。R^2 归一化因子按 2^ - (15 + scale) 缩小

reserved0

已保留

rad_inv_r2

径向 R^-2 归一化为 (0.5..1)。精度 u7,范围 [0, 127]。

reserved1

已保留

struct ipu3_uapi_rad_far_w

径向 FAR 子组

定义:

struct ipu3_uapi_rad_far_w {
    __u32 rad_dir_far_sharp_w:8;
    __u32 rad_dir_far_dns_w:8;
    __u32 rad_ndir_far_dns_power:8;
    __u32 reserved:8;
};

成员

rad_dir_far_sharp_w

宽直接锐化的权重,u1.6,范围 [0, 64],默认值为 64。

rad_dir_far_dns_w

宽直接降噪的权重,u1.6,范围 [0, 64],默认值为 0。

rad_ndir_far_dns_power

非直接锐化的强度,u1.6,范围 [0, 64],默认值为 0。

已保留

已保留

struct ipu3_uapi_cu_cfg0

半径配置单元 cfg0 寄存器

定义:

struct ipu3_uapi_cu_cfg0 {
    __u32 cu6_pow:7;
    __u32 reserved0:1;
    __u32 cu_unsharp_pow:7;
    __u32 reserved1:1;
    __u32 rad_cu6_pow:7;
    __u32 reserved2:1;
    __u32 rad_cu_unsharp_pow:6;
    __u32 reserved3:2;
};

成员

cu6_pow

CU6 的强度。非直接锐化的强度,u3.4。

reserved0

已保留

cu_unsharp_pow

非锐化蒙版的强度,u2.4。

reserved1

已保留

rad_cu6_pow

径向/角落 CU6。定向锐化的强度,u3.4。

reserved2

已保留

rad_cu_unsharp_pow

非锐化蒙版的径向强度,u2.4。

reserved3

已保留

struct ipu3_uapi_cu_cfg1

半径配置单元 cfg1 寄存器

定义:

struct ipu3_uapi_cu_cfg1 {
    __u32 rad_cu6_x1:9;
    __u32 reserved0:1;
    __u32 rad_cu_unsharp_x1:9;
    __u32 reserved1:13;
};

成员

rad_cu6_x1

配置单元 6 的 X1 点,精度 u9.0。

reserved0

已保留

rad_cu_unsharp_x1

径向/角落点的配置单元非锐化的 X1 点,精度 u9.0。

reserved1

已保留

struct ipu3_uapi_yuvp1_iefd_rad_cfg

IEFd 参数在图片平面上沿径向变化。

定义:

struct ipu3_uapi_yuvp1_iefd_rad_cfg {
    struct ipu3_uapi_radial_reset_xy reset_xy;
    struct ipu3_uapi_radial_reset_x2 reset_x2;
    struct ipu3_uapi_radial_reset_y2 reset_y2;
    struct ipu3_uapi_radial_cfg cfg;
    struct ipu3_uapi_rad_far_w rad_far_w;
    struct ipu3_uapi_cu_cfg0 cu_cfg0;
    struct ipu3_uapi_cu_cfg1 cu_cfg1;
};

成员

reset_xy

在径向计算中重置 xy 值。ipu3_uapi_radial_reset_xy

reset_x2

在径向计算中重置 x 平方值。请参见 struct ipu3_uapi_radial_reset_x2

reset_y2

在径向计算中重置 y 平方值。请参见 struct ipu3_uapi_radial_reset_y2

cfg

径向配置在 ipu3_uapi_radial_cfg 中定义

rad_far_w

宽范围径向的权重。ipu3_uapi_rad_far_w

cu_cfg0

配置单元 0。请参见 ipu3_uapi_cu_cfg0

cu_cfg1

配置单元 1。请参见 ipu3_uapi_cu_cfg1

struct ipu3_uapi_vss_lut_x

Vssnlm LUT x0/x1/x2

定义:

struct ipu3_uapi_vss_lut_x {
    __u32 vs_x0:8;
    __u32 vs_x1:8;
    __u32 vs_x2:8;
    __u32 reserved2:8;
};

成员

vs_x0

Vssnlm LUT x0,精度 u8,范围 [0, 255],默认值为 16。

vs_x1

Vssnlm LUT x1,精度 u8,范围 [0, 255],默认值为 32。

vs_x2

Vssnlm LUT x2,精度 u8,范围 [0, 255],默认值为 64。

reserved2

已保留

struct ipu3_uapi_vss_lut_y

Vssnlm LUT y0/y1/y2

定义:

struct ipu3_uapi_vss_lut_y {
    __u32 vs_y1:4;
    __u32 reserved0:4;
    __u32 vs_y2:4;
    __u32 reserved1:4;
    __u32 vs_y3:4;
    __u32 reserved2:12;
};

成员

vs_y1

Vssnlm LUT y1,精度 u4,范围 [0, 8],默认值为 1。

reserved0

已保留

vs_y2

Vssnlm LUT y2,精度 u4,范围 [0, 8],默认值为 3。

reserved1

已保留

vs_y3

Vssnlm LUT y3,精度 u4,范围 [0, 8],默认值为 8。

reserved2

已保留

struct ipu3_uapi_yuvp1_iefd_vssnlm_cfg

IEFd Vssnlm 查找表

定义:

struct ipu3_uapi_yuvp1_iefd_vssnlm_cfg {
    struct ipu3_uapi_vss_lut_x vss_lut_x;
    struct ipu3_uapi_vss_lut_y vss_lut_y;
};

成员

vss_lut_x

vss 查找表。请参见 ipu3_uapi_vss_lut_x 说明

vss_lut_y

vss 查找表。请参见 ipu3_uapi_vss_lut_y 说明

struct ipu3_uapi_yuvp1_iefd_config

IEFd 配置

定义:

struct ipu3_uapi_yuvp1_iefd_config {
    struct ipu3_uapi_yuvp1_iefd_cfg_units units;
    struct ipu3_uapi_yuvp1_iefd_config_s config;
    struct ipu3_uapi_yuvp1_iefd_control control;
    struct ipu3_uapi_yuvp1_iefd_shrp_cfg sharp;
    struct ipu3_uapi_yuvp1_iefd_unshrp_cfg unsharp;
    struct ipu3_uapi_yuvp1_iefd_rad_cfg rad;
    struct ipu3_uapi_yuvp1_iefd_vssnlm_cfg vsslnm;
};

成员

units

配置单元设置,ipu3_uapi_yuvp1_iefd_cfg_units

配置

configuration,由 ipu3_uapi_yuvp1_iefd_config_s 定义

control

控制设置,由 ipu3_uapi_yuvp1_iefd_control 定义

sharp

锐度设置,由 ipu3_uapi_yuvp1_iefd_shrp_cfg 定义

unsharp

非锐度设置,由 ipu3_uapi_yuvp1_iefd_unshrp_cfg 定义

rad

径向设置,由 ipu3_uapi_yuvp1_iefd_rad_cfg 定义

vsslnm

vsslnm 设置,由 ipu3_uapi_yuvp1_iefd_vssnlm_cfg 定义

struct ipu3_uapi_yuvp1_yds_config

Y 下采样配置

定义:

struct ipu3_uapi_yuvp1_yds_config {
    __u32 c00:2;
    __u32 c01:2;
    __u32 c02:2;
    __u32 c03:2;
    __u32 c10:2;
    __u32 c11:2;
    __u32 c12:2;
    __u32 c13:2;
    __u32 norm_factor:5;
    __u32 reserved0:4;
    __u32 bin_output:1;
    __u32 reserved1:6;
};

成员

c00

范围 [0, 3],默认值为 0x0

c01

范围 [0, 3],默认值为 0x1

c02

范围 [0, 3],默认值为 0x1

c03

范围 [0, 3],默认值为 0x0

c10

范围 [0, 3],默认值为 0x0

c11

范围 [0, 3],默认值为 0x1

c12

范围 [0, 3],默认值为 0x1

c13

范围 [0, 3],默认值为 0x0

norm_factor

归一化因子,范围 [0, 4],默认值为 2 0 - 除以 1 1 - 除以 2 2 - 除以 4 3 - 除以 8 4 - 除以 16

reserved0

已保留

bin_output

两个可选模式中的亮度通道下采样 0 - 二进制输出 4.2.0(默认),1 输出 4.2.2。

reserved1

已保留

描述

以上是色度输出下采样的 4x2 滤波器系数。

struct ipu3_uapi_yuvp1_chnr_enable_config

色度降噪使能

定义:

struct ipu3_uapi_yuvp1_chnr_enable_config {
    __u32 enable:1;
    __u32 yuv_mode:1;
    __u32 reserved0:14;
    __u32 col_size:12;
    __u32 reserved1:4;
};

成员

enable

启用/禁用色度降噪

yuv_mode

0 - YUV420, 1 - YUV422

reserved0

已保留

col_size

帧中的列数,最大宽度为 2560

reserved1

已保留

struct ipu3_uapi_yuvp1_chnr_coring_config

UV 的 Coring 阈值

定义:

struct ipu3_uapi_yuvp1_chnr_coring_config {
    __u32 u:13;
    __u32 reserved0:3;
    __u32 v:13;
    __u32 reserved1:3;
};

成员

u

U coring 电平,u0.13,范围 [0.0, 1.0],默认值为 0.0

reserved0

已保留

v

V coring 电平,u0.13,范围 [0.0, 1.0],默认值为 0.0

reserved1

已保留

struct ipu3_uapi_yuvp1_chnr_sense_gain_config

色度降噪增益

定义:

struct ipu3_uapi_yuvp1_chnr_sense_gain_config {
    __u32 vy:8;
    __u32 vu:8;
    __u32 vv:8;
    __u32 reserved0:8;
    __u32 hy:8;
    __u32 hu:8;
    __u32 hv:8;
    __u32 reserved1:8;
};

成员

vy

Y 的水平边缘的灵敏度,默认值为 100

vu

U 的水平边缘的灵敏度,默认值为 100

vv

V 的水平边缘的灵敏度,默认值为 100

reserved0

已保留

hy

Y 的垂直边缘的灵敏度,默认值为 50

hu

U 的垂直边缘的灵敏度,默认值为 50

hv

V 的垂直边缘的灵敏度,默认值为 50

reserved1

已保留

描述

所有灵敏度增益参数的精度为 u13.0,范围 [0, 8191]。

struct ipu3_uapi_yuvp1_chnr_iir_fir_config

色度 IIR/FIR 滤波器配置

定义:

struct ipu3_uapi_yuvp1_chnr_iir_fir_config {
    __u32 fir_0h:6;
    __u32 reserved0:2;
    __u32 fir_1h:6;
    __u32 reserved1:2;
    __u32 fir_2h:6;
    __u32 dalpha_clip_val:9;
    __u32 reserved2:1;
};

成员

fir_0h

水平 FIR 中中心抽头的值,范围 [0, 32],默认值为 8。

reserved0

已保留

fir_1h

水平 FIR 中距离 1 的值,范围 [0, 32],默认值为 12。

reserved1

已保留

fir_2h

水平 FIR 中距离 2 抽头的值,范围 [0, 32],默认值为 0。

dalpha_clip_val

IIR 中前一行的权重,范围 [1, 256],默认值为 0。

reserved2

已保留

struct ipu3_uapi_yuvp1_chnr_config

色度降噪配置

定义:

struct ipu3_uapi_yuvp1_chnr_config {
    struct ipu3_uapi_yuvp1_chnr_enable_config enable;
    struct ipu3_uapi_yuvp1_chnr_coring_config coring;
    struct ipu3_uapi_yuvp1_chnr_sense_gain_config sense_gain;
    struct ipu3_uapi_yuvp1_chnr_iir_fir_config iir_fir;
};

成员

enable

色度降噪使能,请参见 ipu3_uapi_yuvp1_chnr_enable_config

coring

色度降噪的 coring 配置,请参见 ipu3_uapi_yuvp1_chnr_coring_config

sense_gain

色度降噪的灵敏度配置,请参见 ipu3_uapi_yuvp1_chnr_sense_gain_config

iir_fir

色度降噪的 iir 和 fir 配置,请参见 ipu3_uapi_yuvp1_chnr_iir_fir_config

struct ipu3_uapi_yuvp1_y_ee_nr_lpf_config

亮度 (Y) 边缘增强低通滤波器系数

定义:

struct ipu3_uapi_yuvp1_y_ee_nr_lpf_config {
    __u32 a_diag:5;
    __u32 reserved0:3;
    __u32 a_periph:5;
    __u32 reserved1:3;
    __u32 a_cent:5;
    __u32 reserved2:9;
    __u32 enable:1;
};

成员

a_diag

平滑对角线系数,u5.0。

reserved0

已保留

a_periph

图像平滑外围,u5.0。

reserved1

已保留

a_cent

图像平滑中心系数,u5.0。

reserved2

已保留

enable

0:禁用 Y_EE_NR,输出 = 输入;1:启用 Y_EE_NR。

struct ipu3_uapi_yuvp1_y_ee_nr_sense_config

亮度 (Y) 边缘增强降噪灵敏度增益

定义:

struct ipu3_uapi_yuvp1_y_ee_nr_sense_config {
    __u32 edge_sense_0:13;
    __u32 reserved0:3;
    __u32 delta_edge_sense:13;
    __u32 reserved1:3;
    __u32 corner_sense_0:13;
    __u32 reserved2:3;
    __u32 delta_corner_sense:13;
    __u32 reserved3:3;
};

成员

edge_sense_0

黑暗区域中边缘的灵敏度。u13.0,默认值为 8191。

reserved0

已保留

delta_edge_sense

明亮和黑暗区域之间边缘灵敏度的差异。 u13.0,默认值为 0。

reserved1

已保留

corner_sense_0

黑暗区域中角落的灵敏度。 u13.0,默认值为 0。

reserved2

已保留

delta_corner_sense

明亮和黑暗区域之间角落灵敏度的差异。 u13.0,默认值为 8191。

reserved3

已保留

struct ipu3_uapi_yuvp1_y_ee_nr_gain_config

亮度 (Y) 边缘增强降噪增益配置

定义:

struct ipu3_uapi_yuvp1_y_ee_nr_gain_config {
    __u32 gain_pos_0:5;
    __u32 reserved0:3;
    __u32 delta_gain_posi:5;
    __u32 reserved1:3;
    __u32 gain_neg_0:5;
    __u32 reserved2:3;
    __u32 delta_gain_neg:5;
    __u32 reserved3:3;
};

成员

gain_pos_0

黑暗区域中正边缘的增益。 u5.0, [0, 16], 默认值 2。

reserved0

已保留

delta_gain_posi

明亮和黑暗区域之间正边缘的增益差异。 u5.0, [0, 16], 默认值 0。

reserved1

已保留

gain_neg_0

黑暗区域中负边缘的增益。 u5.0, [0, 16], 默认值 8。

reserved2

已保留

delta_gain_neg

明亮和黑暗区域之间负边缘的增益差异。 u5.0, [0, 16], 默认值 0。

reserved3

已保留

struct ipu3_uapi_yuvp1_y_ee_nr_clip_config

亮度 (Y) 边缘增强降噪剪裁配置

定义:

struct ipu3_uapi_yuvp1_y_ee_nr_clip_config {
    __u32 clip_pos_0:5;
    __u32 reserved0:3;
    __u32 delta_clip_posi:5;
    __u32 reserved1:3;
    __u32 clip_neg_0:5;
    __u32 reserved2:3;
    __u32 delta_clip_neg:5;
    __u32 reserved3:3;
};

成员

clip_pos_0

黑暗区域中正边缘的限制 u5,值 [0, 16],默认值 8。

reserved0

已保留

delta_clip_posi

明亮和黑暗区域之间正边缘的限制差异。 u5,值 [0, 16],默认值 8。

reserved1

已保留

clip_neg_0

黑暗区域中负边缘的限制 u5,值 [0, 16],默认值 8。

reserved2

已保留

delta_clip_neg

明亮和黑暗区域之间负边缘的限制差异。 u5,值 [0, 16],默认值 8。

reserved3

已保留

struct ipu3_uapi_yuvp1_y_ee_nr_frng_config

亮度 (Y) 边缘增强降噪边缘配置

定义:

struct ipu3_uapi_yuvp1_y_ee_nr_frng_config {
    __u32 gain_exp:4;
    __u32 reserved0:28;
    __u32 min_edge:13;
    __u32 reserved1:3;
    __u32 lin_seg_param:4;
    __u32 reserved2:4;
    __u32 t1:1;
    __u32 t2:1;
    __u32 reserved3:6;
};

成员

gain_exp

增益的公共指数,u4,[0, 8],默认值 2。

reserved0

已保留

min_edge

边缘和平滑拼接的阈值,u13。

reserved1

已保留

lin_seg_param

LinSeg 的幂,u4。

reserved2

已保留

t1

启用/禁用边缘增强的参数,u1.0,[0, 1],默认值 1。

t2

启用/禁用平滑的参数,u1.0,[0, 1],默认值 1。

reserved3

已保留

struct ipu3_uapi_yuvp1_y_ee_nr_diag_config

亮度 (Y) 边缘增强降噪对角线配置

定义:

struct ipu3_uapi_yuvp1_y_ee_nr_diag_config {
    __u32 diag_disc_g:4;
    __u32 reserved0:4;
    __u32 hvw_hor:4;
    __u32 dw_hor:4;
    __u32 hvw_diag:4;
    __u32 dw_diag:4;
    __u32 reserved1:8;
};

成员

diag_disc_g

优先考虑水平或垂直方向的对角线边缘以进行最终增强的系数。 u4.0, [1, 15], 默认值 1。

reserved0

已保留

hvw_hor

水平/垂直边缘的水平/垂直边缘增强的权重。 u2.2, [1, 15], 默认值 4。

dw_hor

水平/垂直边缘的对角线边缘增强的权重。 u2.2, [1, 15], 默认值 1。

hvw_diag

对角线边缘的水平/垂直边缘增强的权重。 u2.2, [1, 15], 默认值 1。

dw_diag

对角线边缘的对角线边缘增强的权重。 u2.2, [1, 15], 默认值 4。

reserved1

已保留

struct ipu3_uapi_yuvp1_y_ee_nr_fc_coring_config

亮度 (Y) 边缘增强降噪伪彩色校正 (FCC) 内核配置

定义:

struct ipu3_uapi_yuvp1_y_ee_nr_fc_coring_config {
    __u32 pos_0:13;
    __u32 reserved0:3;
    __u32 pos_delta:13;
    __u32 reserved1:3;
    __u32 neg_0:13;
    __u32 reserved2:3;
    __u32 neg_delta:13;
    __u32 reserved3:3;
};

成员

pos_0

黑暗区域中正边缘的增益,u13.0,[0, 16],默认值 0。

reserved0

已保留

pos_delta

明亮区域中正边缘的增益,值:pos_0 + pos_delta <=16 u13.0,默认值 0。

reserved1

已保留

neg_0

黑暗区域中负边缘的增益,u13.0,范围 [0, 16],默认值 0。

reserved2

已保留

neg_delta

明亮区域中负边缘的增益。 neg_0 + neg_delta <=16 u13.0,默认值 0。

reserved3

已保留

描述

内核是一种简单的软阈值技术。

struct ipu3_uapi_yuvp1_y_ee_nr_config

边缘增强和降噪

定义:

struct ipu3_uapi_yuvp1_y_ee_nr_config {
    struct ipu3_uapi_yuvp1_y_ee_nr_lpf_config lpf;
    struct ipu3_uapi_yuvp1_y_ee_nr_sense_config sense;
    struct ipu3_uapi_yuvp1_y_ee_nr_gain_config gain;
    struct ipu3_uapi_yuvp1_y_ee_nr_clip_config clip;
    struct ipu3_uapi_yuvp1_y_ee_nr_frng_config frng;
    struct ipu3_uapi_yuvp1_y_ee_nr_diag_config diag;
    struct ipu3_uapi_yuvp1_y_ee_nr_fc_coring_config fc_coring;
};

成员

lpf

低通滤波器配置。请参阅 ipu3_uapi_yuvp1_y_ee_nr_lpf_config

sense

灵敏度配置。请参阅 ipu3_uapi_yuvp1_y_ee_nr_sense_config

gain

增益配置,如 ipu3_uapi_yuvp1_y_ee_nr_gain_config 中定义

clip

剪裁配置,如 ipu3_uapi_yuvp1_y_ee_nr_clip_config 中定义

frng

边缘配置,如 ipu3_uapi_yuvp1_y_ee_nr_frng_config 中定义

diag

对角线边缘配置。请参阅 ipu3_uapi_yuvp1_y_ee_nr_diag_config

fc_coring

边缘控制的内核配置。请参阅 ipu3_uapi_yuvp1_y_ee_nr_fc_coring_config

struct ipu3_uapi_yuvp2_tcc_gen_control_static_config

总色彩校正通用控制配置

定义:

struct ipu3_uapi_yuvp2_tcc_gen_control_static_config {
    __u32 en:1;
    __u32 blend_shift:3;
    __u32 gain_according_to_y_only:1;
    __u32 reserved0:11;
    __s32 gamma:5;
    __u32 reserved1:3;
    __s32 delta:5;
    __u32 reserved2:3;
};

成员

en

0 - TCC 已禁用。输出 = 输入 1 - TCC 已启用。

blend_shift

混合偏移,范围 [3, 4],默认 NA。

gain_according_to_y_only

0:增益根据 YUV 计算,1:增益仅根据 Y 计算

reserved0

已保留

伽马

最终混合系数。值 [-16, 16],默认 NA。

reserved1

已保留

delta

最终混合系数。值 [-16, 16],默认 NA。

reserved2

已保留

struct ipu3_uapi_yuvp2_tcc_macc_elem_static_config

总色彩校正多轴色彩控制 (MACC) 配置

定义:

struct ipu3_uapi_yuvp2_tcc_macc_elem_static_config {
    __s32 a:12;
    __u32 reserved0:4;
    __s32 b:12;
    __u32 reserved1:4;
    __s32 c:12;
    __u32 reserved2:4;
    __s32 d:12;
    __u32 reserved3:4;
};

成员

a

2x2 MACC 转换矩阵的 a 系数。

reserved0

已保留

b

b 系数 2x2 MACC 转换矩阵。

reserved1

已保留

c

2x2 MACC 转换矩阵的 c 系数。

reserved2

已保留

d

2x2 MACC 转换矩阵的 d 系数。

reserved3

已保留

struct ipu3_uapi_yuvp2_tcc_macc_table_static_config

总色彩校正多轴色彩控制 (MACC) 表格阵列

定义:

struct ipu3_uapi_yuvp2_tcc_macc_table_static_config {
    struct ipu3_uapi_yuvp2_tcc_macc_elem_static_config entries[IPU3_UAPI_YUVP2_TCC_MACC_TABLE_ELEMENTS];
};

成员

entries

多轴色彩校正的配置,如 ipu3_uapi_yuvp2_tcc_macc_elem_static_config 中指定

struct ipu3_uapi_yuvp2_tcc_inv_y_lut_static_config

总色彩校正反 Y 查找表

定义:

struct ipu3_uapi_yuvp2_tcc_inv_y_lut_static_config {
    __u16 entries[IPU3_UAPI_YUVP2_TCC_INV_Y_LUT_ELEMENTS];
};

成员

entries

用于反 Y 估计的查找表,并使用它来估计亮度和色度之间的比率。色度通过近似色度平面上半径的绝对值 (R = sqrt(u^2+v^2) ) 来获得,亮度通过近似 1/Y 来获得。

struct ipu3_uapi_yuvp2_tcc_gain_pcwl_lut_static_config

PCWL 总色彩校正查找表

定义:

struct ipu3_uapi_yuvp2_tcc_gain_pcwl_lut_static_config {
    __u16 entries[IPU3_UAPI_YUVP2_TCC_GAIN_PCWL_LUT_ELEMENTS];
};

成员

entries

用于增益分段线性变换 (PCWL) 的查找表

struct ipu3_uapi_yuvp2_tcc_r_sqr_lut_static_config

R 平方根的总色彩校正查找表

定义:

struct ipu3_uapi_yuvp2_tcc_r_sqr_lut_static_config {
    __s16 entries[IPU3_UAPI_YUVP2_TCC_R_SQR_LUT_ELEMENTS];
};

成员

entries

用于 R 平方根估计的查找表

struct ipu3_uapi_yuvp2_tcc_static_config

总色彩校正静态

定义:

struct ipu3_uapi_yuvp2_tcc_static_config {
    struct ipu3_uapi_yuvp2_tcc_gen_control_static_config gen_control;
    struct ipu3_uapi_yuvp2_tcc_macc_table_static_config macc_table;
    struct ipu3_uapi_yuvp2_tcc_inv_y_lut_static_config inv_y_lut;
    struct ipu3_uapi_yuvp2_tcc_gain_pcwl_lut_static_config gain_pcwl;
    struct ipu3_uapi_yuvp2_tcc_r_sqr_lut_static_config r_sqr_lut;
};

成员

gen_control

总色彩校正的通用配置

macc_table

多轴色彩校正的配置

inv_y_lut

反 Y 估计的查找表

gain_pcwl

增益 PCWL 的查找表

r_sqr_lut

R 平方根估计的查找表。

struct ipu3_uapi_anr_transform_config

高级降噪变换

定义:

struct ipu3_uapi_anr_transform_config {
    __u32 enable:1;
    __u32 adaptive_treshhold_en:1;
    __u32 reserved1:30;
    __u8 reserved2[44];
    struct ipu3_uapi_anr_alpha alpha[3];
    struct ipu3_uapi_anr_beta beta[3];
    struct ipu3_uapi_anr_plane_color color[3];
    __u16 sqrt_lut[IPU3_UAPI_ANR_LUT_SIZE];
    __s16 xreset:13;
    __u16 reserved3:3;
    __s16 yreset:13;
    __u16 reserved4:3;
    __u32 x_sqr_reset:24;
    __u32 r_normfactor:5;
    __u32 reserved5:3;
    __u32 y_sqr_reset:24;
    __u32 gain_scale:8;
};

成员

enable

启用高级降噪。

adaptive_treshhold_en

在 IPU3 上,始终启用自适应阈值。

reserved1

已保留

reserved2

已保留

alpha

使用以下默认值:13, 13, 13, 13, 0, 0, 0, 0 11, 11, 11, 11, 0, 0, 0, 0 14, 14, 14, 14, 0, 0, 0, 0

beta

使用以下默认值:24, 24, 24, 24 21, 20, 20, 21 25, 25, 25, 25

color

使用 driver/media/pci/intel/ipu3-tables.c 中定义的默认值

sqrt_lut

每个元素 11 位,值 = [724 768 810 849 887 923 958 991 1024 1056 1116 1145 1173 1201 1086 1228 1254 1280 1305 1330 1355 1379 1402 1425 1448]

xreset

r^2 计算的 X 重置值。 值:col_start-X_center 约束:Xreset + FrameWdith=4095 Xreset= -4095,默认值 -1632。

reserved3

已保留

yreset

r^2 计算的 Y 重置值。 值:row_start-Y_center 约束:Yreset + FrameHeight=4095 Yreset= -4095,默认值 -1224。

reserved4

已保留

x_sqr_reset

X^2 的重置值用于 r^2 计算 值 = (Xreset)^2

r_normfactor

R 的归一化因子。默认值 14。

reserved5

已保留

y_sqr_reset

Y^2 的重置值用于 r^2 计算 值 = (Yreset)^2

gain_scale

描述阴影增益作为距图像中心距离的函数的参数。每个帧的单个值,由驱动程序加载。默认值 115。

struct ipu3_uapi_anr_stitch_pyramid

ANR 拼接金字塔

定义:

struct ipu3_uapi_anr_stitch_pyramid {
    __u32 entry0:6;
    __u32 entry1:6;
    __u32 entry2:6;
    __u32 reserved:14;
};

成员

entry0

金字塔 LUT 条目 0,范围 [0x0, 0x3f]

entry1

金字塔 LUT 条目 1,范围 [0x0, 0x3f]

entry2

金字塔 LUT 条目 2,范围 [0x0, 0x3f]

已保留

已保留

struct ipu3_uapi_anr_stitch_config

ANR 拼接配置

定义:

struct ipu3_uapi_anr_stitch_config {
    __u32 anr_stitch_en;
    __u8 reserved[44];
    struct ipu3_uapi_anr_stitch_pyramid pyramid[IPU3_UAPI_ANR_PYRAMID_SIZE];
};

成员

anr_stitch_en

启用拼接。用 1 启用。

已保留

已保留

pyramid

金字塔表,由 ipu3_uapi_anr_stitch_pyramid 定义默认值:{ 1, 3, 5 }, { 7, 7, 5 }, { 3, 1, 3 }, { 9, 15, 21 }, { 21, 15, 9 }, { 3, 5, 15 }, { 25, 35, 35 }, { 25, 15, 5 }, { 7, 21, 35 }, { 49, 49, 35 }, { 21, 7, 7 }, { 21, 35, 49 }, { 49, 35, 21 }, { 7, 5, 15 }, { 25, 35, 35 }, { 25, 15, 5 }, { 3, 9, 15 }, { 21, 21, 15 }, { 9, 3, 1 }, { 3, 5, 7 }, { 7, 5, 3}, { 1 }

struct ipu3_uapi_anr_config

ANR 配置

定义:

struct ipu3_uapi_anr_config {
    struct ipu3_uapi_anr_transform_config transform  ;
    struct ipu3_uapi_anr_stitch_config stitch  ;
};

成员

transform

高级降噪变换配置,如 ipu3_uapi_anr_transform_config 中指定

stitch

从周围的 4 个 8x8 图块创建 4x4 图块。

struct ipu3_uapi_acc_param

加速器集群参数

定义:

struct ipu3_uapi_acc_param {
    struct ipu3_uapi_bnr_static_config bnr;
    struct ipu3_uapi_bnr_static_config_green_disparity green_disparity  ;
    struct ipu3_uapi_dm_config dm  ;
    struct ipu3_uapi_ccm_mat_config ccm  ;
    struct ipu3_uapi_gamma_config gamma  ;
    struct ipu3_uapi_csc_mat_config csc  ;
    struct ipu3_uapi_cds_params cds  ;
    struct ipu3_uapi_shd_config shd  ;
    struct ipu3_uapi_yuvp1_iefd_config iefd  ;
    struct ipu3_uapi_yuvp1_yds_config yds_c0  ;
    struct ipu3_uapi_yuvp1_chnr_config chnr_c0  ;
    struct ipu3_uapi_yuvp1_y_ee_nr_config y_ee_nr  ;
    struct ipu3_uapi_yuvp1_yds_config yds  ;
    struct ipu3_uapi_yuvp1_chnr_config chnr  ;
    struct ipu3_uapi_yuvp1_yds_config yds2  ;
    struct ipu3_uapi_yuvp2_tcc_static_config tcc  ;
    struct ipu3_uapi_anr_config anr;
    struct ipu3_uapi_awb_fr_config_s awb_fr;
    struct ipu3_uapi_ae_config ae;
    struct ipu3_uapi_af_config_s af;
    struct ipu3_uapi_awb_config awb;
};

成员

bnr

用于拜耳降噪静态配置的参数。请参阅 ipu3_uapi_bnr_static_config

green_disparity

gr 和 gb 通道之间的视差静态配置。请参阅 ipu3_uapi_bnr_static_config_green_disparity

dm

去马赛克配置。请参阅 ipu3_uapi_dm_config

ccm

色彩校正矩阵。请参阅 ipu3_uapi_ccm_mat_config

伽马

伽玛校正配置。请参阅 ipu3_uapi_gamma_config

csc

色彩空间转换矩阵。请参阅 ipu3_uapi_csc_mat_config

cds

颜色下采样配置。请参阅 ipu3_uapi_cds_params

shd

镜头阴影校正配置。请参阅 ipu3_uapi_shd_config

iefd

图像增强滤波器和降噪配置。ipu3_uapi_yuvp1_iefd_config

yds_c0

Y 向下缩放器配置。ipu3_uapi_yuvp1_yds_config

chnr_c0

色度降噪配置。ipu3_uapi_yuvp1_chnr_config

y_ee_nr

Y 边缘增强和降噪配置。ipu3_uapi_yuvp1_y_ee_nr_config

yds

Y 向下缩放器配置。请参阅 ipu3_uapi_yuvp1_yds_config

chnr

色度降噪配置。请参阅 ipu3_uapi_yuvp1_chnr_config

yds2

Y 通道向下缩放器配置。请参阅 ipu3_uapi_yuvp1_yds_config

tcc

总色彩校正配置,如 struct ipu3_uapi_yuvp2_tcc_static_config 中定义

anr

高级降噪配置。请参阅 ipu3_uapi_anr_config

awb_fr

AWB 滤波器响应配置。请参阅 ipu3_uapi_awb_fr_config

ae

自动曝光配置,如 ipu3_uapi_ae_config 中指定

af

自动对焦配置。如 ipu3_uapi_af_config 中指定

awb

自动白平衡配置。如 ipu3_uapi_awb_config 中指定

描述

ACC 是指包含所有固定功能 (FF) 的硬件集群。每个 FF 实现一个特定的算法。

struct ipu3_uapi_isp_lin_vmem_params

线性化参数

定义:

struct ipu3_uapi_isp_lin_vmem_params {
    __s16 lin_lutlow_gr[IPU3_UAPI_LIN_LUT_SIZE];
    __s16 lin_lutlow_r[IPU3_UAPI_LIN_LUT_SIZE];
    __s16 lin_lutlow_b[IPU3_UAPI_LIN_LUT_SIZE];
    __s16 lin_lutlow_gb[IPU3_UAPI_LIN_LUT_SIZE];
    __s16 lin_lutdif_gr[IPU3_UAPI_LIN_LUT_SIZE];
    __s16 lin_lutdif_r[IPU3_UAPI_LIN_LUT_SIZE];
    __s16 lin_lutdif_b[IPU3_UAPI_LIN_LUT_SIZE];
    __s16 lin_lutdif_gb[IPU3_UAPI_LIN_LUT_SIZE];
};

成员

lin_lutlow_gr

用于 GR 通道插值的线性化查找表。

lin_lutlow_r

用于 R 通道插值的线性化查找表。

lin_lutlow_b

用于 B 通道插值的线性化查找表。

lin_lutlow_gb

用于 GB 通道插值的线性化查找表。 lin_lutlow_gr / lin_lutlow_r / lin_lutlow_b / lin_lutlow_gb <= LIN_MAX_VALUE - 1。

lin_lutdif_gr

lin_lutlow_gr[i+1] - lin_lutlow_gr[i]。

lin_lutdif_r

lin_lutlow_r[i+1] - lin_lutlow_r[i]。

lin_lutdif_b

lin_lutlow_b[i+1] - lin_lutlow_b[i]。

lin_lutdif_gb

lin_lutlow_gb[i+1] - lin_lutlow_gb[i]。

struct ipu3_uapi_isp_tnr3_vmem_params

时域降噪向量内存参数

定义:

struct ipu3_uapi_isp_tnr3_vmem_params {
    __u16 slope[IPU3_UAPI_ISP_TNR3_VMEM_LEN];
    __u16 reserved1[IPU3_UAPI_ISP_VEC_ELEMS - IPU3_UAPI_ISP_TNR3_VMEM_LEN];
    __u16 sigma[IPU3_UAPI_ISP_TNR3_VMEM_LEN];
    __u16 reserved2[IPU3_UAPI_ISP_VEC_ELEMS - IPU3_UAPI_ISP_TNR3_VMEM_LEN];
};

成员

slope

时域降噪插值曲线中的斜率设置。

reserved1

已保留

sigma

时域降噪插值曲线中的转折点设置。

reserved2

已保留

struct ipu3_uapi_isp_tnr3_params

时域降噪 v3 参数

定义:

struct ipu3_uapi_isp_tnr3_params {
    __u32 knee_y1;
    __u32 knee_y2;
    __u32 maxfb_y;
    __u32 maxfb_u;
    __u32 maxfb_v;
    __u32 round_adj_y;
    __u32 round_adj_u;
    __u32 round_adj_v;
    __u32 ref_buf_select;
};

成员

knee_y1

转折点 TNR3 假设 Y、U 和 V 在 Y1 处的标准偏差为 TnrY1_Sigma_Y、U 和 V。

knee_y2

转折点 TNR3 假设 Y、U 和 V 在 Y2 处的标准偏差为 TnrY2_Sigma_Y、U 和 V。

maxfb_y

Y 的最大反馈增益

maxfb_u

U 的最大反馈增益

maxfb_v

V 的最大反馈增益

round_adj_y

Y 的舍入调整

round_adj_u

U 的舍入调整

round_adj_v

V 的舍入调整

ref_buf_select

要使用的参考帧缓冲区的选择。

struct ipu3_uapi_isp_xnr3_vmem_params

极限降噪 v3 向量内存参数

定义:

struct ipu3_uapi_isp_xnr3_vmem_params {
    __u16 x[IPU3_UAPI_ISP_VEC_ELEMS];
    __u16 a[IPU3_UAPI_ISP_VEC_ELEMS];
    __u16 b[IPU3_UAPI_ISP_VEC_ELEMS];
    __u16 c[IPU3_UAPI_ISP_VEC_ELEMS];
};

成员

x

xnr3 参数。

a

xnr3 参数。

b

xnr3 参数。

c

xnr3 参数。

struct ipu3_uapi_xnr3_alpha_params

极限降噪 v3 alpha 调整参数

定义:

struct ipu3_uapi_xnr3_alpha_params {
    __u32 y0;
    __u32 u0;
    __u32 v0;
    __u32 ydiff;
    __u32 udiff;
    __u32 vdiff;
};

成员

y0

黑暗区域中 Y 范围相似性的 Sigma。

u0

黑暗区域中 U 范围相似性的 Sigma。

v0

黑暗区域中 V 范围相似性的 Sigma。

ydiff

明亮区域和黑暗区域之间 Y 的 Sigma 差异。

udiff

明亮区域和黑暗区域之间 U 的 Sigma 差异。

vdiff

明亮区域和黑暗区域之间 V 的 Sigma 差异。

struct ipu3_uapi_xnr3_coring_params

极限降噪 v3 内核参数

定义:

struct ipu3_uapi_xnr3_coring_params {
    __u32 u0;
    __u32 v0;
    __u32 udiff;
    __u32 vdiff;
};

成员

u0

黑暗区域中 U 通道的内核阈值。

v0

黑暗区域中 V 通道的内核阈值。

udiff

明亮区域和黑暗区域之间 U 通道的阈值差异。

vdiff

明亮区域和黑暗区域之间 V 通道的阈值差异。

struct ipu3_uapi_xnr3_blending_params

混合因子

定义:

struct ipu3_uapi_xnr3_blending_params {
    __u32 strength;
};

成员

strength

用于将输出与输入混合的因子。这是调整参数。值越高,XNR 操作越积极。

struct ipu3_uapi_isp_xnr3_params

极限降噪 v3 参数

定义:

struct ipu3_uapi_isp_xnr3_params {
    struct ipu3_uapi_xnr3_alpha_params alpha;
    struct ipu3_uapi_xnr3_coring_params coring;
    struct ipu3_uapi_xnr3_blending_params blending;
};

成员

alpha

xnr3 alpha 的参数。请参阅 ipu3_uapi_xnr3_alpha_params

coring

xnr3 内核的参数。请参阅 ipu3_uapi_xnr3_coring_params

blending

xnr3 混合的参数。请参阅 ipu3_uapi_xnr3_blending_params

struct ipu3_uapi_obgrid_param

光学黑电平补偿参数

定义:

struct ipu3_uapi_obgrid_param {
    __u16 gr;
    __u16 r;
    __u16 b;
    __u16 gb;
};

成员

gr

颜色 GR 的网格表值

r

颜色 R 的网格表值

b

颜色 B 的网格表值

gb

颜色 GB 的网格表值

描述

红色、绿色和蓝色通道的黑电平不同。因此,每个通道的黑电平补偿也不同。

struct ipu3_uapi_flags

指示哪些流水线需要更新的位

定义:

struct ipu3_uapi_flags {
    __u32 gdc:1;
    __u32 obgrid:1;
    __u32 reserved1:30;
    __u32 acc_bnr:1;
    __u32 acc_green_disparity:1;
    __u32 acc_dm:1;
    __u32 acc_ccm:1;
    __u32 acc_gamma:1;
    __u32 acc_csc:1;
    __u32 acc_cds:1;
    __u32 acc_shd:1;
    __u32 reserved2:2;
    __u32 acc_iefd:1;
    __u32 acc_yds_c0:1;
    __u32 acc_chnr_c0:1;
    __u32 acc_y_ee_nr:1;
    __u32 acc_yds:1;
    __u32 acc_chnr:1;
    __u32 acc_ytm:1;
    __u32 acc_yds2:1;
    __u32 acc_tcc:1;
    __u32 acc_dpc:1;
    __u32 acc_bds:1;
    __u32 acc_anr:1;
    __u32 acc_awb_fr:1;
    __u32 acc_ae:1;
    __u32 acc_af:1;
    __u32 acc_awb:1;
    __u32 reserved3:4;
    __u32 lin_vmem_params:1;
    __u32 tnr3_vmem_params:1;
    __u32 xnr3_vmem_params:1;
    __u32 tnr3_dmem_params:1;
    __u32 xnr3_dmem_params:1;
    __u32 reserved4:1;
    __u32 obgrid_param:1;
    __u32 reserved5:25;
};

成员

gdc

0 = 无更新,1 = 更新。

obgrid

0 = 无更新,1 = 更新。

reserved1

未使用。

acc_bnr

0 = 无更新,1 = 更新。

acc_green_disparity

0 = 无更新,1 = 更新。

acc_dm

0 = 无更新,1 = 更新。

acc_ccm

0 = 无更新,1 = 更新。

acc_gamma

0 = 无更新,1 = 更新。

acc_csc

0 = 无更新,1 = 更新。

acc_cds

0 = 无更新,1 = 更新。

acc_shd

0 = 无更新,1 = 更新。

reserved2

未使用。

acc_iefd

0 = 无更新,1 = 更新。

acc_yds_c0

0 = 无更新,1 = 更新。

acc_chnr_c0

0 = 无更新,1 = 更新。

acc_y_ee_nr

0 = 无更新,1 = 更新。

acc_yds

0 = 无更新,1 = 更新。

acc_chnr

0 = 无更新,1 = 更新。

acc_ytm

0 = 无更新,1 = 更新。

acc_yds2

0 = 无更新,1 = 更新。

acc_tcc

0 = 无更新,1 = 更新。

acc_dpc

0 = 无更新,1 = 更新。

acc_bds

0 = 无更新,1 = 更新。

acc_anr

0 = 无更新,1 = 更新。

acc_awb_fr

0 = 无更新,1 = 更新。

acc_ae

0 = 无更新,1 = 更新。

acc_af

0 = 无更新,1 = 更新。

acc_awb

0 = 无更新,1 = 更新。

reserved3

未使用。

lin_vmem_params

0 = 无更新,1 = 更新。

tnr3_vmem_params

0 = 无更新,1 = 更新。

xnr3_vmem_params

0 = 无更新,1 = 更新。

tnr3_dmem_params

0 = 无更新,1 = 更新。

xnr3_dmem_params

0 = 无更新,1 = 更新。

reserved4

未使用。

obgrid_param

0 = 无更新,1 = 更新。

reserved5

未使用。

struct ipu3_uapi_params

V4L2_META_FMT_IPU3_PARAMS

定义:

struct ipu3_uapi_params {
    struct ipu3_uapi_flags use  ;
    struct ipu3_uapi_acc_param acc_param;
    struct ipu3_uapi_isp_lin_vmem_params lin_vmem_params;
    struct ipu3_uapi_isp_tnr3_vmem_params tnr3_vmem_params;
    struct ipu3_uapi_isp_xnr3_vmem_params xnr3_vmem_params;
    struct ipu3_uapi_isp_tnr3_params tnr3_dmem_params;
    struct ipu3_uapi_isp_xnr3_params xnr3_dmem_params;
    struct ipu3_uapi_obgrid_param obgrid_param;
};

成员

use

选择要应用的参数,请参阅 ipu3_uapi_flags

acc_param

ACC 参数,如 ipu3_uapi_acc_param 中指定

lin_vmem_params

线性化 VMEM,如 ipu3_uapi_isp_lin_vmem_params 中指定

tnr3_vmem_params

tnr3 VMEM,如 ipu3_uapi_isp_tnr3_vmem_params 中指定

xnr3_vmem_params

xnr3 VMEM,如 ipu3_uapi_isp_xnr3_vmem_params 中指定

tnr3_dmem_params

tnr3 DMEM,如 ipu3_uapi_isp_tnr3_params 中指定

xnr3_dmem_params

xnr3 DMEM,如 ipu3_uapi_isp_xnr3_params 中指定

obgrid_param

obgrid 参数,如 ipu3_uapi_obgrid_param 中指定

描述

视频队列“parameters”的格式为 V4L2_META_FMT_IPU3_PARAMS。这是使用 V4L2_BUF_TYPE_META_OUTPUT 的“单平面”v4l2_meta_format。

下面定义的 struct ipu3_uapi_params 包含许多参数,ipu3_uapi_flags 选择要应用的参数。