Intel® Integrated Performance Primitives (Intel® IPP) Developer Guide and Reference

ID 790148
Date 6/24/2024
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

GammaInv

Converts a gamma-corrected R'G'B' image back to the original RGB image.

Syntax

Case 1: Not-in-place operation on integer pixel-order data

IppStatus ippiGammaInv_<mod>(const Ipp<datatype>* pSrc, int srcStep, Ipp<datatype>* pDst, int dstStep, IppiSize roiSize);

Supported values for mod:

8u_C3R 16u_C3R
8u_AC4R 16u_AC4R

Case 2: Not-in-place operation on integer planar data

IppStatus ippiGammaInv_<mod>(const Ipp<datatype>* pSrc[3], int srcStep, Ipp<datatype>* pDst[3], int dstStep, IppiSize roiSize);

Supported values for mod:

8u_P3R 16u_P3R

Case 3: Not-in-place operation on floating-point pixel-order data

IppStatus ippiGammaInv_<mod>(const Ipp32f* pSrc, int srcStep, Ipp32f* pDst, int dstStep, IppiSize roiSize, Ipp32f vMin, Ipp32f vMax);

Supported values for mod:

32f_C3R
32f_AC4R

Case 4: Not-in-place operation on floating-point planar data

IppStatus ippiGammaInv_32f_P3R (const Ipp32f* pSrc[3], int srcStep, Ipp32f* pDst[3], int dstStep, IppiSize roiSize, Ipp32f vMin, Ipp32f vMax);

Case 5: In-place operation on integer pixel-order data

IppStatus ippiGammaInv_<mod>(Ipp<datatype>* pSrcDst, int srcDstStep, IppiSize roiSize);

Supported values for mod:

8u_C3IR 16u_C3IR
8u_AC4IR 16u_AC4IR

Case 6: In-place operation on integer planar data

IppStatus ippiGammaInv_<mod>(Ipp<datatype>* pSrcDst[3], int srcDstStep, IppiSize roiSize);

Supported values for mod:

8u_IP3R 16u_IP3R

Case 7: In-place operation on floating-point pixel-order data

IppStatus ippiGammaInv_<mod>(Ipp32f* pSrcDst, int srcDstStep, IppiSize roiSize, Ipp32f vMin, Ipp32f vMax);

Supported values for mod:

32f_C3IR
32f_AC4IR

Case 8: In-place operation on floating-point planar data

IppStatus ippiGammaInv_32f_IP3R (Ipp32f* pSrcDst[3], int srcDstStep, IppiSize roiSize, Ipp32f vMin, Ipp32f vMax);

Include Files

ippcc.h

Domain Dependencies

Headers: ippcore.h, ippvm.h, ipps.h, ippi.h

Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters

pSrc

Pointer to the ROI in the pixel-order source image. Array of pointers to the ROI in each plane of the planar source image.

srcStep

Distance in bytes between starts of consecutive lines in the source image.

pDst

Pointer to the ROI in the pixel-order destination image. Array of pointers to the ROI in each plane of the planar destination image.

dstStep

Distance in bytes between starts of consecutive lines in the destination image.

pSrcDst

Pointer to the source and destination image ROI for the in-place operation.

srcDstStep

Distance in bytes between starts of consecutive lines in the source and destination image for the in-place operation.

roiSize

Size of the source and destination ROI in pixels.

vMin, vMax

Minimum and maximum values of the input floating-point data.

Description

This function operates with ROI (see Regions of Interest in Intel IPP).

This function converts a gamma-correctedR'G'B' image back to the original RGB image. It uses the following equations:

for R',G',B' < 0.0812

R = R'/4.5

G = G'/4.5

B = B'/4.5

for R',G',B' 0.0812







Note that the channel intensity values are normalized to fit in the range of [0..1]. The gamma value is equal to 1/0.45 = 2.22 in conformity with [ITU709] specification.

Return Values

ippStsNoErr

Indicates no error. Any other value indicates an error.

ippStsNullPtrErr

Indicates an error condition if pSrc, pDst, or pSrcDst is NULL.

ippStsSizeErr

Indicates an error condition if roiSize has a field with a zero or negative value.

ippStsGammaRangeErr

Indicates an error condition if the input data bounds are incorrect, that is, vMax is less than or equal to vMin.