|
|
|
@@ -1156,6 +1156,67 @@ static void rvcn_init_mode_probs(void *prob)
|
|
|
|
|
memcpy(fc->intrabc_cdf, default_intrabc_cdf, sizeof(default_intrabc_cdf));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void rvcn_vcn4_init_mode_probs(void *prob)
|
|
|
|
|
{
|
|
|
|
|
rvcn_av1_vcn4_frame_context_t * fc = (rvcn_av1_vcn4_frame_context_t*)prob;
|
|
|
|
|
int i;
|
|
|
|
|
|
|
|
|
|
memcpy(fc->palette_y_size_cdf, default_palette_y_size_cdf, sizeof(default_palette_y_size_cdf));
|
|
|
|
|
memcpy(fc->palette_uv_size_cdf, default_palette_uv_size_cdf, sizeof(default_palette_uv_size_cdf));
|
|
|
|
|
memcpy(fc->palette_y_color_index_cdf, default_palette_y_color_index_cdf, sizeof(default_palette_y_color_index_cdf));
|
|
|
|
|
memcpy(fc->palette_uv_color_index_cdf, default_palette_uv_color_index_cdf, sizeof(default_palette_uv_color_index_cdf));
|
|
|
|
|
memcpy(fc->kf_y_cdf, default_kf_y_mode_cdf, sizeof(default_kf_y_mode_cdf));
|
|
|
|
|
memcpy(fc->angle_delta_cdf, default_angle_delta_cdf, sizeof(default_angle_delta_cdf));
|
|
|
|
|
memcpy(fc->comp_inter_cdf, default_comp_inter_cdf, sizeof(default_comp_inter_cdf));
|
|
|
|
|
memcpy(fc->comp_ref_type_cdf, default_comp_ref_type_cdf,sizeof(default_comp_ref_type_cdf));
|
|
|
|
|
memcpy(fc->uni_comp_ref_cdf, default_uni_comp_ref_cdf, sizeof(default_uni_comp_ref_cdf));
|
|
|
|
|
memcpy(fc->palette_y_mode_cdf, default_palette_y_mode_cdf, sizeof(default_palette_y_mode_cdf));
|
|
|
|
|
memcpy(fc->palette_uv_mode_cdf, default_palette_uv_mode_cdf, sizeof(default_palette_uv_mode_cdf));
|
|
|
|
|
memcpy(fc->comp_ref_cdf, default_comp_ref_cdf, sizeof(default_comp_ref_cdf));
|
|
|
|
|
memcpy(fc->comp_bwdref_cdf, default_comp_bwdref_cdf, sizeof(default_comp_bwdref_cdf));
|
|
|
|
|
memcpy(fc->single_ref_cdf, default_single_ref_cdf, sizeof(default_single_ref_cdf));
|
|
|
|
|
memcpy(fc->txfm_partition_cdf, default_txfm_partition_cdf, sizeof(default_txfm_partition_cdf));
|
|
|
|
|
memcpy(fc->compound_index_cdf, default_compound_idx_cdfs, sizeof(default_compound_idx_cdfs));
|
|
|
|
|
memcpy(fc->comp_group_idx_cdf, default_comp_group_idx_cdfs, sizeof(default_comp_group_idx_cdfs));
|
|
|
|
|
memcpy(fc->newmv_cdf, default_newmv_cdf, sizeof(default_newmv_cdf));
|
|
|
|
|
memcpy(fc->zeromv_cdf, default_zeromv_cdf, sizeof(default_zeromv_cdf));
|
|
|
|
|
memcpy(fc->refmv_cdf, default_refmv_cdf, sizeof(default_refmv_cdf));
|
|
|
|
|
memcpy(fc->drl_cdf, default_drl_cdf, sizeof(default_drl_cdf));
|
|
|
|
|
memcpy(fc->motion_mode_cdf, default_motion_mode_cdf, sizeof(default_motion_mode_cdf));
|
|
|
|
|
memcpy(fc->obmc_cdf, default_obmc_cdf, sizeof(default_obmc_cdf));
|
|
|
|
|
memcpy(fc->inter_compound_mode_cdf, default_inter_compound_mode_cdf, sizeof(default_inter_compound_mode_cdf));
|
|
|
|
|
memcpy(fc->compound_type_cdf, default_compound_type_cdf, sizeof(default_compound_type_cdf));
|
|
|
|
|
memcpy(fc->wedge_idx_cdf, default_wedge_idx_cdf, sizeof(default_wedge_idx_cdf));
|
|
|
|
|
memcpy(fc->interintra_cdf, default_interintra_cdf, sizeof(default_interintra_cdf));
|
|
|
|
|
memcpy(fc->wedge_interintra_cdf, default_wedge_interintra_cdf, sizeof(default_wedge_interintra_cdf));
|
|
|
|
|
memcpy(fc->interintra_mode_cdf, default_interintra_mode_cdf, sizeof(default_interintra_mode_cdf));
|
|
|
|
|
memcpy(fc->pred_cdf, default_segment_pred_cdf, sizeof(default_segment_pred_cdf));
|
|
|
|
|
memcpy(fc->switchable_restore_cdf, default_switchable_restore_cdf, sizeof(default_switchable_restore_cdf));
|
|
|
|
|
memcpy(fc->wiener_restore_cdf, default_wiener_restore_cdf, sizeof(default_wiener_restore_cdf));
|
|
|
|
|
memcpy(fc->sgrproj_restore_cdf, default_sgrproj_restore_cdf, sizeof(default_sgrproj_restore_cdf));
|
|
|
|
|
memcpy(fc->y_mode_cdf, default_if_y_mode_cdf, sizeof(default_if_y_mode_cdf));
|
|
|
|
|
memcpy(fc->uv_mode_cdf, default_uv_mode_cdf, sizeof(default_uv_mode_cdf));
|
|
|
|
|
memcpy(fc->switchable_interp_cdf, default_switchable_interp_cdf, sizeof(default_switchable_interp_cdf));
|
|
|
|
|
memcpy(fc->partition_cdf, default_partition_cdf, sizeof(default_partition_cdf));
|
|
|
|
|
memcpy(fc->intra_ext_tx_cdf, &default_intra_ext_tx_cdf[1], sizeof(default_intra_ext_tx_cdf[1]) * 2);
|
|
|
|
|
memcpy(fc->inter_ext_tx_cdf, &default_inter_ext_tx_cdf[1], sizeof(default_inter_ext_tx_cdf[1]) * 3);
|
|
|
|
|
memcpy(fc->skip_cdfs, default_skip_cdfs, sizeof(default_skip_cdfs));
|
|
|
|
|
memcpy(fc->intra_inter_cdf, default_intra_inter_cdf, sizeof(default_intra_inter_cdf));
|
|
|
|
|
memcpy(fc->tree_cdf, default_seg_tree_cdf, sizeof(default_seg_tree_cdf));
|
|
|
|
|
for (i = 0; i < SPATIAL_PREDICTION_PROBS; ++i)
|
|
|
|
|
memcpy(fc->spatial_pred_seg_cdf[i], default_spatial_pred_seg_tree_cdf[i], sizeof(default_spatial_pred_seg_tree_cdf[i]));
|
|
|
|
|
memcpy(fc->tx_size_cdf, default_tx_size_cdf, sizeof(default_tx_size_cdf));
|
|
|
|
|
memcpy(fc->delta_q_cdf, default_delta_q_cdf, sizeof(default_delta_q_cdf));
|
|
|
|
|
memcpy(fc->skip_mode_cdfs, default_skip_mode_cdfs, sizeof(default_skip_mode_cdfs));
|
|
|
|
|
memcpy(fc->delta_lf_cdf, default_delta_lf_cdf, sizeof(default_delta_lf_cdf));
|
|
|
|
|
memcpy(fc->delta_lf_multi_cdf, default_delta_lf_multi_cdf, sizeof(default_delta_lf_multi_cdf));
|
|
|
|
|
memcpy(fc->cfl_sign_cdf, default_cfl_sign_cdf, sizeof(default_cfl_sign_cdf));
|
|
|
|
|
memcpy(fc->cfl_alpha_cdf, default_cfl_alpha_cdf, sizeof(default_cfl_alpha_cdf));
|
|
|
|
|
memcpy(fc->filter_intra_cdfs, default_filter_intra_cdfs, sizeof(default_filter_intra_cdfs));
|
|
|
|
|
memcpy(fc->filter_intra_mode_cdf, default_filter_intra_mode_cdf, sizeof(default_filter_intra_mode_cdf));
|
|
|
|
|
memcpy(fc->intrabc_cdf, default_intrabc_cdf, sizeof(default_intrabc_cdf));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void rvcn_av1_init_mv_probs(void *prob)
|
|
|
|
|
{
|
|
|
|
|
rvcn_av1_frame_context_t * fc = (rvcn_av1_frame_context_t*)prob;
|
|
|
|
@@ -1196,6 +1257,46 @@ static void rvcn_av1_init_mv_probs(void *prob)
|
|
|
|
|
memcpy(fc->ndvc_1_sign_cdf, default_nmv_context.comps[1].sign_cdf, sizeof(default_nmv_context.comps[1].sign_cdf));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void rvcn_vcn4_av1_init_mv_probs(void *prob)
|
|
|
|
|
{
|
|
|
|
|
rvcn_av1_vcn4_frame_context_t * fc = (rvcn_av1_vcn4_frame_context_t*)prob;
|
|
|
|
|
|
|
|
|
|
memcpy(fc->nmvc_joints_cdf, default_nmv_context.joints_cdf, sizeof(default_nmv_context.joints_cdf));
|
|
|
|
|
memcpy(fc->nmvc_0_bits_cdf, default_nmv_context.comps[0].bits_cdf, sizeof(default_nmv_context.comps[0].bits_cdf));
|
|
|
|
|
memcpy(fc->nmvc_0_class0_cdf, default_nmv_context.comps[0].class0_cdf, sizeof(default_nmv_context.comps[0].class0_cdf));
|
|
|
|
|
memcpy(fc->nmvc_0_class0_fp_cdf, default_nmv_context.comps[0].class0_fp_cdf, sizeof(default_nmv_context.comps[0].class0_fp_cdf));
|
|
|
|
|
memcpy(fc->nmvc_0_class0_hp_cdf, default_nmv_context.comps[0].class0_hp_cdf, sizeof(default_nmv_context.comps[0].class0_hp_cdf));
|
|
|
|
|
memcpy(fc->nmvc_0_classes_cdf, default_nmv_context.comps[0].classes_cdf, sizeof(default_nmv_context.comps[0].classes_cdf));
|
|
|
|
|
memcpy(fc->nmvc_0_fp_cdf, default_nmv_context.comps[0].fp_cdf, sizeof(default_nmv_context.comps[0].fp_cdf));
|
|
|
|
|
memcpy(fc->nmvc_0_hp_cdf, default_nmv_context.comps[0].hp_cdf, sizeof(default_nmv_context.comps[0].hp_cdf));
|
|
|
|
|
memcpy(fc->nmvc_0_sign_cdf, default_nmv_context.comps[0].sign_cdf, sizeof(default_nmv_context.comps[0].sign_cdf));
|
|
|
|
|
memcpy(fc->nmvc_1_bits_cdf, default_nmv_context.comps[1].bits_cdf, sizeof(default_nmv_context.comps[1].bits_cdf));
|
|
|
|
|
memcpy(fc->nmvc_1_class0_cdf, default_nmv_context.comps[1].class0_cdf, sizeof(default_nmv_context.comps[1].class0_cdf));
|
|
|
|
|
memcpy(fc->nmvc_1_class0_fp_cdf, default_nmv_context.comps[1].class0_fp_cdf, sizeof(default_nmv_context.comps[1].class0_fp_cdf));
|
|
|
|
|
memcpy(fc->nmvc_1_class0_hp_cdf, default_nmv_context.comps[1].class0_hp_cdf, sizeof(default_nmv_context.comps[1].class0_hp_cdf));
|
|
|
|
|
memcpy(fc->nmvc_1_classes_cdf, default_nmv_context.comps[1].classes_cdf, sizeof(default_nmv_context.comps[1].classes_cdf));
|
|
|
|
|
memcpy(fc->nmvc_1_fp_cdf, default_nmv_context.comps[1].fp_cdf, sizeof(default_nmv_context.comps[1].fp_cdf));
|
|
|
|
|
memcpy(fc->nmvc_1_hp_cdf, default_nmv_context.comps[1].hp_cdf, sizeof(default_nmv_context.comps[1].hp_cdf));
|
|
|
|
|
memcpy(fc->nmvc_1_sign_cdf, default_nmv_context.comps[1].sign_cdf, sizeof(default_nmv_context.comps[1].sign_cdf));
|
|
|
|
|
memcpy(fc->ndvc_joints_cdf, default_nmv_context.joints_cdf, sizeof(default_nmv_context.joints_cdf));
|
|
|
|
|
memcpy(fc->ndvc_0_bits_cdf, default_nmv_context.comps[0].bits_cdf, sizeof(default_nmv_context.comps[0].bits_cdf));
|
|
|
|
|
memcpy(fc->ndvc_0_class0_cdf, default_nmv_context.comps[0].class0_cdf, sizeof(default_nmv_context.comps[0].class0_cdf));
|
|
|
|
|
memcpy(fc->ndvc_0_class0_fp_cdf, default_nmv_context.comps[0].class0_fp_cdf, sizeof(default_nmv_context.comps[0].class0_fp_cdf));
|
|
|
|
|
memcpy(fc->ndvc_0_class0_hp_cdf, default_nmv_context.comps[0].class0_hp_cdf, sizeof(default_nmv_context.comps[0].class0_hp_cdf));
|
|
|
|
|
memcpy(fc->ndvc_0_classes_cdf, default_nmv_context.comps[0].classes_cdf, sizeof(default_nmv_context.comps[0].classes_cdf));
|
|
|
|
|
memcpy(fc->ndvc_0_fp_cdf, default_nmv_context.comps[0].fp_cdf, sizeof(default_nmv_context.comps[0].fp_cdf));
|
|
|
|
|
memcpy(fc->ndvc_0_hp_cdf, default_nmv_context.comps[0].hp_cdf, sizeof(default_nmv_context.comps[0].hp_cdf));
|
|
|
|
|
memcpy(fc->ndvc_0_sign_cdf, default_nmv_context.comps[0].sign_cdf, sizeof(default_nmv_context.comps[0].sign_cdf));
|
|
|
|
|
memcpy(fc->ndvc_1_bits_cdf, default_nmv_context.comps[1].bits_cdf, sizeof(default_nmv_context.comps[1].bits_cdf));
|
|
|
|
|
memcpy(fc->ndvc_1_class0_cdf, default_nmv_context.comps[1].class0_cdf, sizeof(default_nmv_context.comps[1].class0_cdf));
|
|
|
|
|
memcpy(fc->ndvc_1_class0_fp_cdf, default_nmv_context.comps[1].class0_fp_cdf, sizeof(default_nmv_context.comps[1].class0_fp_cdf));
|
|
|
|
|
memcpy(fc->ndvc_1_class0_hp_cdf, default_nmv_context.comps[1].class0_hp_cdf, sizeof(default_nmv_context.comps[1].class0_hp_cdf));
|
|
|
|
|
memcpy(fc->ndvc_1_classes_cdf, default_nmv_context.comps[1].classes_cdf, sizeof(default_nmv_context.comps[1].classes_cdf));
|
|
|
|
|
memcpy(fc->ndvc_1_fp_cdf, default_nmv_context.comps[1].fp_cdf, sizeof(default_nmv_context.comps[1].fp_cdf));
|
|
|
|
|
memcpy(fc->ndvc_1_hp_cdf, default_nmv_context.comps[1].hp_cdf, sizeof(default_nmv_context.comps[1].hp_cdf));
|
|
|
|
|
memcpy(fc->ndvc_1_sign_cdf, default_nmv_context.comps[1].sign_cdf, sizeof(default_nmv_context.comps[1].sign_cdf));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void rvcn_av1_default_coef_probs(void *prob, int index)
|
|
|
|
|
{
|
|
|
|
|
rvcn_av1_frame_context_t * fc = (rvcn_av1_frame_context_t*)prob;
|
|
|
|
@@ -1215,6 +1316,37 @@ static void rvcn_av1_default_coef_probs(void *prob, int index)
|
|
|
|
|
memcpy(fc->eob_flag_cdf1024, av1_default_eob_multi1024_cdfs[index], sizeof(av1_default_eob_multi1024_cdfs[index]));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void rvcn_vcn4_av1_default_coef_probs(void *prob, int index)
|
|
|
|
|
{
|
|
|
|
|
rvcn_av1_vcn4_frame_context_t * fc = (rvcn_av1_vcn4_frame_context_t*)prob;
|
|
|
|
|
void *p;
|
|
|
|
|
int i, j;
|
|
|
|
|
unsigned size;
|
|
|
|
|
|
|
|
|
|
memcpy(fc->txb_skip_cdf, av1_default_txb_skip_cdfs[index], sizeof(av1_default_txb_skip_cdfs[index]));
|
|
|
|
|
|
|
|
|
|
p = (void *)fc->eob_extra_cdf;
|
|
|
|
|
size = sizeof(av1_default_eob_extra_cdfs[0][0][0][0]) * EOB_COEF_CONTEXTS_VCN4;
|
|
|
|
|
for (i = 0; i < AV1_TX_SIZES; i++) {
|
|
|
|
|
for ( j = 0; j < AV1_PLANE_TYPES; j++) {
|
|
|
|
|
memcpy(p, &av1_default_eob_extra_cdfs[index][i][j][3], size);
|
|
|
|
|
p += size;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
memcpy(fc->dc_sign_cdf, av1_default_dc_sign_cdfs[index], sizeof(av1_default_dc_sign_cdfs[index]));
|
|
|
|
|
memcpy(fc->coeff_br_cdf, av1_default_coeff_lps_multi_cdfs[index], sizeof(av1_default_coeff_lps_multi_cdfs[index]));
|
|
|
|
|
memcpy(fc->coeff_base_cdf, av1_default_coeff_base_multi_cdfs[index], sizeof(av1_default_coeff_base_multi_cdfs[index]));
|
|
|
|
|
memcpy(fc->coeff_base_eob_cdf, av1_default_coeff_base_eob_multi_cdfs[index], sizeof(av1_default_coeff_base_eob_multi_cdfs[index]));
|
|
|
|
|
memcpy(fc->eob_flag_cdf16, av1_default_eob_multi16_cdfs[index], sizeof(av1_default_eob_multi16_cdfs[index]));
|
|
|
|
|
memcpy(fc->eob_flag_cdf32, av1_default_eob_multi32_cdfs[index], sizeof(av1_default_eob_multi32_cdfs[index]));
|
|
|
|
|
memcpy(fc->eob_flag_cdf64, av1_default_eob_multi64_cdfs[index], sizeof(av1_default_eob_multi64_cdfs[index]));
|
|
|
|
|
memcpy(fc->eob_flag_cdf128, av1_default_eob_multi128_cdfs[index], sizeof(av1_default_eob_multi128_cdfs[index]));
|
|
|
|
|
memcpy(fc->eob_flag_cdf256, av1_default_eob_multi256_cdfs[index], sizeof(av1_default_eob_multi256_cdfs[index]));
|
|
|
|
|
memcpy(fc->eob_flag_cdf512, av1_default_eob_multi512_cdfs[index], sizeof(av1_default_eob_multi512_cdfs[index]));
|
|
|
|
|
memcpy(fc->eob_flag_cdf1024, av1_default_eob_multi1024_cdfs[index], sizeof(av1_default_eob_multi1024_cdfs[index]));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static unsigned calc_ctx_size_h265_main(struct radeon_decoder *dec)
|
|
|
|
|
{
|
|
|
|
|
unsigned width = align(dec->base.width, VL_MACROBLOCK_WIDTH);
|
|
|
|
@@ -1902,22 +2034,37 @@ static struct pb_buffer *rvcn_dec_message_decode(struct radeon_decoder *dec,
|
|
|
|
|
index_codec->message_id = RDECODE_MESSAGE_AV1;
|
|
|
|
|
|
|
|
|
|
if (dec->ctx.res == NULL) {
|
|
|
|
|
unsigned ctx_size = (9 + 4) * align(sizeof(rvcn_av1_hw_frame_context_t), 2048) +
|
|
|
|
|
9 * 64 * 34 * 512 + 9 * 64 * 34 * 256 * 5;
|
|
|
|
|
|
|
|
|
|
unsigned frame_ctxt_size = dec->av1_version == RDECODE_AV1_VER_0
|
|
|
|
|
? align(sizeof(rvcn_av1_frame_context_t), 2048)
|
|
|
|
|
: align(sizeof(rvcn_av1_vcn4_frame_context_t), 2048);
|
|
|
|
|
|
|
|
|
|
unsigned ctx_size = (9 + 4) * frame_ctxt_size + 9 * 64 * 34 * 512 + 9 * 64 * 34 * 256 * 5;
|
|
|
|
|
int num_64x64_CTB_8k = 68;
|
|
|
|
|
int num_128x128_CTB_8k = 34;
|
|
|
|
|
int sdb_pitch_64x64 = align(32 * num_64x64_CTB_8k, 256);
|
|
|
|
|
int sdb_pitch_128x128 = align(32 * num_128x128_CTB_8k, 256);
|
|
|
|
|
int sdb_lf_size_ctb_64x64 = sdb_pitch_64x64 * (1728 / 32);
|
|
|
|
|
int sdb_lf_size_ctb_128x128 = sdb_pitch_128x128 * (3008 / 32);
|
|
|
|
|
int sdb_superres_size_ctb_64x64 = sdb_pitch_64x64 * (3232 / 32);
|
|
|
|
|
int sdb_superres_size_ctb_128x128 = sdb_pitch_128x128 * (6208 / 32);
|
|
|
|
|
int sdb_output_size_ctb_64x64 = sdb_pitch_64x64 * (1312 / 32);
|
|
|
|
|
int sdb_output_size_ctb_128x128 = sdb_pitch_128x128 * (2336 / 32);
|
|
|
|
|
int sdb_fg_avg_luma_size_ctb_64x64 = sdb_pitch_64x64 * (384 / 32);
|
|
|
|
|
int sdb_fg_avg_luma_size_ctb_128x128 = sdb_pitch_128x128 * (640 / 32);
|
|
|
|
|
int sdb_pitch_64x64 = align(32 * num_64x64_CTB_8k, 256) * 2;
|
|
|
|
|
int sdb_pitch_128x128 = align(32 * num_128x128_CTB_8k, 256) * 2;
|
|
|
|
|
int sdb_lf_size_ctb_64x64 = sdb_pitch_64x64 * (align(1728, 64) / 64);
|
|
|
|
|
int sdb_lf_size_ctb_128x128 = sdb_pitch_128x128 * (align(3008, 64) / 64);
|
|
|
|
|
int sdb_superres_size_ctb_64x64 = sdb_pitch_64x64 * (align(3232, 64) / 64);
|
|
|
|
|
int sdb_superres_size_ctb_128x128 = sdb_pitch_128x128 * (align(6208, 64) / 64);
|
|
|
|
|
int sdb_output_size_ctb_64x64 = sdb_pitch_64x64 * (align(1312, 64) / 64);
|
|
|
|
|
int sdb_output_size_ctb_128x128 = sdb_pitch_128x128 * (align(2336, 64) / 64);
|
|
|
|
|
int sdb_fg_avg_luma_size_ctb_64x64 = sdb_pitch_64x64 * (align(384, 64) / 64);
|
|
|
|
|
int sdb_fg_avg_luma_size_ctb_128x128 = sdb_pitch_128x128 * (align(640, 64) / 64);
|
|
|
|
|
uint8_t *ptr;
|
|
|
|
|
int i;
|
|
|
|
|
struct rvcn_av1_prob_funcs prob;
|
|
|
|
|
|
|
|
|
|
if (dec->av1_version == RDECODE_AV1_VER_0) {
|
|
|
|
|
prob.init_mode_probs = rvcn_init_mode_probs;
|
|
|
|
|
prob.init_mv_probs = rvcn_av1_init_mv_probs;
|
|
|
|
|
prob.default_coef_probs = rvcn_av1_default_coef_probs;
|
|
|
|
|
} else {
|
|
|
|
|
prob.init_mode_probs = rvcn_vcn4_init_mode_probs;
|
|
|
|
|
prob.init_mv_probs = rvcn_vcn4_av1_init_mv_probs;
|
|
|
|
|
prob.default_coef_probs = rvcn_vcn4_av1_default_coef_probs;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ctx_size += (MAX2(sdb_lf_size_ctb_64x64, sdb_lf_size_ctb_128x128) +
|
|
|
|
|
MAX2(sdb_superres_size_ctb_64x64, sdb_superres_size_ctb_128x128) +
|
|
|
|
@@ -1931,9 +2078,9 @@ static struct pb_buffer *rvcn_dec_message_decode(struct radeon_decoder *dec,
|
|
|
|
|
ptr = dec->ws->buffer_map(dec->ws, dec->ctx.res->buf, &dec->cs, PIPE_MAP_WRITE | RADEON_MAP_TEMPORARY);
|
|
|
|
|
|
|
|
|
|
for (i = 0; i < 4; ++i) {
|
|
|
|
|
rvcn_init_mode_probs((void*)(ptr + i * align(sizeof(rvcn_av1_frame_context_t), 2048)));
|
|
|
|
|
rvcn_av1_init_mv_probs((void*)(ptr + i * align(sizeof(rvcn_av1_frame_context_t), 2048)));
|
|
|
|
|
rvcn_av1_default_coef_probs((void*)(ptr + i * align(sizeof(rvcn_av1_frame_context_t), 2048)), i);
|
|
|
|
|
prob.init_mode_probs((void*)(ptr + i * frame_ctxt_size));
|
|
|
|
|
prob.init_mv_probs((void*)(ptr + i * frame_ctxt_size));
|
|
|
|
|
prob.default_coef_probs((void*)(ptr + i * frame_ctxt_size), i);
|
|
|
|
|
}
|
|
|
|
|
dec->ws->buffer_unmap(dec->ws, dec->ctx.res->buf);
|
|
|
|
|
}
|
|
|
|
@@ -2732,6 +2879,7 @@ struct pipe_video_codec *radeon_create_decoder(struct pipe_context *context,
|
|
|
|
|
si_vid_clear_buffer(context, &dec->sessionctx);
|
|
|
|
|
|
|
|
|
|
dec->addr_gfx_mode = RDECODE_ARRAY_MODE_LINEAR;
|
|
|
|
|
dec->av1_version = RDECODE_AV1_VER_0;
|
|
|
|
|
|
|
|
|
|
switch (sctx->family) {
|
|
|
|
|
case CHIP_RAVEN:
|
|
|
|
@@ -2771,6 +2919,7 @@ struct pipe_video_codec *radeon_create_decoder(struct pipe_context *context,
|
|
|
|
|
case CHIP_GFX1102:
|
|
|
|
|
dec->jpg.direct_reg = true;
|
|
|
|
|
dec->addr_gfx_mode = RDECODE_ARRAY_MODE_ADDRLIB_SEL_GFX11;
|
|
|
|
|
dec->av1_version = RDECODE_AV1_VER_1;
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
RVID_ERR("VCN is not supported.\n");
|
|
|
|
|