mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 17:20:36 +00:00
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:
parent
31be44c47f
commit
42dea672fa
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue