alpha: Fix one_over_kc calculation

On arm/aarch64, converting from float directly to unsigned int uses
a different opcode and negative numbers result in 0. Cast to
signed int first.
This commit is contained in:
Doug Nazar 2019-09-08 20:43:17 -04:00
parent 31be44c47f
commit 42dea672fa

View file

@ -2349,7 +2349,7 @@ gst_alpha_init_params_full (GstAlpha * alpha,
tmp = MIN (tmp, 255);
alpha->accept_angle_ctg = tmp;
tmp = 1 / (kgl);
alpha->one_over_kc = 255 * 2 * tmp - 255;
alpha->one_over_kc = (gint) (255 * 2 * tmp - 255);
tmp = 15 * y / kgl;
tmp = MIN (tmp, 255);
alpha->kfgy_scale = tmp;