yuvconstants.c: fix double->float conv warnings

under Visual Studio:
...\util\yuvconstants.c(57,14): warning C4244:
'initializing': conversion from 'double' to 'float', possible loss of
data
...\util\yuvconstants.c(58,14): warning C4244:
'initializing': conversion from 'double' to 'float', possible loss of
data

Change-Id: I3c49e670d9e4217ef3ed0acd31a9a86fc54c4694
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/4513826
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
This commit is contained in:
James Zern 2023-05-08 15:28:35 -07:00 committed by libyuv LUCI CQ
parent 8b4aa7cef9
commit b2ea744591

View File

@ -54,8 +54,8 @@ int main(int argc, const char* argv[]) {
printf(" 9 BT.2020 KR = 0.2627; KB = 0.0593\n");
return -1;
}
float kr = atof(argv[1]);
float kb = atof(argv[2]);
float kr = (float)atof(argv[1]);
float kb = (float)atof(argv[2]);
float kg = 1 - kr - kb;
float vr = 2 * (1 - kr);