Skip to content

Commit

Permalink
channels/private/gradientMex.cpp: minor fix to tri-linear interpolati…
Browse files Browse the repository at this point in the history
…on (didn't actually affect results, but it could, thanks Chulmin Yeum [email protected])
  • Loading branch information
pdollar committed Apr 18, 2014
1 parent 1aa5c4f commit 9932900
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions channels/private/gradientMex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ void gradHist( float *M, float *O, float *H, int h, int w,
{
const int hb=h/bin, wb=w/bin, h0=hb*bin, w0=wb*bin, nb=wb*hb;
const float s=(float)bin, sInv=1/s, sInv2=1/s/s;
float *H0, *H1, *M0, *M1; int x, y; int *O0, *O1;
float *H0, *H1, *M0, *M1; int x, y; int *O0, *O1; float xb, init;
O0=(int*)alMalloc(h*sizeof(int),16); M0=(float*) alMalloc(h*sizeof(float),16);
O1=(int*)alMalloc(h*sizeof(int),16); M1=(float*) alMalloc(h*sizeof(float),16);
// main loop
Expand Down Expand Up @@ -182,7 +182,7 @@ void gradHist( float *M, float *O, float *H, int h, int w,

} else {
// interpolate using trilinear interpolation
float ms[4], xyd, xb, yb, xd, yd, init; __m128 _m, _m0, _m1;
float ms[4], xyd, yb, xd, yd; __m128 _m, _m0, _m1;
bool hasLf, hasRt; int xb0, yb0;
if( x==0 ) { init=(0+.5f)*sInv-0.5f; xb=init; }
hasLf = xb>=0; xb0 = hasLf?(int)xb:-1; hasRt = xb0 < wb-1;
Expand Down
3 changes: 3 additions & 0 deletions external/history.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
Version NEW
-minor: gradientMex.cpp

Version 3.25 (15-Dec-2013)
-added pointer to PAMI14 work: chnsScaling.m, acfTrain.m, chnsPyramid.m
-minor: toolboxCompile.m
Expand Down

0 comments on commit 9932900

Please sign in to comment.