mirror of
https://github.com/webmproject/libwebp.git
synced 2024-12-26 05:38:22 +01:00
SharpYuvComputeConversionMatrix: quiet int->float warnings
under some versions of visual studio: sharpyuv\sharpyuv_csp.c(43): warning C4244: '=': conversion from 'int' to 'float', possible loss of data sharpyuv\sharpyuv_csp.c(35): warning C4244: 'initializing': conversion from 'int' to 'float', possible loss of data Change-Id: I452d24857b43b8a80fae0f339163b4b3965f2d9f
This commit is contained in:
parent
deb426becc
commit
99a8756201
@ -32,7 +32,7 @@ void SharpYuvComputeConversionMatrix(const SharpYuvColorSpace* yuv_color_space,
|
||||
float addY = 0.0f;
|
||||
float scaleU = cr;
|
||||
float scaleV = cb;
|
||||
float addUV = (128 << shift);
|
||||
float addUV = (float)(128 << shift);
|
||||
|
||||
assert(yuv_color_space->bits >= 8);
|
||||
|
||||
@ -40,7 +40,7 @@ void SharpYuvComputeConversionMatrix(const SharpYuvColorSpace* yuv_color_space,
|
||||
scaleY *= (219 << shift) / denom;
|
||||
scaleU *= (224 << shift) / denom;
|
||||
scaleV *= (224 << shift) / denom;
|
||||
addY = (16 << shift);
|
||||
addY = (float)(16 << shift);
|
||||
}
|
||||
|
||||
matrix->rgb_to_y[0] = ToFixed16(kr * scaleY);
|
||||
|
Loading…
Reference in New Issue
Block a user