mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 08:58:02 +02:00
frontends/va: Parse chroma sample location in H264/HEVC SPS
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com> Reviewed-by: Sil Vilerino <sivileri@microsoft.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25078>
This commit is contained in:
parent
aca2adc36c
commit
8e76b8fb35
3 changed files with 18 additions and 0 deletions
|
|
@ -399,6 +399,12 @@ static void parseEncSpsParamsH264(vlVaContext *context, struct vl_rbsp *rbsp)
|
|||
context->desc.h264enc.seq.matrix_coefficients = vl_rbsp_u(rbsp, 8);
|
||||
}
|
||||
}
|
||||
|
||||
context->desc.h264enc.seq.vui_flags.chroma_loc_info_present_flag = vl_rbsp_u(rbsp, 1);
|
||||
if (context->desc.h264enc.seq.vui_flags.chroma_loc_info_present_flag) {
|
||||
context->desc.h264enc.seq.chroma_sample_loc_type_top_field = vl_rbsp_ue(rbsp);
|
||||
context->desc.h264enc.seq.chroma_sample_loc_type_bottom_field = vl_rbsp_ue(rbsp);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -425,6 +425,12 @@ static void parseEncSpsParamsH265(vlVaContext *context, struct vl_rbsp *rbsp)
|
|||
context->desc.h265enc.seq.matrix_coefficients = vl_rbsp_u(rbsp, 8);
|
||||
}
|
||||
}
|
||||
|
||||
context->desc.h265enc.seq.vui_flags.chroma_loc_info_present_flag = vl_rbsp_u(rbsp, 1);
|
||||
if (context->desc.h265enc.seq.vui_flags.chroma_loc_info_present_flag) {
|
||||
context->desc.h265enc.seq.chroma_sample_loc_type_top_field = vl_rbsp_ue(rbsp);
|
||||
context->desc.h265enc.seq.chroma_sample_loc_type_bottom_field = vl_rbsp_ue(rbsp);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -514,6 +514,7 @@ struct pipe_h264_enc_seq_param
|
|||
uint32_t timing_info_present_flag: 1;
|
||||
uint32_t video_signal_type_present_flag: 1;
|
||||
uint32_t colour_description_present_flag: 1;
|
||||
uint32_t chroma_loc_info_present_flag: 1;
|
||||
} vui_flags;
|
||||
uint32_t aspect_ratio_idc;
|
||||
uint32_t sar_width;
|
||||
|
|
@ -525,6 +526,8 @@ struct pipe_h264_enc_seq_param
|
|||
uint32_t colour_primaries;
|
||||
uint32_t transfer_characteristics;
|
||||
uint32_t matrix_coefficients;
|
||||
uint32_t chroma_sample_loc_type_top_field;
|
||||
uint32_t chroma_sample_loc_type_bottom_field;
|
||||
};
|
||||
|
||||
struct pipe_h264_enc_picture_desc
|
||||
|
|
@ -605,6 +608,7 @@ struct pipe_h265_enc_seq_param
|
|||
uint32_t timing_info_present_flag: 1;
|
||||
uint32_t video_signal_type_present_flag: 1;
|
||||
uint32_t colour_description_present_flag: 1;
|
||||
uint32_t chroma_loc_info_present_flag: 1;
|
||||
} vui_flags;
|
||||
uint32_t aspect_ratio_idc;
|
||||
uint32_t sar_width;
|
||||
|
|
@ -616,6 +620,8 @@ struct pipe_h265_enc_seq_param
|
|||
uint32_t colour_primaries;
|
||||
uint32_t transfer_characteristics;
|
||||
uint32_t matrix_coefficients;
|
||||
uint32_t chroma_sample_loc_type_top_field;
|
||||
uint32_t chroma_sample_loc_type_bottom_field;
|
||||
};
|
||||
|
||||
struct pipe_h265_enc_pic_param
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue