@@ -94,8 +94,12 @@ 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+ // Variable octave is a leftover of a parameter from the attempt to create
100+ // the top level of every octave directly from the upscaled input
101+ const int octave = 0 ;
102+
99103 Octave& oct_obj = _octaves[octave];
100104
101105 const int width = oct_obj.getWidth ();
@@ -475,16 +479,7 @@ void Pyramid::build_pyramid( const Config& conf, ImageBase* base )
475479 Octave& oct_obj = _octaves[octave];
476480 cudaStream_t stream = oct_obj.getStream ();
477481
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 ) {
482+ if ( conf.getGaussMode () == Config::Fixed9 || conf.getGaussMode () == Config::Fixed15 ) {
488483 if ( octave == 0 ) {
489484 make_octave ( conf, base, oct_obj, stream, true );
490485 } else {
@@ -496,30 +491,14 @@ void Pyramid::build_pyramid( const Config& conf, ImageBase* base )
496491 }
497492
498493 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- }
515494 } else if ( conf.getGaussMode () == Config::VLFeat_Relative ) {
516495 for ( int level=0 ; level<_levels; level++ )
517496 {
518497 if ( level == 0 )
519498 {
520499 if ( octave == 0 )
521500 {
522- horiz_from_input_image ( conf, base, 0 , stream );
501+ horiz_from_input_image ( conf, base, stream );
523502 vert_from_interm ( octave, 0 , stream, Interpolated_FromPrevious );
524503 }
525504 else
@@ -551,7 +530,7 @@ void Pyramid::build_pyramid( const Config& conf, ImageBase* base )
551530 {
552531 if ( octave == 0 )
553532 {
554- horiz_from_input_image ( conf, base, 0 , stream );
533+ horiz_from_input_image ( conf, base, stream );
555534 vert_from_interm ( octave, 0 , stream, NotInterpolated_FromPrevious );
556535 }
557536 else
0 commit comments