Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJai Luthra <me@jailuthra.in>2021-08-20 13:45:28 +0300
committerJai Luthra <me@jailuthra.in>2021-08-28 11:00:02 +0300
commitd91542e61830e64365f40bfdc3c32084cfc41165 (patch)
tree1e2f0a667f61f79f8913c98d35d86d0c105e61fa /libavfilter/signature_lookup.c
parent9dd410c80416197188337e3b7e1600be41d2ea64 (diff)
avfilter/signature: fix integer rounding cast precedence
Co-authored-by: Oscar <oscar_davids@outlook.com> Signed-off-by: Jai Luthra <me@jailuthra.in>
Diffstat (limited to 'libavfilter/signature_lookup.c')
-rw-r--r--libavfilter/signature_lookup.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavfilter/signature_lookup.c b/libavfilter/signature_lookup.c
index 977f898049..86dd0c6675 100644
--- a/libavfilter/signature_lookup.c
+++ b/libavfilter/signature_lookup.c
@@ -244,9 +244,9 @@ static MatchingInfo* get_matching_parameters(AVFilterContext *ctx, SignatureCont
if (pairs[i].b[j] != pairs[k].b[l]) {
/* linear regression */
m = (pairs[k].b_pos[l]-pairs[i].b_pos[j]) / (k-i); /* good value between 0.0 - 2.0 */
- framerate = (int) m*30 + 0.5; /* round up to 0 - 60 */
+ framerate = (int) (m*30 + 0.5); /* round up to 0 - 60 */
if (framerate>0 && framerate <= MAX_FRAMERATE) {
- offset = pairs[i].b_pos[j] - ((int) m*i + 0.5); /* only second part has to be rounded up */
+ offset = pairs[i].b_pos[j] - ((int) (m*i + 0.5)); /* only second part has to be rounded up */
if (offset > -HOUGH_MAX_OFFSET && offset < HOUGH_MAX_OFFSET) {
if (pairs[i].dist < pairs[k].dist) {
if (pairs[i].dist < hspace[framerate-1][offset+HOUGH_MAX_OFFSET].dist) {