mirror of
				https://github.com/blakeblackshear/frigate.git
				synced 2025-10-27 10:52:11 +01:00 
			
		
		
		
	Ensure that birdseye error correction uses a resolution that is divisible by 4 (#8398)
This commit is contained in:
		
							parent
							
								
									af24eb7dbf
								
							
						
					
					
						commit
						8085ad4b4c
					
				| @ -63,8 +63,8 @@ def get_canvas_shape(width: int, height: int) -> tuple[int, int]: | |||||||
|     a_w, a_h = get_standard_aspect_ratio(width, height) |     a_w, a_h = get_standard_aspect_ratio(width, height) | ||||||
| 
 | 
 | ||||||
|     if round(a_w / a_h, 2) != round(width / height, 2): |     if round(a_w / a_h, 2) != round(width / height, 2): | ||||||
|         canvas_width = width |         canvas_width = int(width // 4 * 4) | ||||||
|         canvas_height = int((canvas_width / a_w) * a_h) |         canvas_height = int((canvas_width / a_w * a_h) // 4 * 4) | ||||||
|         logger.warning( |         logger.warning( | ||||||
|             f"The birdseye resolution is a non-standard aspect ratio, forcing birdseye resolution to {canvas_width} x {canvas_height}" |             f"The birdseye resolution is a non-standard aspect ratio, forcing birdseye resolution to {canvas_width} x {canvas_height}" | ||||||
|         ) |         ) | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user