mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 06:48:06 +02:00
st/omx/enc: fix incorrect reference picture order for B frames
Stacking frames is for driver that's capable to do dual instances encoding. Such feature is not enabled for B frames currently. Signed-off-by: Leo Liu <leo.liu@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Cc: "11.1 11.2" <mesa-stable@lists.freedesktop.org>
This commit is contained in:
parent
7bc987abe0
commit
fef0e993a1
1 changed files with 12 additions and 7 deletions
|
|
@ -180,11 +180,6 @@ static OMX_ERRORTYPE vid_enc_Constructor(OMX_COMPONENTTYPE *comp, OMX_STRING nam
|
|||
PIPE_VIDEO_ENTRYPOINT_ENCODE, PIPE_VIDEO_CAP_SUPPORTED))
|
||||
return OMX_ErrorBadParameter;
|
||||
|
||||
priv->stacked_frames_num = screen->get_video_param(screen,
|
||||
PIPE_VIDEO_PROFILE_MPEG4_AVC_HIGH,
|
||||
PIPE_VIDEO_ENTRYPOINT_ENCODE,
|
||||
PIPE_VIDEO_CAP_STACKED_FRAMES);
|
||||
|
||||
priv->s_pipe = screen->context_create(screen, priv->screen, 0);
|
||||
if (!priv->s_pipe)
|
||||
return OMX_ErrorInsufficientResources;
|
||||
|
|
@ -699,9 +694,19 @@ static OMX_ERRORTYPE vid_enc_MessageHandler(OMX_COMPONENTTYPE* comp, internalReq
|
|||
priv->scale.xWidth : port->sPortParam.format.video.nFrameWidth;
|
||||
templat.height = priv->scale_buffer[priv->current_scale_buffer] ?
|
||||
priv->scale.xHeight : port->sPortParam.format.video.nFrameHeight;
|
||||
templat.max_references = (templat.profile == PIPE_VIDEO_PROFILE_MPEG4_AVC_BASELINE) ?
|
||||
1 : OMX_VID_ENC_P_PERIOD_DEFAULT;
|
||||
|
||||
if (templat.profile == PIPE_VIDEO_PROFILE_MPEG4_AVC_BASELINE) {
|
||||
struct pipe_screen *screen = priv->screen->pscreen;
|
||||
templat.max_references = 1;
|
||||
priv->stacked_frames_num =
|
||||
screen->get_video_param(screen,
|
||||
PIPE_VIDEO_PROFILE_MPEG4_AVC_HIGH,
|
||||
PIPE_VIDEO_ENTRYPOINT_ENCODE,
|
||||
PIPE_VIDEO_CAP_STACKED_FRAMES);
|
||||
} else {
|
||||
templat.max_references = OMX_VID_ENC_P_PERIOD_DEFAULT;
|
||||
priv->stacked_frames_num = 1;
|
||||
}
|
||||
priv->codec = priv->s_pipe->create_video_codec(priv->s_pipe, &templat);
|
||||
|
||||
} else if ((msg->messageParam == OMX_StateLoaded) && (priv->state == OMX_StateIdle)) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue