Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HEVCe] update header logic #371

Merged
merged 1 commit into from
Jul 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 13 additions & 8 deletions encode/hevcencode.c
Original file line number Diff line number Diff line change
Expand Up @@ -841,9 +841,9 @@ void fill_sps_header(struct SeqParamSet *sps, int id)
sps->log2_min_luma_transform_block_size_minus2) : 3;
sps->max_transform_hierarchy_depth_inter = use_block_sizes ? block_sizes.max_max_transform_hierarchy_depth_inter : 2;
sps->max_transform_hierarchy_depth_intra = use_block_sizes ? block_sizes.max_max_transform_hierarchy_depth_intra : 2;
sps->scaling_list_enabled_flag = use_features ? features.scaling_lists : 0;
sps->sps_scaling_list_data_present_flag = 0;
sps->amp_enabled_flag = use_features ? features.amp : 1;
sps->scaling_list_enabled_flag = 0;
//sps->sps_scaling_list_data_present_flag; // ignore since scaling_list_enabled_flag equal to 0
sps->amp_enabled_flag = use_features ? features.amp >= 1 : 1;
sps->sample_adaptive_offset_enabled_flag = use_features ? features.sao : 1;
sps->pcm_enabled_flag = use_features ? features.pcm : 0;
/* ignore below parameters seting since pcm_enabled_flag equal to 0
Expand Down Expand Up @@ -899,7 +899,7 @@ static void fill_pps_header(
pps->init_qp_minus26 = initial_qp - 26;
pps->constrained_intra_pred_flag = use_features ? features.constrained_intra_pred : 0;
pps->transform_skip_enabled_flag = use_features ? features.transform_skip : 0;
pps->cu_qp_delta_enabled_flag = use_features ? features.cu_qp_delta : 1;
pps->cu_qp_delta_enabled_flag = use_features ? features.cu_qp_delta >= 1 : 1;
if (pps->cu_qp_delta_enabled_flag)
pps->diff_cu_qp_delta_depth = 2;
pps->pps_cb_qp_offset = 0;
Expand Down Expand Up @@ -1986,6 +1986,7 @@ static int init_va(void)
VAEntrypoint *entrypoints;
int num_entrypoints, slice_entrypoint;
int support_encode = 0;
int support_lpEntryPoint = 0;
int major_ver, minor_ver;
VAStatus va_status;
unsigned int i;
Expand All @@ -2009,10 +2010,12 @@ static int init_va(void)
hevc_profile = profile_list[i];
vaQueryConfigEntrypoints(va_dpy, hevc_profile, entrypoints, &num_entrypoints);
for (slice_entrypoint = 0; slice_entrypoint < num_entrypoints; slice_entrypoint++) {
if (entrypoints[slice_entrypoint] == VAEntrypointEncSlice ||
entrypoints[slice_entrypoint] == VAEntrypointEncSliceLP ) {
if (entrypoints[slice_entrypoint] == VAEntrypointEncSlice) {
support_encode = 1;
break;
}
else if (entrypoints[slice_entrypoint] == VAEntrypointEncSliceLP) {
support_encode = 1;
support_lpEntryPoint = 1;
}
}
if (support_encode == 1)
Expand Down Expand Up @@ -2048,8 +2051,10 @@ static int init_va(void)

if (lowpower)
{
entryPoint = VAEntrypointEncSliceLP;
LCU_SIZE = 64;
if (support_lpEntryPoint == 1) {
entryPoint = VAEntrypointEncSliceLP;
}
}

va_status = vaGetConfigAttributes(va_dpy, hevc_profile, entryPoint,
Expand Down
Loading