NVIDIA 2D Image And Signal Performance Primitives (NPP)  Version 11.5.0.*
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
Functions
Scale To Higher Bit Depth

Functions for scaling images to higher bit depth. More...

Functions

NppStatus nppiScale_8u16u_C1R_Ctx (const Npp8u *pSrc, int nSrcStep, Npp16u *pDst, int nDstStep, NppiSize oSizeROI, NppStreamContext nppStreamCtx)
 Single channel 8-bit unsigned to 16-bit unsigned conversion. More...
 
NppStatus nppiScale_8u16u_C1R (const Npp8u *pSrc, int nSrcStep, Npp16u *pDst, int nDstStep, NppiSize oSizeROI)
 
NppStatus nppiScale_8u16u_C3R_Ctx (const Npp8u *pSrc, int nSrcStep, Npp16u *pDst, int nDstStep, NppiSize oSizeROI, NppStreamContext nppStreamCtx)
 Three channel 8-bit unsigned to 16-bit unsigned conversion. More...
 
NppStatus nppiScale_8u16u_C3R (const Npp8u *pSrc, int nSrcStep, Npp16u *pDst, int nDstStep, NppiSize oSizeROI)
 
NppStatus nppiScale_8u16u_C4R_Ctx (const Npp8u *pSrc, int nSrcStep, Npp16u *pDst, int nDstStep, NppiSize oSizeROI, NppStreamContext nppStreamCtx)
 Four channel 8-bit unsigned to 16-bit unsigned conversion. More...
 
NppStatus nppiScale_8u16u_C4R (const Npp8u *pSrc, int nSrcStep, Npp16u *pDst, int nDstStep, NppiSize oSizeROI)
 
NppStatus nppiScale_8u16u_AC4R_Ctx (const Npp8u *pSrc, int nSrcStep, Npp16u *pDst, int nDstStep, NppiSize oSizeROI, NppStreamContext nppStreamCtx)
 Four channel 8-bit unsigned to 16-bit unsigned conversion, not affecting Alpha. More...
 
NppStatus nppiScale_8u16u_AC4R (const Npp8u *pSrc, int nSrcStep, Npp16u *pDst, int nDstStep, NppiSize oSizeROI)
 
NppStatus nppiScale_8u16s_C1R_Ctx (const Npp8u *pSrc, int nSrcStep, Npp16s *pDst, int nDstStep, NppiSize oSizeROI, NppStreamContext nppStreamCtx)
 Single channel 8-bit unsigned to 16-bit signed conversion. More...
 
NppStatus nppiScale_8u16s_C1R (const Npp8u *pSrc, int nSrcStep, Npp16s *pDst, int nDstStep, NppiSize oSizeROI)
 
NppStatus nppiScale_8u16s_C3R_Ctx (const Npp8u *pSrc, int nSrcStep, Npp16s *pDst, int nDstStep, NppiSize oSizeROI, NppStreamContext nppStreamCtx)
 Three channel 8-bit unsigned to 16-bit signed conversion. More...
 
NppStatus nppiScale_8u16s_C3R (const Npp8u *pSrc, int nSrcStep, Npp16s *pDst, int nDstStep, NppiSize oSizeROI)
 
NppStatus nppiScale_8u16s_C4R_Ctx (const Npp8u *pSrc, int nSrcStep, Npp16s *pDst, int nDstStep, NppiSize oSizeROI, NppStreamContext nppStreamCtx)
 Four channel 8-bit unsigned to 16-bit signed conversion. More...
 
NppStatus nppiScale_8u16s_C4R (const Npp8u *pSrc, int nSrcStep, Npp16s *pDst, int nDstStep, NppiSize oSizeROI)
 
NppStatus nppiScale_8u16s_AC4R_Ctx (const Npp8u *pSrc, int nSrcStep, Npp16s *pDst, int nDstStep, NppiSize oSizeROI, NppStreamContext nppStreamCtx)
 Four channel 8-bit unsigned to 16-bit signed conversion, not affecting Alpha. More...
 
NppStatus nppiScale_8u16s_AC4R (const Npp8u *pSrc, int nSrcStep, Npp16s *pDst, int nDstStep, NppiSize oSizeROI)
 
NppStatus nppiScale_8u32s_C1R_Ctx (const Npp8u *pSrc, int nSrcStep, Npp32s *pDst, int nDstStep, NppiSize oSizeROI, NppStreamContext nppStreamCtx)
 Single channel 8-bit unsigned to 32-bit signed conversion. More...
 
NppStatus nppiScale_8u32s_C1R (const Npp8u *pSrc, int nSrcStep, Npp32s *pDst, int nDstStep, NppiSize oSizeROI)
 
NppStatus nppiScale_8u32s_C3R_Ctx (const Npp8u *pSrc, int nSrcStep, Npp32s *pDst, int nDstStep, NppiSize oSizeROI, NppStreamContext nppStreamCtx)
 Three channel 8-bit unsigned to 32-bit signed conversion. More...
 
NppStatus nppiScale_8u32s_C3R (const Npp8u *pSrc, int nSrcStep, Npp32s *pDst, int nDstStep, NppiSize oSizeROI)
 
NppStatus nppiScale_8u32s_C4R_Ctx (const Npp8u *pSrc, int nSrcStep, Npp32s *pDst, int nDstStep, NppiSize oSizeROI, NppStreamContext nppStreamCtx)
 Four channel 8-bit unsigned to 32-bit signed conversion. More...
 
NppStatus nppiScale_8u32s_C4R (const Npp8u *pSrc, int nSrcStep, Npp32s *pDst, int nDstStep, NppiSize oSizeROI)
 
NppStatus nppiScale_8u32s_AC4R_Ctx (const Npp8u *pSrc, int nSrcStep, Npp32s *pDst, int nDstStep, NppiSize oSizeROI, NppStreamContext nppStreamCtx)
 Four channel 8-bit unsigned to 32-bit signed conversion, not affecting Alpha. More...
 
NppStatus nppiScale_8u32s_AC4R (const Npp8u *pSrc, int nSrcStep, Npp32s *pDst, int nDstStep, NppiSize oSizeROI)
 
NppStatus nppiScale_8u32f_C1R_Ctx (const Npp8u *pSrc, int nSrcStep, Npp32f *pDst, int nDstStep, NppiSize oSizeROI, Npp32f nMin, Npp32f nMax, NppStreamContext nppStreamCtx)
 Single channel 8-bit unsigned to 32-bit floating-point conversion. More...
 
NppStatus nppiScale_8u32f_C1R (const Npp8u *pSrc, int nSrcStep, Npp32f *pDst, int nDstStep, NppiSize oSizeROI, Npp32f nMin, Npp32f nMax)
 
NppStatus nppiScale_8u32f_C3R_Ctx (const Npp8u *pSrc, int nSrcStep, Npp32f *pDst, int nDstStep, NppiSize oSizeROI, Npp32f nMin, Npp32f nMax, NppStreamContext nppStreamCtx)
 Three channel 8-bit unsigned to 32-bit floating-point conversion. More...
 
NppStatus nppiScale_8u32f_C3R (const Npp8u *pSrc, int nSrcStep, Npp32f *pDst, int nDstStep, NppiSize oSizeROI, Npp32f nMin, Npp32f nMax)
 
NppStatus nppiScale_8u32f_C4R_Ctx (const Npp8u *pSrc, int nSrcStep, Npp32f *pDst, int nDstStep, NppiSize oSizeROI, Npp32f nMin, Npp32f nMax, NppStreamContext nppStreamCtx)
 Four channel 8-bit unsigned to 32-bit floating-point conversion. More...
 
NppStatus nppiScale_8u32f_C4R (const Npp8u *pSrc, int nSrcStep, Npp32f *pDst, int nDstStep, NppiSize oSizeROI, Npp32f nMin, Npp32f nMax)
 
NppStatus nppiScale_8u32f_AC4R_Ctx (const Npp8u *pSrc, int nSrcStep, Npp32f *pDst, int nDstStep, NppiSize oSizeROI, Npp32f nMin, Npp32f nMax, NppStreamContext nppStreamCtx)
 Four channel 8-bit unsigned to 32-bit floating-point conversion, not affecting Alpha. More...
 
NppStatus nppiScale_8u32f_AC4R (const Npp8u *pSrc, int nSrcStep, Npp32f *pDst, int nDstStep, NppiSize oSizeROI, Npp32f nMin, Npp32f nMax)
 

Detailed Description

Functions for scaling images to higher bit depth.

To map source pixel srcPixelValue to destination pixel dstPixelValue the following equation is used:

 dstPixelValue = dstMinRangeValue + scaleFactor * (srcPixelValue - srcMinRangeValue)

where scaleFactor = (dstMaxRangeValue - dstMinRangeValue) / (srcMaxRangeValue - srcMinRangeValue).

For conversions between integer data types, the entire integer numeric range of the input data type is mapped onto the entire integer numeric range of the output data type.

For conversions to floating point data types the floating point data range is defined by the user supplied floating point values of nMax and nMin which are used as the dstMaxRangeValue and dstMinRangeValue respectively in the scaleFactor and dstPixelValue calculations and also as the saturation values to which output data is clamped.

When converting from floating-point values to integer values, nMax and nMin are used as the srcMaxRangeValue and srcMinRangeValue respectively in the scaleFactor and dstPixelValue calculations. Output values are saturated and clamped to the full output integer pixel value range.

Common parameters for nppiScale to higher bit depth functions include:

Parameters
pSrcSource-Image Pointer.
nSrcStepSource-Image Line Step.
pDstDestination-Image Pointer.
nDstStepDestination-Image Line Step.
oSizeROIRegion-of-Interest (ROI).
nMinspecifies the minimum saturation value to which every output value will be clamped.
nMaxspecifies the maximum saturation value to which every output value will be clamped.
nppStreamCtxApplication Managed Stream Context.
Returns
Image Data Related Error Codes, ROI Related Error Codes, NPP_SCALE_RANGE_ERROR indicates an error condition if nMax <= nMin.

Function Documentation

NppStatus nppiScale_8u16s_AC4R ( const Npp8u pSrc,
int  nSrcStep,
Npp16s pDst,
int  nDstStep,
NppiSize  oSizeROI 
)
NppStatus nppiScale_8u16s_AC4R_Ctx ( const Npp8u pSrc,
int  nSrcStep,
Npp16s pDst,
int  nDstStep,
NppiSize  oSizeROI,
NppStreamContext  nppStreamCtx 
)

Four channel 8-bit unsigned to 16-bit signed conversion, not affecting Alpha.

For common parameter descriptions, see Common parameters for nppiScale to higher bit depth functions.

NppStatus nppiScale_8u16s_C1R ( const Npp8u pSrc,
int  nSrcStep,
Npp16s pDst,
int  nDstStep,
NppiSize  oSizeROI 
)
NppStatus nppiScale_8u16s_C1R_Ctx ( const Npp8u pSrc,
int  nSrcStep,
Npp16s pDst,
int  nDstStep,
NppiSize  oSizeROI,
NppStreamContext  nppStreamCtx 
)

Single channel 8-bit unsigned to 16-bit signed conversion.

For common parameter descriptions, see Common parameters for nppiScale to higher bit depth functions.

NppStatus nppiScale_8u16s_C3R ( const Npp8u pSrc,
int  nSrcStep,
Npp16s pDst,
int  nDstStep,
NppiSize  oSizeROI 
)
NppStatus nppiScale_8u16s_C3R_Ctx ( const Npp8u pSrc,
int  nSrcStep,
Npp16s pDst,
int  nDstStep,
NppiSize  oSizeROI,
NppStreamContext  nppStreamCtx 
)

Three channel 8-bit unsigned to 16-bit signed conversion.

For common parameter descriptions, see Common parameters for nppiScale to higher bit depth functions.

NppStatus nppiScale_8u16s_C4R ( const Npp8u pSrc,
int  nSrcStep,
Npp16s pDst,
int  nDstStep,
NppiSize  oSizeROI 
)
NppStatus nppiScale_8u16s_C4R_Ctx ( const Npp8u pSrc,
int  nSrcStep,
Npp16s pDst,
int  nDstStep,
NppiSize  oSizeROI,
NppStreamContext  nppStreamCtx 
)

Four channel 8-bit unsigned to 16-bit signed conversion.

For common parameter descriptions, see Common parameters for nppiScale to higher bit depth functions.

NppStatus nppiScale_8u16u_AC4R ( const Npp8u pSrc,
int  nSrcStep,
Npp16u pDst,
int  nDstStep,
NppiSize  oSizeROI 
)
NppStatus nppiScale_8u16u_AC4R_Ctx ( const Npp8u pSrc,
int  nSrcStep,
Npp16u pDst,
int  nDstStep,
NppiSize  oSizeROI,
NppStreamContext  nppStreamCtx 
)

Four channel 8-bit unsigned to 16-bit unsigned conversion, not affecting Alpha.

For common parameter descriptions, see Common parameters for nppiScale to higher bit depth functions.

NppStatus nppiScale_8u16u_C1R ( const Npp8u pSrc,
int  nSrcStep,
Npp16u pDst,
int  nDstStep,
NppiSize  oSizeROI 
)
NppStatus nppiScale_8u16u_C1R_Ctx ( const Npp8u pSrc,
int  nSrcStep,
Npp16u pDst,
int  nDstStep,
NppiSize  oSizeROI,
NppStreamContext  nppStreamCtx 
)

Single channel 8-bit unsigned to 16-bit unsigned conversion.

For common parameter descriptions, see Common parameters for nppiScale to higher bit depth functions.

NppStatus nppiScale_8u16u_C3R ( const Npp8u pSrc,
int  nSrcStep,
Npp16u pDst,
int  nDstStep,
NppiSize  oSizeROI 
)
NppStatus nppiScale_8u16u_C3R_Ctx ( const Npp8u pSrc,
int  nSrcStep,
Npp16u pDst,
int  nDstStep,
NppiSize  oSizeROI,
NppStreamContext  nppStreamCtx 
)

Three channel 8-bit unsigned to 16-bit unsigned conversion.

For common parameter descriptions, see Common parameters for nppiScale to higher bit depth functions.

NppStatus nppiScale_8u16u_C4R ( const Npp8u pSrc,
int  nSrcStep,
Npp16u pDst,
int  nDstStep,
NppiSize  oSizeROI 
)
NppStatus nppiScale_8u16u_C4R_Ctx ( const Npp8u pSrc,
int  nSrcStep,
Npp16u pDst,
int  nDstStep,
NppiSize  oSizeROI,
NppStreamContext  nppStreamCtx 
)

Four channel 8-bit unsigned to 16-bit unsigned conversion.

For common parameter descriptions, see Common parameters for nppiScale to higher bit depth functions.

NppStatus nppiScale_8u32f_AC4R ( const Npp8u pSrc,
int  nSrcStep,
Npp32f pDst,
int  nDstStep,
NppiSize  oSizeROI,
Npp32f  nMin,
Npp32f  nMax 
)
NppStatus nppiScale_8u32f_AC4R_Ctx ( const Npp8u pSrc,
int  nSrcStep,
Npp32f pDst,
int  nDstStep,
NppiSize  oSizeROI,
Npp32f  nMin,
Npp32f  nMax,
NppStreamContext  nppStreamCtx 
)

Four channel 8-bit unsigned to 32-bit floating-point conversion, not affecting Alpha.

For common parameter descriptions, see Common parameters for nppiScale to higher bit depth functions.

NppStatus nppiScale_8u32f_C1R ( const Npp8u pSrc,
int  nSrcStep,
Npp32f pDst,
int  nDstStep,
NppiSize  oSizeROI,
Npp32f  nMin,
Npp32f  nMax 
)
NppStatus nppiScale_8u32f_C1R_Ctx ( const Npp8u pSrc,
int  nSrcStep,
Npp32f pDst,
int  nDstStep,
NppiSize  oSizeROI,
Npp32f  nMin,
Npp32f  nMax,
NppStreamContext  nppStreamCtx 
)

Single channel 8-bit unsigned to 32-bit floating-point conversion.

For common parameter descriptions, see Common parameters for nppiScale to higher bit depth functions.

NppStatus nppiScale_8u32f_C3R ( const Npp8u pSrc,
int  nSrcStep,
Npp32f pDst,
int  nDstStep,
NppiSize  oSizeROI,
Npp32f  nMin,
Npp32f  nMax 
)
NppStatus nppiScale_8u32f_C3R_Ctx ( const Npp8u pSrc,
int  nSrcStep,
Npp32f pDst,
int  nDstStep,
NppiSize  oSizeROI,
Npp32f  nMin,
Npp32f  nMax,
NppStreamContext  nppStreamCtx 
)

Three channel 8-bit unsigned to 32-bit floating-point conversion.

For common parameter descriptions, see Common parameters for nppiScale to higher bit depth functions.

NppStatus nppiScale_8u32f_C4R ( const Npp8u pSrc,
int  nSrcStep,
Npp32f pDst,
int  nDstStep,
NppiSize  oSizeROI,
Npp32f  nMin,
Npp32f  nMax 
)
NppStatus nppiScale_8u32f_C4R_Ctx ( const Npp8u pSrc,
int  nSrcStep,
Npp32f pDst,
int  nDstStep,
NppiSize  oSizeROI,
Npp32f  nMin,
Npp32f  nMax,
NppStreamContext  nppStreamCtx 
)

Four channel 8-bit unsigned to 32-bit floating-point conversion.

For common parameter descriptions, see Common parameters for nppiScale to higher bit depth functions.

NppStatus nppiScale_8u32s_AC4R ( const Npp8u pSrc,
int  nSrcStep,
Npp32s pDst,
int  nDstStep,
NppiSize  oSizeROI 
)
NppStatus nppiScale_8u32s_AC4R_Ctx ( const Npp8u pSrc,
int  nSrcStep,
Npp32s pDst,
int  nDstStep,
NppiSize  oSizeROI,
NppStreamContext  nppStreamCtx 
)

Four channel 8-bit unsigned to 32-bit signed conversion, not affecting Alpha.

For common parameter descriptions, see Common parameters for nppiScale to higher bit depth functions.

NppStatus nppiScale_8u32s_C1R ( const Npp8u pSrc,
int  nSrcStep,
Npp32s pDst,
int  nDstStep,
NppiSize  oSizeROI 
)
NppStatus nppiScale_8u32s_C1R_Ctx ( const Npp8u pSrc,
int  nSrcStep,
Npp32s pDst,
int  nDstStep,
NppiSize  oSizeROI,
NppStreamContext  nppStreamCtx 
)

Single channel 8-bit unsigned to 32-bit signed conversion.

For common parameter descriptions, see Common parameters for nppiScale to higher bit depth functions.

NppStatus nppiScale_8u32s_C3R ( const Npp8u pSrc,
int  nSrcStep,
Npp32s pDst,
int  nDstStep,
NppiSize  oSizeROI 
)
NppStatus nppiScale_8u32s_C3R_Ctx ( const Npp8u pSrc,
int  nSrcStep,
Npp32s pDst,
int  nDstStep,
NppiSize  oSizeROI,
NppStreamContext  nppStreamCtx 
)

Three channel 8-bit unsigned to 32-bit signed conversion.

For common parameter descriptions, see Common parameters for nppiScale to higher bit depth functions.

NppStatus nppiScale_8u32s_C4R ( const Npp8u pSrc,
int  nSrcStep,
Npp32s pDst,
int  nDstStep,
NppiSize  oSizeROI 
)
NppStatus nppiScale_8u32s_C4R_Ctx ( const Npp8u pSrc,
int  nSrcStep,
Npp32s pDst,
int  nDstStep,
NppiSize  oSizeROI,
NppStreamContext  nppStreamCtx 
)

Four channel 8-bit unsigned to 32-bit signed conversion.

For common parameter descriptions, see Common parameters for nppiScale to higher bit depth functions.


Copyright © 2009-2021 NVIDIA CORPORATION AND AFFILIATES