PUCLIB 1.6.2.0
PHOTRON USB Control Library
Loading...
Searching...
No Matches
pucutil Namespace Reference

Functions

DLL_EXPORT PUCRESULT WINAPI ExtractSequenceNo (const PUCHAR pData, UINT32 nWidth, UINT32 nHeight, PUSHORT pSeqNo)
 This extracts the sequence number from the compressed image data.
DLL_EXPORT PUCRESULT WINAPI DecodeData (PUINT8 pDst, UINT32 nX, UINT32 nY, UINT32 nWidth, UINT32 nHeight, UINT32 nLineBytes, const PUINT8 pSrc, const PUSHORT pQVals)
 This unpacks the compressed image data to luminance data.
DLL_EXPORT PUCRESULT WINAPI DecodeDataMultiThread (PUINT8 pDst, UINT32 nX, UINT32 nY, UINT32 nWidth, UINT32 nHeight, UINT32 nLineBytes, const PUINT8 pSrc, const PUSHORT pQVals, UINT32 nThreadCount)
 This unpacks the compressed image data to luminance data. This process is multithreaded.
DLL_EXPORT PUCRESULT WINAPI DecodeDCTData (PINT16 pDst, UINT32 nX, UINT32 nY, UINT32 nWidth, UINT32 nHeight, UINT32 nLineBytes, const PUINT8 pSrc, const PUSHORT pQVals)
 This unpacks the compressed image data to DCT coefficients.
DLL_EXPORT PUCRESULT WINAPI DecodeDCData (PUINT8 pDst, UINT32 nBlockX, UINT32 nBlockY, UINT32 nBlockCountX, UINT32 nBlockCountY, const PUINT8 pSrc)
 Decodes the DC component of compressed image data.
DLL_EXPORT PUCRESULT WINAPI GetAvailableGPUProcess ()
 This retrieves whether the PC is capable of GPU processing.
DLL_EXPORT PUCRESULT WINAPI SetupGPUDecode (PUC_GPU_SETUP_PARAM param)
 Allocates memory for GPU processing.
DLL_EXPORT PUCRESULT WINAPI TeardownGPUDecode ()
 Releases memory used by GPU processing.
DLL_EXPORT PUCRESULT WINAPI DecodeGPU (bool download, unsigned char *pSrc, unsigned char **pDst, UINT32 lineBytes)
 This unpacks the compressed image data to luminance data.(GPU processing)
DLL_EXPORT PUCRESULT WINAPI GetGPULastError (int &errorCode)
 This retrieves the error code from the last GPU processing.
DLL_EXPORT PUCRESULT WINAPI IsSetupGPUDecode (bool &status)
 This retrieves whether GPU decode memory is allocated.

Function Documentation

◆ DecodeData()

DLL_EXPORT PUCRESULT WINAPI DecodeData ( PUINT8 pDst,
UINT32 nX,
UINT32 nY,
UINT32 nWidth,
UINT32 nHeight,
UINT32 nLineBytes,
const PUINT8 pSrc,
const PUSHORT pQVals )

This unpacks the compressed image data to luminance data.

Parameters
[out]pDstThe buffer at the unpacking destination. The size of the width must be allocated rounded up to a multiple of four. (e.g., If the width is 1246 px, a buffer is required 1248 bytes at least)
[in]nXThe upper left coordinate X for starting unpacking. This must be 0, or a multiple of 8.
[in]nYThe upper left coordinate Y for starting unpacking. This must be 0, or a multiple of 8.
[in]nWidthThe width for unpacking
[in]nHeightThe height for unpacking
[in]nLineBytesThe number of bytes of the buffer width at the unpacking destination
[in]pSrcThe compressed image data
[in]pQValsA quantization table
Returns
If successful, PUC_SUCCEEDED will be returned. If failed, other responses will be returned.
Note
This function is thread-safe. This function can be executed in parallel.
See also
PUC_GetXferDataSize
PUC_GetMaxXferDataSize

◆ DecodeDataMultiThread()

DLL_EXPORT PUCRESULT WINAPI DecodeDataMultiThread ( PUINT8 pDst,
UINT32 nX,
UINT32 nY,
UINT32 nWidth,
UINT32 nHeight,
UINT32 nLineBytes,
const PUINT8 pSrc,
const PUSHORT pQVals,
UINT32 nThreadCount )

This unpacks the compressed image data to luminance data. This process is multithreaded.

Parameters
[out]pDstThe buffer at the unpacking destination. The size of the width must be allocated rounded up to a multiple of four. (e.g., If the width is 1246 px, a buffer is required 1248 bytes at least)
[in]nXThe upper left coordinate X for starting unpacking. This must be 0, or a multiple of 8.
[in]nYThe upper left coordinate Y for starting unpacking. This must be 0, or a multiple of 8.
[in]nWidthThe width for unpacking
[in]nHeightThe height for unpacking
[in]nLineBytesThe number of bytes of the buffer width at the unpacking destination
[in]pSrcThe compressed image data
[in]pQValsA quantization table
[in]nThreadCountThe number of threads to process in multiple threads.
Returns
If successful, PUC_SUCCEEDED will be returned. If failed, other responses will be returned.
Note
This function is thread-safe. This function can be executed in parallel.
See also
PUC_GetXferDataSize
PUC_GetMaxXferDataSize
PUC_DecodeData

◆ DecodeDCData()

DLL_EXPORT PUCRESULT WINAPI DecodeDCData ( PUINT8 pDst,
UINT32 nBlockX,
UINT32 nBlockY,
UINT32 nBlockCountX,
UINT32 nBlockCountY,
const PUINT8 pSrc )

Decodes the DC component of compressed image data.

Parameters
[out]pDstThe buffer at the decoding destination. Must be allocated for the total number of blocks included in the decoding range.
[in]nBlockXThe block coordinates X for starting decoding
[in]nBlockYThe block coordinates Y for starting decoding
[in]nBlockCountXNumber of blocks in the X direction to be decoded
[in]nBlockCountYNumber of blocks in the Y direction to be decoded
[in]pSrcThe compressed image data
Returns
If successful, PUC_SUCCEEDED will be returned. If failed, other responses will be returned.
Note
This function is thread-safe. This function can be executed in parallel.
See also
PUC_GetXferDataSize
PUC_GetMaxXferDataSize

◆ DecodeDCTData()

DLL_EXPORT PUCRESULT WINAPI DecodeDCTData ( PINT16 pDst,
UINT32 nX,
UINT32 nY,
UINT32 nWidth,
UINT32 nHeight,
UINT32 nLineBytes,
const PUINT8 pSrc,
const PUSHORT pQVals )

This unpacks the compressed image data to DCT coefficients.

Parameters
[out]pDstThe buffer at the unpacking destination. The size of the width must be allocated rounded up to a multiple of four. (e.g., If the width is 1246 px, a buffer is required 1248 bytes at least)
[in]nXThe upper left coordinate X for starting unpacking. This must be 0, or a multiple of 8.
[in]nYThe upper left coordinate Y for starting unpacking. This must be 0, or a multiple of 8.
[in]nWidthThe width for unpacking
[in]nHeightThe height for unpacking
[in]nLineBytesThe number of bytes of the buffer width at the unpacking destination
[in]pSrcThe compressed image data
[in]pQValsA quantization table
Returns
If successful, PUC_SUCCEEDED will be returned. If failed, other responses will be returned.
Note
This function is thread-safe. This function can be executed in parallel.
See also
PUC_GetXferDataSize
PUC_GetMaxXferDataSize

◆ DecodeGPU()

DLL_EXPORT PUCRESULT WINAPI DecodeGPU ( bool download,
unsigned char * pSrc,
unsigned char ** pDst,
UINT32 lineBytes )

This unpacks the compressed image data to luminance data.(GPU processing)

Parameters
[in]downloadIf false is specified, the decoded data is stored in device (GPU) memory; if true is specified, it is stored in host (CPU) memory.
[in]pSrcThe original encoded frame data to be decoded.
[out]pDstThe decoded processing result frame data, which is output to device memory or host memory depending on the setting of the download argument.
[in]lineBytesThe number of bytes of the buffer width at the unpacking destination
If the download argument is true, the data decoded by the GPU is copied to the address specified by this argument.
Therefore, it is necessary to allocate a buffer in host memory in advance.
The size of the width must be allocated rounded up to a multiple of four. (e.g., If the width is 1246 px, a buffer is required 1248 bytes at least)
If the download argument is false, the address of the device memory of the data decoded by the GPU is acquired. Allocation of host memory is not required.
Returns
If successful, PUC_SUCCEEDED will be returned. If failed, other responses will be returned.

◆ ExtractSequenceNo()

DLL_EXPORT PUCRESULT WINAPI ExtractSequenceNo ( const PUCHAR pData,
UINT32 nWidth,
UINT32 nHeight,
PUSHORT pSeqNo )

This extracts the sequence number from the compressed image data.

Parameters
[in]pDataThe compressed image data
[in]nWidthThe image width
[in]nHeightThe image height
[out]pSeqNoThe storage destination for the sequence number extracted
Returns
If successful, PUC_SUCCEEDED will be returned. If failed, other responses will be returned.
Note
This function is thread-safe. This function can be executed in parallel.

◆ GetAvailableGPUProcess()

DLL_EXPORT PUCRESULT WINAPI GetAvailableGPUProcess ( )

This retrieves whether the PC is capable of GPU processing.

Returns
Returns PUC_SUCCEEDED if GPU processing is possible, otherwise returns PUC_ERROR_NOTSUPPORT.

◆ GetGPULastError()

DLL_EXPORT PUCRESULT WINAPI GetGPULastError ( int & errorCode)

This retrieves the error code from the last GPU processing.

Parameters
[out]Theerror code from GPU.
Returns
If successful, PUC_SUCCEEDED will be returned. If failed, other responses will be returned.

◆ IsSetupGPUDecode()

DLL_EXPORT PUCRESULT WINAPI IsSetupGPUDecode ( bool & status)

This retrieves whether GPU decode memory is allocated.

Parameters
[out]statustrue : allocated, false : not allocated.
Returns
If successful, PUC_SUCCEEDED will be returned. If failed, other responses will be returned.

◆ SetupGPUDecode()

DLL_EXPORT PUCRESULT WINAPI SetupGPUDecode ( PUC_GPU_SETUP_PARAM param)

Allocates memory for GPU processing.

Parameters
[in]paramThis is a configuration parameter.
Returns
If successful, PUC_SUCCEEDED will be returned. If failed, other responses will be returned.

◆ TeardownGPUDecode()

DLL_EXPORT PUCRESULT WINAPI TeardownGPUDecode ( )

Releases memory used by GPU processing.

Returns
If successful, PUC_SUCCEEDED will be returned. If failed, other responses will be returned.
Note
It is safe to run after releasing the buffer used for PUC_DecodeGPU.