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

Unified · Split

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

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