// file: $USFS/class/image_analysis/v6.1/imaga_dct_05.cc
//

// isip include files
//
#include "image_analysis.h"
#include "image_analysis_constants.h"

// method: dct_normalize_cc
//
// arguments: none
//
// return: a logical_1 value indicating status
//
// this method normalizes the DCT coefficients using a hardcoded normalization
//
logical_1 Image_analysis::dct_normalize_cc() {
  
  // normalize the image by dividing the DCT value by the matrix term
  //
  for (int_4 i=0; i<dct_blk_size_d; i++) {
    for (int_4 j=0; j<dct_blk_size_d; j++) {
      dct_r_red_d[i * dct_blk_size_d + j] /= dct_norm_d[i][j];
      dct_r_grn_d[i * dct_blk_size_d + j] /= dct_norm_d[i][j];
      dct_r_blu_d[i * dct_blk_size_d + j] /= dct_norm_d[i][j];
    }
  }
  
  // exit gracefully
  //
  return ISIP_TRUE;
}
