radeonsi/vpe: Use float division to get scaling ratio
Fixes: e85a6b6a63
("radeonsi/vpe: check reduction ratio")
Reviewed-by: Peyton Lee <peytolee@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34519>
This commit is contained in:
@@ -1266,8 +1266,8 @@ si_vpe_processor_process_frame(struct pipe_video_codec *codec,
|
|||||||
dst_rect_width = process_properties->dst_region.x1 - process_properties->dst_region.x0;
|
dst_rect_width = process_properties->dst_region.x1 - process_properties->dst_region.x0;
|
||||||
dst_rect_height = process_properties->dst_region.y1 - process_properties->dst_region.y0;
|
dst_rect_height = process_properties->dst_region.y1 - process_properties->dst_region.y0;
|
||||||
|
|
||||||
scaling_ratio[0] = src_rect_width / dst_rect_width;
|
scaling_ratio[0] = (float)src_rect_width / dst_rect_width;
|
||||||
scaling_ratio[1] = src_rect_height / dst_rect_height;
|
scaling_ratio[1] = (float)src_rect_height / dst_rect_height;
|
||||||
|
|
||||||
/* Perform general processing */
|
/* Perform general processing */
|
||||||
if ((scaling_ratio[0] <= VPE_MAX_GEOMETRIC_DOWNSCALE) && (scaling_ratio[1] <= VPE_MAX_GEOMETRIC_DOWNSCALE))
|
if ((scaling_ratio[0] <= VPE_MAX_GEOMETRIC_DOWNSCALE) && (scaling_ratio[1] <= VPE_MAX_GEOMETRIC_DOWNSCALE))
|
||||||
|
Reference in New Issue
Block a user