我要评分
获取效率
正确性
完整性
易理解

GetPQDistance

API Definition

int GetPQDistance(const unsigned char *basecode, const unsigned char *querycode, const PQParams *params, const float *pqDistanceTable, float *PQDistance);

Function

Calculate the PQ ADC or SDC distance. If querycode == NULL, the ADC distance is calculated. If querycode != NULL, the SDC distance is calculated.

Parameters

Parameter

Description

Data Type

Value Range

basecode

Quantized base.

unsigned char*

The value cannot be null.

querycode

Quantized query.

unsigned char*

The value cannot be null.

pqDistanceTable

SDC or ADC distance table.

float*

The value cannot be null.

pqDistance

SDC or ADC distance.

float*

The value cannot be null.

PQParams

For details, see the description of PQParams in Structure Description.

Return Value

Data Type

Description

int

The value 0 is returned when the system runs properly, and the value -1 is returned when the system exits abnormally.