已合并
aipp新增CSC色域转换 #765
jinyijian创建于 4月21日
aipp新增CSC色域转换 #765
已合并
jinyijian创建于 4月21日
jinyijian成员
4月21日

描述

新增色域转换能力:
YUV420SP_U8转YUV444
YUV420SP_U8转YVU444
RGB888_U8转BGR
RGB888_U8转YVU444
BGR888_U8转RGB
BGR888_U8转BGR
XRGB8888_U8转YUV444
XRGB8888_U8转YVU444
XRGB8888_U8转GRAY
XBGR8888_U8转GRAY
RGBX8888_U8转GRAY
BGRX8888_U8转GRAY
YUV400_U8转GRAY

关联的Issue

331

测试

本地自验证
【色域转换】
YUV420SP_U8转YUV444

aipp_op {
    aipp_mode: static
    input_format : YUV420SP_U8
    csc_switch : false
    rbuv_swap_switch : false
}

YUV420SP_U8转YVU444

aipp_op {
    aipp_mode: static
    input_format : YUV420SP_U8
    csc_switch : false
    rbuv_swap_switch : true
}

RGB888_U8转RGB

aipp_op {
    aipp_mode: static
    input_format : RGB888_U8
    csc_switch : false
    rbuv_swap_switch : false
}

RGB888_U8转YVU444

aipp_op {
    aipp_mode: static
    input_format : RGB8888_U8
    csc_switch : true
    rbuv_swap_switch : false
    matrix_r0c0 : 77
    matrix_r0c1 : 150
    matrix_r0c2 : 29
    matrix_r1c0 : 128
    matrix_r1c1 : -107
    matrix_r1c2 : -21
    matrix_r2c0 : -43
    matrix_r2c1 : -85
    matrix_r2c2 : 128
    output_bias_0 : 0
    output_bias_1 : 128
    output_bias_2 : 128
}

BGR888_U8转RGB

aipp_op {
    aipp_mode: static
    input_format : RGB888_U8
    csc_switch : false
    rbuv_swap_switch : true
}

BGR888_U8转BGR

aipp_op {
    aipp_mode: static
    input_format : RGB888_U8
    csc_switch : false
    rbuv_swap_switch : false
}

XRGB8888_U8转YUV444

aipp_op {
    aipp_mode: static
    input_format : XRGB8888_U8
    csc_switch : true
    rbuv_swap_switch : false
    ax_swap_switch : true
    matrix_r0c0 : 77
    matrix_r0c1 : 150
    matrix_r0c2 : 29
    matrix_r1c0 : -43
    matrix_r1c1 : -85
    matrix_r1c2 : 128
    matrix_r2c0 : 128
    matrix_r2c1 : -107
    matrix_r2c2 : -21
    output_bias_0 : 0
    output_bias_1 : 128
    output_bias_2 : 128
}

XRGB8888_U8转YVU444

aipp_op {
    aipp_mode: static
    input_format : XRGB8888_U8
    csc_switch : true
    rbuv_swap_switch : false
    ax_swap_switch : true
    matrix_r0c0 : 77
    matrix_r0c1 : 150
    matrix_r0c2 : 29
    matrix_r1c0 : 128
    matrix_r1c1 : -107
    matrix_r1c2 : -21
    matrix_r2c0 : -43
    matrix_r2c1 : -85
    matrix_r2c2 : 128
    output_bias_0 : 0
    output_bias_1 : 128
    output_bias_2 : 128
}

XRGB8888_U8转GRAY

aipp_op {
    aipp_mode: static
    input_format : XRGB8888_U8
    csc_switch : true
    rbuv_swap_switch : false
    ax_swap_switch : true
    matrix_r0c0 : 76
    matrix_r0c1 : 150
    matrix_r0c2 : 30
    matrix_r1c0 : 0
    matrix_r1c1 : 0
    matrix_r1c2 : 0
    matrix_r2c0 : 0
    matrix_r2c1 : 0
    matrix_r2c2 : 0
    output_bias_0 : 0
    output_bias_1 : 0
    output_bias_2 : 0
}

XBGR8888_U8转GRAY

aipp_op {
    aipp_mode: static
    input_format : XRGB8888_U8
    csc_switch : true
    rbuv_swap_switch : true
    ax_swap_switch : true
    matrix_r0c0 : 76
    matrix_r0c1 : 150
    matrix_r0c2 : 30
    matrix_r1c0 : 0
    matrix_r1c1 : 0
    matrix_r1c2 : 0
    matrix_r2c0 : 0
    matrix_r2c1 : 0
    matrix_r2c2 : 0
    output_bias_0 : 0
    output_bias_1 : 0
    output_bias_2 : 0
}

RGBX8888_U8转GRAY

aipp_op {
    aipp_mode: static
    input_format : XRGB8888_U8
    csc_switch : true
    rbuv_swap_switch : false
    ax_swap_switch : false
    matrix_r0c0 : 76
    matrix_r0c1 : 150
    matrix_r0c2 : 30
    matrix_r1c0 : 0
    matrix_r1c1 : 0
    matrix_r1c2 : 0
    matrix_r2c0 : 0
    matrix_r2c1 : 0
    matrix_r2c2 : 0
    output_bias_0 : 0
    output_bias_1 : 0
    output_bias_2 : 0
}

BGRX8888_U8转GRAY

aipp_op {
    aipp_mode: static
    input_format : XRGB8888_U8
    csc_switch : true
    rbuv_swap_switch : true
    ax_swap_switch : false
    matrix_r0c0 : 76
    matrix_r0c1 : 150
    matrix_r0c2 : 30
    matrix_r1c0 : 0
    matrix_r1c1 : 0
    matrix_r1c2 : 0
    matrix_r2c0 : 0
    matrix_r2c1 : 0
    matrix_r2c2 : 0
    output_bias_0 : 0
    output_bias_1 : 0
    output_bias_2 : 0
}

YUV400_U8转GRAY

aipp_op {
    aipp_mode: static
    input_format : YUV400_U8
    csc_switch : false  
}

文档更新

类型标签

likedislike
Pull Request已成功合入, 合并人@CANN-robot
(感谢 jinyijian 的贡献)
Jjinyijian成员
4月21日 创建了 pull request,commit 9c2a1ee5
Jjinyijian成员
4月21日 关联了issue:[Requirement|需求建议]: AIPP算子新增13种csc类型转换支持
CANN-robot
CANN-robot成员
4月21日 评论:

Thanks for your pull-request.
The full list of commands accepted by me can be found at here
You can get sig-info at here


PR Approval Progress

Congratulations! All modules have met the lgtm and approve requirements.

Module Approval Details

module lgtm status approve status
*/*/README.md 周奇龙, 杜慧萍, 刘伟, 周文芳 (4/2) 周文芳 (1/1)
repo-cann/ops-cv 周奇龙, 刘伟 (2/2) 周奇龙 (1/1)

💡 Tip:

  • Committer can comment /approve or /lgtm
  • Commenting /approve implies both code review (lgtm) and intent to merge (approve)

CLA Signature Pass

jinyijian, thanks for your pull request. All authors of the commits have signed the CLA. 👍

likedislike
CANN-robotCANN-robot成员
4月21日 将zhou-qilong,rxtfeng,loov1,zl_hw,liu-wei,llimwang,gubaocheng设为评审人
CANN-robotCANN-robot成员
4月21日 添加了label:cann-cla/no
此处折叠了115条消息 查看更多
CANN-robot
CANN-robot成员
4月24日 评论:

The following users do not have permission to comment /lgtm or /approve on any module in this PR:
wangcimeng

likedislike
CANN-robotCANN-robot成员
4月24日 添加了label:lgtm
CANN-robot
CANN-robot成员
4月24日 评论:

Review Guide

This pull-request passes review.
Committers who wrote a comment of /approve are: 周奇龙, 周文芳.
Reviewers who wrote a comment of /lgtm are: 刘伟, 周奇龙, 杜慧萍, 周文芳.

likedislike
CANN-robotCANN-robot成员
4月24日 关闭了关联的issue
CANN-robotCANN-robot成员
4月24日 合入了pull request