History

avutil/tests/color_utils: reduce accuracy threshold to pass to 1e-7

Fixes FATE on a variety of configurations due to accuracy problems in floating point math. Most constants tested against here are not even specified with 7 decimal digits.

Hendrik Leppkes committed 1 year ago

Commit 5215ec61 parent 34c6ad01 file · +1 −1Browse files

Unified · Split

libavutil/tests/color_utils.c+1−1
@@ -70,7 +70,7 @@ int main(int argc, char *argv[]) · 69 unmodified lines
70 printf("trc=%s calling func(%f) expected=%f roundtrip=%f\n",70 printf("trc=%s calling func(%f) expected=%f roundtrip=%f\n",
71 name, test_data[i], result, roundtrip);71 name, test_data[i], result, roundtrip);
72 72
73 if (result > 0.0 && fabs(roundtrip - test_data[i]) > 1e-8) {73 if (result > 0.0 && fabs(roundtrip - test_data[i]) > 1e-7) {
74 printf(" FAIL\n");74 printf(" FAIL\n");
75 return 1;75 return 1;
76 }76 }

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