diff --git a/src/gallium/frontends/va/config.c b/src/gallium/frontends/va/config.c index e1dd3d34ffc..37e7307c3a7 100644 --- a/src/gallium/frontends/va/config.c +++ b/src/gallium/frontends/va/config.c @@ -745,7 +745,6 @@ vlVaCreateConfig(VADriverContextP ctx, VAProfile profile, VAEntrypoint entrypoin FREE(config); return VA_STATUS_ERROR_INVALID_VALUE; } - config->packed_headers = attrib_value; } } diff --git a/src/gallium/frontends/va/context.c b/src/gallium/frontends/va/context.c index c142587955f..4dc606536ac 100644 --- a/src/gallium/frontends/va/context.c +++ b/src/gallium/frontends/va/context.c @@ -424,7 +424,6 @@ vlVaCreateContext(VADriverContextP ctx, VAConfigID config_id, int picture_width, default: break; } - context->desc.base.packed_headers = config->packed_headers; mtx_lock(&drv->mutex); context->decoder = drv->pipe->create_video_codec(drv->pipe, &context->templat); diff --git a/src/gallium/frontends/va/picture_h264_enc.c b/src/gallium/frontends/va/picture_h264_enc.c index 14d747430d2..a7249322cb4 100644 --- a/src/gallium/frontends/va/picture_h264_enc.c +++ b/src/gallium/frontends/va/picture_h264_enc.c @@ -133,12 +133,6 @@ vlVaHandleVAEncPictureParameterBufferTypeH264(vlVaDriver *drv, vlVaContext *cont context->desc.h264enc.pic_ctrl.transform_8x8_mode_flag = h264->pic_fields.bits.transform_8x8_mode_flag; - if (!(context->desc.base.packed_headers & VA_ENC_PACKED_HEADER_SLICE)) { - unsigned max_poc = 1 << (context->desc.h264enc.seq.log2_max_pic_order_cnt_lsb_minus4 + 4); - context->desc.h264enc.slice.frame_num = h264->frame_num; - context->desc.h264enc.slice.pic_order_cnt_lsb = h264->CurrPic.TopFieldOrderCnt % max_poc; - } - return VA_STATUS_SUCCESS; } @@ -299,15 +293,6 @@ vlVaHandleVAEncSequenceParameterBufferTypeH264(vlVaDriver *drv, vlVaContext *con context->desc.h264enc.seq.enc_frame_crop_bottom_offset = h264->frame_crop_bottom_offset; } - if (!(context->desc.base.packed_headers & VA_ENC_PACKED_HEADER_SEQUENCE)) { - util_dynarray_append(&context->desc.h264enc.raw_headers, - struct pipe_enc_raw_header, - (struct pipe_enc_raw_header){.type = PIPE_H264_NAL_SPS}); - util_dynarray_append(&context->desc.h264enc.raw_headers, - struct pipe_enc_raw_header, - (struct pipe_enc_raw_header){.type = PIPE_H264_NAL_PPS}); - } - return VA_STATUS_SUCCESS; } diff --git a/src/gallium/frontends/va/picture_hevc_enc.c b/src/gallium/frontends/va/picture_hevc_enc.c index fdf53e81ba1..10a82153432 100644 --- a/src/gallium/frontends/va/picture_hevc_enc.c +++ b/src/gallium/frontends/va/picture_hevc_enc.c @@ -130,15 +130,6 @@ vlVaHandleVAEncPictureParameterBufferTypeHEVC(vlVaDriver *drv, vlVaContext *cont context->desc.h265enc.num_ref_idx_l0_active_minus1 = h265->num_ref_idx_l0_default_active_minus1; context->desc.h265enc.num_ref_idx_l1_active_minus1 = h265->num_ref_idx_l1_default_active_minus1; - if (!(context->desc.base.packed_headers & VA_ENC_PACKED_HEADER_SLICE)) { - unsigned max_poc = 1 << (context->desc.h265enc.seq.log2_max_pic_order_cnt_lsb_minus4 + 4); - context->desc.h265enc.slice.slice_pic_order_cnt_lsb = h265->decoded_curr_pic.pic_order_cnt % max_poc; - if (context->desc.h265enc.picture_type == PIPE_H2645_ENC_PICTURE_TYPE_P) { - context->desc.h265enc.slice.st_ref_pic_set.num_negative_pics = 1; - context->desc.h265enc.slice.st_ref_pic_set.used_by_curr_pic_s0_flag[0] = 1; - } - } - return VA_STATUS_SUCCESS; } @@ -314,28 +305,6 @@ vlVaHandleVAEncSequenceParameterBufferTypeHEVC(vlVaDriver *drv, vlVaContext *con context->desc.h265enc.rc[0].frame_rate_num = time_scale; context->desc.h265enc.rc[0].frame_rate_den = num_units_in_tick; - if (!(context->desc.base.packed_headers & VA_ENC_PACKED_HEADER_SEQUENCE)) { - struct pipe_h265_profile_tier_level *ptl = - &context->desc.h265enc.vid.profile_tier_level; - util_dynarray_append(&context->desc.h264enc.raw_headers, - struct pipe_enc_raw_header, - (struct pipe_enc_raw_header){.type = PIPE_H265_NAL_VPS}); - util_dynarray_append(&context->desc.h264enc.raw_headers, - struct pipe_enc_raw_header, - (struct pipe_enc_raw_header){.type = PIPE_H265_NAL_SPS}); - util_dynarray_append(&context->desc.h264enc.raw_headers, - struct pipe_enc_raw_header, - (struct pipe_enc_raw_header){.type = PIPE_H265_NAL_PPS}); - context->desc.h265enc.vid.vps_base_layer_internal_flag = 1; - context->desc.h265enc.vid.vps_base_layer_available_flag = 1; - ptl->profile_tier.general_tier_flag = h265->general_tier_flag; - ptl->profile_tier.general_profile_idc = h265->general_profile_idc; - ptl->profile_tier.general_progressive_source_flag = 1; - ptl->profile_tier.general_frame_only_constraint_flag = 1; - ptl->general_level_idc = h265->general_level_idc; - context->desc.h265enc.seq.profile_tier_level = *ptl; - } - return VA_STATUS_SUCCESS; } diff --git a/src/gallium/frontends/va/va_private.h b/src/gallium/frontends/va/va_private.h index a2304bd559d..917c13c6f1a 100644 --- a/src/gallium/frontends/va/va_private.h +++ b/src/gallium/frontends/va/va_private.h @@ -432,7 +432,6 @@ typedef struct { enum pipe_video_entrypoint entrypoint; enum pipe_h2645_enc_rate_control_method rc; unsigned int rt_format; - unsigned int packed_headers; } vlVaConfig; typedef struct vlVaSurface { diff --git a/src/gallium/include/pipe/p_video_state.h b/src/gallium/include/pipe/p_video_state.h index dd4073e265d..e2575133a46 100644 --- a/src/gallium/include/pipe/p_video_state.h +++ b/src/gallium/include/pipe/p_video_state.h @@ -235,7 +235,6 @@ struct pipe_picture_desc unsigned flush_flags; /* A fence for pipe_video_codec::end_frame to signal job completion */ struct pipe_fence_handle **fence; - unsigned packed_headers; }; struct pipe_quant_matrix