@@ -94,9 +94,9 @@ void make_dog( cudaTextureObject_t src_data,
9494} // namespace gauss
9595
9696__host__
97- inline void Pyramid::horiz_from_input_image ( const Config& conf, ImageBase* base, int octave, cudaStream_t stream )
97+ inline void Pyramid::horiz_from_input_image ( const Config& conf, ImageBase* base, cudaStream_t stream )
9898{
99- Octave& oct_obj = _octaves[octave ];
99+ Octave& oct_obj = _octaves[0 ];
100100
101101 const int width = oct_obj.getWidth ();
102102 const int height = oct_obj.getHeight ();
@@ -109,8 +109,8 @@ inline void Pyramid::horiz_from_input_image( const Config& conf, ImageBase* base
109109 const Config::SiftMode& mode = conf.getSiftMode ();
110110 float shift = 0 .5f ;
111111
112- if ( octave == 0 && ( mode == Config::PopSift || mode == Config::VLFeat ) ) {
113- shift = 0 .5f * powf ( 2 .0f , conf.getUpscaleFactor () - octave );
112+ if ( mode == Config::PopSift || mode == Config::VLFeat ) {
113+ shift = 0 .5f * powf ( 2 .0f , conf.getUpscaleFactor () );
114114 }
115115
116116 gauss::normalizedSource::horiz
@@ -119,7 +119,6 @@ inline void Pyramid::horiz_from_input_image( const Config& conf, ImageBase* base
119119 oct_obj.getIntermediateSurface (),
120120 width,
121121 height,
122- octave,
123122 shift );
124123
125124 POP_SYNC_CHK;
@@ -475,16 +474,7 @@ void Pyramid::build_pyramid( const Config& conf, ImageBase* base )
475474 Octave& oct_obj = _octaves[octave];
476475 cudaStream_t stream = oct_obj.getStream ();
477476
478- if ( ( conf.getScalingMode () == Config::ScaleDirect ) &&
479- ( conf.getGaussMode () == Config::Fixed9 || conf.getGaussMode () == Config::Fixed15 ) ) {
480- if ( octave == 0 ) {
481- make_octave ( conf, base, oct_obj, stream, true );
482- } else {
483- horiz_from_input_image ( conf, base, octave, stream );
484- vert_from_interm ( octave, 0 , stream, NotInterpolated_FromPrevious );
485- make_octave ( conf, base, oct_obj, stream, false );
486- }
487- } else if ( conf.getGaussMode () == Config::Fixed9 || conf.getGaussMode () == Config::Fixed15 ) {
477+ if ( conf.getGaussMode () == Config::Fixed9 || conf.getGaussMode () == Config::Fixed15 ) {
488478 if ( octave == 0 ) {
489479 make_octave ( conf, base, oct_obj, stream, true );
490480 } else {
@@ -496,30 +486,14 @@ void Pyramid::build_pyramid( const Config& conf, ImageBase* base )
496486 }
497487
498488 cuda::event_record ( oct_obj.getEventScaleDone (), stream, __FILE__, __LINE__ );
499- } else if ( conf.getScalingMode () == Config::ScaleDirect ) {
500- GaussTableChoice useGauss = ( conf.getGaussMode () == Config::VLFeat_Relative ) ? Interpolated_FromPrevious
501- : NotInterpolated_FromPrevious;
502- for ( int level=0 ; level<_levels; level++ )
503- {
504- if ( level == 0 )
505- {
506- horiz_from_input_image ( conf, base, octave, stream );
507- vert_from_interm ( octave, level, stream, useGauss );
508- }
509- else
510- {
511- horiz_from_prev_level ( octave, level, stream, useGauss );
512- vert_from_interm ( octave, level, stream, useGauss );
513- }
514- }
515489 } else if ( conf.getGaussMode () == Config::VLFeat_Relative ) {
516490 for ( int level=0 ; level<_levels; level++ )
517491 {
518492 if ( level == 0 )
519493 {
520494 if ( octave == 0 )
521495 {
522- horiz_from_input_image ( conf, base, 0 , stream );
496+ horiz_from_input_image ( conf, base, stream );
523497 vert_from_interm ( octave, 0 , stream, Interpolated_FromPrevious );
524498 }
525499 else
@@ -551,7 +525,7 @@ void Pyramid::build_pyramid( const Config& conf, ImageBase* base )
551525 {
552526 if ( octave == 0 )
553527 {
554- horiz_from_input_image ( conf, base, 0 , stream );
528+ horiz_from_input_image ( conf, base, stream );
555529 vert_from_interm ( octave, 0 , stream, NotInterpolated_FromPrevious );
556530 }
557531 else
0 commit comments