nmpp
sResample.h
1//------------------------------------------------------------------------
2//
3// $Workfile:: sResampl $
4//
5// Векторно-матричная библиотека
6//
7// Copyright (c) RC Module Inc.
8//
9// $Revision: 1.1 $ $Date: 2005/01/12 14:09:07 $
10//
19//------------------------------------------------------------------------
20#include "nmtype.h"
21#ifndef _S_RESAMPLE_H_INCLUDED_
22#define _S_RESAMPLE_H_INCLUDED_
23
24#ifdef __cplusplus
25 extern "C" {
26#endif
27
28
65void nmppsResampleDown2_8u8u(nm8u7b* pSrcVec, nm8u7b* pDstVec, int nSrcVecSize, nm64s* pKernel);
66void nmppsResampleDown2_16u16u(nm16u15b* pSrcVec, nm16u15b* pDstVec, int nSrcVecSize, nm64s* pKernel);
68
69//\param pTmpBuf
70// \ru Временный буффер размера 2*nSize.
71// \en Temporary buffer with size 2*nSize.
72
73//void nmppsResampleDown2(nm8u* pSrcVec, nm16u* pDstVec, int nSrcVecSize, nm64s* pKernel, void* pTmpBuf);
74void nmppsResampleDown2_8u16u(nm8u* pSrcVec,nm16u* pDstVec,void* pTmpBuf,int nSize);
75
76//*****************************************************************************
77
113void nmppsResampleUp3Down2_8s16s(nm8s* pSrcVec, nm16s* pDstVec, int nSrcVecSize, nm64s* pKernel);
115//*****************************************************************************
116
145void nmppsCreateResampleUp3Down2_8s16s(nm64s** pKernel, int nHint);
146void nmppsCreateResampleDown2_8u8u(nm64s** pKernel, int nHint);
147void nmppsCreateResampleDown2_16u16u(nm64s** pKernel, int nHint);
149
150//*****************************************************************************
151
183int nmppsSetResampleUp3Down2_8s16s(nm64s* pKernel);
184int nmppsSetResampleDown2_8u8u(nm64s* pKernel);
185int nmppsSetResampleDown2_16u16u(nm64s* pKernel);
187
188
189//*****************************************************************************
190
197void nmppsDecimate16_8s(nm8s* pSrcVec,nm8s* pDstVec,int nDstSize);
198void nmppsDecimate16_16s(nm16s* pSrcVec,nm16s* pDstVec,int nDstSize);
199void nmppsDecimate16_32s(nm32s* pSrcVec,nm32s* pDstVec,int nDstSize);
200void nmppsDecimate16_64s(nm64s* pSrcVec,nm64s* pDstVec,int nDstSize);
202
203
204//*****************************************************************************
205
270void nmppsResampleUp3Down2_perf(nm8s* pSrcVec, nm16s* pDstVec, int nSrcVecSize, nm64s* pKernel);
271void nmppsResampleDown2_perf_8u(nm8u7b* pSrcVec, nm8u7b* pDstVec, int nSrcVecSize, nm64s* pKernel);
272void nmppsResampleDown2_perf_16u(nm16u15b* pSrcVec, nm16u15b* pDstVec, int nSrcVecSize, nm64s* pKernel);
274
275
276
277
278
284#ifdef EEE
285template <class nmbits_in, class nmbits_out> class CnmppsResampleUp3Down2
286{
287public:
288 void (*pfFree32)(void*);
289 int nWeights;
290 nm64s* pKernel;
291 int nKernelSize;
292
294
300 CSIG_ResampleUp3Down2(void* (*malloc32_func)(unsigned),void (*free32_func)(void*));
301
302
304
316 void Eval(nmbits_in* pSrcVec, nmbits_out* pDstVec, int nSize);
317
319 ~CSIG_ResampleUp3Down2(){
320 if (pKernel)
321 pfFree32(pKernel);
322 }
323
324
325};
326#endif
327
328
329
330
331#ifdef __cplusplus
332 };
333#endif
334
335
336#endif //
unsigned char nm8u
Definition: nmtype.h:448
int nm32s
Definition: nmtype.h:292
unsigned short nm16u
Definition: nmtype.h:481
nm8u nm8u7b
Definition: nmtype.h:463
long long nm64s
Definition: nmtype.h:375
short nm16s
Definition: nmtype.h:243
char nm8s
Definition: nmtype.h:167
nm16u nm16u15b
Definition: nmtype.h:495