mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-02 13:50:09 +01:00
frontends/va: Parse H264 prefix for temporal_id
Reviewed-By: Sil Vilerino <sivileri@microsoft.com> Reviewed-by: Ruijing Dong <ruijing.dong@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31148>
This commit is contained in:
parent
ce2eedd13e
commit
c56fc312a8
2 changed files with 17 additions and 0 deletions
|
|
@ -716,6 +716,19 @@ static void parseEncPpsParamsH264(vlVaContext *context, struct vl_rbsp *rbsp)
|
|||
}
|
||||
}
|
||||
|
||||
static void parseEncPrefixH264(vlVaContext *context, struct vl_rbsp *rbsp)
|
||||
{
|
||||
if (!vl_rbsp_u(rbsp, 1)) /* svc_extension_flag */
|
||||
return;
|
||||
|
||||
vl_rbsp_u(rbsp, 1); /* idr_flag */
|
||||
vl_rbsp_u(rbsp, 6); /* priority_id */
|
||||
vl_rbsp_u(rbsp, 1); /* no_inter_layer_pred_flag */
|
||||
vl_rbsp_u(rbsp, 3); /* dependency_id */
|
||||
vl_rbsp_u(rbsp, 4); /* quality_id */
|
||||
context->desc.h264enc.pic_ctrl.temporal_id = vl_rbsp_u(rbsp, 3);
|
||||
}
|
||||
|
||||
VAStatus
|
||||
vlVaHandleVAEncPackedHeaderDataBufferTypeH264(vlVaContext *context, vlVaBuffer *buf)
|
||||
{
|
||||
|
|
@ -774,6 +787,9 @@ vlVaHandleVAEncPackedHeaderDataBufferTypeH264(vlVaContext *context, vlVaBuffer *
|
|||
case PIPE_H264_NAL_PPS:
|
||||
parseEncPpsParamsH264(context, &rbsp);
|
||||
break;
|
||||
case PIPE_H264_NAL_PREFIX:
|
||||
parseEncPrefixH264(context, &rbsp);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -136,6 +136,7 @@ enum pipe_h264_nal_unit_type
|
|||
PIPE_H264_NAL_SPS = 7,
|
||||
PIPE_H264_NAL_PPS = 8,
|
||||
PIPE_H264_NAL_AUD = 9,
|
||||
PIPE_H264_NAL_PREFIX = 14,
|
||||
};
|
||||
|
||||
enum pipe_h264_slice_type
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue