av1/encoder/temporal_filter.c
// Estimates the strength for filter weight adjustment, which is used in YUV
// strategy. This estimation is based on the pre-estimated noise level of the
// to-filter frame.
// Inputs:
//   cpi: Pointer to the composed information of input video.
//   noise_level: Noise level of the to-filter frame, estimated with Y-plane.
//   group_boost: Boost level for the current group of frames.
// Returns:
//   Estimated strength which will be used for filter weight adjustment.
Estimates the strength for filter weight adjustment, which is used in YUV
strategy. This estimation is based on the pre-estimated noise level of the
to-filter frame.
Inputs:
cpi: Pointer to the composed information of input video.
noise_level: Noise level of the to-filter frame, estimated with Y-plane.
group_boost: Boost level for the current group of frames.
Returns:
Estimated strength which will be used for filter weight adjustment.
Estimates the strength for filter weight adjustment which is used in YUV strategy . This estimation is based on the pre - estimated noise level of the to - filter frame . Inputs : cpi : Pointer to the composed information of input video . noise_level : Noise level of the to - filter frame estimated with Y - plane . group_boost : Boost level for the current group of frames . Returns : Estimated strength which will be used for filter weight adjustment .
static int tf_estimate_strength(const AV1_COMP *cpi, const double noise_level,
                                const int group_boost) {
  int strength = cpi->oxcf.arnr_strength;
  if (noise_level > 0) {       
    if (noise_level < 0.75) {  
      strength = strength - 2;
    } else if (noise_level < 1.75) {  
      strength = strength - 1;
    } else if (noise_level < 4.0) {  
      strength = strength + 0;
    } else {  
      strength = strength + 1;
    }
  }
  const FRAME_TYPE frame_type =
      (cpi->common.current_frame.frame_number > 1) ? INTER_FRAME : KEY_FRAME;
  const int q = (int)av1_convert_qindex_to_q(
      cpi->rc.avg_frame_qindex[frame_type], cpi->common.seq_params.bit_depth);
  strength = strength - AOMMAX(0, (16 - q) / 2);
  return CLIP(strength, 0, group_boost / 300);
}
static int tf_estimate_strength ( const AV1_COMP * cpi , const double noise_level , const int group_boost ) { int strength = cpi -> oxcf . arnr_strength ; if ( noise_level > 0 ) { if ( noise_level < 0.75 ) { strength = strength - 2 ; } else if ( noise_level < 1.75 ) { strength = strength - 1 ; } else if ( noise_level < 4.0 ) { strength = strength + 0 ; } else { strength = strength + 1 ; } } const FRAME_TYPE frame_type = ( cpi -> common . current_frame . frame_number > 1 ) ? INTER_FRAME : KEY_FRAME ; const int q = ( int ) av1_convert_qindex_to_q ( cpi -> rc . avg_frame_qindex [ frame_type ] , cpi -> common . seq_params . bit_depth ) ; strength = strength - AOMMAX ( 0 , ( 16 - q ) / 2 ) ; return CLIP ( strength , 0 , group_boost / 300 ) ; }
Estimates the strength for filter weight adjustment, which is used in YUV
strategy.
Estimates the strength for filter weight adjustment which is used in YUV strategy .
// Adjust the strength based on the estimated noise level. // Adjust when the noise level is reliable. // Noise level lies in range (0, 0.75). // Noise level lies in range [0.75, 1.75). // Noise level lies in range [1.75, 4.0). // Noise level lies in range [4.0, +inf). // Adjust the strength based on active max q.