athena_signal/kernels/dios_ssp_aec/dios_ssp_aec_tde/dios_ssp_aec_tde_delay_estimator.c
static int HistogramBasedValidation(BinaryDelayEstimator* self,
                                    int candidate_delay)
{
    float fraction = 1.0f;
    float histogram_threshold = self->histogram[self->compare_delay];
    int delay_difference = candidate_delay - self->last_delay;
    int is_histogram_valid = 0;

    if (delay_difference > 0)
    {
        fraction = 1.0f - kFractionSlope * delay_difference;
        fraction = (fraction > kMinFractionWhenPossiblyCausal ? fraction : kMinFractionWhenPossiblyCausal);
    } 
    else if (delay_difference < 0)
    {
        fraction = kMinFractionWhenPossiblyNonCausal - kFractionSlope * delay_difference;
        fraction = (fraction > 1.0f ? 1.0f : fraction);
    }
    histogram_threshold *= fraction;
    histogram_threshold = (histogram_threshold > kMinHistogramThreshold ? histogram_threshold : kMinHistogramThreshold);

    is_histogram_valid = (self->histogram[candidate_delay] >= histogram_threshold) && (self->candidate_hits > kMinRequiredHits);

    return is_histogram_valid;
}
// Validates the |candidate_delay|, estimated in dios_ssp_aec_tde_processbinaryspectrum(),
// based on a mix of counting concurring hits with a modified histogram
// of recent delay estimates.  In brief a candidate is valid (returns 1) if it
// is the most likely according to the histogram.
Validates the |candidate_delay|, estimated in dios_ssp_aec_tde_processbinaryspectrum(),
based on a mix of counting concurring hits with a modified histogram
of recent delay estimates.  In brief a candidate is valid (returns 1) if it
is the most likely according to the histogram.
Validates the |candidate_delay| estimated in dios_ssp_aec_tde_processbinaryspectrum () based on a mix of counting concurring hits with a modified histogram of recent delay estimates . In brief a candidate is valid ( returns 1 ) if it is the most likely according to the histogram .
static int HistogramBasedValidation(BinaryDelayEstimator* self,
                                    int candidate_delay)
{
    float fraction = 1.0f;
    float histogram_threshold = self->histogram[self->compare_delay];
    int delay_difference = candidate_delay - self->last_delay;
    int is_histogram_valid = 0;
    if (delay_difference > 0)
    {
        fraction = 1.0f - kFractionSlope * delay_difference;
        fraction = (fraction > kMinFractionWhenPossiblyCausal ? fraction : kMinFractionWhenPossiblyCausal);
    } 
    else if (delay_difference < 0)
    {
        fraction = kMinFractionWhenPossiblyNonCausal - kFractionSlope * delay_difference;
        fraction = (fraction > 1.0f ? 1.0f : fraction);
    }
    histogram_threshold *= fraction;
    histogram_threshold = (histogram_threshold > kMinHistogramThreshold ? histogram_threshold : kMinHistogramThreshold);
    is_histogram_valid = (self->histogram[candidate_delay] >= histogram_threshold) && (self->candidate_hits > kMinRequiredHits);
    return is_histogram_valid;
}
static int HistogramBasedValidation ( BinaryDelayEstimator * self , int candidate_delay ) { float fraction = 1.0f ; float histogram_threshold = self -> histogram [ self -> compare_delay ] ; int delay_difference = candidate_delay - self -> last_delay ; int is_histogram_valid = 0 ; if ( delay_difference > 0 ) { fraction = 1.0f - kFractionSlope * delay_difference ; fraction = ( fraction > kMinFractionWhenPossiblyCausal ? fraction : kMinFractionWhenPossiblyCausal ) ; } else if ( delay_difference < 0 ) { fraction = kMinFractionWhenPossiblyNonCausal - kFractionSlope * delay_difference ; fraction = ( fraction > 1.0f ? 1.0f : fraction ) ; } histogram_threshold *= fraction ; histogram_threshold = ( histogram_threshold > kMinHistogramThreshold ? histogram_threshold : kMinHistogramThreshold ) ; is_histogram_valid = ( self -> histogram [ candidate_delay ] >= histogram_threshold ) && ( self -> candidate_hits > kMinRequiredHits ) ; return is_histogram_valid ; }
Validates the |candidate_delay|, estimated in dios_ssp_aec_tde_processbinaryspectrum(),
based on a mix of counting concurring hits with a modified histogram
of recent delay estimates.
Validates the |candidate_delay| estimated in dios_ssp_aec_tde_processbinaryspectrum () based on a mix of counting concurring hits with a modified histogram of recent delay estimates .