pucutil 名前空間 API (C++)
PUCUTIL.h では、画像復号 (デコード) 処理 API で解説している PUC_ プレフィックス付きのC関数と全く同じ機能を、C++ の pucutil:: 名前空間内の関数として呼び出せるように提供しています。using namespace pucutil; と記述すれば、PUC_DecodeData を DecodeData のように短く呼び出せます。
1. デコード処理 (PUC_DecodeData 等の pucutil 版)
Section titled “1. デコード処理 (PUC_DecodeData 等の pucutil 版)”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);}各関数の引数・戻り値の意味は、画像復号 (デコード) 処理 API に記載の対応する PUC_ 関数と同一です(例:pucutil::DecodeData ⇔ PUC_DecodeData)。
#include "PUCUTIL.h"using namespace pucutil;
PUCRESULT ret = DecodeData(pDst, 0, 0, width, height, lineBytes, pSrc, qVals);2. GPU (CUDA) デコード処理 (pucutil 版)
Section titled “2. GPU (CUDA) デコード処理 (pucutil 版)”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);}こちらも引数・戻り値の意味は 画像復号 (デコード) 処理 API のGPUデコード節に記載の PUC_ 関数と同一です。
画像復号 (デコード) 処理 APIPUC_DecodeData 等、C言語版の完全なAPIリファレンス
