49 CUVIDPICPARAMS *pp = &
ctx->pic_params;
50 CUVIDAV1PICPARAMS *ppc = &pp->CodecSpecific.av1;
67 *pp = (CUVIDPICPARAMS) {
68 .PicWidthInMbs = (cur_frame->
width + 15) / 16,
69 .FrameHeightInMbs = (cur_frame->
height + 15) / 16,
70 .CurrPicIdx = cf->
idx,
75 .CodecSpecific.av1 = {
76 .width = cur_frame->
width,
77 .height = cur_frame->
height,
107 .allow_screen_content_tools =
frame_header->allow_screen_content_tools,
113 .allow_high_precision_mv =
frame_header->allow_high_precision_mv,
115 .switchable_motion_mode =
frame_header->is_motion_mode_switchable,
117 .disable_frame_end_update_cdf =
frame_header->disable_frame_end_update_cdf,
121 .coded_lossless =
s->cur_frame.coded_lossless,
125 .allow_warped_motion =
frame_header->allow_warped_motion,
132 .context_update_tile_id =
frame_header->context_update_tile_id,
135 .cdef_damping_minus_3 =
frame_header->cdef_damping_minus_3,
140 s->cur_frame.skip_mode_frame_idx[0] : 0,
142 s->cur_frame.skip_mode_frame_idx[1] : 0,
156 .segmentation_enabled =
frame_header->segmentation_enabled,
157 .segmentation_update_map =
frame_header->segmentation_update_map,
158 .segmentation_update_data =
frame_header->segmentation_update_data,
159 .segmentation_temporal_update =
frame_header->segmentation_temporal_update,
162 .loop_filter_level[0] =
frame_header->loop_filter_level[0],
163 .loop_filter_level[1] =
frame_header->loop_filter_level[1],
164 .loop_filter_level_u =
frame_header->loop_filter_level[2],
165 .loop_filter_level_v =
frame_header->loop_filter_level[3],
166 .loop_filter_sharpness =
frame_header->loop_filter_sharpness,
167 .loop_filter_delta_enabled =
frame_header->loop_filter_delta_enabled,
168 .loop_filter_delta_update =
frame_header->loop_filter_delta_update,
169 .loop_filter_mode_deltas[0] =
frame_header->loop_filter_mode_deltas[0],
170 .loop_filter_mode_deltas[1] =
frame_header->loop_filter_mode_deltas[1],
184 .temporal_layer_id =
s->cur_frame.temporal_id,
185 .spatial_layer_id =
s->cur_frame.spatial_id,
188 .apply_grain = apply_grain,
200 .cb_mult = film_grain->
cb_mult,
203 .cr_mult = film_grain->
cr_mult,
214 ppc->tile_heights[
i] =
frame_header->height_in_sbs_minus_1[
i] + 1;
225 ppc->segmentation_feature_mask[
i] = 0;
227 ppc->segmentation_feature_mask[
i] |=
frame_header->feature_enabled[
i][j] << j;
228 ppc->segmentation_feature_data[
i][j] =
frame_header->feature_value[
i][j];
234 ppc->loop_filter_ref_deltas[
i] =
frame_header->loop_filter_ref_deltas[
i];
241 ppc->primary_ref_frame = -1;
244 ppc->primary_ref_frame = ppc->ref_frame_map[pri_ref_idx];
252 ppc->ref_frame[
i].index = ppc->ref_frame_map[ref_idx];
259 for (j = 0; j < 6; ++j) {
266 for (
i = 0;
i < 14; ++
i) {
270 for (
i = 0;
i < 10; ++
i) {
276 for (
i = 0;
i < 24; ++
i) {
279 for (
i = 0;
i < 25; ++
i) {
298 ctx->nb_slices * 2 *
sizeof(*
ctx->slice_offsets));
305 if (
ctx->nb_slices ==
s->tg_end -
s->tg_start + 1) {
309 for (
int i = 0;
i <
ctx->nb_slices; ++
i) {
310 ctx->slice_offsets[
i*2 ] =
s->tile_group_info[
i].tile_offset;
311 ctx->slice_offsets[
i*2 + 1] =
ctx->slice_offsets[
i*2] +
s->tile_group_info[
i].tile_size;
322 ctx->bitstream =
ctx->bitstream_internal =
tmp;
326 for (uint32_t tile_num =
s->tg_start; tile_num <= s->tg_end; ++tile_num) {
327 ctx->slice_offsets[tile_num*2 ] =
ctx->bitstream_len +
s->tile_group_info[tile_num].tile_offset;
328 ctx->slice_offsets[tile_num*2 + 1] =
ctx->slice_offsets[tile_num*2] +
s->tile_group_info[tile_num].tile_size;
342 .
p.
name =
"av1_nvdec",