Skip to content

Commit

Permalink
Cherry-pick aom 3154860bdbe978da9271ba55eea60973b0be06b5
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=253015
rdar://105507028

Reviewed by Geoffrey Garen.

Cherry-pick patch from upstream.

* Source/ThirdParty/libwebrtc/Source/third_party/libaom/source/libaom/av1/encoder/encodeframe_utils.c:
(av1_source_content_sb):

Cherry-pick: 259548.317@safari-7615-branch (92bb5fb). rdar://107755462
Canonical link: https://commits.webkit.org/262739@main
  • Loading branch information
youennf authored and webkit-early-warning-system committed Apr 8, 2023
1 parent 776f5f1 commit 36c30e4
Showing 1 changed file with 6 additions and 5 deletions.
Expand Up @@ -1317,10 +1317,11 @@ void av1_source_content_sb(AV1_COMP *cpi, MACROBLOCK *x, int mi_row,
unsigned int tmp_variance;
const BLOCK_SIZE bsize = cpi->common.seq_params->sb_size;
uint8_t *src_y = cpi->source->y_buffer;
int src_ystride = cpi->source->y_stride;
const int src_ystride = cpi->source->y_stride;
const int src_offset = src_ystride * (mi_row << 2) + (mi_col << 2);
uint8_t *last_src_y = cpi->last_source->y_buffer;
int last_src_ystride = cpi->last_source->y_stride;
const int offset = cpi->source->y_stride * (mi_row << 2) + (mi_col << 2);
const int last_src_ystride = cpi->last_source->y_stride;
const int last_src_offset = last_src_ystride * (mi_row << 2) + (mi_col << 2);
uint64_t avg_source_sse_threshold[2] = { 100000, // ~5*5*(64*64)
36000 }; // ~3*3*(64*64)
uint64_t avg_source_sse_threshold_high = 1000000; // ~15*15*(64*64)
Expand All @@ -1329,8 +1330,8 @@ void av1_source_content_sb(AV1_COMP *cpi, MACROBLOCK *x, int mi_row,
MACROBLOCKD *xd = &x->e_mbd;
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) return;
#endif
src_y += offset;
last_src_y += offset;
src_y += src_offset;
last_src_y += last_src_offset;
tmp_variance = cpi->ppi->fn_ptr[bsize].vf(src_y, src_ystride, last_src_y,
last_src_ystride, &tmp_sse);
// rd thresholds
Expand Down

0 comments on commit 36c30e4

Please sign in to comment.