From 08762d5171bfcc94a36d778679abbf05d5045a51 Mon Sep 17 00:00:00 2001 From: Leo Liu Date: Tue, 20 Oct 2020 17:44:13 -0400 Subject: [PATCH 1/2] frontends/omx/dec: Use the known codec profile when allocating buffers We should use it since the profile has been known already, otherwise it will get incorrect buffers in some cases. Signed-off-by: Leo Liu Reviewed-by: Boyuan Zhang Part-of: --- src/gallium/frontends/omx/vid_dec_common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gallium/frontends/omx/vid_dec_common.c b/src/gallium/frontends/omx/vid_dec_common.c index 0a59aad1ea7f..b22883b13def 100644 --- a/src/gallium/frontends/omx/vid_dec_common.c +++ b/src/gallium/frontends/omx/vid_dec_common.c @@ -56,13 +56,13 @@ void vid_dec_NeedTarget(vid_dec_PrivateType *priv) templat.height = priv->codec->height; templat.buffer_format = pscreen->get_video_param( pscreen, - PIPE_VIDEO_PROFILE_UNKNOWN, + priv->profile, PIPE_VIDEO_ENTRYPOINT_BITSTREAM, PIPE_VIDEO_CAP_PREFERED_FORMAT ); templat.interlaced = pscreen->get_video_param( pscreen, - PIPE_VIDEO_PROFILE_UNKNOWN, + priv->profile, PIPE_VIDEO_ENTRYPOINT_BITSTREAM, PIPE_VIDEO_CAP_PREFERS_INTERLACED ); -- GitLab From a071590b1d13457640f2b02f067854d26d666675 Mon Sep 17 00:00:00 2001 From: Leo Liu Date: Tue, 20 Oct 2020 18:51:23 -0400 Subject: [PATCH 2/2] frontends/omx/h265: Check the pps set before the scaling data Certain clip has no scaling list data in the pps set Signed-off-by: Leo Liu Reviewed-by: Boyuan Zhang Part-of: --- src/gallium/frontends/omx/bellagio/vid_dec_h265.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gallium/frontends/omx/bellagio/vid_dec_h265.c b/src/gallium/frontends/omx/bellagio/vid_dec_h265.c index c50be7804cb3..11766691668b 100644 --- a/src/gallium/frontends/omx/bellagio/vid_dec_h265.c +++ b/src/gallium/frontends/omx/bellagio/vid_dec_h265.c @@ -598,6 +598,9 @@ static void picture_parameter_set(vid_dec_PrivateType *priv, } } + if (vl_vlc_bits_left(&rbsp->nal) == 0) + return; + /* pps_scaling_list_data_present_flag */ if (vl_rbsp_u(rbsp, 1)) scaling_list_data(priv, rbsp, sps); -- GitLab