libcm is a C development framework with an emphasis on audio signal processing applications.
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

cmFrameFile.h 20KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360
  1. #ifndef cmFrameFile_h
  2. #define cmFrameFile_h
  3. /*
  4. file -> cmFfFile_t frame*
  5. frame -> cmFfFrame_t mtx*
  6. mtx -> cmFfMtx_t data*
  7. */
  8. #ifdef __cplusplus
  9. extern "C" {
  10. #endif
  11. enum
  12. {
  13. kInvalidFrameTId = 0,
  14. kInvalidStreamId = 0,
  15. kTocFrameTId = -3,
  16. kTocStreamId = -3,
  17. kFileFfTId = 'FrmF',
  18. };
  19. enum
  20. {
  21. kOkFfRC = 0, // 0
  22. kFileOpenFailFfRC, // 1
  23. kFileReadFailFfRC, // 2
  24. kFileWriteFailFfRC, // 3
  25. kFileSeekFailFfRC, // 4
  26. kFileCloseFailFfRC, // 5
  27. kEofFfRC, // 6
  28. kInvalidHandleFfRC, // 7
  29. kMemAllocErrFfRC, // 8
  30. kNotFrameFileFfRC, // 9
  31. kUnknownErrFfRC, // 10
  32. kNoMatchingFrameFfRC, // 11
  33. kInvalidFileModeFfRC, // 12
  34. kJsonFailFfRC, // 13
  35. kInvalidFrameIdxFfRC, // 14
  36. kDuplicateMtxIdFfRC, // 15
  37. kFileTellFailFfRC, // 16
  38. kLHeapFailFfRC, // 17
  39. kTocFrameRdFailFfRC, // 18
  40. kTocRecdNotFoundFfRC, // 19
  41. kBufTooSmallFfRC // 20
  42. };
  43. // row data formats
  44. enum
  45. {
  46. kInvalidFmtId, // 0
  47. kUCharFmtId, // 1
  48. kCharFmtId, // 2
  49. kUShortFmtId, // 3
  50. kShortFmtId, // 4
  51. kULongFmtId, // 5
  52. kLongFmtId, // 6
  53. kUIntFmtId, // 7
  54. kIntFmtId, // 8
  55. kLLongFmtId, // 9
  56. kULLongFmtId, // 10
  57. kOff_tFmtId, // 11
  58. kFloatFmtId, // 12
  59. kDoubleFmtId, // 13
  60. kStringZFmtId, // 14
  61. kBlobFmtId, // 15
  62. kJsonFmtId // 16
  63. };
  64. enum
  65. {
  66. kInvalidUId , // 0
  67. kNoUnitsUId, // 1
  68. kHzUId, // 2
  69. kRadsUId, // 3 -pi to pi
  70. kAmplUId, // 4 -1.0 to 1.0
  71. kPowUId, // 5 amp^2/2
  72. k10DbUId, // 6 10*log10(v)
  73. k20DbUId, // 7 20*log10(v)
  74. kCntUId, // 8 count of elements
  75. kIdxUId, // 9 element index
  76. kBfccUId, // 10
  77. kMfccUId, // 11
  78. kCepsUId, // 12
  79. kD1UFl = 0x80000000 // this is a 1st difference
  80. };
  81. enum
  82. {
  83. kTocMId = -2,
  84. kInvalidMId = 0,// 0
  85. kAudioMId, // 1
  86. kMagMId, // 2
  87. kPhsMId, // 3
  88. kFrqMId, // 4 measured bin frequecies in Hz
  89. kTrkMId, // 5
  90. kRmsMId, // 6
  91. kBinCntMId, // 7 count of frequency domain bins in frame
  92. kWndSmpCntMId, // 8 actual count of samples in FFT window (this is no (binCnt-1)*2)
  93. kAudSmpCntMId, // 9 count of audio samples in frame
  94. kBfccMId, // 10 vector of BFCC's
  95. kBfccBandCntMId,// 11 count of coeff's BFCC vector in this frame
  96. kMfccMId, // 12 vector of MFCC's
  97. kCepsMId, // 13 vector of cepstral coefficients
  98. kConstqMId, // 14 vector of constant
  99. kDataMId // 15 blob of misc data
  100. };
  101. typedef cmHandle_t cmFrameFileH_t;
  102. typedef unsigned cmFfRC_t;
  103. // mtx desc record
  104. typedef struct
  105. {
  106. unsigned type;
  107. unsigned fmtId;
  108. unsigned unitsId;
  109. unsigned rowCnt;
  110. unsigned colCnt;
  111. } cmFfMtx_t;
  112. // frame desc record
  113. typedef struct
  114. {
  115. unsigned type;
  116. unsigned mtxCnt;
  117. unsigned flags; // used internally to track time format (seconds or samples)
  118. unsigned streamId;
  119. union
  120. {
  121. unsigned sampleIdx;
  122. double seconds;
  123. } time;
  124. } cmFfFrame_t;
  125. // file desc record
  126. typedef struct
  127. {
  128. cmChar_t* filenameStr;
  129. unsigned version;
  130. unsigned frameCnt; // count of frames in all streams
  131. double srate; // sample rate for all frames
  132. } cmFfFile_t;
  133. extern cmFrameFileH_t cmFrameFileNullHandle;
  134. cmFfRC_t cmFrameFileCreate( cmFrameFileH_t* hPtr, const char* fn, double srate, cmCtx_t* ctx );
  135. // The fileDescPtrPtr is optional. Set to NULL to ignore.
  136. cmFfRC_t cmFrameFileOpen( cmFrameFileH_t* hPtr, const char* fn, cmCtx_t* ctx, const cmFfFile_t** fileDescPtrPtr );
  137. cmFfRC_t cmFrameFileClose( cmFrameFileH_t* hPtr );
  138. bool cmFrameFileIsValid( cmFrameFileH_t h );
  139. const cmFfFile_t* cmFrameFileDesc( cmFrameFileH_t h );
  140. // Return the count of frames in the requested stream.
  141. unsigned cmFrameFileFrameCount( cmFrameFileH_t h, unsigned streamId );
  142. // Create a frame in a file created via cmFrameFileCreate().
  143. // Set 'sampleIdx' to -1 if seconds is being used instead of samples.
  144. cmFfRC_t cmFrameFileFrameCreate( cmFrameFileH_t h, unsigned frameType, unsigned streamId, unsigned sampleIdx, double secs );
  145. // (W) Complete and write a frame created via an earilier call
  146. // to cmFrameFileFrameCreate()
  147. cmFfRC_t cmFrameFileFrameClose( cmFrameFileH_t h );
  148. // (W) Fill a frame with matrix data. The frame must have been created
  149. // via an earlier call to cmFrameFileCreate().
  150. cmFfRC_t cmFrameFileWriteMtxUChar( cmFrameFileH_t h, unsigned mtxType, unsigned unitsId, const unsigned char* p, unsigned rn, unsigned cn );
  151. cmFfRC_t cmFrameFileWriteMtxChar( cmFrameFileH_t h, unsigned mtxType, unsigned unitsId, const char* p, unsigned rn, unsigned cn );
  152. cmFfRC_t cmFrameFileWriteMtxUShort( cmFrameFileH_t h, unsigned mtxType, unsigned unitsId, const unsigned short* p, unsigned rn, unsigned cn );
  153. cmFfRC_t cmFrameFileWriteMtxShort( cmFrameFileH_t h, unsigned mtxType, unsigned unitsId, const short* p, unsigned rn, unsigned cn );
  154. cmFfRC_t cmFrameFileWriteMtxULong( cmFrameFileH_t h, unsigned mtxType, unsigned unitsId, const unsigned long* p, unsigned rn, unsigned cn );
  155. cmFfRC_t cmFrameFileWriteMtxLong( cmFrameFileH_t h, unsigned mtxType, unsigned unitsId, const long* p, unsigned rn, unsigned cn );
  156. cmFfRC_t cmFrameFileWriteMtxUInt( cmFrameFileH_t h, unsigned mtxType, unsigned unitsId, const unsigned* p, unsigned rn, unsigned cn );
  157. cmFfRC_t cmFrameFileWriteMtxInt( cmFrameFileH_t h, unsigned mtxType, unsigned unitsId, const int* p, unsigned rn, unsigned cn );
  158. cmFfRC_t cmFrameFileWriteMtxULLong( cmFrameFileH_t h, unsigned mtxType, unsigned unitsId, const unsigned long long* p, unsigned rn, unsigned cn );
  159. cmFfRC_t cmFrameFileWriteMtxLLong( cmFrameFileH_t h, unsigned mtxType, unsigned unitsId, const long long* p, unsigned rn, unsigned cn );
  160. cmFfRC_t cmFrameFileWriteMtxOff_t( cmFrameFileH_t h, unsigned mtxType, unsigned unitsId, const off_t* p, unsigned rn, unsigned cn );
  161. cmFfRC_t cmFrameFileWriteMtxFloat( cmFrameFileH_t h, unsigned mtxType, unsigned unitsId, const float* p, unsigned rn, unsigned cn );
  162. cmFfRC_t cmFrameFileWriteMtxDouble( cmFrameFileH_t h, unsigned mtxType, unsigned unitsId, const double* p, unsigned rn, unsigned cn );
  163. cmFfRC_t cmFrameFileWriteMtxBlob( cmFrameFileH_t h, unsigned mtxType, unsigned unitsId, const void* p, unsigned rn, unsigned cn );
  164. cmFfRC_t cmFrameFileWriteMtxStringZ( cmFrameFileH_t h, unsigned mtxType, unsigned unitsId, const char* p );
  165. cmFfRC_t cmFrameFileWriteMtxJson( cmFrameFileH_t h, unsigned mtxType, cmJsonH_t jsH, const cmJsonNode_t* nodePtr );
  166. // (R/W) Rewind to the first frame. Must call cmFrameFileFrameNext()
  167. // following successful execution of this function to maintain correct
  168. // alignment.
  169. cmFfRC_t cmFrameFileRewind( cmFrameFileH_t h );
  170. // (R/W) Seek to the frame at index 'frameIdx'. Must call cmFrameFileFrameNext()
  171. // following successful execution of this function to maintain correct
  172. // alignment.
  173. cmFfRC_t cmFrameFileSeek( cmFrameFileH_t h, unsigned streamId, unsigned frameIdx );
  174. // (R/W) Seek to the next frame in stream frameStreamId with type frameTypeId.
  175. // Set frameTypeId to kInvalidFrameTId to return any frame type.
  176. // Set frameStreamId to kInvalidStreamId to return any stream type.
  177. // This function must be followed by a call to cmFrameFileFrameLoad()
  178. // or cmFrameFileSkip().
  179. cmFfRC_t cmFrameFileFrameNext( cmFrameFileH_t h, unsigned frameTypeId, unsigned streamId );
  180. // (R/W) Load the matrix data associated with the current frame.
  181. // This function can only be called after a successful call to
  182. // cmFrameFileFrameNext().
  183. // The frameDescPtrPtr is optional. Set to NULL to ignore.
  184. cmFfRC_t cmFrameFileFrameLoad( cmFrameFileH_t h, const cmFfFrame_t** frameDescPtrPtr );
  185. // (R/W) Skip over the matrix data associated with the current frame.
  186. // This is an alternative to cmFrameFileLoad().
  187. cmFfRC_t cmFrameFileFrameSkip( cmFrameFileH_t h );
  188. // (R/W) Combines cmFrameFileFrameNext() and cmFrameFileFrameLoad()
  189. // into a single call.
  190. cmFfRC_t cmFrameFileFrameLoadNext( cmFrameFileH_t h, unsigned frameTypeId, unsigned streamId, const cmFfFrame_t** frameDescPtrPtr );
  191. // (R/W) Write the current frame back to disk.
  192. cmFfRC_t cmFrameFileFrameUpdate( cmFrameFileH_t h );
  193. // Return the current frame description record.
  194. const cmFfFrame_t* cmFrameFileFrameDesc( cmFrameFileH_t h );
  195. // Currently loaded frame index.
  196. unsigned cmFrameFileFrameLoadedIndex( cmFrameFileH_t h );
  197. // Return the index of the frame with type 'mtxTypeId', units 'unitsId', and format 'fmtId'
  198. // or cmInvalidIdx if the specified frame is not found.
  199. // Set mtxTypeId to kInvalidMId to return any mtx type.
  200. // Set unitsId to kInvalidUId to return a mtx with any units.
  201. // Set fmtId to kInvalidFmtId to return a mtx with any fmt.
  202. unsigned cmFrameFileMtxIndex( cmFrameFileH_t h, unsigned mtxTypeId, unsigned unitsId, unsigned fmtId );
  203. // Return a matrix description record.
  204. const cmFfMtx_t* cmFrameFileMtxDesc( cmFrameFileH_t h, unsigned mtxIdx );
  205. // Access matrix data.
  206. //Set descPtr to NULL if the matrix desc is not needed.
  207. unsigned char* cmFrameFileMtxIndexUChar( cmFrameFileH_t h, unsigned mtxIdx, const cmFfMtx_t** descPtrPtr );
  208. char* cmFrameFileMtxIndexChar( cmFrameFileH_t h, unsigned mtxIdx, const cmFfMtx_t** descPtrPtr );
  209. unsigned short* cmFrameFileMtxIndexUShort( cmFrameFileH_t h, unsigned mtxIdx, const cmFfMtx_t** descPtrPtr );
  210. short* cmFrameFileMtxIndexShort( cmFrameFileH_t h, unsigned mtxIdx, const cmFfMtx_t** descPtrPtr );
  211. unsigned long* cmFrameFileMtxIndexULong( cmFrameFileH_t h, unsigned mtxIdx, const cmFfMtx_t** descPtrPtr );
  212. long* cmFrameFileMtxIndexLong( cmFrameFileH_t h, unsigned mtxIdx, const cmFfMtx_t** descPtrPtr );
  213. unsigned* cmFrameFileMtxIndexUInt( cmFrameFileH_t h, unsigned mtxIdx, const cmFfMtx_t** descPtrPtr );
  214. int* cmFrameFileMtxIndexInt( cmFrameFileH_t h, unsigned mtxIdx, const cmFfMtx_t** descPtrPtr );
  215. unsigned long long* cmFrameFileMtxIndexULLong( cmFrameFileH_t h, unsigned mtxIdx, const cmFfMtx_t** descPtrPtr );
  216. long long* cmFrameFileMtxIndexLLong( cmFrameFileH_t h, unsigned mtxIdx, const cmFfMtx_t** descPtrPtr );
  217. off_t* cmFrameFileMtxIndexOff_t( cmFrameFileH_t h, unsigned mtxIdx, const cmFfMtx_t** descPtrPtr );
  218. float* cmFrameFileMtxIndexFloat( cmFrameFileH_t h, unsigned mtxIdx, const cmFfMtx_t** descPtrPtr );
  219. double* cmFrameFileMtxIndexDouble( cmFrameFileH_t h, unsigned mtxIdx, const cmFfMtx_t** descPtrPtr );
  220. char* cmFrameFileMtxIndexStringZ( cmFrameFileH_t h, unsigned mtxIdx, const cmFfMtx_t** descPtrPtr );
  221. void* cmFrameFileMtxIndexBlob( cmFrameFileH_t h, unsigned mtxIdx, const cmFfMtx_t** descPtrPtr );
  222. // (The caller is responsible for invoking cmJsonFinalize() to finalize the returned json handle.)
  223. cmJsonH_t cmFrameFileMtxIndexJson( cmFrameFileH_t h, unsigned mtxIdx, const cmFfMtx_t** descPtrPtr );
  224. // Return a pointer to the data, and optionally the descPtr, for a matrix with the given
  225. // type,units and format in the current frame.
  226. // The following functions are implmented in terms of
  227. // cmFrameFileMtxIndexXXX() and cmFrameFileMtxIndex().
  228. unsigned char* cmFrameFileMtxUChar( cmFrameFileH_t h, unsigned mtxTypeId, unsigned unitsId, const cmFfMtx_t** descPtrPtr );
  229. char* cmFrameFileMtxChar( cmFrameFileH_t h, unsigned mtxTypeId, unsigned unitsId, const cmFfMtx_t** descPtrPtr );
  230. unsigned short* cmFrameFileMtxUShort( cmFrameFileH_t h, unsigned mtxTypeId, unsigned unitsId, const cmFfMtx_t** descPtrPtr );
  231. short* cmFrameFileMtxShort( cmFrameFileH_t h, unsigned mtxTypeId, unsigned unitsId, const cmFfMtx_t** descPtrPtr );
  232. unsigned long* cmFrameFileMtxULong( cmFrameFileH_t h, unsigned mtxTypeId, unsigned unitsId, const cmFfMtx_t** descPtrPtr );
  233. long* cmFrameFileMtxLong( cmFrameFileH_t h, unsigned mtxTypeId, unsigned unitsId, const cmFfMtx_t** descPtrPtr );
  234. unsigned* cmFrameFileMtxUInt( cmFrameFileH_t h, unsigned mtxTypeId, unsigned unitsId, const cmFfMtx_t** descPtrPtr );
  235. int* cmFrameFileMtxInt( cmFrameFileH_t h, unsigned mtxTypeId, unsigned unitsId, const cmFfMtx_t** descPtrPtr );
  236. unsigned long long* cmFrameFileMtxULLong( cmFrameFileH_t h, unsigned mtxTypeId, unsigned unitsId, const cmFfMtx_t** descPtrPtr );
  237. long long* cmFrameFileMtxLLong( cmFrameFileH_t h, unsigned mtxTypeId, unsigned unitsId, const cmFfMtx_t** descPtrPtr );
  238. off_t* cmFrameFileMtxOff_t( cmFrameFileH_t h, unsigned mtxTypeId, unsigned unitsId, const cmFfMtx_t** descPtrPtr );
  239. float* cmFrameFileMtxFloat( cmFrameFileH_t h, unsigned mtxTypeId, unsigned unitsId, const cmFfMtx_t** descPtrPtr );
  240. double* cmFrameFileMtxDouble( cmFrameFileH_t h, unsigned mtxTypeId, unsigned unitsId, const cmFfMtx_t** descPtrPtr );
  241. char* cmFrameFileMtxStringZ( cmFrameFileH_t h, unsigned mtxTypeId, unsigned unitsId, const cmFfMtx_t** descPtrPtr );
  242. void* cmFrameFileMtxBlob( cmFrameFileH_t h, unsigned mtxTypeId, unsigned unitsId, const cmFfMtx_t** descPtrPtr );
  243. // (The caller is responsible for invoking cmJsonFinalize() to finalize the returned json handle.)
  244. cmJsonH_t cmFrameFileMtxJson( cmFrameFileH_t h, unsigned mtxTypeId, const cmFfMtx_t** descPtrPtr );
  245. // Return the max row cnt, max col count, and total element count
  246. // for all matrices which match the given stream/mtx/units/fmt
  247. // combination. Note that if the returned ele count is less than
  248. // maxRowCnt * maxColCnt * cmFrameFileFrameCount(streamId) then
  249. // some matched matrices contain fewer than maxRowCnt/maxColCnt
  250. // rows/columns.
  251. cmFfRC_t cmFrameFileMtxSize( cmFrameFileH_t h, unsigned streamId, unsigned mtxType, unsigned unitsId, unsigned fmtId, unsigned* frameCntPtr, unsigned* rowCntPtr, unsigned* colCntPtr, unsigned* eleCntPtr );
  252. // Load a buffer with all of the data which matches a given
  253. // stream/mtx/unit/fmt combination in the given range of frames.
  254. // 'frmIdx' specifies the frame index relative to the given stream id as opposed to
  255. // and absolute frame index.
  256. // Set frmCnt to -1 to include all frames following 'frmIdx'.
  257. // *outCntPtr is set to the actual number of elements copied into the buffer
  258. // The data is packed into the return buffer by copying columwise from the source.
  259. // matrices to the buf[]. If all of the matrices are not of a fixed known size
  260. // it may therefore be difficult to distinguish where one frames data ends and
  261. // the next begins.
  262. cmFfRC_t cmFrameFileMtxLoadUChar( cmFrameFileH_t h, unsigned streamId, unsigned mtxTypeId, unsigned unitsId, unsigned frmIdx, unsigned frmCnt, unsigned char* buf, unsigned eleCnt, unsigned* outCntPtr );
  263. cmFfRC_t cmFrameFileMtxLoadChar( cmFrameFileH_t h, unsigned streamId, unsigned mtxTypeId, unsigned unitsId, unsigned frmIdx, unsigned frmCnt, char* buf, unsigned eleCnt, unsigned* outCntPtr );
  264. cmFfRC_t cmFrameFileMtxLoadUShort( cmFrameFileH_t h, unsigned streamId, unsigned mtxTypeId, unsigned unitsId, unsigned frmIdx, unsigned frmCnt, unsigned short* buf, unsigned eleCnt, unsigned* outCntPtr );
  265. cmFfRC_t cmFrameFileMtxLoadShort( cmFrameFileH_t h, unsigned streamId, unsigned mtxTypeId, unsigned unitsId, unsigned frmIdx, unsigned frmCnt, short* buf, unsigned eleCnt, unsigned* outCntPtr );
  266. cmFfRC_t cmFrameFileMtxLoadULong( cmFrameFileH_t h, unsigned streamId, unsigned mtxTypeId, unsigned unitsId, unsigned frmIdx, unsigned frmCnt, unsigned long* buf, unsigned eleCnt, unsigned* outCntPtr );
  267. cmFfRC_t cmFrameFileMtxLoadLong( cmFrameFileH_t h, unsigned streamId, unsigned mtxTypeId, unsigned unitsId, unsigned frmIdx, unsigned frmCnt, long* buf, unsigned eleCnt, unsigned* outCntPtr );
  268. cmFfRC_t cmFrameFileMtxLoadUInt( cmFrameFileH_t h, unsigned streamId, unsigned mtxTypeId, unsigned unitsId, unsigned frmIdx, unsigned frmCnt, unsigned int* buf, unsigned eleCnt, unsigned* outCntPtr );
  269. cmFfRC_t cmFrameFileMtxLoadInt( cmFrameFileH_t h, unsigned streamId, unsigned mtxTypeId, unsigned unitsId, unsigned frmIdx, unsigned frmCnt, int* buf, unsigned eleCnt, unsigned* outCntPtr );
  270. cmFfRC_t cmFrameFileMtxLoadULLong( cmFrameFileH_t h, unsigned streamId, unsigned mtxTypeId, unsigned unitsId, unsigned frmIdx, unsigned frmCnt, unsigned long long* buf, unsigned eleCnt, unsigned* outCntPtr );
  271. cmFfRC_t cmFrameFileMtxLoadLLong( cmFrameFileH_t h, unsigned streamId, unsigned mtxTypeId, unsigned unitsId, unsigned frmIdx, unsigned frmCnt, long long* buf, unsigned eleCnt, unsigned* outCntPtr );
  272. cmFfRC_t cmFrameFileMtxLoadOff_t( cmFrameFileH_t h, unsigned streamId, unsigned mtxTypeId, unsigned unitsId, unsigned frmIdx, unsigned frmCnt, off_t* buf, unsigned eleCnt, unsigned* outCntPtr );
  273. cmFfRC_t cmFrameFileMtxLoadFloat( cmFrameFileH_t h, unsigned streamId, unsigned mtxTypeId, unsigned unitsId, unsigned frmIdx, unsigned frmCnt, float* buf, unsigned eleCnt, unsigned* outCntPtr );
  274. cmFfRC_t cmFrameFileMtxLoadDouble( cmFrameFileH_t h, unsigned streamId, unsigned mtxTypeId, unsigned unitsId, unsigned frmIdx, unsigned frmCnt, double* buf, unsigned eleCnt, unsigned* outCntPtr );
  275. cmFfRC_t cmFrameFileMtxLoadStringZ( cmFrameFileH_t h, unsigned streamId, unsigned mtxTypeId, unsigned unitsId, unsigned frmIdx, unsigned frmCnt, char* buf, unsigned eleCnt, unsigned* outCntPtr );
  276. cmFfRC_t cmFrameFileMtxLoadBlob( cmFrameFileH_t h, unsigned streamId, unsigned mtxTypeId, unsigned unitsId, unsigned frmIdx, unsigned frmCnt, void* buf, unsigned eleCnt, unsigned* outCntPtr );
  277. cmFfRC_t cmFrameFileReport( cmFrameFileH_t h, bool summOnlyFl, cmRpt_t* rpt );
  278. cmFfRC_t cmFrameFileNameReport( const char* fn, bool summOnlyFl, cmCtx_t* ctx );
  279. cmFfRC_t cmFrameFileTest( const char* fn, cmCtx_t* ctx );
  280. #if CM_FLOAT_SMP == 1
  281. #define cmFrameFileMtxLoadSample cmFrameFileMtxLoadFloat
  282. #define cmFrameFileWriteMtxSample cmFrameFileWriteMtxFloat
  283. #define cmFrameFileMtxIndexSample cmFrameFileMtxIndexFloat
  284. #define cmFrameFileMtxSample cmFrameFileMtxFloat
  285. #define kSampleFmtId kFloatFmtId
  286. #else
  287. #define cmFrameFileMtxLoadSample cmFrameFileMtxLoadDouble
  288. #define cmFrameFileWriteMtxSample cmFrameFileWriteMtxDouble
  289. #define cmFrameFileMtxIndexSample cmFrameFileMtxIndexDouble
  290. #define cmFrameFileMtxSample cmFrameFileMtxDouble
  291. #define kSampleFmtId kDoubleFmtId
  292. #endif
  293. #if CM_FLOAT_REAL == 1
  294. #define cmFrameFileMtxLoadReal cmFrameFileMtxLoadFloat
  295. #define cmFrameFileWriteMtxReal cmFrameFileWriteMtxFloat
  296. #define cmFrameFileMtxIndexReal cmFrameFileMtxIndexFloat
  297. #define cmFrameFileMtxReal cmFrameFileMtxFloat
  298. #define kRealFmtId kFloatFmtId
  299. #else
  300. #define cmFrameFileMtxLoadReal cmFrameFileMtxLoadDouble
  301. #define cmFrameFileWriteMtxReal cmFrameFileWriteMtxDouble
  302. #define cmFrameFileMtxIndexReal cmFrameFileMtxIndexDouble
  303. #define cmFrameFileMtxReal cmFrameFileMtxDouble
  304. #define kRealFmtId kDoubleFmtId
  305. #endif
  306. #ifdef __cplusplus
  307. }
  308. #endif
  309. #endif