summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorJulien Isorce <[email protected]>2015-12-01 08:10:42 +0000
committerJulien Isorce <[email protected]>2016-06-27 17:52:15 +0100
commit23b7a83cc1484336e8af2b965d89ab532f4ee691 (patch)
tree88fba5d28025ce7beb886cd916fe5acdbebec9b6 /src/gallium
parentf6ff4836460f0e76d5e2ba82ffeb7bb52c0554fc (diff)
st/omx: retrieve preferred interlaced and buffer_formats
Interlaced can be true for nouveau driver. Signed-off-by: Julien Isorce <[email protected]> Reviewed-by: Christian König <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/state_trackers/omx/vid_dec.c26
1 files changed, 24 insertions, 2 deletions
diff --git a/src/gallium/state_trackers/omx/vid_dec.c b/src/gallium/state_trackers/omx/vid_dec.c
index 108a46029e0..564ca2f5da8 100644
--- a/src/gallium/state_trackers/omx/vid_dec.c
+++ b/src/gallium/state_trackers/omx/vid_dec.c
@@ -385,16 +385,38 @@ static OMX_ERRORTYPE vid_dec_MessageHandler(OMX_COMPONENTTYPE* comp, internalReq
void vid_dec_NeedTarget(vid_dec_PrivateType *priv)
{
struct pipe_video_buffer templat = {};
+ struct vl_screen *omx_screen;
+ struct pipe_screen *pscreen;
omx_base_video_PortType *port;
+ omx_screen = priv->screen;
port = (omx_base_video_PortType *)priv->ports[OMX_BASE_FILTER_INPUTPORT_INDEX];
+ assert(omx_screen);
+ assert(port);
+
+ pscreen = omx_screen->pscreen;
+
+ assert(pscreen);
+
if (!priv->target) {
- templat.buffer_format = PIPE_FORMAT_NV12;
+ memset(&templat, 0, sizeof(templat));
+
templat.chroma_format = PIPE_VIDEO_CHROMA_FORMAT_420;
templat.width = port->sPortParam.format.video.nFrameWidth;
templat.height = port->sPortParam.format.video.nFrameHeight;
- templat.interlaced = false;
+ templat.buffer_format = pscreen->get_video_param(
+ pscreen,
+ PIPE_VIDEO_PROFILE_UNKNOWN,
+ PIPE_VIDEO_ENTRYPOINT_BITSTREAM,
+ PIPE_VIDEO_CAP_PREFERED_FORMAT
+ );
+ templat.interlaced = pscreen->get_video_param(
+ pscreen,
+ PIPE_VIDEO_PROFILE_UNKNOWN,
+ PIPE_VIDEO_ENTRYPOINT_BITSTREAM,
+ PIPE_VIDEO_CAP_PREFERS_INTERLACED
+ );
priv->target = priv->pipe->create_video_buffer(priv->pipe, &templat);
}
}