48 #ifndef NV_NPPI_COMPRESSION_FUNCTIONS_H
49 #define NV_NPPI_COMPRESSION_FUNCTIONS_H
164 Npp16s * pDst,
int nDstStep,
169 Npp16s * pDst,
int nDstStep,
194 Npp8u * pDst,
int nDstStep,
199 Npp8u * pDst,
int nDstStep,
203 #if defined (__cplusplus)
269 Npp16s * pDst,
int nDstStep,
275 Npp16s * pDst,
int nDstStep,
303 Npp8u * pDst,
int nDstStep,
309 Npp8u * pDst,
int nDstStep,
337 Npp16s * pDst,
int nDstStep,
343 Npp16s * pDst,
int nDstStep,
371 Npp8u * pDst,
int nDstStep,
377 Npp8u * pDst,
int nDstStep,
383 #if defined (__cplusplus)
508 #if defined (__cplusplus)
604 Npp8u* pTempStorage);
648 Npp8u* pTempStorage);
882 #define NPPI_JPEG_DECODE_N_BUFFERS 3
NppStatus nppiDCTQuantInv8x8LS_JPEG_16s8u_C1R_Ctx(const Npp16s *pSrc, int nSrcStep, Npp8u *pDst, int nDstStep, const Npp16u *pQuantInvTable, NppiSize oSizeROI, NppStreamContext nppStreamCtx)
Inverse DCT, de-quantization and level shift part of the JPEG decoding.
NppStatus nppiEncodeHuffmanSpecGetBufSize_JPEG(int *pSize)
Returns the length of the NppiEncodeHuffmanSpec structure.
NppStatus nppiEncodeOptimizeHuffmanGetSize(NppiSize oSize, int nChannels, int *pBufSize)
Calculates the size of the temporary buffer for optimize Huffman coding.
NppStatus nppiDCTQuantInv8x8LS_JPEG_16s8u_C1R_NEW_Ctx(const Npp16s *pSrc, int nSrcStep, Npp8u *pDst, int nDstStep, const Npp8u *pQuantizationTable, NppiSize oSizeROI, NppiDCTState *pState, NppStreamContext nppStreamCtx)
Inverse DCT, de-quantization and level shift part of the JPEG decoding.
NppStatus nppiEncodeHuffmanScan_JPEG_8u16s_P1R_Ctx(const Npp16s *pSrc, Npp32s nSrcStep, Npp32s nRestartInterval, Npp32s nSs, Npp32s nSe, Npp32s nAh, Npp32s nAl, Npp8u *pDst, Npp32s *nLength, NppiEncodeHuffmanSpec *pHuffmanTableDC, NppiEncodeHuffmanSpec *pHuffmanTableAC, NppiSize oSizeROI, Npp8u *pTempStorage, NppStreamContext nppStreamCtx)
Huffman Encoding of the JPEG Encoding.
JPEG frame descriptor.
Definition: nppi_compression_functions.h:807
unsigned char Npp8u
8-bit unsigned chars
Definition: nppdefs.h:270
NppStatus nppiEncodeHuffmanScan_JPEG_8u16s_P1R(const Npp16s *pSrc, Npp32s nSrcStep, Npp32s nRestartInterval, Npp32s nSs, Npp32s nSe, Npp32s nAh, Npp32s nAl, Npp8u *pDst, Npp32s *nLength, NppiEncodeHuffmanSpec *pHuffmanTableDC, NppiEncodeHuffmanSpec *pHuffmanTableAC, NppiSize oSizeROI, Npp8u *pTempStorage)
NppStatus nppiEncodeHuffmanSpecFree_JPEG(NppiEncodeHuffmanSpec *pHuffmanSpec)
Frees the memory allocated by nppiEncodeHuffmanSpecInitAlloc_JPEG.
NppStatus nppiDCTQuant16Inv8x8LS_JPEG_16s8u_C1R_NEW(const Npp16s *pSrc, int nSrcStep, Npp8u *pDst, int nDstStep, const Npp16u *pQuantizationTable, NppiSize oSizeROI, NppiDCTState *pState)
NppStatus nppiEncodeOptimizeHuffmanScan_JPEG_8u16s_P1R_Ctx(const Npp16s *pSrc, Npp32s nSrcStep, Npp32s nRestartInterval, Npp32s nSs, Npp32s nSe, Npp32s nAh, Npp32s nAl, Npp8u *pDst, Npp32s *pLength, Npp8u *hpCodesDC, Npp8u *hpTableDC, Npp8u *hpCodesAC, Npp8u *hpTableAC, NppiEncodeHuffmanSpec *pHuffmanDCTable, NppiEncodeHuffmanSpec *pHuffmanACTable, NppiSize oSizeROI, Npp8u *pTempStorage, NppStreamContext nppStreamCtx)
Optimize Huffman Encoding of the JPEG Encoding.
NppStatus nppiDCTQuantInv8x8LS_JPEG_16s8u_C1R_NEW(const Npp16s *pSrc, int nSrcStep, Npp8u *pDst, int nDstStep, const Npp8u *pQuantizationTable, NppiSize oSizeROI, NppiDCTState *pState)
Zeroing memory before decoding.
Definition: nppi_compression_functions.h:861
NppiJpegDecodeJobKind
Type of job to execute.
Definition: nppi_compression_functions.h:851
NppStatus
Error Status Codes.
Definition: nppdefs.h:170
NppStatus nppiEncodeOptimizeHuffmanScan_JPEG_8u16s_P3R_Ctx(Npp16s *apSrc[3], Npp32s aSrcStep[3], Npp32s nRestartInterval, Npp32s nSs, Npp32s nSe, Npp32s nAh, Npp32s nAl, Npp8u *pDst, Npp32s *pLength, Npp8u *hpCodesDC[3], Npp8u *hpTableDC[3], Npp8u *hpCodesAC[3], Npp8u *hpTableAC[3], NppiEncodeHuffmanSpec *apHuffmanDCTable[3], NppiEncodeHuffmanSpec *apHuffmanACTable[3], NppiSize oSizeROI[3], Npp8u *pTempStorage, NppStreamContext nppStreamCtx)
Optimize Huffman Encoding of the JPEG Encoding.
NppStatus nppiDCTQuantInv8x8LS_JPEG_16s8u_C1R(const Npp16s *pSrc, int nSrcStep, Npp8u *pDst, int nDstStep, const Npp16u *pQuantInvTable, NppiSize oSizeROI)
Decode whole scan using a single job.
Definition: nppi_compression_functions.h:852
NppStatus nppiDecodeHuffmanSpecInitAllocHost_JPEG(const Npp8u *pRawHuffmanTable, NppiHuffmanTableType eTableType, NppiDecodeHuffmanSpec **ppHuffmanSpec)
Allocates memory and creates a Huffman table in a format that is suitable for the decoder on the host...
NppStatus nppiDCTInitAlloc(NppiDCTState **ppState)
size_t nppiJpegDecodeGetScanDeadzoneSize(void)
This function returns how much additional memory has to be available after the end of compressed scan...
NppiJpegFrameDescr * pFrame
This field and its contents are never written.
Definition: nppi_compression_functions.h:871
NppStatus nppiDCTFree(NppiDCTState *pState)
Frees the additional resources of the DCT state structure.
NppStatus nppiEncodeHuffmanSpecInitAlloc_JPEG_Ctx(const Npp8u *pRawHuffmanTable, NppiHuffmanTableType eTableType, NppiEncodeHuffmanSpec **ppHuffmanSpec, NppStreamContext nppStreamCtx)
Allocates memory and creates a Huffman table in a format that is suitable for the encoder...
NppStatus nppiDCTInv4x4_WebP_16s_C1R(const Npp16s *pSrc, int nSrcStep, Npp16s *pDst, int nDstStep, NppiSize oSizeROI)
NppStatus nppiDCTQuantFwd8x8LS_JPEG_8u16s_C1R(const Npp8u *pSrc, int nSrcStep, Npp16s *pDst, int nDstStep, const Npp16u *pQuantFwdTable, NppiSize oSizeROI)
NppStatus nppiDecodeHuffmanSpecGetBufSize_JPEG(int *pSize)
Returns the length of the NppiDecodeHuffmanSpec structure.
NppStatus nppiDCTQuant16Fwd8x8LS_JPEG_8u16s_C1R_NEW_Ctx(const Npp8u *pSrc, int nSrcStep, Npp16s *pDst, int nDstStep, const Npp16u *pQuantizationTable, NppiSize oSizeROI, NppiDCTState *pState, NppStreamContext nppStreamCtx)
Forward DCT, quantization and level shift part of the JPEG encoding, 16-bit short integer...
2D Size This struct typically represents the size of a a rectangular region in two space...
Definition: nppdefs.h:410
JPEG decode job used by nppiJpegDecodeJob (see that for more documentation)
Definition: nppi_compression_functions.h:870
NppStatus nppiJpegDecodeJob_Ctx(const NppiJpegDecodeJob *pJob, const NppiJpegDecodeJobMemory *pMemory, NppStreamContext nppStreamCtx)
Executes a job – part of decoding.
Memory buffers used by one decode job.
Definition: nppi_compression_functions.h:890
Npp8u nAh
Successive approximation bit position high.
Definition: nppi_compression_functions.h:833
NppStatus nppiDCTQuant16Fwd8x8LS_JPEG_8u16s_C1R_NEW(const Npp8u *pSrc, int nSrcStep, Npp16s *pDst, int nDstStep, const Npp16u *pQuantizationTable, NppiSize oSizeROI, NppiDCTState *pState)
NppStatus nppiJpegDecodeJobMemorySize(const NppiJpegDecodeJob *pJob, size_t *aSize)
Calculates sizes of additional buffers used by the job.
NppStatus nppiDCTQuant16Inv8x8LS_JPEG_16s8u_C1R_NEW_Ctx(const Npp16s *pSrc, int nSrcStep, Npp8u *pDst, int nDstStep, const Npp16u *pQuantizationTable, NppiSize oSizeROI, NppiDCTState *pState, NppStreamContext nppStreamCtx)
Inverse DCT, de-quantization and level shift part of the JPEG decoding, 16-bit short integer...
NppStatus nppiEncodeOptimizeHuffmanScan_JPEG_8u16s_P1R(const Npp16s *pSrc, Npp32s nSrcStep, Npp32s nRestartInterval, Npp32s nSs, Npp32s nSe, Npp32s nAh, Npp32s nAl, Npp8u *pDst, Npp32s *pLength, Npp8u *hpCodesDC, Npp8u *hpTableDC, Npp8u *hpCodesAC, Npp8u *hpTableAC, NppiEncodeHuffmanSpec *pHuffmanDCTable, NppiEncodeHuffmanSpec *pHuffmanACTable, NppiSize oSizeROI, Npp8u *pTempStorage)
NppiSize oSizeInBlocks
Size of component with 1x1 subsampling (usually luma) in DCT blocks.
Definition: nppi_compression_functions.h:809
NppStatus nppiDCTQuantFwd8x8LS_JPEG_8u16s_C1R_NEW_Ctx(const Npp8u *pSrc, int nSrcStep, Npp16s *pDst, int nDstStep, const Npp8u *pQuantizationTable, NppiSize oSizeROI, NppiDCTState *pState, NppStreamContext nppStreamCtx)
Forward DCT, quantization and level shift part of the JPEG encoding.
NppStatus nppiDecodeHuffmanSpecFreeHost_JPEG(NppiDecodeHuffmanSpec *pHuffmanSpec)
Frees the host memory allocated by nppiDecodeHuffmanSpecInitAllocHost_JPEG.
NppStatus nppiDCTQuantFwd8x8LS_JPEG_8u16s_C1R_NEW(const Npp8u *pSrc, int nSrcStep, Npp16s *pDst, int nDstStep, const Npp8u *pQuantizationTable, NppiSize oSizeROI, NppiDCTState *pState)
Npp8u nSs
Start of spectral selection (index of first coefficient), 0-63.
Definition: nppi_compression_functions.h:831
Npp8u nAl
Successive approximation bit position low.
Definition: nppi_compression_functions.h:834
NppStatus nppiEncodeHuffmanSpecInit_JPEG_Ctx(const Npp8u *pRawHuffmanTable, NppiHuffmanTableType eTableType, NppiEncodeHuffmanSpec *pHuffmanSpec, NppStreamContext nppStreamCtx)
Creates a Huffman table in a format that is suitable for the encoder.
int Npp32s
32-bit signed integers
Definition: nppdefs.h:275
NppStatus nppiDecodeHuffmanScanHost_JPEG_8u16s_P1R_Ctx(const Npp8u *pSrc, Npp32s nLength, Npp32s restartInterval, Npp32s Ss, Npp32s Se, Npp32s Ah, Npp32s Al, Npp16s *pDst, Npp32s nDstStep, NppiDecodeHuffmanSpec *pHuffmanTableDC, NppiDecodeHuffmanSpec *pHuffmanTableAC, NppiSize oSizeROI, NppStreamContext nppStreamCtx)
Huffman Decoding of the JPEG decoding on the host.
NppStatus nppiJpegDecodeJob(const NppiJpegDecodeJob *pJob, const NppiJpegDecodeJobMemory *pMemory)
NppStatus nppiDecodeHuffmanScanHost_JPEG_8u16s_P3R(const Npp8u *pSrc, Npp32s nLength, Npp32s nRestartInterval, Npp32s nSs, Npp32s nSe, Npp32s nAh, Npp32s nAl, Npp16s *apDst[3], Npp32s aDstStep[3], NppiDecodeHuffmanSpec *apHuffmanDCTable[3], NppiDecodeHuffmanSpec *apHuffmanACTable[3], NppiSize aSizeROI[3])
Preprocessing scan on GPU.
Definition: nppi_compression_functions.h:856
NppStatus nppiQuantFwdRawTableInit_JPEG_8u(Npp8u *hpQuantRawTable, int nQualityFactor)
Apply quality factor to raw 8-bit quantization table.
struct NppiDCTState NppiDCTState
Definition: nppi_compression_functions.h:206
NppStatus nppiDecodeHuffmanScanHost_JPEG_8u16s_P1R(const Npp8u *pSrc, Npp32s nLength, Npp32s restartInterval, Npp32s Ss, Npp32s Se, Npp32s Ah, Npp32s Al, Npp16s *pDst, Npp32s nDstStep, NppiDecodeHuffmanSpec *pHuffmanTableDC, NppiDecodeHuffmanSpec *pHuffmanTableAC, NppiSize oSizeROI)
NppStatus nppiEncodeHuffmanSpecInitAlloc_JPEG(const Npp8u *pRawHuffmanTable, NppiHuffmanTableType eTableType, NppiEncodeHuffmanSpec **ppHuffmanSpec)
size_t nppiJpegDecodeGetDCTBufferSize(NppiSize oBlocks)
Returns how much memory has to be allocated for DCT coefficient buffers declared in NppiJpegDecodeJob...
const Npp8u * pCpuScan
Pointer to host memory containing compressed scan data.
Definition: nppi_compression_functions.h:891
unsigned short Npp16u
16-bit unsigned integers
Definition: nppdefs.h:272
NppStatus nppiJpegDecodeJobCreateFinalize(NppiJpegDecodeJob *pJob)
Initializes a job that has to be called at the end of decoding, in order to convert temporary represe...
NPP stream context structure must be filled in by application.
Definition: nppdefs.h:612
Npp32s restartInterval
Restart interval in MCUs.
Definition: nppi_compression_functions.h:835
Part of decoding run on CPU.
Definition: nppi_compression_functions.h:857
Change memory representation of DCT coefficients to final.
Definition: nppi_compression_functions.h:862
NppiJpegScanDescr * pScan
This field is never written.
Definition: nppi_compression_functions.h:872
JPEG scan descriptor.
Definition: nppi_compression_functions.h:820
NppiHuffmanTableType
Definition: nppdefs.h:584
short Npp16s
16-bit signed integers
Definition: nppdefs.h:273
Npp8u nComponents
Number of components in frame.
Definition: nppi_compression_functions.h:808
NppStatus nppiEncodeHuffmanSpecInit_JPEG(const Npp8u *pRawHuffmanTable, NppiHuffmanTableType eTableType, NppiEncodeHuffmanSpec *pHuffmanSpec)
Npp8u nComponents
Number of components present in scan.
Definition: nppi_compression_functions.h:821
NppStatus nppiQuantFwdTableInit_JPEG_8u16u(const Npp8u *hpQuantRawTable, Npp16u *hpQuantFwdRawTable)
Initializes a quantization table for nppiDCTQuantFwd8x8LS_JPEG_8u16s_C1R().
NppStatus nppiDCTInitAlloc_Ctx(NppiDCTState **ppState, NppStreamContext nppStreamCtx)
Initializes DCT state structure and allocates additional resources.
#define NPPI_JPEG_DECODE_N_BUFFERS
Number of additional buffers that may be used by JPEG decode jobs.
Definition: nppi_compression_functions.h:882
NppStatus nppiJpegDecodeJobCreateMemzero(NppiJpegDecodeJob *pJob)
Initializes a job that has to be called at the beginning of decoding.
struct NppiEncodeHuffmanSpec NppiEncodeHuffmanSpec
Definition: nppi_compression_functions.h:511
NppStatus nppiDecodeHuffmanScanHost_JPEG_8u16s_P3R_Ctx(const Npp8u *pSrc, Npp32s nLength, Npp32s nRestartInterval, Npp32s nSs, Npp32s nSe, Npp32s nAh, Npp32s nAl, Npp16s *apDst[3], Npp32s aDstStep[3], NppiDecodeHuffmanSpec *apHuffmanDCTable[3], NppiDecodeHuffmanSpec *apHuffmanACTable[3], NppiSize aSizeROI[3], NppStreamContext nppStreamCtx)
Huffman Decoding of the JPEG decoding on the host.
Part of decoding run on GPU.
Definition: nppi_compression_functions.h:858
NppStatus nppiDCTQuantFwd8x8LS_JPEG_8u16s_C1R_Ctx(const Npp8u *pSrc, int nSrcStep, Npp16s *pDst, int nDstStep, const Npp16u *pQuantFwdTable, NppiSize oSizeROI, NppStreamContext nppStreamCtx)
Forward DCT, quantization and level shift part of the JPEG encoding.
NppStatus nppiDecodeHuffmanSpecInitHost_JPEG(const Npp8u *pRawHuffmanTable, NppiHuffmanTableType eTableType, NppiDecodeHuffmanSpec *pHuffmanSpec)
Creates a Huffman table in a format that is suitable for the decoder on the host. ...
NppStatus nppiQuantInvTableInit_JPEG_8u16u(const Npp8u *hpQuantRawTable, Npp16u *hpQuantFwdRawTable)
Initializes a quantization table for nppiDCTQuantInv8x8LS_JPEG_16s8u_C1R().
NppStatus nppiEncodeHuffmanGetSize(NppiSize oSize, int nChannels, size_t *pBufSize)
Calculates the size of the temporary buffer for baseline Huffman encoding.
NppStatus nppiEncodeHuffmanScan_JPEG_8u16s_P3R(Npp16s *apSrc[3], Npp32s aSrcStep[3], Npp32s nRestartInterval, Npp32s nSs, Npp32s nSe, Npp32s nAh, Npp32s nAl, Npp8u *pDst, Npp32s *nLength, NppiEncodeHuffmanSpec *apHuffmanDCTable[3], NppiEncodeHuffmanSpec *apHuffmanACTable[3], NppiSize aSizeROI[3], Npp8u *pTempStorage)
Npp8u nSe
End of spectral selection (index of first coefficient), 0-63.
Definition: nppi_compression_functions.h:832
NppStatus nppiEncodeHuffmanScan_JPEG_8u16s_P3R_Ctx(Npp16s *apSrc[3], Npp32s aSrcStep[3], Npp32s nRestartInterval, Npp32s nSs, Npp32s nSe, Npp32s nAh, Npp32s nAl, Npp8u *pDst, Npp32s *nLength, NppiEncodeHuffmanSpec *apHuffmanDCTable[3], NppiEncodeHuffmanSpec *apHuffmanACTable[3], NppiSize aSizeROI[3], Npp8u *pTempStorage, NppStreamContext nppStreamCtx)
Huffman Encoding of the JPEG Encoding.
NppStatus nppiDCTInv4x4_WebP_16s_C1R_Ctx(const Npp16s *pSrc, int nSrcStep, Npp16s *pDst, int nDstStep, NppiSize oSizeROI, NppStreamContext nppStreamCtx)
Inverse DCT in WebP decoding.
Npp8u * pGpuScan
Pointer to device memory used for compressed scan data.
Definition: nppi_compression_functions.h:897
struct NppiDecodeHuffmanSpec NppiDecodeHuffmanSpec
Definition: nppi_compression_functions.h:386
Npp32s length
Length of compressed (encoded) scan data.
Definition: nppi_compression_functions.h:836
NppStatus nppiEncodeOptimizeHuffmanScan_JPEG_8u16s_P3R(Npp16s *apSrc[3], Npp32s aSrcStep[3], Npp32s nRestartInterval, Npp32s nSs, Npp32s nSe, Npp32s nAh, Npp32s nAl, Npp8u *pDst, Npp32s *pLength, Npp8u *hpCodesDC[3], Npp8u *hpTableDC[3], Npp8u *hpCodesAC[3], Npp8u *hpTableAC[3], NppiEncodeHuffmanSpec *apHuffmanDCTable[3], NppiEncodeHuffmanSpec *apHuffmanACTable[3], NppiSize oSizeROI[3], Npp8u *pTempStorage)