NVIDIA 2D Image And Signal Performance Primitives (NPP)  Version 10.2.*.*
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
nppi_compression_functions.h
1  /* Copyright 2009-2019 NVIDIA Corporation. All rights reserved.
2  *
3  * NOTICE TO LICENSEE:
4  *
5  * The source code and/or documentation ("Licensed Deliverables") are
6  * subject to NVIDIA intellectual property rights under U.S. and
7  * international Copyright laws.
8  *
9  * The Licensed Deliverables contained herein are PROPRIETARY and
10  * CONFIDENTIAL to NVIDIA and are being provided under the terms and
11  * conditions of a form of NVIDIA software license agreement by and
12  * between NVIDIA and Licensee ("License Agreement") or electronically
13  * accepted by Licensee. Notwithstanding any terms or conditions to
14  * the contrary in the License Agreement, reproduction or disclosure
15  * of the Licensed Deliverables to any third party without the express
16  * written consent of NVIDIA is prohibited.
17  *
18  * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
19  * LICENSE AGREEMENT, NVIDIA MAKES NO REPRESENTATION ABOUT THE
20  * SUITABILITY OF THESE LICENSED DELIVERABLES FOR ANY PURPOSE. THEY ARE
21  * PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND.
22  * NVIDIA DISCLAIMS ALL WARRANTIES WITH REGARD TO THESE LICENSED
23  * DELIVERABLES, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY,
24  * NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE.
25  * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
26  * LICENSE AGREEMENT, IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY
27  * SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, OR ANY
28  * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
29  * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
30  * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
31  * OF THESE LICENSED DELIVERABLES.
32  *
33  * U.S. Government End Users. These Licensed Deliverables are a
34  * "commercial item" as that term is defined at 48 C.F.R. 2.101 (OCT
35  * 1995), consisting of "commercial computer software" and "commercial
36  * computer software documentation" as such terms are used in 48
37  * C.F.R. 12.212 (SEPT 1995) and are provided to the U.S. Government
38  * only as a commercial end item. Consistent with 48 C.F.R.12.212 and
39  * 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), all
40  * U.S. Government End Users acquire the Licensed Deliverables with
41  * only those rights set forth herein.
42  *
43  * Any use of the Licensed Deliverables in individual and commercial
44  * software must include, in the user documentation and internal
45  * comments to the code, the above Disclaimer and U.S. Government End
46  * Users Notice.
47  */
48 #ifndef NV_NPPI_COMPRESSION_FUNCTIONS_H
49 #define NV_NPPI_COMPRESSION_FUNCTIONS_H
50 
56 #include "nppdefs.h"
57 
58 #ifdef __cplusplus
59 extern "C" {
60 #endif
61 
98 NppStatus
99 nppiQuantFwdRawTableInit_JPEG_8u(Npp8u * hpQuantRawTable, int nQualityFactor);
100 
119 NppStatus
120 nppiQuantFwdTableInit_JPEG_8u16u(const Npp8u * hpQuantRawTable, Npp16u * hpQuantFwdRawTable);
121 
138 NppStatus
139 nppiQuantInvTableInit_JPEG_8u16u(const Npp8u * hpQuantRawTable, Npp16u * hpQuantFwdRawTable);
140 
141 
162 NppStatus
163 nppiDCTQuantFwd8x8LS_JPEG_8u16s_C1R_Ctx(const Npp8u * pSrc, int nSrcStep,
164  Npp16s * pDst, int nDstStep,
165  const Npp16u * pQuantFwdTable, NppiSize oSizeROI, NppStreamContext nppStreamCtx);
166 
167 NppStatus
168 nppiDCTQuantFwd8x8LS_JPEG_8u16s_C1R(const Npp8u * pSrc, int nSrcStep,
169  Npp16s * pDst, int nDstStep,
170  const Npp16u * pQuantFwdTable, NppiSize oSizeROI);
171 
192 NppStatus
193 nppiDCTQuantInv8x8LS_JPEG_16s8u_C1R_Ctx(const Npp16s * pSrc, int nSrcStep,
194  Npp8u * pDst, int nDstStep,
195  const Npp16u * pQuantInvTable, NppiSize oSizeROI, NppStreamContext nppStreamCtx);
196 
197 NppStatus
198 nppiDCTQuantInv8x8LS_JPEG_16s8u_C1R(const Npp16s * pSrc, int nSrcStep,
199  Npp8u * pDst, int nDstStep,
200  const Npp16u * pQuantInvTable, NppiSize oSizeROI);
201 
202 
203 #if defined (__cplusplus)
204 struct NppiDCTState;
205 #else
206 typedef struct NppiDCTState NppiDCTState;
207 #endif
208 
209 
226 
228 
244 
267 NppStatus
268 nppiDCTQuantFwd8x8LS_JPEG_8u16s_C1R_NEW_Ctx(const Npp8u * pSrc, int nSrcStep,
269  Npp16s * pDst, int nDstStep,
270  const Npp8u * pQuantizationTable, NppiSize oSizeROI,
271  NppiDCTState* pState, NppStreamContext nppStreamCtx);
272 
273 NppStatus
274 nppiDCTQuantFwd8x8LS_JPEG_8u16s_C1R_NEW(const Npp8u * pSrc, int nSrcStep,
275  Npp16s * pDst, int nDstStep,
276  const Npp8u * pQuantizationTable, NppiSize oSizeROI,
277  NppiDCTState* pState);
278 
301 NppStatus
302 nppiDCTQuantInv8x8LS_JPEG_16s8u_C1R_NEW_Ctx(const Npp16s * pSrc, int nSrcStep,
303  Npp8u * pDst, int nDstStep,
304  const Npp8u * pQuantizationTable, NppiSize oSizeROI,
305  NppiDCTState* pState, NppStreamContext nppStreamCtx);
306 
307 NppStatus
308 nppiDCTQuantInv8x8LS_JPEG_16s8u_C1R_NEW(const Npp16s * pSrc, int nSrcStep,
309  Npp8u * pDst, int nDstStep,
310  const Npp8u * pQuantizationTable, NppiSize oSizeROI,
311  NppiDCTState* pState);
312 
335 NppStatus
336 nppiDCTQuant16Fwd8x8LS_JPEG_8u16s_C1R_NEW_Ctx(const Npp8u * pSrc, int nSrcStep,
337  Npp16s * pDst, int nDstStep,
338  const Npp16u * pQuantizationTable, NppiSize oSizeROI,
339  NppiDCTState* pState, NppStreamContext nppStreamCtx);
340 
341 NppStatus
342 nppiDCTQuant16Fwd8x8LS_JPEG_8u16s_C1R_NEW(const Npp8u * pSrc, int nSrcStep,
343  Npp16s * pDst, int nDstStep,
344  const Npp16u * pQuantizationTable, NppiSize oSizeROI,
345  NppiDCTState* pState);
346 
369 NppStatus
370 nppiDCTQuant16Inv8x8LS_JPEG_16s8u_C1R_NEW_Ctx(const Npp16s * pSrc, int nSrcStep,
371  Npp8u * pDst, int nDstStep,
372  const Npp16u * pQuantizationTable, NppiSize oSizeROI,
373  NppiDCTState* pState, NppStreamContext nppStreamCtx);
374 
375 NppStatus
376 nppiDCTQuant16Inv8x8LS_JPEG_16s8u_C1R_NEW(const Npp16s * pSrc, int nSrcStep,
377  Npp8u * pDst, int nDstStep,
378  const Npp16u * pQuantizationTable, NppiSize oSizeROI,
379  NppiDCTState* pState);
380 
383 #if defined (__cplusplus)
384 struct NppiDecodeHuffmanSpec;
385 #else
387 #endif
388 
395 NppStatus
397 
406 NppStatus
407 nppiDecodeHuffmanSpecInitHost_JPEG(const Npp8u* pRawHuffmanTable, NppiHuffmanTableType eTableType, NppiDecodeHuffmanSpec *pHuffmanSpec);
408 
417 NppStatus
418 nppiDecodeHuffmanSpecInitAllocHost_JPEG(const Npp8u* pRawHuffmanTable, NppiHuffmanTableType eTableType, NppiDecodeHuffmanSpec **ppHuffmanSpec);
419 
425 NppStatus
427 
452 NppStatus
454  Npp32s restartInterval, Npp32s Ss, Npp32s Se, Npp32s Ah, Npp32s Al,
455  Npp16s * pDst, Npp32s nDstStep,
456  NppiDecodeHuffmanSpec * pHuffmanTableDC,
457  NppiDecodeHuffmanSpec * pHuffmanTableAC,
458  NppiSize oSizeROI, NppStreamContext nppStreamCtx);
459 
460 NppStatus
462  Npp32s restartInterval, Npp32s Ss, Npp32s Se, Npp32s Ah, Npp32s Al,
463  Npp16s * pDst, Npp32s nDstStep,
464  NppiDecodeHuffmanSpec * pHuffmanTableDC,
465  NppiDecodeHuffmanSpec * pHuffmanTableAC,
466  NppiSize oSizeROI);
467 
492  NppStatus
494  Npp32s nRestartInterval, Npp32s nSs, Npp32s nSe, Npp32s nAh, Npp32s nAl,
495  Npp16s * apDst[3], Npp32s aDstStep[3],
496  NppiDecodeHuffmanSpec * apHuffmanDCTable[3],
497  NppiDecodeHuffmanSpec * apHuffmanACTable[3],
498  NppiSize aSizeROI[3], NppStreamContext nppStreamCtx);
499 
500  NppStatus
502  Npp32s nRestartInterval, Npp32s nSs, Npp32s nSe, Npp32s nAh, Npp32s nAl,
503  Npp16s * apDst[3], Npp32s aDstStep[3],
504  NppiDecodeHuffmanSpec * apHuffmanDCTable[3],
505  NppiDecodeHuffmanSpec * apHuffmanACTable[3],
506  NppiSize aSizeROI[3]);
507 
508 #if defined (__cplusplus)
509 struct NppiEncodeHuffmanSpec;
510 #else
512 #endif
513 
514 
521 NppStatus
523 
533 NppStatus
534 nppiEncodeHuffmanSpecInit_JPEG_Ctx(const Npp8u* pRawHuffmanTable, NppiHuffmanTableType eTableType, NppiEncodeHuffmanSpec *pHuffmanSpec, NppStreamContext nppStreamCtx);
535 
536 NppStatus
537 nppiEncodeHuffmanSpecInit_JPEG(const Npp8u* pRawHuffmanTable, NppiHuffmanTableType eTableType, NppiEncodeHuffmanSpec *pHuffmanSpec);
538 
548 NppStatus
549 nppiEncodeHuffmanSpecInitAlloc_JPEG_Ctx(const Npp8u* pRawHuffmanTable, NppiHuffmanTableType eTableType, NppiEncodeHuffmanSpec **ppHuffmanSpec, NppStreamContext nppStreamCtx);
550 
551 NppStatus
552 nppiEncodeHuffmanSpecInitAlloc_JPEG(const Npp8u* pRawHuffmanTable, NppiHuffmanTableType eTableType, NppiEncodeHuffmanSpec **ppHuffmanSpec);
553 
559 NppStatus
561 
588 NppStatus
590  Npp32s nRestartInterval, Npp32s nSs, Npp32s nSe, Npp32s nAh, Npp32s nAl,
591  Npp8u * pDst, Npp32s* nLength,
592  NppiEncodeHuffmanSpec * pHuffmanTableDC,
593  NppiEncodeHuffmanSpec * pHuffmanTableAC,
594  NppiSize oSizeROI,
595  Npp8u* pTempStorage, NppStreamContext nppStreamCtx);
596 
597 NppStatus
598 nppiEncodeHuffmanScan_JPEG_8u16s_P1R(const Npp16s * pSrc, Npp32s nSrcStep,
599  Npp32s nRestartInterval, Npp32s nSs, Npp32s nSe, Npp32s nAh, Npp32s nAl,
600  Npp8u * pDst, Npp32s* nLength,
601  NppiEncodeHuffmanSpec * pHuffmanTableDC,
602  NppiEncodeHuffmanSpec * pHuffmanTableAC,
603  NppiSize oSizeROI,
604  Npp8u* pTempStorage);
605 
632  NppStatus
634  Npp32s nRestartInterval, Npp32s nSs, Npp32s nSe, Npp32s nAh, Npp32s nAl,
635  Npp8u * pDst, Npp32s* nLength,
636  NppiEncodeHuffmanSpec * apHuffmanDCTable[3],
637  NppiEncodeHuffmanSpec * apHuffmanACTable[3],
638  NppiSize aSizeROI[3],
639  Npp8u* pTempStorage, NppStreamContext nppStreamCtx);
640 
641 NppStatus
642  nppiEncodeHuffmanScan_JPEG_8u16s_P3R(Npp16s * apSrc[3], Npp32s aSrcStep[3],
643  Npp32s nRestartInterval, Npp32s nSs, Npp32s nSe, Npp32s nAh, Npp32s nAl,
644  Npp8u * pDst, Npp32s* nLength,
645  NppiEncodeHuffmanSpec * apHuffmanDCTable[3],
646  NppiEncodeHuffmanSpec * apHuffmanACTable[3],
647  NppiSize aSizeROI[3],
648  Npp8u* pTempStorage);
649 
680 NppStatus
682  Npp32s nRestartInterval, Npp32s nSs,
683  Npp32s nSe, Npp32s nAh, Npp32s nAl,
684  Npp8u * pDst, Npp32s * pLength,
685  Npp8u * hpCodesDC, Npp8u * hpTableDC,
686  Npp8u * hpCodesAC, Npp8u * hpTableAC,
687  NppiEncodeHuffmanSpec * pHuffmanDCTable,
688  NppiEncodeHuffmanSpec * pHuffmanACTable,
689  NppiSize oSizeROI, Npp8u * pTempStorage, NppStreamContext nppStreamCtx);
690 
691 NppStatus
693  Npp32s nRestartInterval, Npp32s nSs,
694  Npp32s nSe, Npp32s nAh, Npp32s nAl,
695  Npp8u * pDst, Npp32s * pLength,
696  Npp8u * hpCodesDC, Npp8u * hpTableDC,
697  Npp8u * hpCodesAC, Npp8u * hpTableAC,
698  NppiEncodeHuffmanSpec * pHuffmanDCTable,
699  NppiEncodeHuffmanSpec * pHuffmanACTable,
700  NppiSize oSizeROI, Npp8u * pTempStorage);
701 
732 NppStatus
734  Npp32s nRestartInterval, Npp32s nSs,
735  Npp32s nSe, Npp32s nAh, Npp32s nAl,
736  Npp8u * pDst, Npp32s * pLength,
737  Npp8u * hpCodesDC[3], Npp8u * hpTableDC[3],
738  Npp8u * hpCodesAC[3], Npp8u * hpTableAC[3],
739  NppiEncodeHuffmanSpec * apHuffmanDCTable[3],
740  NppiEncodeHuffmanSpec * apHuffmanACTable[3],
741  NppiSize oSizeROI[3], Npp8u * pTempStorage, NppStreamContext nppStreamCtx);
742 
743 NppStatus
745  Npp32s nRestartInterval, Npp32s nSs,
746  Npp32s nSe, Npp32s nAh, Npp32s nAl,
747  Npp8u * pDst, Npp32s * pLength,
748  Npp8u * hpCodesDC[3], Npp8u * hpTableDC[3],
749  Npp8u * hpCodesAC[3], Npp8u * hpTableAC[3],
750  NppiEncodeHuffmanSpec * apHuffmanDCTable[3],
751  NppiEncodeHuffmanSpec * apHuffmanACTable[3],
752  NppiSize oSizeROI[3], Npp8u * pTempStorage);
753 
771 NppStatus nppiEncodeHuffmanGetSize(NppiSize oSize, int nChannels, size_t * pBufSize);
772 
789 NppStatus nppiEncodeOptimizeHuffmanGetSize(NppiSize oSize, int nChannels, int * pBufSize);
790 
791 
801 
807 typedef struct {
810  NppiSize aComponentSubsampling[4];
811  Npp16s * apComponentBuffer[4];
818 
820 typedef struct {
822  Npp8u aComponentIdx[4];
824  Npp8u aComponentDcHtSel[4];
825  Npp8u aComponentAcHtSel[4];
826  const Npp8u * apRawDcHtTable[4];
830  const Npp8u * apRawAcHtTable[4];
838 
854  // SIMPLE can be split into:
860 
863 };
864 
870 typedef struct {
876 
882 #define NPPI_JPEG_DECODE_N_BUFFERS 3
883 
890 typedef struct {
891  const Npp8u * pCpuScan;
905  void * apCpuBuffer[NPPI_JPEG_DECODE_N_BUFFERS];
910  void * apGpuBuffer[NPPI_JPEG_DECODE_N_BUFFERS];
914 
929 NppStatus nppiJpegDecodeJobMemorySize(const NppiJpegDecodeJob * pJob, size_t * aSize);
930 
1003 
1005 
1018 
1029 
1041 
1056 
1079 NppStatus nppiDCTInv4x4_WebP_16s_C1R_Ctx(const Npp16s * pSrc, int nSrcStep, Npp16s * pDst, int nDstStep, NppiSize oSizeROI, NppStreamContext nppStreamCtx);
1080 
1081 NppStatus nppiDCTInv4x4_WebP_16s_C1R(const Npp16s * pSrc, int nSrcStep, Npp16s * pDst, int nDstStep, NppiSize oSizeROI);
1082 
1086 #ifdef __cplusplus
1087 } /* extern "C" */
1088 #endif
1089 
1090 #endif /* NV_NPPI_COMPRESSION_FUNCTIONS_H */
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)

Copyright © 2009-2019 NVIDIA Corporation