![]() |
PUCLIB 1.7.0.0
PHOTRON USB Control Library
|
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. (UC1 only) | |
| DLL_EXPORT PUCRESULT WINAPI | ExtractSequenceNo_GBE2 (const PUCHAR pData, PUSHORT pSeqNo) |
| This extracts the sequence number from the transfer data. (GbE-2 only) | |
| 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. | |
| DLL_EXPORT PUCRESULT WINAPI | GetTimeCode2EPOC (PUINT8 pSrc, time_t *time) |
| This converts the time code in the transfer data into epoch time. (GbE-2 only) | |
| DLL_EXPORT PUCRESULT WINAPI | ExtractGbe2XferHeader (const PUCHAR pData, PPUC_GBE2_XFER_HEADER pHeader) |
| This parses the header of the transfer data. (GbE-2 only) | |
| DLL_EXPORT PUCRESULT WINAPI | SetWhiteBalanceGain (double nGainR, double nGainG, double nGainB) |
| Sets the per-channel white balance gain applied during GbE-2 color (bayer) decoding. 1.0 = no change. Stored process-globally and used by the next decode.. | |
| 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.
| [out] | pDst | The 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) For the GbE-2 color model, BGR 24-bit data (3 bytes per pixel, nWidth*3 bytes per line) is written, so at least nWidth*nHeight*3 bytes are required. |
| [in] | nX | The upper left coordinate X for starting unpacking. This must be 0, or a multiple of 8. |
| [in] | nY | The upper left coordinate Y for starting unpacking. This must be 0, or a multiple of 8. |
| [in] | nWidth | The width for unpacking |
| [in] | nHeight | The height for unpacking |
| [in] | nLineBytes | The number of bytes of the buffer width at the unpacking destination For the GbE-2 color model, pass nWidth. (This is the line width of the bayer data before conversion, not of the BGR output.) |
| [in] | pSrc | The compressed image data |
| [in] | pQVals | A quantization table |
| 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.
| [out] | pDst | The 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) For the GbE-2 color model, BGR 24-bit data (3 bytes per pixel, nWidth*3 bytes per line) is written, so at least nWidth*nHeight*3 bytes are required. |
| [in] | nX | The upper left coordinate X for starting unpacking. This must be 0, or a multiple of 8. |
| [in] | nY | The upper left coordinate Y for starting unpacking. This must be 0, or a multiple of 8. |
| [in] | nWidth | The width for unpacking |
| [in] | nHeight | The height for unpacking |
| [in] | nLineBytes | The number of bytes of the buffer width at the unpacking destination For the GbE-2 color model, pass nWidth. (This is the line width of the bayer data before conversion, not of the BGR output.) |
| [in] | pSrc | The compressed image data |
| [in] | pQVals | A quantization table |
| [in] | nThreadCount | The number of threads to process in multiple threads. |
| 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.
| [out] | pDst | The buffer at the decoding destination. Must be allocated for the total number of blocks included in the decoding range. |
| [in] | nBlockX | The block coordinates X for starting decoding |
| [in] | nBlockY | The block coordinates Y for starting decoding |
| [in] | nBlockCountX | Number of blocks in the X direction to be decoded |
| [in] | nBlockCountY | Number of blocks in the Y direction to be decoded |
| [in] | pSrc | The compressed image data |
| 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.
| [out] | pDst | The 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] | nX | The upper left coordinate X for starting unpacking. This must be 0, or a multiple of 8. |
| [in] | nY | The upper left coordinate Y for starting unpacking. This must be 0, or a multiple of 8. |
| [in] | nWidth | The width for unpacking. For the GbE-2, this must be a multiple of 8. |
| [in] | nHeight | The height for unpacking. For the GbE-2, this must be a multiple of 8. |
| [in] | nLineBytes | The number of bytes of the buffer width at the unpacking destination. This must be at least nWidth * 2. |
| [in] | pSrc | The compressed image data |
| [in] | pQVals | A quantization table |
| 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)
| [in] | download | If false is specified, the decoded data is stored in device (GPU) memory; if true is specified, it is stored in host (CPU) memory. |
| [in] | pSrc | The original encoded frame data to be decoded. |
| [out] | pDst | The decoded processing result frame data, which is output to device memory or host memory depending on the setting of the download argument. |
| [in] | lineBytes | The 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. |
| DLL_EXPORT PUCRESULT WINAPI ExtractGbe2XferHeader | ( | const PUCHAR | pData, |
| PPUC_GBE2_XFER_HEADER | pHeader ) |
This parses the header of the transfer data. (GbE-2 only)
This retrieves the image number, the packet loss flag, the synchronization/PTP/trigger status and the epoch time all at once.
The model is identified by the model code in the transfer data header (2nd byte). For UC1 data, PUC_ERROR_NOTSUPPORT will be returned.
For data with an unknown model code, PUC_ERROR_XFER_DATA_INVALID_HEADER will be returned. This also applies to a frame whose first packet (including the header) was lost, because the missing part is filled with 0.
If failed, the output is not modified.
| [in] | pData | The transfer data |
| [out] | pHeader | The storage destination for the parsed header |
| DLL_EXPORT PUCRESULT WINAPI ExtractSequenceNo | ( | const PUCHAR | pData, |
| UINT32 | nWidth, | ||
| UINT32 | nHeight, | ||
| PUSHORT | pSeqNo ) |
This extracts the sequence number from the compressed image data. (UC1 only)
The model is identified by the model code in the transfer data header (2nd byte).
For GbE-2 data, PUC_ERROR_NOTSUPPORT will be returned. Use ExtractSequenceNo_GBE2 instead.
For data with an unknown model code, PUC_ERROR_XFER_DATA_INVALID_HEADER will be returned.
| [in] | pData | The compressed image data |
| [in] | nWidth | The image width |
| [in] | nHeight | The image height |
| [out] | pSeqNo | The storage destination for the sequence number extracted |
| DLL_EXPORT PUCRESULT WINAPI ExtractSequenceNo_GBE2 | ( | const PUCHAR | pData, |
| PUSHORT | pSeqNo ) |
This extracts the sequence number from the transfer data. (GbE-2 only)
Unlike ExtractSequenceNo, the resolution is not required because the sequence number is stored in the transfer data header.
The model is identified by the model code in the transfer data header (2nd byte). For UC1 data, PUC_ERROR_NOTSUPPORT will be returned.
For data with an unknown model code, PUC_ERROR_XFER_DATA_INVALID_HEADER will be returned. This also applies to a frame whose first packet (including the header) was lost, because the missing part is filled with 0.
If failed, the output is not modified.
| [in] | pData | The transfer data |
| [out] | pSeqNo | The storage destination for the sequence number |
| DLL_EXPORT PUCRESULT WINAPI GetAvailableGPUProcess | ( | ) |
This retrieves whether the PC is capable of GPU processing.
| DLL_EXPORT PUCRESULT WINAPI GetGPULastError | ( | int & | errorCode | ) |
This retrieves the error code from the last GPU processing.
| [out] | The | error code from GPU. |
| DLL_EXPORT PUCRESULT WINAPI GetTimeCode2EPOC | ( | PUINT8 | pSrc, |
| time_t * | time ) |
This converts the time code in the transfer data into epoch time. (GbE-2 only)
The model is identified by the model code in the transfer data header (2nd byte).
For a model that has no time code, PUC_ERROR_NOTSUPPORT will be returned.
| [in] | pSrc | The transfer data |
| [out] | time | The storage destination for the epoch time (seconds) |
| DLL_EXPORT PUCRESULT WINAPI IsSetupGPUDecode | ( | bool & | status | ) |
This retrieves whether GPU decode memory is allocated.
| [out] | status | true : allocated, false : not allocated. |
| DLL_EXPORT PUCRESULT WINAPI SetupGPUDecode | ( | PUC_GPU_SETUP_PARAM | param | ) |
Allocates memory for GPU processing.
| [in] | param | This is a configuration parameter. |
| DLL_EXPORT PUCRESULT WINAPI SetWhiteBalanceGain | ( | double | nGainR, |
| double | nGainG, | ||
| double | nGainB ) |
Sets the per-channel white balance gain applied during GbE-2 color (bayer) decoding. 1.0 = no change. Stored process-globally and used by the next decode..
| DLL_EXPORT PUCRESULT WINAPI TeardownGPUDecode | ( | ) |
Releases memory used by GPU processing.