- sanitizing CertFingerprint input in webrtc-128.0.patch - added patch for CVE-2026-56208 Resolves: RHEL-210837
80 lines
3.2 KiB
Diff
80 lines
3.2 KiB
Diff
diff --git a/av1/encoder/encoder.h b/av1/encoder/encoder.h
|
|
index 61153b9..0e38bb8 100644
|
|
--- a/av1/encoder/encoder.h
|
|
+++ b/av1/encoder/encoder.h
|
|
|
|
@@ -4194,7 +4194,10 @@
|
|
// Function return size of frame stats buffer
|
|
static inline int get_stats_buf_size(int num_lap_buffer, int num_lag_buffer) {
|
|
/* if lookahead is enabled return num_lap_buffers else num_lag_buffers */
|
|
- return (num_lap_buffer > 0 ? num_lap_buffer + 1 : num_lag_buffer);
|
|
+ if (num_lap_buffer > 0) {
|
|
+ return AOMMAX(num_lap_buffer + 1, MAX_GF_LENGTH_LAP + 1);
|
|
+ }
|
|
+ return num_lag_buffer;
|
|
}
|
|
|
|
// TODO(zoeliu): To set up cpi->oxcf.gf_cfg.enable_auto_brf
|
|
|
|
diff --git a/av1/encoder/firstpass.c b/av1/encoder/firstpass.c
|
|
index e8c15cb..605e968 100644
|
|
--- a/av1/encoder/firstpass.c
|
|
+++ b/av1/encoder/firstpass.c
|
|
|
|
@@ -1004,6 +1004,19 @@
|
|
twopass->stats_buf_ctx->stats_in_buf_end)) {
|
|
twopass->stats_buf_ctx->stats_in_end =
|
|
twopass->stats_buf_ctx->stats_in_start;
|
|
+ } else if (cpi->ppi->lap_enabled &&
|
|
+ (twopass->stats_buf_ctx->stats_in_end >=
|
|
+ twopass->stats_buf_ctx->stats_in_buf_end)) {
|
|
+ const int num_valid = (int)(twopass->stats_buf_ctx->stats_in_end -
|
|
+ cpi->twopass_frame.stats_in);
|
|
+ if (num_valid > 0) {
|
|
+ memmove(twopass->stats_buf_ctx->stats_in_start,
|
|
+ cpi->twopass_frame.stats_in,
|
|
+ num_valid * sizeof(FIRSTPASS_STATS));
|
|
+ }
|
|
+ cpi->twopass_frame.stats_in = twopass->stats_buf_ctx->stats_in_start;
|
|
+ twopass->stats_buf_ctx->stats_in_end =
|
|
+ twopass->stats_buf_ctx->stats_in_start + num_valid;
|
|
}
|
|
}
|
|
}
|
|
|
|
diff --git a/av1/encoder/pass2_strategy.c b/av1/encoder/pass2_strategy.c
|
|
index 52b92b2..81adede 100644
|
|
--- a/av1/encoder/pass2_strategy.c
|
|
+++ b/av1/encoder/pass2_strategy.c
|
|
|
|
@@ -4100,10 +4100,12 @@
|
|
// how many frames we can analyze from this frame
|
|
int rest_frames =
|
|
AOMMIN(rc->frames_to_key, MAX_FIRSTPASS_ANALYSIS_FRAMES);
|
|
- rest_frames =
|
|
- AOMMIN(rest_frames, (int)(twopass->stats_buf_ctx->stats_in_end -
|
|
- cpi->twopass_frame.stats_in +
|
|
- (rc->frames_since_key == 0)));
|
|
+ int available_frames = (int)(twopass->stats_buf_ctx->stats_in_end -
|
|
+ cpi->twopass_frame.stats_in);
|
|
+ if (!cpi->ppi->lap_enabled) {
|
|
+ available_frames += (rc->frames_since_key == 0);
|
|
+ }
|
|
+ rest_frames = AOMMIN(rest_frames, available_frames);
|
|
p_rc->frames_till_regions_update = rest_frames;
|
|
|
|
int ret;
|
|
@@ -4114,9 +4116,8 @@
|
|
twopass->stats_buf_ctx->stats_in_end, cpi->common.error);
|
|
estimate_coeff(twopass->stats_buf_ctx->stats_in_start,
|
|
twopass->stats_buf_ctx->stats_in_end);
|
|
- ret = identify_regions(cpi->twopass_frame.stats_in, rest_frames,
|
|
- (rc->frames_since_key == 0), p_rc->regions,
|
|
- &p_rc->num_regions);
|
|
+ ret = identify_regions(cpi->twopass_frame.stats_in, rest_frames, 0,
|
|
+ p_rc->regions, &p_rc->num_regions);
|
|
} else {
|
|
ret = identify_regions(
|
|
cpi->twopass_frame.stats_in - (rc->frames_since_key == 0),
|
|
|