- Description:
- Converts image bit depth.
- Method:
- Convert Bit Depth is computed by using the following equation:
For Wrap Policy:
dst(x,y) = ((uint8)(src(x,y) >> shift));
For Saturate Policy:
int16 value = src(x,y) >> shift;
value = value < 0 ? 0 : value;
value = value > 255 ? 255 : value;
dst(x,y) = (uint8)value;
- Parameters
-
[in] | src[] | Pointer to array containing first input image (SQ15.0) |
[in] | src_addr[] | Pointer to structure containing dimensional information of src |
[out] | dst[] | Pointer to array containing output image (UQ8.0) |
[in] | dst_addr[] | Pointer to structure containing dimensional information of dst |
[in] | shift | Parameter indicating shift value; valid for 0 <= shift < 8 |
[in] | policy | Parameter indicating overflow policy |
- Assumptions:
- I/O buffer pointers are assumed to be not aliased.
- Performance Considerations:
- For best performance, the following parameter settings are recommended:
- Set widths equal to strides
- Align all pointers to 8 byte boundaries
- Set all stride values to a multiple of 8
- Set all width values to a multiple of 16