 
     float factor = __fdividef( -0.5f, (sigw * sigw) );
     int sq_thres  = rad * rad;
+
     int32_t xmin = max(1,     (int32_t)floor(x - rad));
     int32_t xmax = min(w - 2, (int32_t)floor(x + rad));
     int32_t ymin = max(1,     (int32_t)floor(y - rad));

            ext->orientation = th;

            nangles++;
            if (nangles > 2) break;
        }
    }
}


    ext->orientation = th;

    for( int i=1; i<ORIENTATION_MAX_COUNT; i++ ) {
        if( y_max[i] < -1000.0f ) break; // this is a random number: no orientation can be this small

        if( y_max[i] < 0.8f * y_max[0] ) break;
