From 0bac88f67778d5d6d178cf166702cb3f46e2b2e2 Mon Sep 17 00:00:00 2001 From: Julien Isorce Date: Wed, 26 Aug 2015 18:15:34 +0100 Subject: [PATCH 7/8] nouveau: fix chunk decoding by updating number of slices https://bugs.freedesktop.org/show_bug.cgi?id=89969 Signed-off-by: Julien Isorce --- src/gallium/drivers/nouveau/nouveau_vp3_video_bsp.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/gallium/drivers/nouveau/nouveau_vp3_video_bsp.c b/src/gallium/drivers/nouveau/nouveau_vp3_video_bsp.c index 70e88ba..52090ad 100644 --- a/src/gallium/drivers/nouveau/nouveau_vp3_video_bsp.c +++ b/src/gallium/drivers/nouveau/nouveau_vp3_video_bsp.c @@ -128,6 +128,8 @@ nouveau_vp3_fill_picparm_mpeg12_bsp(struct nouveau_vp3_decoder *dec, for (i = 0; i < 4; ++i) pic_bsp->f_code[i/2][i%2] = desc->f_code[i/2][i%2] + 1; // FU + desc->num_slices = dec->nb_slices; + return (desc->num_slices << 4) | (dec->base.profile != PIPE_VIDEO_PROFILE_MPEG1); } @@ -196,6 +198,8 @@ nouveau_vp3_fill_picparm_h264_bsp(struct nouveau_vp3_decoder *dec, struct h264_picparm_bsp stub_h = {}, *h = &stub_h; uint32_t caps = (d->slice_count << 4)&0xfff0; + d->slice_count = dec->nb_slices; + assert(!(d->slice_count & ~0xfff)); if (d->slice_count & 0x1000) caps |= 1 << 20; -- 1.9.1