#include "HxFuncKernelNgbOp2d.h"
#include "HxCategories.h"
Pix_variations | |
template<class SrcDataPtrT, class NgbT, class KernelT> void | HxFuncKernelNgbOp2d_Pix_P1Loop (SrcDataPtrT srcPtr, NgbT &ngb, KernelT &kernel, int ngbWidth, int ngbHeight) |
Pix : phase 1, loop. More... | |
template<class SrcDataPtrT, class NgbT, class KernelT> void | HxFuncKernelNgbOp2d_Pix_P2Loop (SrcDataPtrT srcPtr, NgbT &ngb, KernelT &kernel, int ngbWidth, int ngbHeight) |
Pix : phase 2, loop. More... | |
Row_variations | |
template<class DstDataPtrT, class SrcDataPtrT, class NgbT, class KernelT> void | HxFuncKernelNgbOp2d_Row (DstDataPtrT dstPtr, SrcDataPtrT srcPtr, int y, int imgWidth, NgbT &ngb, KernelT &kernel, HxTag1Phase dummy1, HxTagLoop dummy2) |
Row : phase 1, loop. More... | |
template<class DstDataPtrT, class SrcDataPtrT, class NgbT, class KernelT> void | HxFuncKernelNgbOp2d_Row (DstDataPtrT dstPtr, SrcDataPtrT srcPtr, int y, int imgWidth, NgbT &ngb, KernelT &kernel, HxTag2Phase dummy1, HxTagLoop dummy2) |
Row : phase 2, loop. More... | |
template<class DstDataPtrT, class SrcDataPtrT, class NgbT, class KernelT> void | HxFuncKernelNgbOp2d_Row (DstDataPtrT dstPtr, SrcDataPtrT srcPtr, int y, int imgWidth, NgbT &ngb, KernelT &kernel, HxTagNPhase dummy1, HxTagLoop dummy2) |
Row : phase N, loop. More... | |
Functions | |
template<class DstDataPtrT, class SrcDataPtrT, class NgbT, class KernelT> void | HxFuncKernelNgbOp2dDispatch (DstDataPtrT dstPtr, SrcDataPtrT srcPtr, HxSizes dstSize, NgbT &ngb, KernelT &kernel) |
Dispatch function for KernelNgbOp2d (see Global functions for KernelNgbOp2d). More... |
|
Pix : phase 1, loop.
00052 { 00053 for (int j=0; j<ngbHeight; j++) { 00054 for (int i=0; i<ngbWidth; i++) { 00055 ngb.next(i, j, srcPtr.readIncX(), kernel(i, j)); 00056 } 00057 srcPtr.decX(ngbWidth); 00058 srcPtr.incY(); 00059 } 00060 } |
|
Pix : phase 2, loop.
00068 { 00069 for (int j=0; j<ngbHeight; j++) { 00070 for (int i=0; i<ngbWidth; i++) { 00071 ngb.next2(i, j, srcPtr.readIncX(), kernel(i, j)); 00072 } 00073 srcPtr.decX(ngbWidth); 00074 srcPtr.incY(); 00075 } 00076 } |
|
Row : phase 1, loop.
00092 { 00093 int ngbWidth = ngb.size().x(); 00094 int ngbHeight = ngb.size().y(); 00095 SrcDataPtrT cenSrcPtr = srcPtr; 00096 cenSrcPtr.incXYZ(ngbWidth/2, ngbHeight/2, 0); 00097 for(int x=0; x < imgWidth; x++) { 00098 ngb.init(x, y, cenSrcPtr.readIncX()); 00099 HxFuncKernelNgbOp2d_Pix_P1Loop(srcPtr, ngb, kernel, ngbWidth, ngbHeight); 00100 srcPtr.incX(); 00101 dstPtr.writeIncX(ngb.result()); 00102 } 00103 } |
|
Row : phase 2, loop.
00112 { 00113 int ngbWidth = ngb.size().x(); 00114 int ngbHeight = ngb.size().y(); 00115 SrcDataPtrT cenSrcPtr = srcPtr; 00116 cenSrcPtr.incXYZ(ngbWidth/2, ngbHeight/2, 0); 00117 for(int x=0; x < imgWidth; x++) { 00118 ngb.init(x, y, cenSrcPtr.read()); 00119 HxFuncKernelNgbOp2d_Pix_P1Loop(srcPtr, ngb, kernel, ngbWidth, ngbHeight); 00120 ngb.init2(x, y, cenSrcPtr.readIncX()); 00121 HxFuncKernelNgbOp2d_Pix_P2Loop(srcPtr, ngb, kernel, ngbWidth, ngbHeight); 00122 srcPtr.incX(); 00123 dstPtr.writeIncX(ngb.result()); 00124 } 00125 } |
|
Row : phase N, loop.
00134 { 00135 int ngbWidth = ngb.size().x(); 00136 int ngbHeight = ngb.size().y(); 00137 SrcDataPtrT cenSrcPtr = srcPtr; 00138 cenSrcPtr.incXYZ(ngbWidth/2, ngbHeight/2, 0); 00139 for(int x=0; x < imgWidth; x++) { 00140 int phase = 1; 00141 do { 00142 ngb.init(phase, x, y, cenSrcPtr.read()); 00143 HxFuncKernelNgbOp2d_Pix_P1Loop(srcPtr, ngb, kernel, ngbWidth, 00144 ngbHeight); 00145 ngb.done(phase); 00146 } while (ngb.hasNextPhase(phase++)); 00147 cenSrcPtr.incX(); 00148 srcPtr.incX(); 00149 dstPtr.writeIncX(ngb.result()); 00150 } 00151 } |
|
Dispatch function for KernelNgbOp2d (see Global functions for KernelNgbOp2d). Dispatch is based on the categories defined in NgbT.
00170 { 00171 for(int y=0; y < dstSize.y(); y++) { 00172 HxFuncKernelNgbOp2d_Row(dstPtr, srcPtr, y, dstSize.x(), ngb, kernel, 00173 typename NgbT::PhaseCategory(), 00174 typename NgbT::IteratorCategory()); 00175 srcPtr.incY(); 00176 dstPtr.incY(); 00177 } 00178 } |