* [PATCH] st/omx/enc: fix incorrect reference picture order for B frames
@ 2016-05-03 14:49 Leo Liu
2016-05-03 14:58 ` Leo Liu
0 siblings, 1 reply; 2+ messages in thread
From: Leo Liu @ 2016-05-03 14:49 UTC (permalink / raw)
To: dri-devel; +Cc: 11.1 11.2, Leo Liu
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>
Cc: "11.1 11.2" <mesa-stable@lists.freedesktop.org>
---
src/gallium/state_trackers/omx/vid_enc.c | 19 ++++++++++++-------
1 file changed, 12 insertions(+), 7 deletions(-)
diff --git a/src/gallium/state_trackers/omx/vid_enc.c b/src/gallium/state_trackers/omx/vid_enc.c
index 5565241..d70439a 100644
--- a/src/gallium/state_trackers/omx/vid_enc.c
+++ b/src/gallium/state_trackers/omx/vid_enc.c
@@ -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)) {
--
2.7.4
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] st/omx/enc: fix incorrect reference picture order for B frames
2016-05-03 14:49 [PATCH] st/omx/enc: fix incorrect reference picture order for B frames Leo Liu
@ 2016-05-03 14:58 ` Leo Liu
0 siblings, 0 replies; 2+ messages in thread
From: Leo Liu @ 2016-05-03 14:58 UTC (permalink / raw)
To: dri-devel
Never mind. Sorry about it.
On 05/03/2016 10:49 AM, Leo Liu wrote:
> 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>
> Cc: "11.1 11.2" <mesa-stable@lists.freedesktop.org>
> ---
> src/gallium/state_trackers/omx/vid_enc.c | 19 ++++++++++++-------
> 1 file changed, 12 insertions(+), 7 deletions(-)
>
> diff --git a/src/gallium/state_trackers/omx/vid_enc.c b/src/gallium/state_trackers/omx/vid_enc.c
> index 5565241..d70439a 100644
> --- a/src/gallium/state_trackers/omx/vid_enc.c
> +++ b/src/gallium/state_trackers/omx/vid_enc.c
> @@ -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)) {
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-05-03 15:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-03 14:49 [PATCH] st/omx/enc: fix incorrect reference picture order for B frames Leo Liu
2016-05-03 14:58 ` Leo Liu
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.