History

avcodec/ffv1enc: Eliminate fabs()

Fixes: warning: using floating point absolute value function 'fabs' when argument is of integer type No change in output Changing variables to float worsens compression significantly

Michael Niedermayer committed 1 year ago

Commit fb36f171 parent 716c3981 file · +1 −1Browse files

Showing the changes to libavcodec (1 of 1 file). Show all

Unified · Split

libavcodec/ffv1enc.c+1−1
@@ -1441,7 +1441,7 @@ static void encode_float32_remap(FFV1Context *f, FFV1SliceContext *sc, · 1440 unmodified lines
1441 cost = FFMAX((delta + mul/2) / mul, 1);1441 cost = FFMAX((delta + mul/2) / mul, 1);
1442 float score = 1;1442 float score = 1;
1443 if (mul > 1) {1443 if (mul > 1) {
1444 score *= (fabs(delta - cost*mul)+1);1444 score *= (FFABS(delta - cost*mul)+1);
1445 if (mul_count > 1)1445 if (mul_count > 1)
1446 score *= score;1446 score *= score;
1447 }1447 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t