CSC Configuration

AIPP provides CSC, which is a more convenient method to covert input image formats into those required by your model. Once the input and output image formats have been determined for AIPP, the CSC parameters are also determined. The values for matrix_r*c* are fixed and need not to be adjusted.

For example, convert JPEG images (such as .jpg, .jpeg, .JPG, or .JPEG) into RGB format, or convert YUV data decoded from a video into RGB format. Videos fall into the following two standards: BT.601, a standard for standard-definition television (SDTV) and BT.709, a standard for high-definition television (HDTV). They can be subdivided into narrow and wide ranges.

The representation range of the narrow range is , and that of the wide range is .

For details about how to determine the standard of the input data, see How Do I Determine the Video Stream Format Standard When I Perform CSC on a Model Using AIPP?.

YUV-to-RGB conversion can be regarded as a matrix multiplication operation using the following formula. The transformation matrix consists of the parameters and biases to be configured.

# YUV2BGR conversion:
| B |   | matrix_r0c0 matrix_r0c1 matrix_r0c2 | | Y - input_bias_0 |
| G | = | matrix_r1c0 matrix_r1c1 matrix_r1c2 | | U - input_bias_1 | >> 8
| R |   | matrix_r2c0 matrix_r2c1 matrix_r2c2 | | V - input_bias_2 |

For images or videos (in various color coding formats such as YUV420SP_U8 and RGB888_U8) input to the model, the following typical CSC configurations are provided, including those for JPEG, BT.601 Narrow, BT.601 Wide, BT.709 Narrow, and BT.709 Wide.

DVPP processing does not change data color space. For example, if BT.709 data is fed to DVPP, the DVPP result data will be in the same format.

YUV420SP_U8 to YUV444

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

YUV420SP_U8 to YVU444

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

YUV420SP_U8 to RGB

  • JPEG image input

    JPEG

    aipp_op {
        aipp_mode: static
        input_format : YUV420SP_U8
        csc_switch : true
        rbuv_swap_switch : false
        matrix_r0c0 : 256
        matrix_r0c1 : 0
        matrix_r0c2 : 359
        matrix_r1c0 : 256
        matrix_r1c1 : -88
        matrix_r1c2 : -183
        matrix_r2c0 : 256
        matrix_r2c1 : 454
        matrix_r2c2 : 0
        input_bias_0 : 0
        input_bias_1 : 128
        input_bias_2 : 128
    }
  • BT.601 Narrow video input

    BT.601 Narrow

    aipp_op {
        aipp_mode: static
        input_format : YUV420SP_U8
        csc_switch : true
        rbuv_swap_switch : false
        matrix_r0c0 : 298
        matrix_r0c1 : 0
        matrix_r0c2 : 409
        matrix_r1c0 : 298
        matrix_r1c1 : -100
        matrix_r1c2 : -208
        matrix_r2c0 : 298
        matrix_r2c1 : 516
        matrix_r2c2 : 0
        input_bias_0 : 16
        input_bias_1 : 128
        input_bias_2 : 128
    }
  • BT.601 Wide video input

    BT.601 Wide

    aipp_op {
        aipp_mode: static
        input_format : YUV420SP_U8
        csc_switch : true
        rbuv_swap_switch : false
        matrix_r0c0 : 256
        matrix_r0c1 : 0
        matrix_r0c2 : 359
        matrix_r1c0 : 256
        matrix_r1c1 : -88
        matrix_r1c2 : -183
        matrix_r2c0 : 256
        matrix_r2c1 : 454
        matrix_r2c2 : 0
        input_bias_0 : 0
        input_bias_1 : 128
        input_bias_2 : 128
    }
  • BT.709 Narrow video input

    BT.709 Narrow

    aipp_op {
        aipp_mode: static
        input_format : YUV420SP_U8
        csc_switch : true
        rbuv_swap_switch : false
        matrix_r0c0 : 298
        matrix_r0c1 : 0
        matrix_r0c2 : 459
        matrix_r1c0 : 298
        matrix_r1c1 : -55
        matrix_r1c2 : -136
        matrix_r2c0 : 298
        matrix_r2c1 : 541
        matrix_r2c2 : 0
        input_bias_0 : 16
        input_bias_1 : 128
        input_bias_2 : 128
    }
  • BT.709 Wide video input

    BT.709 Wide

    aipp_op {
        aipp_mode: static
        input_format : YUV420SP_U8
        csc_switch : true
        rbuv_swap_switch : false
        matrix_r0c0 : 256
        matrix_r0c1 : 0
        matrix_r0c2 : 403
        matrix_r1c0 : 256
        matrix_r1c1 : -48
        matrix_r1c2 : -120
        matrix_r2c0 : 256
        matrix_r2c1 : 475
        matrix_r2c2 : 0
        input_bias_0 : 0
        input_bias_1 : 128
        input_bias_2 : 128
    }

YUV420SP_U8 to BGR

  • JPEG image input

    JPEG

    aipp_op {
        aipp_mode: static
        input_format : YUV420SP_U8
        csc_switch : true
        rbuv_swap_switch : false
        matrix_r0c0 : 256
        matrix_r0c1 : 454
        matrix_r0c2 : 0
        matrix_r1c0 : 256
        matrix_r1c1 : -88
        matrix_r1c2 : -183
        matrix_r2c0 : 256
        matrix_r2c1 : 0
        matrix_r2c2 : 359
        input_bias_0 : 0
        input_bias_1 : 128
        input_bias_2 : 128
    }
  • BT.601 Narrow video input

    BT.601 Narrow

    aipp_op {
        aipp_mode: static
        input_format : YUV420SP_U8
        csc_switch : true
        rbuv_swap_switch : false
        matrix_r0c0 : 298
        matrix_r0c1 : 516
        matrix_r0c2 : 0
        matrix_r1c0 : 298
        matrix_r1c1 : -100
        matrix_r1c2 : -208
        matrix_r2c0 : 298
        matrix_r2c1 : 0
        matrix_r2c2 : 409
        input_bias_0 : 16
        input_bias_1 : 128
        input_bias_2 : 128
    }
  • BT.601 Wide video input

    BT.601 Wide

    aipp_op {
        aipp_mode: static
        input_format : YUV420SP_U8
        csc_switch : true
        rbuv_swap_switch : false
        matrix_r0c0 : 256
        matrix_r0c1 : 454
        matrix_r0c2 : 0
        matrix_r1c0 : 256
        matrix_r1c1 : -88
        matrix_r1c2 : -183
        matrix_r2c0 : 256
        matrix_r2c1 : 0
        matrix_r2c2 : 359
        input_bias_0 : 0
        input_bias_1 : 128
        input_bias_2 : 128
    }
  • BT.709 Narrow video input

    BT.709 Narrow

    aipp_op {
        aipp_mode: static
        input_format : YUV420SP_U8
        csc_switch : true
        rbuv_swap_switch : false
        matrix_r0c0 : 298
        matrix_r0c1 : 541
        matrix_r0c2 : 0
        matrix_r1c0 : 298
        matrix_r1c1 : -55
        matrix_r1c2 : -136
        matrix_r2c0 : 298
        matrix_r2c1 : 0
        matrix_r2c2 : 459
        input_bias_0 : 16
        input_bias_1 : 128
        input_bias_2 : 128
    }
  • BT.709 Wide video input

    BT.709 Wide

    aipp_op {
        aipp_mode: static
        input_format : YUV420SP_U8
        csc_switch : true
        rbuv_swap_switch : false
        matrix_r0c0 : 256
        matrix_r0c1 : 475
        matrix_r0c2 : 0
        matrix_r1c0 : 256
        matrix_r1c1 : -48
        matrix_r1c2 : -120
        matrix_r2c0 : 256
        matrix_r2c1 : 0
        matrix_r2c2 : 403
        input_bias_0 : 0
        input_bias_1 : 128
        input_bias_2 : 128
    }

YUV420SP_U8 to Gray

aipp_op {
    aipp_mode: static
    input_format : YUV420SP_U8
    csc_switch : true
    rbuv_swap_switch : false
    matrix_r0c0 : 256
    matrix_r0c1 : 0
    matrix_r0c2 : 0
    matrix_r1c0 : 0
    matrix_r1c1 : 0
    matrix_r1c2 : 0
    matrix_r2c0 : 0
    matrix_r2c1 : 0
    matrix_r2c2 : 0
    input_bias_0 : 0
    input_bias_1 : 0
    input_bias_2 : 0
}

YVU420SP_U8 to RGB

  • JPEG image input

    JPEG

    aipp_op {
        aipp_mode: static
        input_format : YUV420SP_U8
        csc_switch : true
        rbuv_swap_switch : true
        matrix_r0c0 : 256
        matrix_r0c1 : 0
        matrix_r0c2 : 359
        matrix_r1c0 : 256
        matrix_r1c1 : -88
        matrix_r1c2 : -183
        matrix_r2c0 : 256
        matrix_r2c1 : 454
        matrix_r2c2 : 0
        input_bias_0 : 0
        input_bias_1 : 128
        input_bias_2 : 128
    }
  • BT.601 Narrow video input

    BT.601 Narrow

    aipp_op {
        aipp_mode: static
        input_format : YUV420SP_U8
        csc_switch : true
        rbuv_swap_switch : true
        matrix_r0c0 : 298
        matrix_r0c1 : 0
        matrix_r0c2 : 409
        matrix_r1c0 : 298
        matrix_r1c1 : -100
        matrix_r1c2 : -208
        matrix_r2c0 : 298
        matrix_r2c1 : 516
        matrix_r2c2 : 0
        input_bias_0 : 16
        input_bias_1 : 128
        input_bias_2 : 128
    }
  • BT.601 Wide video input

    BT.601 Wide

    aipp_op {
        aipp_mode: static
        input_format : YUV420SP_U8
        csc_switch : true
        rbuv_swap_switch : true
        matrix_r0c0 : 256
        matrix_r0c1 : 0
        matrix_r0c2 : 359
        matrix_r1c0 : 256
        matrix_r1c1 : -88
        matrix_r1c2 : -183
        matrix_r2c0 : 256
        matrix_r2c1 : 454
        matrix_r2c2 : 0
        input_bias_0 : 0
        input_bias_1 : 128
        input_bias_2 : 128
    }
  • BT.709 Narrow video input

    BT.709 Narrow

    aipp_op {
        aipp_mode: static
        input_format : YUV420SP_U8
        csc_switch : true
        rbuv_swap_switch : true
        matrix_r0c0 : 298
        matrix_r0c1 : 0
        matrix_r0c2 : 459
        matrix_r1c0 : 298
        matrix_r1c1 : -55
        matrix_r1c2 : -136
        matrix_r2c0 : 298
        matrix_r2c1 : 541
        matrix_r2c2 : 0
        input_bias_0 : 16
        input_bias_1 : 128
        input_bias_2 : 128
    }
  • BT.709 Wide video input

    BT.709 Wide

    aipp_op {
        aipp_mode: static
        input_format : YUV420SP_U8
        csc_switch : true
        rbuv_swap_switch : true
        matrix_r0c0 : 256
        matrix_r0c1 : 0
        matrix_r0c2 : 403
        matrix_r1c0 : 256
        matrix_r1c1 : -48
        matrix_r1c2 : -120
        matrix_r2c0 : 256
        matrix_r2c1 : 475
        matrix_r2c2 : 0
        input_bias_0 : 0
        input_bias_1 : 128
        input_bias_2 : 128
    }

YVU420SP_U8 to BGR

  • JPEG image input

    JPEG

    aipp_op {
        aipp_mode: static
        input_format : YUV420SP_U8
        csc_switch : true
        rbuv_swap_switch : true
        matrix_r0c0 : 256
        matrix_r0c1 : 454
        matrix_r0c2 : 0
        matrix_r1c0 : 256
        matrix_r1c1 : -88
        matrix_r1c2 : -183
        matrix_r2c0 : 256
        matrix_r2c1 : 0
        matrix_r2c2 : 359
        input_bias_0 : 0
        input_bias_1 : 128
        input_bias_2 : 128
    }
  • BT.601 Narrow video input

    BT.601 Narrow

    aipp_op {
        aipp_mode: static
        input_format : YUV420SP_U8
        csc_switch : true
        rbuv_swap_switch : true
        matrix_r0c0 : 298
        matrix_r0c1 : 516
        matrix_r0c2 : 0
        matrix_r1c0 : 298
        matrix_r1c1 : -100
        matrix_r1c2 : -208
        matrix_r2c0 : 298
        matrix_r2c1 : 0
        matrix_r2c2 : 409
        input_bias_0 : 16
        input_bias_1 : 128
        input_bias_2 : 128
    }
  • BT.601 Wide video input

    BT.601 Wide

    aipp_op {
        aipp_mode: static
        input_format : YUV420SP_U8
        csc_switch : true
        rbuv_swap_switch : true
        matrix_r0c0 : 256
        matrix_r0c1 : 454
        matrix_r0c2 : 0
        matrix_r1c0 : 256
        matrix_r1c1 : -88
        matrix_r1c2 : -183
        matrix_r2c0 : 256
        matrix_r2c1 : 0
        matrix_r2c2 : 359
        input_bias_0 : 0
        input_bias_1 : 128
        input_bias_2 : 128
    }
  • BT.709 Narrow video input

    BT.709 Narrow

    aipp_op {
        aipp_mode: static
        input_format : YUV420SP_U8
        csc_switch : true
        rbuv_swap_switch : true
        matrix_r0c0 : 298
        matrix_r0c1 : 541
        matrix_r0c2 : 0
        matrix_r1c0 : 298
        matrix_r1c1 : -55
        matrix_r1c2 : -136
        matrix_r2c0 : 298
        matrix_r2c1 : 0
        matrix_r2c2 : 459
        input_bias_0 : 16
        input_bias_1 : 128
        input_bias_2 : 128
    }
  • BT.709 Wide video input

    BT.709 Wide

    aipp_op {
        aipp_mode: static
        input_format : YUV420SP_U8
        csc_switch : true
        rbuv_swap_switch : true
        matrix_r0c0 : 256
        matrix_r0c1 : 475
        matrix_r0c2 : 0
        matrix_r1c0 : 256
        matrix_r1c1 : -48
        matrix_r1c2 : -120
        matrix_r2c0 : 256
        matrix_r2c1 : 0
        matrix_r2c2 : 403
        input_bias_0 : 0
        input_bias_1 : 128
        input_bias_2 : 128
    }

RGB888_U8 to RGB

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

RGB888_U8 to BGR

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

RGB888_U8 to YUV444

  • JPEG image input

    JPEG

    aipp_op {
        aipp_mode: static
        input_format : RGB888_U8
        csc_switch : true
        rbuv_swap_switch : false
        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
    }
  • BT.601 Narrow video input

    BT.601 Narrow

    aipp_op {
        aipp_mode: static
        input_format : RGB888_U8
        csc_switch : true
        rbuv_swap_switch : false
        matrix_r0c0 : 66
        matrix_r0c1 : 129
        matrix_r0c2 : 25
        matrix_r1c0 : -38
        matrix_r1c1 : -74
        matrix_r1c2 : 112
        matrix_r2c0 : 112
        matrix_r2c1 : -94
        matrix_r2c2 : -18
        output_bias_0 : 16
        output_bias_1 : 128
        output_bias_2 : 128
    }
  • BT.601 Wide video input

    BT.601 Wide

    aipp_op {
        aipp_mode: static
        input_format : RGB888_U8
        csc_switch : true
        rbuv_swap_switch : false
        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
    }
  • BT.709 Narrow video input

    BT.709 Narrow

    aipp_op {
        aipp_mode: static
        input_format : RGB888_U8
        csc_switch : true
        rbuv_swap_switch : false
        matrix_r0c0 : 47
        matrix_r0c1 : 157
        matrix_r0c2 : 16
        matrix_r1c0 : -26
        matrix_r1c1 : -87
        matrix_r1c2 : 112
        matrix_r2c0 : 112
        matrix_r2c1 : -102
        matrix_r2c2 : -10
        output_bias_0 : 16
        output_bias_1 : 128
        output_bias_2 : 128
    }
  • BT.709 Wide video input

    BT.709 Wide

    aipp_op {
        aipp_mode: static
        input_format : RGB888_U8
        csc_switch : true
        rbuv_swap_switch : false
        matrix_r0c0 : 55
        matrix_r0c1 : 183
        matrix_r0c2 : 19
        matrix_r1c0 : -29
        matrix_r1c1 : -99
        matrix_r1c2 : 128
        matrix_r2c0 : 128
        matrix_r2c1 : -116
        matrix_r2c2 : -12
        output_bias_0 : 0
        output_bias_1 : 128
        output_bias_2 : 128
    }

RGB888_U8 to YVU444

  • JPEG image input

    JPEG

    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
    }
  • BT.601 Narrow video input

    BT.601 Narrow

    aipp_op {
        aipp_mode: static
        input_format : RGB888_U8
        csc_switch : true
        rbuv_swap_switch : false
        matrix_r0c0 : 66
        matrix_r0c1 : 129
        matrix_r0c2 : 25
        matrix_r1c0 : 112
        matrix_r1c1 : -94
        matrix_r1c2 : -18
        matrix_r2c0 : -38
        matrix_r2c1 : -74
        matrix_r2c2 : 112
        output_bias_0 : 16
        output_bias_1 : 128
        output_bias_2 : 128
    }
  • BT.601 Wide video input

    BT.601 Wide

    aipp_op {
        aipp_mode: static
        input_format : RGB888_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
    }
  • BT.709 Narrow video input

    BT.709 Narrow

    aipp_op {
        aipp_mode: static
        input_format : RGB888_U8
        csc_switch : true
        rbuv_swap_switch : false
        matrix_r0c0 : 47
        matrix_r0c1 : 157
        matrix_r0c2 : 16
        matrix_r1c0 : 112
        matrix_r1c1 : -102
        matrix_r1c2 : -10
        matrix_r2c0 : -26
        matrix_r2c1 : -87
        matrix_r2c2 : 112
        output_bias_0 : 16
        output_bias_1 : 128
        output_bias_2 : 128
    }
  • BT.709 Wide video input

    BT.709 Wide

    aipp_op {
        aipp_mode: static
        input_format : RGB888_U8
        csc_switch : true
        rbuv_swap_switch : false
        matrix_r0c0 : 55
        matrix_r0c1 : 183
        matrix_r0c2 : 19
        matrix_r1c0 : 128
        matrix_r1c1 : -116
        matrix_r1c2 : -12
        matrix_r2c0 : -29
        matrix_r2c1 : -99
        matrix_r2c2 : 128
        output_bias_0 : 0
        output_bias_1 : 128
        output_bias_2 : 128
    }

RGB888_U8 to Gray

aipp_op {
    aipp_mode: static
    input_format : RGB888_U8
    csc_switch : true
    rbuv_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
}

BGR888_U8 to Gray

aipp_op {
    aipp_mode: static
    input_format : RGB888_U8
    csc_switch : true
    rbuv_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
}

BGR888_U8 to RGB

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

BGR888_U8 to BGR

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

XRGB8888_U8 to RGB

aipp_op {
    aipp_mode: static
    input_format : XRGB8888_U8
    csc_switch : false
    rbuv_swap_switch : false
    ax_swap_switch : true
}

XRGB8888_U8 to BGR

aipp_op {
aipp_mode : static
input_format : XRGB8888_U8
csc_switch : false
rbuv_swap_switch : true
ax_swap_switch : true
}

XRGB8888_U8 to YUV444

  • JPEG image input

    JPEG

    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
    }
  • BT.601 Narrow video input

    BT.601 Narrow

    aipp_op {
        aipp_mode: static
        input_format : XRGB8888_U8
        csc_switch : true
        rbuv_swap_switch : false
        ax_swap_switch : true
        matrix_r0c0 : 66
        matrix_r0c1 : 129
        matrix_r0c2 : 25
        matrix_r1c0 : -38
        matrix_r1c1 : -74
        matrix_r1c2 : 112
        matrix_r2c0 : 112
        matrix_r2c1 : -94
        matrix_r2c2 : -18
        output_bias_0 : 16
        output_bias_1 : 128
        output_bias_2 : 128
    }
  • BT.601 Wide video input

    BT.601 Wide

    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
    }
  • BT.709 Narrow video input

    BT.709 Narrow

    aipp_op {
        aipp_mode: static
        input_format : XRGB8888_U8
        csc_switch : true
        rbuv_swap_switch : false
        ax_swap_switch : true
        matrix_r0c0 : 47
        matrix_r0c1 : 157
        matrix_r0c2 : 16
        matrix_r1c0 : -26
        matrix_r1c1 : -87
        matrix_r1c2 : 112
        matrix_r2c0 : 112
        matrix_r2c1 : -102
        matrix_r2c2 : -10
        output_bias_0 : 16
        output_bias_1 : 128
        output_bias_2 : 128
    }
  • BT.709 Wide video input

    BT.709 Wide

    aipp_op {
        aipp_mode: static
        input_format : XRGB8888_U8
        csc_switch : true
        rbuv_swap_switch : false
        ax_swap_switch : true
        matrix_r0c0 : 55
        matrix_r0c1 : 183
        matrix_r0c2 : 19
        matrix_r1c0 : -29
        matrix_r1c1 : -99
        matrix_r1c2 : 128
        matrix_r2c0 : 128
        matrix_r2c1 : -116
        matrix_r2c2 : -12
        output_bias_0 : 0
        output_bias_1 : 128
        output_bias_2 : 128
    }

XRGB8888_U8 to YVU444

  • JPEG image input

    JPEG

    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
    }
  • BT.601 Narrow video input

    BT.601 Narrow

    aipp_op {
        aipp_mode: static
        input_format : XRGB8888_U8
        csc_switch : true
        rbuv_swap_switch : false
        ax_swap_switch : true
        matrix_r0c0 : 66
        matrix_r0c1 : 129
        matrix_r0c2 : 25
        matrix_r1c0 : 112
        matrix_r1c1 : -94
        matrix_r1c2 : -18
        matrix_r2c0 : -38
        matrix_r2c1 : -74
        matrix_r2c2 : 112
        output_bias_0 : 16
        output_bias_1 : 128
        output_bias_2 : 128
    }
  • BT.601 Wide video input

    BT.601 Wide

    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
    }
  • BT.709 Narrow video input

    BT.709 Narrow

    aipp_op {
        aipp_mode: static
        input_format : XRGB8888_U8
        csc_switch : true
        rbuv_swap_switch : false
        ax_swap_switch : true
        matrix_r0c0 : 47
        matrix_r0c1 : 157
        matrix_r0c2 : 16
        matrix_r1c0 : 112
        matrix_r1c1 : -102
        matrix_r1c2 : -10
        matrix_r2c0 : -26
        matrix_r2c1 : -87
        matrix_r2c2 : 112
        output_bias_0 : 16
        output_bias_1 : 128
        output_bias_2 : 128
    }
  • BT.709 Wide video input

    BT.709 Wide

    aipp_op {
        aipp_mode: static
        input_format : XRGB8888_U8
        csc_switch : true
        rbuv_swap_switch : false
        ax_swap_switch : true
        matrix_r0c0 : 55
        matrix_r0c1 : 183
        matrix_r0c2 : 19
        matrix_r1c0 : 128
        matrix_r1c1 : -116
        matrix_r1c2 : -12
        matrix_r2c0 : -29
        matrix_r2c1 : -99
        matrix_r2c2 : 128
        output_bias_0 : 0
        output_bias_1 : 128
        output_bias_2 : 128
    }

XRGB8888_U8 to 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 to 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 to 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 to 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 to Gray

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

RGB888_U8 to FP32 RGB

aipp_op {
    aipp_mode: static
    related_input_rank: 0
    input_format : RGB888_U8
    src_image_size_w : 640
    src_image_size_h : 640
    mean_chn_0 : 0
    mean_chn_1 : 0
    mean_chn_2 : 0
    var_reci_chn_0 : 1.0
    var_reci_chn_1 : 1.0
    var_reci_chn_2 : 1.0
}