• Home
  • Raw
  • Download

Lines Matching refs:tpl_sync

2214 void av1_tpl_dealloc(AV1TplRowMultiThreadSync *tpl_sync) {  in av1_tpl_dealloc()  argument
2215 assert(tpl_sync != NULL); in av1_tpl_dealloc()
2218 if (tpl_sync->mutex_ != NULL) { in av1_tpl_dealloc()
2219 for (int i = 0; i < tpl_sync->rows; ++i) in av1_tpl_dealloc()
2220 pthread_mutex_destroy(&tpl_sync->mutex_[i]); in av1_tpl_dealloc()
2221 aom_free(tpl_sync->mutex_); in av1_tpl_dealloc()
2223 if (tpl_sync->cond_ != NULL) { in av1_tpl_dealloc()
2224 for (int i = 0; i < tpl_sync->rows; ++i) in av1_tpl_dealloc()
2225 pthread_cond_destroy(&tpl_sync->cond_[i]); in av1_tpl_dealloc()
2226 aom_free(tpl_sync->cond_); in av1_tpl_dealloc()
2230 aom_free(tpl_sync->num_finished_cols); in av1_tpl_dealloc()
2233 av1_zero(*tpl_sync); in av1_tpl_dealloc()
2237 static void av1_tpl_alloc(AV1TplRowMultiThreadSync *tpl_sync, AV1_COMMON *cm, in av1_tpl_alloc() argument
2239 tpl_sync->rows = mb_rows; in av1_tpl_alloc()
2242 CHECK_MEM_ERROR(cm, tpl_sync->mutex_, in av1_tpl_alloc()
2243 aom_malloc(sizeof(*tpl_sync->mutex_) * mb_rows)); in av1_tpl_alloc()
2244 if (tpl_sync->mutex_) { in av1_tpl_alloc()
2246 pthread_mutex_init(&tpl_sync->mutex_[i], NULL); in av1_tpl_alloc()
2249 CHECK_MEM_ERROR(cm, tpl_sync->cond_, in av1_tpl_alloc()
2250 aom_malloc(sizeof(*tpl_sync->cond_) * mb_rows)); in av1_tpl_alloc()
2251 if (tpl_sync->cond_) { in av1_tpl_alloc()
2253 pthread_cond_init(&tpl_sync->cond_[i], NULL); in av1_tpl_alloc()
2257 CHECK_MEM_ERROR(cm, tpl_sync->num_finished_cols, in av1_tpl_alloc()
2258 aom_malloc(sizeof(*tpl_sync->num_finished_cols) * mb_rows)); in av1_tpl_alloc()
2261 tpl_sync->sync_range = 1; in av1_tpl_alloc()
2329 AV1TplRowMultiThreadSync *tpl_sync = &tpl_data->tpl_mt_sync; in av1_mc_flow_dispenser_mt() local
2334 if (mb_rows != tpl_sync->rows) { in av1_mc_flow_dispenser_mt()
2335 av1_tpl_dealloc(tpl_sync); in av1_mc_flow_dispenser_mt()
2336 av1_tpl_alloc(tpl_sync, cm, mb_rows); in av1_mc_flow_dispenser_mt()
2338 tpl_sync->num_threads_working = num_workers; in av1_mc_flow_dispenser_mt()
2342 memset(tpl_sync->num_finished_cols, -1, in av1_mc_flow_dispenser_mt()
2343 sizeof(*tpl_sync->num_finished_cols) * mb_rows); in av1_mc_flow_dispenser_mt()