# Image Conversion

- enum FadasCvtYUVPipeline\_e

    - Algorithm pipeline specifying what algorithm pipeline is run by subsequent calls to [FadasCvtYUV\_RunMT()](https://docs.qualcomm.com/doc/80-63309-1/topic/image-conversion.html#group__cvtyuv_1ga2905372850a7fc0f9643e7562c668bce).

- Param FADAS\_CVTYUV\_PIPELINE\_DownscaleUYVYAndRGB888:

    - Scale UYVY image down by 1x to 8x in each dimension and convert to RGB888. The ratios in height and width need not be the same.

- Param FADAS\_CVTYUV\_PIPELINE\_DownscaleUYVYBy2AndRGB888:

    - Scale UYVY image down by two in each dimension and convert to RGB888.

- Param FADAS\_CVTYUV\_PIPELINE\_DownscaleYUV888AndRGB888:

    - Scale YUV888 image down by 1x to 8x in each dimension and convert to RGB888. The ratios in height and width need not be the same.

- Param FADAS\_CVTYUV\_PIPELINE\_DownscaleYUV888By2AndRGB888:

    - Scale YUV888 image down by two in each dimension and convert to RGB888.

- Param FADAS\_CVTYUV\_PIPELINE\_DownscaleY8UV8By2:

    - Scale Y8UV8 image down by two in each dimension.

- Param FADAS\_CVTYUV\_PIPELINE\_DownscaleY10UV10By2:

    - Scale Y10UV10 image down by two in each dimension.

- Param FADAS\_CVTYUV\_PIPELINE\_DownscaleY8UV8:

    - Scale Y8UV8 image down by 1x to 8x in each dimension and the ratios in height and width need not be the same.

- Param FADAS\_CVTYUV\_PIPELINE\_DownscaleY8UV8By2:

    - Scale Y8UV8 image down by two in each dimension and the ratios in height and width need not be the same.

- Param FADAS\_CVTYUV\_PIPELINE\_DownscaleVYUYAndRGB888:

    - Scale VYUY image down by 1x to 8x in each dimension and convert to RGB888. The ratios in height and width need not be the same.

- Param FADAS\_CVTYUV\_PIPELINE\_DownscaleVYUYBy2AndRGB888:

    - Scale VYUY image down by two in each dimension and convert to RGB888.

- Param FADAS\_CVTYUV\_PIPELINE\_Downscale3C888:

    - Scale three-channel 8-bit image down by 1x to 8x in each dimension. The ratios in height and width need not be the same

- Param FADAS\_CVTYUV\_PIPELINE\_DownscaleY8:

    - Scale single-channel 8-bit image down by 1x to 8x in each dimension. The ratios in height and width need not be the same

- Param FADAS\_CVTYUV\_PIPELINE\_UYVYtoRGBAndNormi8:

    - Convert UYVY image to RGB888 and normalize the pixels with int8 output.

- Param FADAS\_CVTYUV\_PIPELINE\_DownscaleUYVYBy2ToRGB888AndNormi8:

    - Scale UYVY image down by 2 in each dimension, convert to RGB888, and normalize the pixels with int8 output.

- Param FADAS\_CVTYUV\_PIPELINE\_DownscaleUYVYToRGB888AndNormi8:

    - Downscale UYVY image, convert to RGB888, and normalize the pixels with int8 output.

- Param FADAS\_CVTYUV\_PIPELINE\_UYVYtoRGBAndNormu8:

    - Convert UYVY image to RGB888 and normalize the pixels with uint8 output.

- Param FADAS\_CVTYUV\_PIPELINE\_DownscaleUYVYBy2ToRGB888AndNormu8:

    - Scale UYVY image down by 2 in each dimension, convert to RGB888, and normalize the pixels with uint8 output.

- Param FADAS\_CVTYUV\_PIPELINE\_DownscaleUYVYToRGB888AndNormu8:

    - Downscale UYVY image, convert to RGB888, and normalize the pixels with uint8 output.

- Param FADAS\_CVTYUV\_PIPELINE\_DownscaleY8UV8AndRGB888:

    - Downscale NV12 image and convert to RGB888.

- Param FADAS\_CVTYUV\_PIPELINE\_DownscaleY8UV8By2AndRGB888:

    - Downscale NV12 image by 2 in each dimension and convert to RGB888.

- Param FADAS\_CVTYUV\_PIPELINE\_Y8UV8ToRGBAndNormi8:

    - Convert NV12 image to RGB888 and normalize the pixels with int8 output.

- Param FADAS\_CVTYUV\_PIPELINE\_DownscaleY8UV8By2ToRGB888AndNormi8:

    - Downscale NV12 image by 2 in each dimension, convert to RGB888 and normalize the pixels with int8 output.

- Param FADAS\_CVTYUV\_PIPELINE\_DownscaleY8UV8ToRGB888AndNormi8:

    - Downscale NV12 image, convert to RGB888 and normalize the pixels with int8 output.

- Param FADAS\_CVTYUV\_PIPELINE\_Y8UV8ToRGBAndNormu8:

    - Convert NV12 image to RGB888 and normalize the pixels.

- Param FADAS\_CVTYUV\_PIPELINE\_DownscaleY8UV8By2ToRGB888AndNormu8:

    - Downscale NV12 image by 2 in each dimension, convert to RGB888 and normalize the pixels.

- Param FADAS\_CVTYUV\_PIPELINE\_DownscaleY8UV8ToRGB888AndNormu8:

    - Downscale NV12 image, convert to RGB888 and normalize the pixels.

- Param FADAS\_CVTYUV\_PIPELINE\_Y8UV8ToRGB888:

    - Convert Y8UV8 to RGB888.

*Values:*

- enumerator FADAS\_CVTYUV\_PIPELINE\_DownscaleUYVYAndRGB888

    - Downscaling UYVY, converting to RGB using the parameters of [FadasCvtYUV\_UYVYtoRGB()](https://docs.qualcomm.com/doc/80-63309-1/topic/image-conversion-functions.html#group__cvtyuvh_1gafb5786870f940adce24b5cd09e2d3573)

- enumerator FADAS\_CVTYUV\_PIPELINE\_DownscaleUYVYBy2AndRGB888

    - Downscaling UYVY by 2, converting to RGB using the parameters of [FadasCvtYUV\_UYVYtoRGB()](https://docs.qualcomm.com/doc/80-63309-1/topic/image-conversion-functions.html#group__cvtyuvh_1gafb5786870f940adce24b5cd09e2d3573)

- enumerator FADAS\_CVTYUV\_PIPELINE\_DownscaleYUV888AndRGB888

    - 3 8-bit channel YUV to RGB using parameters of [FadasCvtYUV\_UYVYtoRGB()](https://docs.qualcomm.com/doc/80-63309-1/topic/image-conversion-functions.html#group__cvtyuvh_1gafb5786870f940adce24b5cd09e2d3573)

- enumerator FADAS\_CVTYUV\_PIPELINE\_DownscaleYUV888By2AndRGB888

    - 3 8-bit channel YUV to RGB using parameters of [FadasCvtYUV\_UYVYtoRGB()](https://docs.qualcomm.com/doc/80-63309-1/topic/image-conversion-functions.html#group__cvtyuvh_1gafb5786870f940adce24b5cd09e2d3573)

- enumerator FADAS\_CVTYUV\_PIPELINE\_DownscaleY8UV8By2

    - Multi planar image (Y,UV) with 8 bit data in 8 bit carriers.

- enumerator FADAS\_CVTYUV\_PIPELINE\_DownscaleY10UV10By2

    - Multi planar image (Y,UV) with 10 bit data in 16 bit carriers.

- enumerator FADAS\_CVTYUV\_PIPELINE\_DownscaleVYUYAndRGB888

    - VYUY to RGB using parameters of [FadasCvtYUV\_UYVYtoRGB()](https://docs.qualcomm.com/doc/80-63309-1/topic/image-conversion-functions.html#group__cvtyuvh_1gafb5786870f940adce24b5cd09e2d3573)

- enumerator FADAS\_CVTYUV\_PIPELINE\_DownscaleVYUYBy2AndRGB888

    - VYUY to RGB using parameters of [FadasCvtYUV\_UYVYtoRGB()](https://docs.qualcomm.com/doc/80-63309-1/topic/image-conversion-functions.html#group__cvtyuvh_1gafb5786870f940adce24b5cd09e2d3573)

- enumerator FADAS\_CVTYUV\_PIPELINE\_Downscale3C888

    - 3 8-bit channel (YUV or RGB)

- enumerator FADAS\_CVTYUV\_PIPELINE\_DownscaleY8

    - single 8-bit channel (Grey Image)

- enumerator FADAS\_CVTYUV\_PIPELINE\_UYVYtoRGBAndNormi8

    - UYVY to RGB using parameters of [FadasCvtYUV\_UYVYtoRGB()](https://docs.qualcomm.com/doc/80-63309-1/topic/image-conversion-functions.html#group__cvtyuvh_1gafb5786870f940adce24b5cd09e2d3573) and Normalization using parameters of [FadasCvtYUV\_Renormalize888u8i8()](https://docs.qualcomm.com/doc/80-63309-1/topic/image-conversion-functions.html#group__cvtyuvh_1gaf3fcfd6744ef79bb9d6dbec400901e24)

- enumerator FADAS\_CVTYUV\_PIPELINE\_DownscaleUYVYBy2ToRGB888AndNormi8

    - Downscaling UYVY by 2, converting to RGB using parameters of [FadasCvtYUV\_UYVYtoRGB()](https://docs.qualcomm.com/doc/80-63309-1/topic/image-conversion-functions.html#group__cvtyuvh_1gafb5786870f940adce24b5cd09e2d3573) and Normalization using parameters of [FadasCvtYUV\_Renormalize888u8i8()](https://docs.qualcomm.com/doc/80-63309-1/topic/image-conversion-functions.html#group__cvtyuvh_1gaf3fcfd6744ef79bb9d6dbec400901e24)

- enumerator FADAS\_CVTYUV\_PIPELINE\_DownscaleUYVYToRGB888AndNormi8

    - Downscaling UYVY, converting to RGB using parameters of [FadasCvtYUV\_UYVYtoRGB()](https://docs.qualcomm.com/doc/80-63309-1/topic/image-conversion-functions.html#group__cvtyuvh_1gafb5786870f940adce24b5cd09e2d3573) and Normalization using parameters of [FadasCvtYUV\_Renormalize888u8i8()](https://docs.qualcomm.com/doc/80-63309-1/topic/image-conversion-functions.html#group__cvtyuvh_1gaf3fcfd6744ef79bb9d6dbec400901e24)

- enumerator FADAS\_CVTYUV\_PIPELINE\_UYVYtoRGBAndNormu8

    - UYVY to RGB using parameters of [FadasCvtYUV\_UYVYtoRGB()](https://docs.qualcomm.com/doc/80-63309-1/topic/image-conversion-functions.html#group__cvtyuvh_1gafb5786870f940adce24b5cd09e2d3573) and Normalization using parameters of [FadasCvtYUV\_Renormalize888()](https://docs.qualcomm.com/doc/80-63309-1/topic/image-conversion-functions.html#group__cvtyuvh_1ga27a65425f1502e5a512dc6c92313abed)

- enumerator FADAS\_CVTYUV\_PIPELINE\_DownscaleUYVYBy2ToRGB888AndNormu8

    - Downscaling UYVY by 2, converting to RGB using parameters of [FadasCvtYUV\_UYVYtoRGB()](https://docs.qualcomm.com/doc/80-63309-1/topic/image-conversion-functions.html#group__cvtyuvh_1gafb5786870f940adce24b5cd09e2d3573) and Normalization using parameters of [FadasCvtYUV\_Renormalize888()](https://docs.qualcomm.com/doc/80-63309-1/topic/image-conversion-functions.html#group__cvtyuvh_1ga27a65425f1502e5a512dc6c92313abed)

- enumerator FADAS\_CVTYUV\_PIPELINE\_DownscaleUYVYToRGB888AndNormu8

    - Downscaling UYVY, converting to RGB using parameters of [FadasCvtYUV\_UYVYtoRGB()](https://docs.qualcomm.com/doc/80-63309-1/topic/image-conversion-functions.html#group__cvtyuvh_1gafb5786870f940adce24b5cd09e2d3573) and Normalization using parameters of [FadasCvtYUV\_Renormalize888()](https://docs.qualcomm.com/doc/80-63309-1/topic/image-conversion-functions.html#group__cvtyuvh_1ga27a65425f1502e5a512dc6c92313abed)

- enumerator FADAS\_CVTYUV\_PIPELINE\_DownscaleY8UV8AndRGB888

    - Downscaling NV12, converting to RGB using the parameters of FadasCvtYUV\_Y8UV8toRGB()

- enumerator FADAS\_CVTYUV\_PIPELINE\_DownscaleY8UV8By2AndRGB888

    - Downscaling NV12 by 2, converting to RGB using the parameters of FadasCvtYUV\_Y8UV8toRGB()

- enumerator FADAS\_CVTYUV\_PIPELINE\_Y8UV8ToRGBAndNormi8

    - NV12 to RGB using parameters of FadasCvtYUV\_Y8UV8toRGB() and Normalization using parameters of [FadasCvtYUV\_Renormalize888u8i8()](https://docs.qualcomm.com/doc/80-63309-1/topic/image-conversion-functions.html#group__cvtyuvh_1gaf3fcfd6744ef79bb9d6dbec400901e24)

- enumerator FADAS\_CVTYUV\_PIPELINE\_DownscaleY8UV8By2ToRGB888AndNormi8

    - Downscaling NV12 by 2, converting to RGB using parameters of [FadasCvtYUV\_UYVYtoRGB()](https://docs.qualcomm.com/doc/80-63309-1/topic/image-conversion-functions.html#group__cvtyuvh_1gafb5786870f940adce24b5cd09e2d3573) and Normalization using parameters of [FadasCvtYUV\_Renormalize888u8i8()](https://docs.qualcomm.com/doc/80-63309-1/topic/image-conversion-functions.html#group__cvtyuvh_1gaf3fcfd6744ef79bb9d6dbec400901e24)

- enumerator FADAS\_CVTYUV\_PIPELINE\_DownscaleY8UV8ToRGB888AndNormi8

    - Downscaling NV12, converting to RGB using parameters of [FadasCvtYUV\_UYVYtoRGB()](https://docs.qualcomm.com/doc/80-63309-1/topic/image-conversion-functions.html#group__cvtyuvh_1gafb5786870f940adce24b5cd09e2d3573) and Normalization using parameters of [FadasCvtYUV\_Renormalize888u8i8()](https://docs.qualcomm.com/doc/80-63309-1/topic/image-conversion-functions.html#group__cvtyuvh_1gaf3fcfd6744ef79bb9d6dbec400901e24)

- enumerator FADAS\_CVTYUV\_PIPELINE\_Y8UV8ToRGBAndNormu8

    - NV12 to RGB using parameters of FadasCvtYUV\_Y8UV8toRGB() and Normalization using parameters of [FadasCvtYUV\_Renormalize888()](https://docs.qualcomm.com/doc/80-63309-1/topic/image-conversion-functions.html#group__cvtyuvh_1ga27a65425f1502e5a512dc6c92313abed)

- enumerator FADAS\_CVTYUV\_PIPELINE\_DownscaleY8UV8By2ToRGB888AndNormu8

    - Downscaling NV12 by 2, converting to RGB using parameters of [FadasCvtYUV\_UYVYtoRGB()](https://docs.qualcomm.com/doc/80-63309-1/topic/image-conversion-functions.html#group__cvtyuvh_1gafb5786870f940adce24b5cd09e2d3573) and Normalization using parameters of [FadasCvtYUV\_Renormalize888()](https://docs.qualcomm.com/doc/80-63309-1/topic/image-conversion-functions.html#group__cvtyuvh_1ga27a65425f1502e5a512dc6c92313abed)

- enumerator FADAS\_CVTYUV\_PIPELINE\_DownscaleY8UV8ToRGB888AndNormu8

    - Downscaling NV12, converting to RGB using parameters of [FadasCvtYUV\_UYVYtoRGB()](https://docs.qualcomm.com/doc/80-63309-1/topic/image-conversion-functions.html#group__cvtyuvh_1gafb5786870f940adce24b5cd09e2d3573) and Normalization using parameters of [FadasCvtYUV\_Renormalize888()](https://docs.qualcomm.com/doc/80-63309-1/topic/image-conversion-functions.html#group__cvtyuvh_1ga27a65425f1502e5a512dc6c92313abed)

- enumerator FADAS\_CVTYUV\_PIPELINE\_Y8UV8ToRGB888

    - N12 to RGB888 colour conversion.

- enumerator FADAS\_CVTYUV\_PIPELINE\_Y12ToY8

    - Converting Y12 to Y8.

- enumerator FADAS\_CVTYUV\_PIPELINE\_Y10ToY8

    - Converting Y10 to Y8.

- enumerator FADAS\_CVTYUV\_PIPELINE\_DownscaleY10UV8By2

    - Multi planar image (Y,UV) with 10 bit data(Y) in 16 bit carriers.

- enumerator FADAS\_CVTYUV\_PIPELINE\_DownscaleY12UV8By2

    - Multi planar image (Y,UV) with 12 bit data(Y) in 16 bit carriers.

- enumerator FADAS\_CVTYUV\_PIPELINE\_END

    - To check invalid enum values.

- enumerator FADAS\_CVTYUV\_PIPELINE\_MAX

    - **WARNING:** do not use

- [FadasError\_e](https://docs.qualcomm.com/doc/80-63309-1/topic/enum_fadas_8h_1a280abf443019bfc722ac1158e5fe1013.html#_CPPv412FadasError_e) FadasCvtYUV\_Init(const char \*licenseKey)

    - Initialize color conversion module. **WARNING:** Must be called once before other FastADAS functions except [FadasVersion()](https://docs.qualcomm.com/doc/80-63309-1/topic/misc.html#group__misc_1ga55cbdff48d751f2a0227ae4ac106d746).

- Parameters:

    - **licenseKey** – License key string.

- Returns:

    - [FADAS\_ERROR\_NONE](https://docs.qualcomm.com/doc/80-63309-1/topic/enum_fadas_8h_1a280abf443019bfc722ac1158e5fe1013.html#fadas_8h_1a280abf443019bfc722ac1158e5fe1013aea09a4171f0866f38326d7e5323f2d12) — Success.

- [FadasError\_e](https://docs.qualcomm.com/doc/80-63309-1/topic/enum_fadas_8h_1a280abf443019bfc722ac1158e5fe1013.html#_CPPv412FadasError_e) FadasCvtYUV\_DeInit(void)

    - Deinitialize color conversion module. **WARNING:** Must be called once after all other FastADAS functions.

- Returns:

    - [FADAS\_ERROR\_NONE](https://docs.qualcomm.com/doc/80-63309-1/topic/enum_fadas_8h_1a280abf443019bfc722ac1158e5fe1013.html#fadas_8h_1a280abf443019bfc722ac1158e5fe1013aea09a4171f0866f38326d7e5323f2d12) — Success.

- void \*FadasCvtYUV\_CreateWorkers(uint32\_t nThreads, int32\_t pThreadsAffinity[], [FadasCvtYUVPipeline\_e](https://docs.qualcomm.com/doc/80-63309-1/topic/enum_group__cvtyuv_1ga63a35152aa8afa80bd1393e646c9c4ec.html#_CPPv421FadasCvtYUVPipeline_e) ePipeline)

    - Creates a multithreaded worker pool for the YUV conversion feature.

- Parameters:

    - - **nThreads** – Requested number of threads; can be limited to the maximum number of threads if requesting more than that limit. The maximum is the maximum number of physical or logical cores. If requesting 0 threads, use the maximum number.
- **pThreadsAffinity** – Array to set thread affinities.
- **ePipeline** – Execution pipeline to use with this worker pool.

- Returns:

    - Pointer to a worker pool.

- [FadasError\_e](https://docs.qualcomm.com/doc/80-63309-1/topic/enum_fadas_8h_1a280abf443019bfc722ac1158e5fe1013.html#_CPPv412FadasError_e) FadasCvtYUV\_DestroyWorkers(void \*wrkrs)

    - Destroys YUV conversion worker pool.

- Parameters:

    - **wrkrs** – Worker pool created by [FadasCvtYUV\_CreateWorkers()](https://docs.qualcomm.com/doc/80-63309-1/topic/image-conversion.html#group__cvtyuv_1ga1580eee32bce6dde1b6b5c1d077c7061).

- Returns:

    - [FADAS\_ERROR\_NONE](https://docs.qualcomm.com/doc/80-63309-1/topic/enum_fadas_8h_1a280abf443019bfc722ac1158e5fe1013.html#fadas_8h_1a280abf443019bfc722ac1158e5fe1013aea09a4171f0866f38326d7e5323f2d12) — Success.

- [FadasError\_e](https://docs.qualcomm.com/doc/80-63309-1/topic/enum_fadas_8h_1a280abf443019bfc722ac1158e5fe1013.html#_CPPv412FadasError_e) FadasCvtYUV\_RunMT(void \*wrkrs, [FadasImage\_t](https://docs.qualcomm.com/doc/80-63309-1/topic/struct_fadas_image__t.html#_CPPv412FadasImage_t) \*src, [FadasImage\_t](https://docs.qualcomm.com/doc/80-63309-1/topic/struct_fadas_image__t.html#_CPPv412FadasImage_t) \*dst, [FadasROI\_t](https://docs.qualcomm.com/doc/80-63309-1/topic/struct_fadas_r_o_i__t.html#_CPPv410FadasROI_t) \*dstROI, [FadasNormlzParams\_t](https://docs.qualcomm.com/doc/80-63309-1/topic/struct_fadas_normlz_params__t.html#_CPPv419FadasNormlzParams_t) \*normlz = nullptr)

    - Runs a multithreaded pipeline for this CvtYUV module.

Runs a multithreaded pipeline using a worker pool created by [FadasCvtYUV\_CreateWorkers()](https://docs.qualcomm.com/doc/80-63309-1/topic/image-conversion.html#group__cvtyuv_1ga1580eee32bce6dde1b6b5c1d077c7061). At worker pool creation, the pipeline of one or more chained algorithms is defined.

- Parameters:

    - - **wrkrs** – Worker pool created by [FadasCvtYUV\_CreateWorkers()](https://docs.qualcomm.com/doc/80-63309-1/topic/image-conversion.html#group__cvtyuv_1ga1580eee32bce6dde1b6b5c1d077c7061).
- **src** – Pointer to the input image. The size of buffer is srcStride\*srcHeight bytes. **WARNING:** Must be 128-byte aligned.
- **dst** – Pointer to the output image with the same type and size as the input image. The size of buffer is dstStride\*dstHeight bytes. **WARNING:** Must be 128-byte aligned.
- **dstROI** – Region of interest in output image.
- **normlz** – Pointer to array of structure holding normalization parameters for all channel. Optional parameter, required only when output image is to be normalized. **WARNING:**

    - normlz[i].sub \((s\_r)\) has a limited valid range of \(-255 \le s\_r \le 255\).
    - normlz[i].mul \((m\_r)\) has a limited valid range of \(-4 \le m\_r \le 4\).
    - normlz[i].add \((a\_r)\) has a limited valid range of \(-255 \le a\_r \le 255\).

- Returns:

    - [FADAS\_ERROR\_NONE](https://docs.qualcomm.com/doc/80-63309-1/topic/enum_fadas_8h_1a280abf443019bfc722ac1158e5fe1013.html#fadas_8h_1a280abf443019bfc722ac1158e5fe1013aea09a4171f0866f38326d7e5323f2d12) — Success.

- [FadasError\_e](https://docs.qualcomm.com/doc/80-63309-1/topic/enum_fadas_8h_1a280abf443019bfc722ac1158e5fe1013.html#_CPPv412FadasError_e) FadasCvtYUV\_DownscaleUYVYToRGB888AndNormi8(const uint8\_t \*src, [FadasImgProps\_t](https://docs.qualcomm.com/doc/80-63309-1/topic/struct_fadas_img_props__t.html#_CPPv415FadasImgProps_t) srcProps, [FadasNormlzParams\_t](https://docs.qualcomm.com/doc/80-63309-1/topic/struct_fadas_normlz_params__t.html#_CPPv419FadasNormlzParams_t) normlzR, [FadasNormlzParams\_t](https://docs.qualcomm.com/doc/80-63309-1/topic/struct_fadas_normlz_params__t.html#_CPPv419FadasNormlzParams_t) normlzG, [FadasNormlzParams\_t](https://docs.qualcomm.com/doc/80-63309-1/topic/struct_fadas_normlz_params__t.html#_CPPv419FadasNormlzParams_t) normlzB, int8\_t \*dst, [FadasImgProps\_t](https://docs.qualcomm.com/doc/80-63309-1/topic/struct_fadas_img_props__t.html#_CPPv415FadasImgProps_t) \*dstProps)

    - Same as [FadasCvtYUV\_DownscaleUYVYAndRGB888()](https://docs.qualcomm.com/doc/80-63309-1/topic/image-conversion-functions.html#group__cvtyuvh_1gae6258efb3515adc16a46184097c57993), with the additional step of normalization with int8 output at the end.

- Parameters:

    - - **src** – Pointer to the input image. **WARNING:** Must be 128-byte aligned.
- **srcProps** – Input image properties.
- **normlzR** – Image normalization parameters for red channel. **WARNING:**

    - normlz.sub \((s\_r)\) has a limited valid range of \(-255 \le s\_r \le 255\).
    - normlz.mul \((m\_r)\) has a limited valid range of \(-4 \le m\_r \le 4\).
    - normlz.add \((a\_r)\) has a limited valid range of \(-255 \le a\_r \le 255\).
- **normlzG** – Image normalization parameters for green channel. **WARNING:**

    - normlz.sub \((s\_g)\) has a limited valid range of \(-255 \le s\_g \le 255\).
    - normlz.mul \((m\_g)\) has a limited valid range of \(-4 \le m\_g \le 4\).
    - normlz.add \((a\_g)\) has a limited valid range of \(-255 \le a\_g \le 255\).
- **normlzB** – Image normalization parameters for blue channel. **WARNING:**

    - normlz.sub \((s\_b)\) has a limited valid range of \(-255 \le s\_b \le 255\).
    - normlz.mul \((m\_b)\) has a limited valid range of \(-4 \le m\_b \le 4\).
    - normlz.add \((a\_b)\) has a limited valid range of \(-255 \le a\_b \le 255\).
- **dst** – Pointer to the output image. **WARNING:**

    - Adequate memory must already be allocated to the image buffer.
    - Must be 128-byte aligned.
- **dstProps** – Output image properties.

- Returns:

    - [FADAS\_ERROR\_NONE](https://docs.qualcomm.com/doc/80-63309-1/topic/enum_fadas_8h_1a280abf443019bfc722ac1158e5fe1013.html#fadas_8h_1a280abf443019bfc722ac1158e5fe1013aea09a4171f0866f38326d7e5323f2d12) — Success.

- [FadasError\_e](https://docs.qualcomm.com/doc/80-63309-1/topic/enum_fadas_8h_1a280abf443019bfc722ac1158e5fe1013.html#_CPPv412FadasError_e) FadasCvtYUV\_DownscaleUYVYToRGB888AndNormu8(const uint8\_t \*src, [FadasImgProps\_t](https://docs.qualcomm.com/doc/80-63309-1/topic/struct_fadas_img_props__t.html#_CPPv415FadasImgProps_t) srcProps, [FadasNormlzParams\_t](https://docs.qualcomm.com/doc/80-63309-1/topic/struct_fadas_normlz_params__t.html#_CPPv419FadasNormlzParams_t) normlzR, [FadasNormlzParams\_t](https://docs.qualcomm.com/doc/80-63309-1/topic/struct_fadas_normlz_params__t.html#_CPPv419FadasNormlzParams_t) normlzG, [FadasNormlzParams\_t](https://docs.qualcomm.com/doc/80-63309-1/topic/struct_fadas_normlz_params__t.html#_CPPv419FadasNormlzParams_t) normlzB, uint8\_t \*dst, [FadasImgProps\_t](https://docs.qualcomm.com/doc/80-63309-1/topic/struct_fadas_img_props__t.html#_CPPv415FadasImgProps_t) \*dstProps)

    - Same as [FadasCvtYUV\_DownscaleUYVYAndRGB888()](https://docs.qualcomm.com/doc/80-63309-1/topic/image-conversion-functions.html#group__cvtyuvh_1gae6258efb3515adc16a46184097c57993), with the additional step of normalization with uint8 output at the end.

- Parameters:

    - - **src** – Pointer to the input image. **WARNING:** Must be 128-byte aligned.
- **srcProps** – Input image properties.
- **normlzR** – Image normalization parameters for red channel. **WARNING:**

    - normlz.sub \((s\_r)\) has a limited valid range of \(-255 \le s\_r \le 255\).
    - normlz.mul \((m\_r)\) has a limited valid range of \(-4 \le m\_r \le 4\).
    - normlz.add \((a\_r)\) has a limited valid range of \(-255 \le a\_r \le 255\).
- **normlzG** – Image normalization parameters for green channel. **WARNING:**

    - normlz.sub \((s\_g)\) has a limited valid range of \(-255 \le s\_g \le 255\).
    - normlz.mul \((m\_g)\) has a limited valid range of \(-4 \le m\_g \le 4\).
    - normlz.add \((a\_g)\) has a limited valid range of \(-255 \le a\_g \le 255\).
- **normlzB** – Image normalization parameters for blue channel. **WARNING:**

    - normlz.sub \((s\_b)\) has a limited valid range of \(-255 \le s\_b \le 255\).
    - normlz.mul \((m\_b)\) has a limited valid range of \(-4 \le m\_b \le 4\).
    - normlz.add \((a\_b)\) has a limited valid range of \(-255 \le a\_b \le 255\).
- **dst** – Pointer to the output image. **WARNING:**

    - Adequate memory must already be allocated to the image buffer.
    - Must be 128-byte aligned.
- **dstProps** – Output image properties.

- Returns:

    - [FADAS\_ERROR\_NONE](https://docs.qualcomm.com/doc/80-63309-1/topic/enum_fadas_8h_1a280abf443019bfc722ac1158e5fe1013.html#fadas_8h_1a280abf443019bfc722ac1158e5fe1013aea09a4171f0866f38326d7e5323f2d12) — Success.

## Related examples

- [uyvy/app.cpp](https://docs.qualcomm.com/doc/80-63309-1/topic/uyvy.html)
- [uyuv\_nv12\_y/app.cpp](https://docs.qualcomm.com/doc/80-63309-1/topic/uyvy-nv12-y.html)
- [one/one.cpp](https://docs.qualcomm.com/doc/80-63309-1/topic/one.html)

Last Published: Sep 30, 2024

[Previous Topic
Convex Quadratic Programming](https://docs.qualcomm.com/bundle/publicresource/80-63309-1/topics/convex-quadratic-programming.md) [Next Topic
Image Conversion Functions](https://docs.qualcomm.com/bundle/publicresource/80-63309-1/topics/image-conversion-functions.md)