projects
/
platform
/
upstream
/
gstreamer.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
31be44c
)
alpha: Fix one_over_kc calculation
author
Doug Nazar
<nazard@nazar.ca>
Mon, 9 Sep 2019 00:43:17 +0000
(20:43 -0400)
committer
Doug Nazar
<nazard@nazar.ca>
Mon, 9 Sep 2019 04:51:53 +0000
(
00:51
-0400)
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.
gst/alpha/gstalpha.c
patch
|
blob
|
history
diff --git
a/gst/alpha/gstalpha.c
b/gst/alpha/gstalpha.c
index 867e0004349f27f53cf42b603fc0bedf8450165e..4a37b01e856d6740edfb37df1a8f764d14012292 100644
(file)
--- a/
gst/alpha/gstalpha.c
+++ b/
gst/alpha/gstalpha.c
@@
-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;