Commit 86a16e9595 for aom
commit 86a16e95956685bb4960811c7ea840a0c6d48d78
Author: Wan-Teh Chang <wtc@google.com>
Date: Mon Apr 6 10:38:48 2026 -0700
Use av1_num_planes(cm) in av1_init_mt_sync()
Use av1_num_planes(cm) instead of MAX_MB_PLANE for the
av1_loop_restoration_alloc() call in av1_init_mt_sync().
Change-Id: I0fb4a17abede20a8e4715bc425bd194ac528d971
diff --git a/av1/encoder/ethread.c b/av1/encoder/ethread.c
index 0422856985..9fad50c9ca 100644
--- a/av1/encoder/ethread.c
+++ b/av1/encoder/ethread.c
@@ -920,12 +920,13 @@ void av1_init_mt_sync(AV1_COMP *cpi, int is_first_pass) {
int rst_unit_size = cpi->sf.lpf_sf.min_lr_unit_size;
int num_rows_lr = av1_lr_count_units(rst_unit_size, cm->height);
int num_lr_workers = av1_get_num_mod_workers_for_alloc(p_mt_info, MOD_LR);
+ const int num_planes = av1_num_planes(cm);
if (!lr_sync->sync_range || num_rows_lr > lr_sync->rows ||
num_lr_workers > lr_sync->num_workers ||
- MAX_MB_PLANE > lr_sync->num_planes) {
+ num_planes > lr_sync->num_planes) {
av1_loop_restoration_dealloc(lr_sync);
av1_loop_restoration_alloc(lr_sync, cm, num_lr_workers, num_rows_lr,
- MAX_MB_PLANE, cm->width);
+ num_planes, cm->width);
}
}
#endif