diff options
author | Gerion Entrup <gerion.entrup@flump.de> | 2024-06-02 14:02:53 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2024-06-07 21:42:23 +0200 |
commit | 300df41c30c7767729e51be1d09cda02901f9b16 (patch) | |
tree | 2d56d91d4f19fba1bfc5eec4bc5211718e7a3549 /libavfilter/af_haas.c | |
parent | 3152c684cb59e929ed572039ad9cdb3dde273dc3 (diff) | |
download | ffmpeg-300df41c30c7767729e51be1d09cda02901f9b16.tar.gz |
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 <sachin.tilloo@gmail.com>
Reviewed-by: Sachin Tilloo <sachin.tilloo@gmail.com>
Tested-by: Sachin Tilloo <sachin.tilloo@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavfilter/af_haas.c')
0 files changed, 0 insertions, 0 deletions