mirror of
				https://projects.vdr-developer.org/git/vdr-plugin-softhddevice.git
				synced 2023-10-10 17:16:51 +00:00 
			
		
		
		
	Fix bug: center cut-out didn't use cut off pixels.
This commit is contained in:
		| @@ -1,6 +1,7 @@ | ||||
| User johns | ||||
| Date: | ||||
|  | ||||
|     Fix bug: center cut-out didn't use cut off pixels. | ||||
|     Fix bug #2058: support for Make.plgcfg. | ||||
|     Fix for compile with vdr 2.1.10, for older vdr versions. | ||||
|  | ||||
|   | ||||
							
								
								
									
										28
									
								
								video.c
									
									
									
									
									
								
							
							
						
						
									
										28
									
								
								video.c
									
									
									
									
									
								
							| @@ -632,27 +632,37 @@ static void VideoUpdateOutput(AVRational input_aspect_ratio, int input_width, | ||||
|  | ||||
|     // look which side must be cut | ||||
|     if (*crop_width > video_width) { | ||||
| 	*crop_height = input_height; | ||||
| 	int tmp; | ||||
|  | ||||
| 	*crop_height = input_height - VideoCutTopBottom[resolution] * 2; | ||||
|  | ||||
| 	// adjust scaling | ||||
| 	*crop_x = ((*crop_width - video_width) * input_width) | ||||
| 	    / (2 * video_width); | ||||
| 	tmp = ((*crop_width - video_width) * input_width) / (2 * video_width); | ||||
| 	// FIXME: round failure? | ||||
| 	if (tmp > *crop_x) { | ||||
| 	    *crop_x = tmp; | ||||
| 	} | ||||
| 	*crop_width = input_width - *crop_x * 2; | ||||
| 	// FIXME: round failure? | ||||
|     } else if (*crop_height > video_height) { | ||||
| 	*crop_width = input_width; | ||||
| 	int tmp; | ||||
|  | ||||
| 	*crop_width = input_width - VideoCutLeftRight[resolution] * 2; | ||||
|  | ||||
| 	// adjust scaling | ||||
| 	*crop_y = ((*crop_height - video_height) * input_height) | ||||
| 	tmp = ((*crop_height - video_height) * input_height) | ||||
| 	    / (2 * video_height); | ||||
| 	*crop_height = input_height - *crop_y * 2; | ||||
| 	// FIXME: round failure? | ||||
| 	if (tmp > *crop_y) { | ||||
| 	    *crop_y = tmp; | ||||
| 	} | ||||
| 	*crop_height = input_height - *crop_y * 2; | ||||
|     } else { | ||||
| 	*crop_width = input_width; | ||||
| 	*crop_height = input_height; | ||||
| 	*crop_width = input_width - VideoCutLeftRight[resolution] * 2; | ||||
| 	*crop_height = input_height - VideoCutTopBottom[resolution] * 2; | ||||
|     } | ||||
|     Debug(3, "video: aspect crop %dx%d%+d%+d\n", *crop_width, *crop_height, | ||||
| 	*crop_x, *crop_y); | ||||
|     return; | ||||
| } | ||||
|  | ||||
| //---------------------------------------------------------------------------- | ||||
|   | ||||
		Reference in New Issue
	
	Block a user