diff options
author | Gerion Entrup <[email protected]> | 2024-06-02 14:02:53 +0200 |
---|---|---|
committer | Michael Niedermayer <[email protected]> | 2024-06-07 21:42:23 +0200 |
commit | 300df41c30c7767729e51be1d09cda02901f9b16 (patch) | |
tree | 2d56d91d4f19fba1bfc5eec4bc5211718e7a3549 /doc/examples/extract_mvs.c | |
parent | 3152c684cb59e929ed572039ad9cdb3dde273dc3 (diff) |
libavfilter/signature_lookup: fix jaccard distance
Actually, the jaccard distance is defined as D = 1 - intersect / union.
Additionally, the distance value is compared against a constant that
must be between 0 and 1, which is not the case here. Both facts together
has led to the fact, that the function always returned a matching course
signature. To leave the constant intact and to avoid floating point
computation, this commit multiplies with 1 << 16 making the constant
effectively 9000 / (1<<16) =~ 0.14.
Reported-by: Sachin Tilloo <[email protected]>
Reviewed-by: Sachin Tilloo <[email protected]>
Tested-by: Sachin Tilloo <[email protected]>
Signed-off-by: Michael Niedermayer <[email protected]>
Diffstat (limited to 'doc/examples/extract_mvs.c')
0 files changed, 0 insertions, 0 deletions