mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avfilter/signature: fix integer rounding cast precedence
Co-authored-by: Oscar <oscar_davids@outlook.com> Signed-off-by: Jai Luthra <me@jailuthra.in>
This commit is contained in:
parent
9dd410c804
commit
d91542e618
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user