Library/ManagedCuda/NPP/JPEGCompression.cs
/// <summary>
/// Huffman Encoding of the JPEG Encoding.<para/>
/// Input is expected to be 64x1 macro blocks and output is expected as byte stuffed huffman encoded JPEG scan.
/// </summary>
/// <param name="pSrc">Source image.</param>
/// <param name="restartInterval">Restart Interval, see JPEG standard.</param>
/// <param name="Ss">Start Coefficient, see JPEG standard.</param>
/// <param name="Se">End Coefficient, see JPEG standard.</param>
/// <param name="Ah">Bit Approximation High, see JPEG standard.</param>
/// <param name="Al">Bit Approximation Low, see JPEG standard.</param>
/// <param name="pDst">Byte-stuffed huffman encoded JPEG scan.</param>
/// <param name="nLength">Byte length of the huffman encoded JPEG scan.</param>
/// <param name="pHuffmanTableDC">DC Huffman table.</param>
/// <param name="pHuffmanTableAC">AC Huffman table.</param>
/// <param name="oSizeROI">ROI</param>
/// <param name="buffer">Scratch buffer</param>
Huffman Encoding of the JPEG Encoding.
Input is expected to be 64x1 macro blocks and output is expected as byte stuffed huffman encoded JPEG scan.
Huffman Encoding of the JPEG Encoding . Input is expected to be 64x1 macro blocks and output is expected as byte stuffed huffman encoded JPEG scan .
public static void EncodeHuffmanScan(NPPImage_16sC1 pSrc, int restartInterval, int Ss, int Se, int Ah, int Al,
					CudaDeviceVariable<byte> pDst, ref int nLength, NppiEncodeHuffmanSpec pHuffmanTableDC, NppiEncodeHuffmanSpec pHuffmanTableAC, NppiSize oSizeROI, CudaDeviceVariable<byte> buffer)
		{
			NppStatus status;
			status = NPPNativeMethods.NPPi.CompressionDCT.nppiEncodeHuffmanScan_JPEG_8u16s_P1R(pSrc.DevicePointer, pSrc.Pitch, restartInterval, Ss, Se, Ah, Al, pDst.DevicePointer, ref nLength, pHuffmanTableDC, pHuffmanTableAC, oSizeROI, buffer.DevicePointer);
			Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "nppiEncodeHuffmanScan_JPEG_8u16s_P1R", status));
			NPPException.CheckNppStatus(status, null);
		}
public static void EncodeHuffmanScan ( NPPImage_16sC1 pSrc , int restartInterval , int Ss , int Se , int Ah , int Al , CudaDeviceVariable < byte > pDst , ref int nLength , NppiEncodeHuffmanSpec pHuffmanTableDC , NppiEncodeHuffmanSpec pHuffmanTableAC , NppiSize oSizeROI , CudaDeviceVariable < byte > buffer ) { NppStatus status ; status = NPPNativeMethods . NPPi . CompressionDCT . nppiEncodeHuffmanScan_JPEG_8u16s_P1R ( pSrc . DevicePointer , pSrc . Pitch , restartInterval , Ss , Se , Ah , Al , pDst . DevicePointer , ref nLength , pHuffmanTableDC , pHuffmanTableAC , oSizeROI , buffer . DevicePointer ) ; Debug . WriteLine ( String . Format ( " " , DateTime . Now , " " , status ) ) ; NPPException . CheckNppStatus ( status , null ) ; }
Huffman Encoding of the JPEG Encoding.
Huffman Encoding of the JPEG Encoding .
pSrc
NPPImage_16sC1
None
restartInterval
int
Restart Interval, see JPEG standard.
Restart Interval see JPEG standard .
Ss
int
Start Coefficient, see JPEG standard.
Start Coefficient see JPEG standard .
Se
int
End Coefficient, see JPEG standard.
End Coefficient see JPEG standard .
Ah
int
Bit Approximation High, see JPEG standard.
Bit Approximation High see JPEG standard .
Al
int
Bit Approximation Low, see JPEG standard.
Bit Approximation Low see JPEG standard .
pDst
CudaDeviceVariable<byte>
Byte-stuffed huffman encoded JPEG scan.
Byte - stuffed huffman encoded JPEG scan .
int
ref
pHuffmanTableDC
NppiEncodeHuffmanSpec
DC Huffman table.
DC Huffman table .
pHuffmanTableAC
NppiEncodeHuffmanSpec
AC Huffman table.
AC Huffman table .
oSizeROI
NppiSize
None
buffer
CudaDeviceVariable<byte>
None
nLength
Byte length of the huffman encoded JPEG scan.
Byte length of the huffman encoded JPEG scan .