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:
David Rosca
2025-04-15 12:25:39 +02:00
committed by Marge Bot
parent b4940255ed
commit bd6f9e8aee

View File

@@ -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_height = process_properties->dst_region.y1 - process_properties->dst_region.y0;
scaling_ratio[0] = src_rect_width / dst_rect_width;
scaling_ratio[1] = src_rect_height / dst_rect_height;
scaling_ratio[0] = (float)src_rect_width / dst_rect_width;
scaling_ratio[1] = (float)src_rect_height / dst_rect_height;
/* Perform general processing */
if ((scaling_ratio[0] <= VPE_MAX_GEOMETRIC_DOWNSCALE) && (scaling_ratio[1] <= VPE_MAX_GEOMETRIC_DOWNSCALE))