Skip to content
⚡ Developer documentation for INFINICAM, the real-time high-speed camera (UC-1.1 / GbE-2)

pucutil Namespace API (C++)

PUCUTIL.h provides exactly the same functionality as the PUC_-prefixed C functions described in Image Decoding API, callable as functions within the C++ pucutil:: namespace. By writing using namespace pucutil;, you can call PUC_DecodeData more concisely as DecodeData.


1. Decoding (pucutil versions of PUC_DecodeData, etc.)

Section titled “1. Decoding (pucutil versions of PUC_DecodeData, etc.)”
namespace pucutil {
PUCRESULT WINAPI ExtractSequenceNo(const PUCHAR pData, UINT32 nWidth, UINT32 nHeight, PUSHORT pSeqNo);
PUCRESULT WINAPI DecodeData(PUINT8 pDst, UINT32 nX, UINT32 nY, UINT32 nWidth, UINT32 nHeight, UINT32 nLineBytes, const PUINT8 pSrc, const PUSHORT pQVals);
PUCRESULT WINAPI DecodeDataMultiThread(PUINT8 pDst, UINT32 nX, UINT32 nY, UINT32 nWidth, UINT32 nHeight, UINT32 nLineBytes, const PUINT8 pSrc, const PUSHORT pQVals, UINT32 nThreadCount);
PUCRESULT WINAPI DecodeDCTData(PINT16 pDst, UINT32 nX, UINT32 nY, UINT32 nWidth, UINT32 nHeight, UINT32 nLineBytes, const PUINT8 pSrc, const PUSHORT pQVals);
PUCRESULT WINAPI DecodeDCData(PUINT8 pDst, UINT32 nBlockX, UINT32 nBlockY, UINT32 nBlockCountX, UINT32 nBlockCountY, const PUINT8 pSrc);
PUCRESULT WINAPI SetWhiteBalanceGain(double nGainR, double nGainG, double nGainB);
PUCRESULT WINAPI GetTimeCode2EPOC(PUINT8 pSrc, time_t* time);
}

The meaning of each function’s arguments and return value is identical to the corresponding PUC_ function described in Image Decoding API (for example, pucutil::DecodeData ⇔ PUC_DecodeData).

Usage example
#include "PUCUTIL.h"
using namespace pucutil;
PUCRESULT ret = DecodeData(pDst, 0, 0, width, height, lineBytes, pSrc, qVals);

namespace pucutil {
PUCRESULT WINAPI GetAvailableGPUProcess();
PUCRESULT WINAPI SetupGPUDecode(PUC_GPU_SETUP_PARAM param);
PUCRESULT WINAPI TeardownGPUDecode();
PUCRESULT WINAPI DecodeGPU(bool download, unsigned char* pSrc, unsigned char** pDst, UINT32 lineBytes);
PUCRESULT WINAPI GetGPULastError(int& errorCode);
PUCRESULT WINAPI IsSetupGPUDecode(bool& status);
}

Here too, the meaning of the arguments and return values is identical to the PUC_ functions described in the GPU decoding section of Image Decoding API.