aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/omx/vid_dec_h265.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/state_trackers/omx/vid_dec_h265.c')
-rw-r--r--src/gallium/state_trackers/omx/vid_dec_h265.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/omx/vid_dec_h265.c b/src/gallium/state_trackers/omx/vid_dec_h265.c
index b9ac654e876..3242dbe11c8 100644
--- a/src/gallium/state_trackers/omx/vid_dec_h265.c
+++ b/src/gallium/state_trackers/omx/vid_dec_h265.c
@@ -614,6 +614,8 @@ static void vid_dec_h265_BeginFrame(vid_dec_PrivateType *priv)
if (!priv->codec) {
struct pipe_video_codec templat = {};
+ omx_base_video_PortType *port = (omx_base_video_PortType *)
+ priv->ports[OMX_BASE_FILTER_INPUTPORT_INDEX];
templat.profile = priv->profile;
templat.entrypoint = PIPE_VIDEO_ENTRYPOINT_BITSTREAM;
@@ -623,6 +625,13 @@ static void vid_dec_h265_BeginFrame(vid_dec_PrivateType *priv)
templat.height = priv->codec_data.h265.pic_height_in_luma_samples;
templat.level = priv->codec_data.h265.level_idc;
priv->codec = priv->pipe->create_video_codec(priv->pipe, &templat);
+
+ /* disable transcode tunnel if video size is different from coded size */
+ if (priv->codec_data.h265.pic_width_in_luma_samples !=
+ port->sPortParam.format.video.nFrameWidth ||
+ priv->codec_data.h265.pic_height_in_luma_samples !=
+ port->sPortParam.format.video.nFrameHeight)
+ priv->disable_tunnel = true;
}
vid_dec_NeedTarget(priv);