Commit f311099b0a for aom
commit f311099b0ac19281a7a39f05ff5be2d6cade73a8
Author: Apurve Kumar Pandey <apurve.pandey@ittiam.com>
Date: Thu Jul 2 13:50:42 2026 +0530
av1_encode: enable do_border_pad
- Enabled the 'do_border_pad' as the crashes in SSE2 code and
in Arm builds have been fixed in
https://aomedia-review.googlesource.com/c/aom/+/214541.
- Simplified the calculation in get_visible_dimensions() by
using ROUND_POWER_OF_TWO instead of
ROUND_POWER_OF_TWO_SIGNED.
Bug: 527078408, 527242002
STATS_CHANGED
Change-Id: Icdbf2e16dabfcbf3d14fe690efde49b489da26b1
diff --git a/av1/encoder/encoder.c b/av1/encoder/encoder.c
index ebf7ed7366..3842190096 100644
--- a/av1/encoder/encoder.c
+++ b/av1/encoder/encoder.c
@@ -4558,9 +4558,7 @@ int av1_encode(AV1_COMP *const cpi, uint8_t *const dest, size_t dest_size,
cpi->oxcf.algo_cfg.enable_tpl_model && cpi->oxcf.q_cfg.aq_mode == NO_AQ &&
!cpi->common.seg.enabled && !cpi->roi.enabled && !cpi->oxcf.sb_qp_sweep &&
!cpi->use_ducky_encode && cpi->oxcf.algo_cfg.sharpness != 3) {
- // TODO(issue 527242002, issue 527078408): set do_border_pad to true after
- // fixing crashes in x86 and Arm builds.
- cpi->do_border_pad = false;
+ cpi->do_border_pad = true;
} else {
cpi->do_border_pad = false;
}
diff --git a/av1/encoder/rdopt_utils.h b/av1/encoder/rdopt_utils.h
index 1c50cb4b3d..89d9c93592 100644
--- a/av1/encoder/rdopt_utils.h
+++ b/av1/encoder/rdopt_utils.h
@@ -379,7 +379,7 @@ static inline int get_visible_dimensions(const MACROBLOCK *x, int plane,
} else {
const int block_height = block_size_high[plane_bsize];
const int block_rows =
- ROUND_POWER_OF_TWO_SIGNED(x->pix_to_bottom_edge, pd->subsampling_y) +
+ -ROUND_POWER_OF_TWO(-x->pix_to_bottom_edge, pd->subsampling_y) +
block_height;
valid_rows = clamp(block_rows - (blk_row << MI_SIZE_LOG2), 0, rows);
}
@@ -389,7 +389,7 @@ static inline int get_visible_dimensions(const MACROBLOCK *x, int plane,
} else {
const int block_width = block_size_wide[plane_bsize];
const int block_cols =
- ROUND_POWER_OF_TWO_SIGNED(x->pix_to_right_edge, pd->subsampling_x) +
+ -ROUND_POWER_OF_TWO(-x->pix_to_right_edge, pd->subsampling_x) +
block_width;
valid_cols = clamp(block_cols - (blk_col << MI_SIZE_LOG2), 0, cols);
}