24 #include <va/va_dec_vvc.h>
40 va_pic->picture_id = VA_INVALID_ID;
41 va_pic->flags = VA_PICTURE_VVC_INVALID;
42 va_pic->pic_order_cnt = 0;
48 va_pic->pic_order_cnt = pic->
poc;
52 va_pic->flags |= VA_PICTURE_VVC_LONG_TERM_REFERENCE;
64 if ((&
h->DPB[j] != current_picture ) &&
75 pic =
frame->hwaccel_picture_private;
77 pp->ReferenceFrames[
i].flags |= VA_PICTURE_VVC_UNAVAILABLE_REFERENCE;
92 VAPictureParameterBufferVVC *pic_param = &pic->pic_param;
98 *pic_param = (VAPictureParameterBufferVVC) {
99 .pps_pic_width_in_luma_samples =
pps->pps_pic_width_in_luma_samples,
100 .pps_pic_height_in_luma_samples =
pps->pps_pic_height_in_luma_samples,
101 .sps_num_subpics_minus1 =
sps->sps_num_subpics_minus1,
102 .sps_chroma_format_idc =
sps->sps_chroma_format_idc,
103 .sps_bitdepth_minus8 =
sps->sps_bitdepth_minus8,
104 .sps_log2_ctu_size_minus5 =
sps->sps_log2_ctu_size_minus5,
105 .sps_log2_min_luma_coding_block_size_minus2 =
sps->sps_log2_min_luma_coding_block_size_minus2,
106 .sps_log2_transform_skip_max_size_minus2 =
sps->sps_log2_transform_skip_max_size_minus2,
107 .sps_six_minus_max_num_merge_cand =
sps->sps_six_minus_max_num_merge_cand,
108 .sps_five_minus_max_num_subblock_merge_cand =
sps->sps_five_minus_max_num_subblock_merge_cand,
109 .sps_max_num_merge_cand_minus_max_num_gpm_cand =
sps->sps_max_num_merge_cand_minus_max_num_gpm_cand,
110 .sps_log2_parallel_merge_level_minus2 =
sps->sps_log2_parallel_merge_level_minus2,
111 .sps_min_qp_prime_ts =
sps->sps_min_qp_prime_ts,
112 .sps_six_minus_max_num_ibc_merge_cand =
sps->sps_six_minus_max_num_ibc_merge_cand,
113 .sps_num_ladf_intervals_minus2 =
sps->sps_num_ladf_intervals_minus2,
114 .sps_ladf_lowest_interval_qp_offset =
sps->sps_ladf_lowest_interval_qp_offset,
116 .sps_subpic_info_present_flag =
sps->sps_subpic_info_present_flag,
117 .sps_independent_subpics_flag =
sps->sps_independent_subpics_flag,
118 .sps_subpic_same_size_flag =
sps->sps_subpic_same_size_flag,
119 .sps_entropy_coding_sync_enabled_flag =
sps->sps_entropy_coding_sync_enabled_flag,
120 .sps_qtbtt_dual_tree_intra_flag =
sps->sps_qtbtt_dual_tree_intra_flag,
121 .sps_max_luma_transform_size_64_flag =
sps->sps_max_luma_transform_size_64_flag,
122 .sps_transform_skip_enabled_flag =
sps->sps_transform_skip_enabled_flag,
123 .sps_bdpcm_enabled_flag =
sps->sps_bdpcm_enabled_flag,
124 .sps_mts_enabled_flag =
sps->sps_mts_enabled_flag,
125 .sps_explicit_mts_intra_enabled_flag =
sps->sps_explicit_mts_intra_enabled_flag,
126 .sps_explicit_mts_inter_enabled_flag =
sps->sps_explicit_mts_inter_enabled_flag,
127 .sps_lfnst_enabled_flag =
sps->sps_lfnst_enabled_flag,
128 .sps_joint_cbcr_enabled_flag =
sps->sps_joint_cbcr_enabled_flag,
129 .sps_same_qp_table_for_chroma_flag =
sps->sps_same_qp_table_for_chroma_flag,
130 .sps_sao_enabled_flag =
sps->sps_sao_enabled_flag,
131 .sps_alf_enabled_flag =
sps->sps_alf_enabled_flag,
132 .sps_ccalf_enabled_flag =
sps->sps_ccalf_enabled_flag,
133 .sps_lmcs_enabled_flag =
sps->sps_lmcs_enabled_flag,
134 .sps_sbtmvp_enabled_flag =
sps->sps_sbtmvp_enabled_flag,
135 .sps_amvr_enabled_flag =
sps->sps_amvr_enabled_flag,
136 .sps_smvd_enabled_flag =
sps->sps_smvd_enabled_flag,
137 .sps_mmvd_enabled_flag =
sps->sps_mmvd_enabled_flag,
138 .sps_sbt_enabled_flag =
sps->sps_sbt_enabled_flag,
139 .sps_affine_enabled_flag =
sps->sps_affine_enabled_flag,
140 .sps_6param_affine_enabled_flag =
sps->sps_6param_affine_enabled_flag,
141 .sps_affine_amvr_enabled_flag =
sps->sps_affine_amvr_enabled_flag,
142 .sps_affine_prof_enabled_flag =
sps->sps_affine_prof_enabled_flag,
143 .sps_bcw_enabled_flag =
sps->sps_bcw_enabled_flag,
144 .sps_ciip_enabled_flag =
sps->sps_ciip_enabled_flag,
145 .sps_gpm_enabled_flag =
sps->sps_gpm_enabled_flag,
146 .sps_isp_enabled_flag =
sps->sps_isp_enabled_flag,
147 .sps_mrl_enabled_flag =
sps->sps_mrl_enabled_flag,
148 .sps_mip_enabled_flag =
sps->sps_mip_enabled_flag,
149 .sps_cclm_enabled_flag =
sps->sps_cclm_enabled_flag,
150 .sps_chroma_horizontal_collocated_flag =
sps->sps_chroma_horizontal_collocated_flag,
151 .sps_chroma_vertical_collocated_flag =
sps->sps_chroma_vertical_collocated_flag,
152 .sps_palette_enabled_flag =
sps->sps_palette_enabled_flag,
153 .sps_act_enabled_flag =
sps->sps_act_enabled_flag,
154 .sps_ibc_enabled_flag =
sps->sps_ibc_enabled_flag,
155 .sps_ladf_enabled_flag =
sps->sps_ladf_enabled_flag,
156 .sps_explicit_scaling_list_enabled_flag =
sps->sps_explicit_scaling_list_enabled_flag,
157 .sps_scaling_matrix_for_lfnst_disabled_flag =
sps->sps_scaling_matrix_for_lfnst_disabled_flag,
158 .sps_scaling_matrix_for_alternative_colour_space_disabled_flag =
sps->sps_scaling_matrix_for_alternative_colour_space_disabled_flag,
159 .sps_scaling_matrix_designated_colour_space_flag =
sps->sps_scaling_matrix_designated_colour_space_flag,
160 .sps_virtual_boundaries_enabled_flag =
sps->sps_virtual_boundaries_enabled_flag,
161 .sps_virtual_boundaries_present_flag =
sps->sps_virtual_boundaries_present_flag,
163 .NumVerVirtualBoundaries =
sps->sps_virtual_boundaries_present_flag ?
164 sps->sps_num_ver_virtual_boundaries :
165 ph->ph_num_ver_virtual_boundaries,
166 .NumHorVirtualBoundaries =
sps->sps_virtual_boundaries_present_flag ?
167 sps->sps_num_hor_virtual_boundaries :
168 ph->ph_num_hor_virtual_boundaries,
169 .pps_scaling_win_left_offset =
pps->pps_scaling_win_left_offset,
170 .pps_scaling_win_right_offset =
pps->pps_scaling_win_right_offset,
171 .pps_scaling_win_top_offset =
pps->pps_scaling_win_top_offset,
172 .pps_scaling_win_bottom_offset =
pps->pps_scaling_win_bottom_offset,
173 .pps_num_exp_tile_columns_minus1 =
pps->pps_num_exp_tile_columns_minus1,
174 .pps_num_exp_tile_rows_minus1 =
pps->pps_num_exp_tile_rows_minus1,
175 .pps_num_slices_in_pic_minus1 =
pps->pps_num_slices_in_pic_minus1,
176 .pps_pic_width_minus_wraparound_offset =
pps->pps_pic_width_minus_wraparound_offset,
177 .pps_cb_qp_offset =
pps->pps_cb_qp_offset,
178 .pps_cr_qp_offset =
pps->pps_cr_qp_offset,
179 .pps_joint_cbcr_qp_offset_value =
pps->pps_joint_cbcr_qp_offset_value,
180 .pps_chroma_qp_offset_list_len_minus1 =
pps->pps_chroma_qp_offset_list_len_minus1,
182 .pps_loop_filter_across_tiles_enabled_flag =
pps->pps_loop_filter_across_tiles_enabled_flag,
183 .pps_rect_slice_flag =
pps->pps_rect_slice_flag,
184 .pps_single_slice_per_subpic_flag =
pps->pps_single_slice_per_subpic_flag,
185 .pps_loop_filter_across_slices_enabled_flag =
pps->pps_loop_filter_across_slices_enabled_flag,
186 .pps_weighted_pred_flag =
pps->pps_weighted_pred_flag,
187 .pps_weighted_bipred_flag =
pps->pps_weighted_bipred_flag,
188 .pps_ref_wraparound_enabled_flag =
pps->pps_ref_wraparound_enabled_flag,
189 .pps_cu_qp_delta_enabled_flag =
pps->pps_cu_qp_delta_enabled_flag,
190 .pps_cu_chroma_qp_offset_list_enabled_flag =
pps->pps_cu_chroma_qp_offset_list_enabled_flag,
191 .pps_deblocking_filter_override_enabled_flag =
pps->pps_deblocking_filter_override_enabled_flag,
192 .pps_deblocking_filter_disabled_flag =
pps->pps_deblocking_filter_disabled_flag,
193 .pps_dbf_info_in_ph_flag =
pps->pps_dbf_info_in_ph_flag,
194 .pps_sao_info_in_ph_flag =
pps->pps_sao_info_in_ph_flag,
195 .pps_alf_info_in_ph_flag =
pps->pps_alf_info_in_ph_flag,
197 .ph_lmcs_aps_id =
ph->ph_lmcs_aps_id,
198 .ph_scaling_list_aps_id =
ph->ph_scaling_list_aps_id,
199 .ph_log2_diff_min_qt_min_cb_intra_slice_luma =
ph->ph_log2_diff_min_qt_min_cb_intra_slice_luma,
200 .ph_max_mtt_hierarchy_depth_intra_slice_luma =
ph->ph_max_mtt_hierarchy_depth_intra_slice_luma,
201 .ph_log2_diff_max_bt_min_qt_intra_slice_luma =
ph->ph_log2_diff_max_bt_min_qt_intra_slice_luma,
202 .ph_log2_diff_max_tt_min_qt_intra_slice_luma =
ph->ph_log2_diff_max_tt_min_qt_intra_slice_luma,
203 .ph_log2_diff_min_qt_min_cb_intra_slice_chroma =
ph->ph_log2_diff_min_qt_min_cb_intra_slice_chroma,
204 .ph_max_mtt_hierarchy_depth_intra_slice_chroma =
ph->ph_max_mtt_hierarchy_depth_intra_slice_chroma,
205 .ph_log2_diff_max_bt_min_qt_intra_slice_chroma =
ph->ph_log2_diff_max_bt_min_qt_intra_slice_chroma,
206 .ph_log2_diff_max_tt_min_qt_intra_slice_chroma =
ph->ph_log2_diff_max_tt_min_qt_intra_slice_chroma,
207 .ph_cu_qp_delta_subdiv_intra_slice =
ph->ph_cu_qp_delta_subdiv_intra_slice,
208 .ph_cu_chroma_qp_offset_subdiv_intra_slice =
ph->ph_cu_chroma_qp_offset_subdiv_intra_slice,
209 .ph_log2_diff_min_qt_min_cb_inter_slice =
ph->ph_log2_diff_min_qt_min_cb_inter_slice,
210 .ph_max_mtt_hierarchy_depth_inter_slice =
ph->ph_max_mtt_hierarchy_depth_inter_slice,
211 .ph_log2_diff_max_bt_min_qt_inter_slice =
ph->ph_log2_diff_max_bt_min_qt_inter_slice,
212 .ph_log2_diff_max_tt_min_qt_inter_slice =
ph->ph_log2_diff_max_tt_min_qt_inter_slice,
213 .ph_cu_qp_delta_subdiv_inter_slice =
ph->ph_cu_qp_delta_subdiv_inter_slice,
214 .ph_cu_chroma_qp_offset_subdiv_inter_slice =
ph->ph_cu_chroma_qp_offset_subdiv_inter_slice,
216 .ph_non_ref_pic_flag =
ph->ph_non_ref_pic_flag,
217 .ph_alf_enabled_flag =
ph->ph_alf_enabled_flag,
218 .ph_alf_cb_enabled_flag =
ph->ph_alf_cb_enabled_flag,
219 .ph_alf_cr_enabled_flag =
ph->ph_alf_cr_enabled_flag,
220 .ph_alf_cc_cb_enabled_flag =
ph->ph_alf_cc_cb_enabled_flag,
221 .ph_alf_cc_cr_enabled_flag =
ph->ph_alf_cc_cr_enabled_flag,
222 .ph_lmcs_enabled_flag =
ph->ph_lmcs_enabled_flag,
223 .ph_chroma_residual_scale_flag =
ph->ph_chroma_residual_scale_flag,
224 .ph_explicit_scaling_list_enabled_flag =
ph->ph_explicit_scaling_list_enabled_flag,
225 .ph_virtual_boundaries_present_flag =
ph->ph_virtual_boundaries_present_flag,
226 .ph_temporal_mvp_enabled_flag =
ph->ph_temporal_mvp_enabled_flag,
227 .ph_mmvd_fullpel_only_flag =
ph->ph_mmvd_fullpel_only_flag,
228 .ph_mvd_l1_zero_flag =
ph->ph_mvd_l1_zero_flag,
229 .ph_bdof_disabled_flag =
ph->ph_bdof_disabled_flag,
230 .ph_dmvr_disabled_flag =
ph->ph_dmvr_disabled_flag,
231 .ph_prof_disabled_flag =
ph->ph_prof_disabled_flag,
232 .ph_joint_cbcr_sign_flag =
ph->ph_joint_cbcr_sign_flag,
233 .ph_sao_luma_enabled_flag =
ph->ph_sao_luma_enabled_flag,
234 .ph_sao_chroma_enabled_flag =
ph->ph_sao_chroma_enabled_flag,
235 .ph_deblocking_filter_disabled_flag =
ph->ph_deblocking_filter_disabled_flag,
237 .PicMiscFlags.fields = {
238 .IntraPicFlag =
pps->pps_mixed_nalu_types_in_pic_flag ? 0 :
IS_IRAP(
h) ? 1 : 0,
247 pic_param->ChromaQpTable[
i][j] =
fc->ps.sps->chroma_qp_table[
i][j];
249 pic_param->sps_ladf_qp_offset[
i] =
sps->sps_ladf_qp_offset[
i];
250 pic_param->sps_ladf_delta_threshold_minus1[
i] =
sps->sps_ladf_delta_threshold_minus1[
i];
253 for (
i = 0;
i < (
sps->sps_virtual_boundaries_present_flag ?
sps->sps_num_ver_virtual_boundaries :
ph->ph_num_ver_virtual_boundaries);
i++) {
254 pic_param->VirtualBoundaryPosX[
i] = (
sps->sps_virtual_boundaries_present_flag ?
255 (
sps->sps_virtual_boundary_pos_x_minus1[
i] + 1) :
256 (
ph->ph_virtual_boundary_pos_x_minus1[
i] + 1)) * 8;
259 for (
i = 0;
i < (
sps->sps_virtual_boundaries_present_flag ?
sps->sps_num_hor_virtual_boundaries :
ph->ph_num_hor_virtual_boundaries);
i++) {
260 pic_param->VirtualBoundaryPosY[
i] = (
sps->sps_virtual_boundaries_present_flag ?
261 (
sps->sps_virtual_boundary_pos_y_minus1[
i] + 1) :
262 (
ph->ph_virtual_boundary_pos_y_minus1[
i] + 1)) * 8;
265 for (
i = 0;
i < 6;
i++) {
266 pic_param->pps_cb_qp_offset_list[
i] =
pps->pps_cb_qp_offset_list[
i];
267 pic_param->pps_cr_qp_offset_list[
i] =
pps->pps_cr_qp_offset_list[
i];
268 pic_param->pps_joint_cbcr_qp_offset_list[
i] =
pps->pps_joint_cbcr_qp_offset_list[
i];
272 VAPictureParameterBufferType,
273 &pic->pic_param,
sizeof(VAPictureParameterBufferVVC));
277 for (
i = 0;
i <=
sps->sps_num_subpics_minus1 &&
sps->sps_subpic_info_present_flag;
i++) {
278 VASubPicVVC subpic_param = {
279 .sps_subpic_ctu_top_left_x =
sps->sps_subpic_ctu_top_left_x[
i],
280 .sps_subpic_ctu_top_left_y =
sps->sps_subpic_ctu_top_left_y[
i],
281 .sps_subpic_width_minus1 =
sps->sps_subpic_width_minus1[
i],
282 .sps_subpic_height_minus1 =
sps->sps_subpic_height_minus1[
i],
283 .SubpicIdVal =
pps->sub_pic_id_val[
i],
284 .subpic_flags.bits = {
285 .sps_subpic_treated_as_pic_flag =
sps->sps_subpic_treated_as_pic_flag[
i],
286 .sps_loop_filter_across_subpic_enabled_flag =
sps->sps_loop_filter_across_subpic_enabled_flag[
i],
291 &subpic_param,
sizeof(VASubPicVVC));
297 const VVCALF *alf_list =
h->ps.alf_list[
i];
300 VAAlfDataVVC alf_param = {
316 for (j = 0; j < 25; j++)
319 for (j = 0; j < 25; j++) {
320 for (k = 0; k < 12; k++) {
326 for (j = 0; j < 8; j++) {
327 for (k = 0; k < 6; k++) {
333 for (j = 0; j < 4; j++) {
334 for (k = 0; k < 7; k++) {
344 &alf_param,
sizeof(VAAlfDataVVC));
353 VALmcsDataVVC lmcs_param = {
354 .aps_adaptation_parameter_set_id =
i,
360 for (j = lmcs->
lmcs_min_bin_idx; j <= 15 - lmcs->lmcs_delta_max_bin_idx; j++)
365 &lmcs_param,
sizeof(VALmcsDataVVC));
376 VAScalingListVVC sl_param = {
377 .aps_adaptation_parameter_set_id =
i,
380 for (j = 0; j < 14; j++)
383 for (j = 0; j < 2; j++)
384 for (k = 0; k < 2; k++)
385 for (l = 0; l < 2; l++)
388 for (j = 2; j < 8; j++)
389 for (k = 0; k < 4; k++)
390 for (l = 0; l < 4; l++)
393 for (j = 8; j < 28; j++)
394 for (k = 0; k < 8; k++)
395 for (l = 0; l < 8; l++)
399 VAIQMatrixBufferType,
400 &sl_param,
sizeof(VAScalingListVVC));
406 for (
i = 0;
i <=
pps->pps_num_exp_tile_columns_minus1;
i++) {
407 tile_dim =
pps->pps_tile_column_width_minus1[
i];
410 &tile_dim,
sizeof(tile_dim));
415 for (
i = 0;
i <=
pps->pps_num_exp_tile_rows_minus1;
i++) {
416 tile_dim =
pps->pps_tile_row_height_minus1[
i];
419 &tile_dim,
sizeof(tile_dim));
424 if (!
pps->pps_no_pic_partition_flag &&
pps->pps_rect_slice_flag && !
pps->pps_single_slice_per_subpic_flag) {
425 for (
i = 0;
i <=
pps->pps_num_slices_in_pic_minus1;
i++) {
426 for (j = 0; j <
pps->pps_num_exp_slices_in_tile[
i]; j++) {
427 exp_slice_height_in_ctus[
i + j] =
pps->pps_exp_slice_height_in_ctus_minus1[
i][j] + 1;
430 for (
i = 0;
i <=
pps->pps_num_slices_in_pic_minus1;
i++) {
431 VASliceStructVVC ss_param = {
432 .SliceTopLeftTileIdx =
pps->slice_top_left_tile_idx[
i],
433 .pps_slice_width_in_tiles_minus1 =
pps->pps_slice_width_in_tiles_minus1[
i],
434 .pps_slice_height_in_tiles_minus1 =
pps->pps_slice_height_in_tiles_minus1[
i],
437 if (
pps->pps_slice_width_in_tiles_minus1[
i] > 0 ||
pps->pps_slice_height_in_tiles_minus1[
i] > 0)
438 ss_param.pps_exp_slice_height_in_ctus_minus1 = 0;
440 if (
pps->num_slices_in_tile[
i] == 1)
441 ss_param.pps_exp_slice_height_in_ctus_minus1 =
pps->row_height_val[
pps->slice_top_left_tile_idx[
i] /
pps->num_tile_columns] - 1;
442 else if (exp_slice_height_in_ctus[
i])
443 ss_param.pps_exp_slice_height_in_ctus_minus1 = exp_slice_height_in_ctus[
i] - 1;
449 VASliceStructBufferType,
450 &ss_param,
sizeof(VASliceStructVVC));
467 VAPictureParameterBufferVVC *pp = (VAPictureParameterBufferVVC *)&pic->pic_param;
474 VASurfaceID pid = pp->ReferenceFrames[
i].picture_id;
475 int poc = pp->ReferenceFrames[
i].pic_order_cnt;
488 for (
int i = 0;
i <
size;
i++) {
493 for (
int j = 0; j < num_identical_bytes; j++) {
500 if (j + 1 == num_identical_bytes)
519 VASliceParameterBufferVVC *slice_param = &pic->slice_param;
522 *slice_param = (VASliceParameterBufferVVC) {
523 .slice_data_size =
size,
524 .slice_data_offset = 0,
525 .slice_data_flag = VA_SLICE_DATA_FLAG_ALL,
527 .sh_subpic_id = sh->sh_subpic_id,
528 .sh_slice_address = sh->sh_slice_address,
529 .sh_num_tiles_in_slice_minus1 = sh->sh_num_tiles_in_slice_minus1,
530 .sh_slice_type = sh->sh_slice_type,
531 .sh_num_alf_aps_ids_luma = sh->sh_num_alf_aps_ids_luma,
532 .sh_alf_aps_id_chroma = sh->sh_alf_aps_id_chroma,
533 .sh_alf_cc_cb_aps_id = sh->sh_alf_cc_cb_aps_id,
534 .sh_alf_cc_cr_aps_id = sh->sh_alf_cc_cr_aps_id,
535 .NumRefIdxActive[0] = sh->num_ref_idx_active[0],
536 .NumRefIdxActive[1] = sh->num_ref_idx_active[1],
537 .sh_collocated_ref_idx = sh->sh_collocated_ref_idx,
538 .SliceQpY =
pps->pps_qp_delta_info_in_ph_flag ?
539 26 +
pps->pps_init_qp_minus26 +
ph->ph_qp_delta :
540 26 +
pps->pps_init_qp_minus26 + sh->sh_qp_delta,
541 .sh_cb_qp_offset = sh->sh_cb_qp_offset,
542 .sh_cr_qp_offset = sh->sh_cr_qp_offset,
543 .sh_joint_cbcr_qp_offset = sh->sh_joint_cbcr_qp_offset,
544 .sh_luma_beta_offset_div2 = sh->sh_luma_beta_offset_div2,
545 .sh_luma_tc_offset_div2 = sh->sh_luma_tc_offset_div2,
546 .sh_cb_beta_offset_div2 = sh->sh_cb_beta_offset_div2,
547 .sh_cb_tc_offset_div2 = sh->sh_cb_tc_offset_div2,
548 .sh_cr_beta_offset_div2 = sh->sh_cr_beta_offset_div2,
549 .sh_cr_tc_offset_div2 = sh->sh_cr_tc_offset_div2,
551 .luma_log2_weight_denom = sh->sh_pred_weight_table.luma_log2_weight_denom,
552 .delta_chroma_log2_weight_denom = sh->sh_pred_weight_table.delta_chroma_log2_weight_denom,
553 .num_l0_weights = sh->sh_pred_weight_table.num_l0_weights,
554 .num_l1_weights = sh->sh_pred_weight_table.num_l1_weights,
557 .sh_alf_enabled_flag = sh->sh_alf_enabled_flag,
558 .sh_alf_cb_enabled_flag = sh->sh_alf_cb_enabled_flag,
559 .sh_alf_cr_enabled_flag = sh->sh_alf_cr_enabled_flag,
560 .sh_alf_cc_cb_enabled_flag = sh->sh_alf_cc_cb_enabled_flag,
561 .sh_alf_cc_cr_enabled_flag = sh->sh_alf_cc_cr_enabled_flag,
562 .sh_lmcs_used_flag = sh->sh_lmcs_used_flag,
563 .sh_explicit_scaling_list_used_flag = sh->sh_explicit_scaling_list_used_flag,
564 .sh_cabac_init_flag = sh->sh_cabac_init_flag,
565 .sh_collocated_from_l0_flag = sh->sh_collocated_from_l0_flag,
566 .sh_cu_chroma_qp_offset_enabled_flag = sh->sh_cu_chroma_qp_offset_enabled_flag,
567 .sh_sao_luma_used_flag = sh->sh_sao_luma_used_flag,
568 .sh_sao_chroma_used_flag = sh->sh_sao_chroma_used_flag,
569 .sh_deblocking_filter_disabled_flag = sh->sh_deblocking_filter_disabled_flag,
570 .sh_dep_quant_used_flag = sh->sh_dep_quant_used_flag,
571 .sh_sign_data_hiding_used_flag = sh->sh_sign_data_hiding_used_flag,
572 .sh_ts_residual_coding_disabled_flag = sh->sh_ts_residual_coding_disabled_flag,
576 memset(&slice_param->RefPicList, 0xFF,
sizeof(slice_param->RefPicList));
580 for (
int list_idx = 0; list_idx < nb_list; list_idx++) {
587 for (
i = 0;
i < 7;
i++)
588 slice_param->sh_alf_aps_id_luma[
i] = sh->sh_alf_aps_id_luma[
i];
590 for (
i = 0;
i < 15;
i++) {
591 slice_param->WPInfo.luma_weight_l0_flag[
i] = sh->sh_pred_weight_table.luma_weight_l0_flag[
i];
592 slice_param->WPInfo.chroma_weight_l0_flag[
i] = sh->sh_pred_weight_table.chroma_weight_l0_flag[
i];
593 slice_param->WPInfo.delta_luma_weight_l0[
i] = sh->sh_pred_weight_table.delta_luma_weight_l0[
i];
594 slice_param->WPInfo.luma_offset_l0[
i] = sh->sh_pred_weight_table.luma_offset_l0[
i];
595 slice_param->WPInfo.luma_weight_l1_flag[
i] = sh->sh_pred_weight_table.luma_weight_l1_flag[
i];
596 slice_param->WPInfo.chroma_weight_l1_flag[
i] = sh->sh_pred_weight_table.chroma_weight_l1_flag[
i];
597 slice_param->WPInfo.delta_luma_weight_l1[
i] = sh->sh_pred_weight_table.delta_luma_weight_l1[
i];
598 slice_param->WPInfo.luma_offset_l1[
i] = sh->sh_pred_weight_table.luma_offset_l1[
i];
601 for (
i = 0;
i < 15;
i++) {
602 for (
int j = 0; j < 2; j++) {
603 slice_param->WPInfo.delta_chroma_weight_l0[
i][j] = sh->sh_pred_weight_table.delta_chroma_weight_l0[
i][j];
604 slice_param->WPInfo.delta_chroma_offset_l0[
i][j] = sh->sh_pred_weight_table.delta_chroma_offset_l0[
i][j];
605 slice_param->WPInfo.delta_chroma_weight_l1[
i][j] = sh->sh_pred_weight_table.delta_chroma_weight_l1[
i][j];
606 slice_param->WPInfo.delta_chroma_offset_l1[
i][j] = sh->sh_pred_weight_table.delta_chroma_offset_l1[
i][j];
611 &pic->slice_param, 1,
612 sizeof(VASliceParameterBufferVVC),
634 pic->decode_issued = 1;
644 .
p.
name =
"vvc_vaapi",