From: Julien Isorce Date: Mon, 4 Jan 2016 22:17:59 +0000 (+0000) Subject: st/omx: count number of slices X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6e4cf937f8e742433a4320b1b847454a06dacf03;p=mesa.git st/omx: count number of slices Used by nouveau driver. Similar patch was done for st/va: 851e7e12aa628d6781b5a3af2f2fc16ee73f435f Signed-off-by: Julien Isorce Reviewed-by: Christian König --- diff --git a/src/gallium/state_trackers/omx/vid_dec_h264.c b/src/gallium/state_trackers/omx/vid_dec_h264.c index 54f244b4a1e..bc7feaa9ab1 100644 --- a/src/gallium/state_trackers/omx/vid_dec_h264.c +++ b/src/gallium/state_trackers/omx/vid_dec_h264.c @@ -128,6 +128,7 @@ static void vid_dec_h264_BeginFrame(vid_dec_PrivateType *priv) priv->codec = priv->pipe->create_video_codec(priv->pipe, &templat); } + priv->picture.h264.slice_count = 0; priv->codec->begin_frame(priv->codec, priv->target, &priv->picture.base); priv->frame_started = true; } @@ -961,6 +962,7 @@ static void vid_dec_h264_Decode(vid_dec_PrivateType *priv, struct vl_vlc *vlc, u if (priv->slice) { unsigned bytes = priv->bytes_left - (vl_vlc_bits_left(vlc) / 8); + ++priv->picture.h264.slice_count; priv->codec->decode_bitstream(priv->codec, priv->target, &priv->picture.base, 1, &priv->slice, &bytes); priv->slice = NULL; @@ -1018,6 +1020,7 @@ static void vid_dec_h264_Decode(vid_dec_PrivateType *priv, struct vl_vlc *vlc, u vid_dec_h264_BeginFrame(priv); + ++priv->picture.h264.slice_count; priv->codec->decode_bitstream(priv->codec, priv->target, &priv->picture.base, 1, &ptr, &bytes); }