forked from mirrors/gecko-dev
		
	Bug 1891458 - Apply local patches r=media-playback-reviewers,padenot
This patch runs `./mach vendor media/libvpx/moz.yaml --patch-mode=only` to apply local patches. Depends on D207807 Differential Revision: https://phabricator.services.mozilla.com/D207808
This commit is contained in:
		
							parent
							
								
									e1d94bc620
								
							
						
					
					
						commit
						e7239b67a6
					
				
					 3 changed files with 29 additions and 11 deletions
				
			
		|  | @ -994,11 +994,20 @@ static vpx_codec_err_t vp8e_encode(vpx_codec_alg_priv_t *ctx, | ||||||
| 
 | 
 | ||||||
|       res = image2yuvconfig(img, &sd); |       res = image2yuvconfig(img, &sd); | ||||||
| 
 | 
 | ||||||
|       if (vp8_receive_raw_frame(ctx->cpi, ctx->next_frame_flag | lib_flags, &sd, |       if (sd.y_width != ctx->cfg.g_w || sd.y_height != ctx->cfg.g_h) { | ||||||
|                                 dst_time_stamp, dst_end_time_stamp)) { |         /* from vpx_encoder.h for g_w/g_h:
 | ||||||
|  |            "Note that the frames passed as input to the encoder must have this | ||||||
|  |            resolution" | ||||||
|  |         */ | ||||||
|  |         ctx->base.err_detail = "Invalid input frame resolution"; | ||||||
|  |         res = VPX_CODEC_INVALID_PARAM; | ||||||
|  |       } else { | ||||||
|  |         if (vp8_receive_raw_frame(ctx->cpi, ctx->next_frame_flag | lib_flags, | ||||||
|  |                                   &sd, dst_time_stamp, dst_end_time_stamp)) { | ||||||
|           VP8_COMP *cpi = (VP8_COMP *)ctx->cpi; |           VP8_COMP *cpi = (VP8_COMP *)ctx->cpi; | ||||||
|           res = update_error_state(ctx, &cpi->common.error); |           res = update_error_state(ctx, &cpi->common.error); | ||||||
|         } |         } | ||||||
|  |       } | ||||||
| 
 | 
 | ||||||
|       /* reset for next frame */ |       /* reset for next frame */ | ||||||
|       ctx->next_frame_flag = 0; |       ctx->next_frame_flag = 0; | ||||||
|  |  | ||||||
|  | @ -1436,6 +1436,14 @@ static vpx_codec_err_t encoder_encode(vpx_codec_alg_priv_t *ctx, | ||||||
|           timebase_units_to_ticks(timebase_in_ts, pts_end); |           timebase_units_to_ticks(timebase_in_ts, pts_end); | ||||||
|       res = image2yuvconfig(img, &sd); |       res = image2yuvconfig(img, &sd); | ||||||
| 
 | 
 | ||||||
|  |       if (sd.y_width != ctx->cfg.g_w || sd.y_height != ctx->cfg.g_h) { | ||||||
|  |         /* from vpx_encoder.h for g_w/g_h:
 | ||||||
|  |            "Note that the frames passed as input to the encoder must have this | ||||||
|  |            resolution" | ||||||
|  |         */ | ||||||
|  |         ctx->base.err_detail = "Invalid input frame resolution"; | ||||||
|  |         res = VPX_CODEC_INVALID_PARAM; | ||||||
|  |       } else { | ||||||
|         // Store the original flags in to the frame buffer. Will extract the
 |         // Store the original flags in to the frame buffer. Will extract the
 | ||||||
|         // key frame flag when we actually encode this frame.
 |         // key frame flag when we actually encode this frame.
 | ||||||
|         if (vp9_receive_raw_frame(cpi, flags | ctx->next_frame_flags, &sd, |         if (vp9_receive_raw_frame(cpi, flags | ctx->next_frame_flags, &sd, | ||||||
|  | @ -1444,6 +1452,7 @@ static vpx_codec_err_t encoder_encode(vpx_codec_alg_priv_t *ctx, | ||||||
|         } |         } | ||||||
|         ctx->next_frame_flags = 0; |         ctx->next_frame_flags = 0; | ||||||
|       } |       } | ||||||
|  |     } | ||||||
| 
 | 
 | ||||||
|     cx_data = ctx->cx_data; |     cx_data = ctx->cx_data; | ||||||
|     cx_data_sz = ctx->cx_data_sz; |     cx_data_sz = ctx->cx_data_sz; | ||||||
|  |  | ||||||
|  | @ -16,7 +16,7 @@ | ||||||
| #include <sys/sysctl.h> | #include <sys/sysctl.h> | ||||||
| #endif | #endif | ||||||
| 
 | 
 | ||||||
| #if !CONFIG_RUNTIME_CPU_DETECT | #if !CONFIG_RUNTIME_CPU_DETECT || defined(__OpenBSD__) | ||||||
| 
 | 
 | ||||||
| static int arm_get_cpu_caps(void) { | static int arm_get_cpu_caps(void) { | ||||||
|   // This function should actually be a no-op. There is no way to adjust any of
 |   // This function should actually be a no-op. There is no way to adjust any of
 | ||||||
|  | @ -29,7 +29,7 @@ static int arm_get_cpu_caps(void) { | ||||||
|   return flags; |   return flags; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| #elif defined(__APPLE__)  // end !CONFIG_RUNTIME_CPU_DETECT
 | #elif defined(__APPLE__)  // end !CONFIG_RUNTIME_CPU_DETECT || defined(__OpenBSD__)
 | ||||||
| 
 | 
 | ||||||
| // sysctlbyname() parameter documentation for instruction set characteristics:
 | // sysctlbyname() parameter documentation for instruction set characteristics:
 | ||||||
| // https://developer.apple.com/documentation/kernel/1387446-sysctlbyname/determining_instruction_set_characteristics
 | // https://developer.apple.com/documentation/kernel/1387446-sysctlbyname/determining_instruction_set_characteristics
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue
	
	 Chun-Min Chang
						Chun-Min Chang