diff --git a/src_base/xeve_pinter.c b/src_base/xeve_pinter.c index 17bd3b5..8068d8f 100644 --- a/src_base/xeve_pinter.c +++ b/src_base/xeve_pinter.c @@ -1518,6 +1518,9 @@ static int pinter_init_mt(XEVE_CTX *ctx, int thread_idx) int size; pic = pi->pic_o = PIC_ORIG(ctx); + pi->refp = ctx->refp; + pi->slice_type = ctx->slice_type; + pi->o[Y_C] = pic->y; pi->o[U_C] = pic->u; pi->o[V_C] = pic->v; @@ -1527,6 +1530,12 @@ static int pinter_init_mt(XEVE_CTX *ctx, int thread_idx) pi->s_o[V_C] = pic->s_c; pic = pi->pic_m = PIC_MODE(ctx); + pi->map_mv = ctx->map_mv; + + pi->w_scu = ctx->w_scu; + size = sizeof(pel) * MAX_CU_DIM; + xeve_mset(pi->pred_buf, 0, size); + pi->m[Y_C] = pic->y; pi->m[U_C] = pic->u; pi->m[V_C] = pic->v; @@ -1534,17 +1543,7 @@ static int pinter_init_mt(XEVE_CTX *ctx, int thread_idx) pi->s_m[Y_C] = pic->s_l; pi->s_m[U_C] = pic->s_c; pi->s_m[V_C] = pic->s_c; - - pi->refp = ctx->refp; - pi->slice_type = ctx->slice_type; - - pi->map_mv = ctx->map_mv; - - pi->w_scu = ctx->w_scu; - - size = sizeof(pel) * MAX_CU_DIM; - xeve_mset(pi->pred_buf, 0, size); - + size = sizeof(s8) * PRED_NUM * REFP_NUM; xeve_mset(pi->refi, 0, size); diff --git a/src_base/xeve_pintra.c b/src_base/xeve_pintra.c index b48cb4e..461fdf0 100644 --- a/src_base/xeve_pintra.c +++ b/src_base/xeve_pintra.c @@ -39,6 +39,10 @@ int xeve_pintra_init_mt(XEVE_CTX * ctx, int tile_idx) pi = &ctx->pintra[tile_idx]; pic = pi->pic_o = PIC_ORIG(ctx); + + xeve_mset(&pi->slice_type, 0, sizeof(int)); + pi->slice_type = ctx->slice_type; + pi->o[Y_C] = pic->y; pi->o[U_C] = pic->u; pi->o[V_C] = pic->v; @@ -56,7 +60,6 @@ int xeve_pintra_init_mt(XEVE_CTX * ctx, int tile_idx) pi->s_m[U_C] = pic->s_c; pi->s_m[V_C] = pic->s_c; - pi->slice_type = ctx->slice_type; return XEVE_OK; } diff --git a/src_base/xeve_type.h b/src_base/xeve_type.h index 8cf5d98..33a7b1f 100644 --- a/src_base/xeve_type.h +++ b/src_base/xeve_type.h @@ -882,8 +882,6 @@ struct _XEVE_CTX /* cu data for current LCU */ XEVE_CU_DATA * map_cu_data; /* map for encoded motion vectors in SCU */ - s16 (* map_mv)[REFP_NUM][MV_D]; - /* map for encoded motion vectors in SCU */ s16 (* map_unrefined_mv)[REFP_NUM][MV_D]; /* map for reference indices */ s8 (* map_refi)[REFP_NUM]; @@ -953,12 +951,10 @@ struct _XEVE_CTX /* intra prediction functions */ int (*fn_pintra_init_mt)(XEVE_CTX * ctx, int tile_idx); int (*fn_pintra_init_lcu)(XEVE_CTX * ctx, XEVE_CORE * core); - double(*fn_pintra_analyze_cu)(XEVE_CTX *ctx, XEVE_CORE *core, int x, int y, int log2_cuw, int log2_cuh, XEVE_MODE *mi, s16 coef[N_C][MAX_CU_DIM], pel *rec[N_C], int s_rec[N_C]); int (*fn_pintra_set_complexity)(XEVE_CTX * ctx, int complexity); /* inter prediction functions */ int (*fn_pinter_init_mt)(XEVE_CTX * ctx, int tile_idx); int (*fn_pinter_init_lcu)(XEVE_CTX * ctx, XEVE_CORE * core); - double(*fn_pinter_analyze_cu)(XEVE_CTX *ctx, XEVE_CORE *core, int x, int y, int log2_cuw, int log2_cuh, XEVE_MODE *mi, s16 coef[N_C][MAX_CU_DIM], pel *rec[N_C], int s_rec[N_C]); int (*fn_pinter_set_complexity)(XEVE_CTX * ctx, int complexity); int (*fn_loop_filter)(XEVE_CTX * ctx, XEVE_CORE * core); /* entropy coding functions */ @@ -982,6 +978,9 @@ struct _XEVE_CTX void (*fn_deblock_tree)(XEVE_CTX * ctx, XEVE_PIC * pic, int x, int y, int cuw, int cuh, int cud, int cup, int is_hor_edge, TREE_CONS tree_cons, XEVE_CORE * core, int boundary_filtering); void (*fn_pic_flt)(XEVE_CTX * ctx, XEVE_IMGB * img); const XEVE_ITXB(*fn_itxb)[MAX_TR_LOG2]; + /* intra/inter analyze functions*/ + double(*fn_pintra_analyze_cu)(XEVE_CTX *ctx, XEVE_CORE *core, int x, int y, int log2_cuw, int log2_cuh, XEVE_MODE *mi, s16 coef[N_C][MAX_CU_DIM], pel *rec[N_C], int s_rec[N_C]); + double(*fn_pinter_analyze_cu)(XEVE_CTX *ctx, XEVE_CORE *core, int x, int y, int log2_cuw, int log2_cuh, XEVE_MODE *mi, s16 coef[N_C][MAX_CU_DIM], pel *rec[N_C], int s_rec[N_C]); /* platform specific data, if needed */ void * pf; @@ -996,6 +995,8 @@ struct _XEVE_CTX u8 tile_to_slice_map[XEVE_MAX_NUM_TILES_COL * XEVE_MAX_NUM_TILES_ROW]; u8 tiles_in_slice[XEVE_MAX_NUM_TILES_COL * XEVE_MAX_NUM_TILES_ROW]; u8 tile_order[XEVE_MAX_NUM_TILES_COL * XEVE_MAX_NUM_TILES_ROW]; + /* map for encoded motion vectors in SCU */ + s16 (* map_mv)[REFP_NUM][MV_D]; };