[FFmpeg-cvslog] dxva2_vc1: include the start code in wMBbitOffset

Hendrik Leppkes git at videolan.org
Fri Mar 7 16:08:32 CET 2014


ffmpeg | branch: master | Hendrik Leppkes <h.leppkes at gmail.com> | Fri Mar  7 14:02:59 2014 +0100| [61ff0431ba8ed8f4b447e4257547da1b1bec6019] | committer: Michael Niedermayer

dxva2_vc1: include the start code in wMBbitOffset

This resolves a decoding failure on Intel GPUs.

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=61ff0431ba8ed8f4b447e4257547da1b1bec6019
---

 libavcodec/dxva2_vc1.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/dxva2_vc1.c b/libavcodec/dxva2_vc1.c
index 88138e3..51c847c 100644
--- a/libavcodec/dxva2_vc1.c
+++ b/libavcodec/dxva2_vc1.c
@@ -168,7 +168,7 @@ static void fill_slice(AVCodecContext *avctx, DXVA_SliceInfo *slice,
     slice->dwSliceDataLocation = position;
     slice->bStartCodeBitOffset = 0;
     slice->bReservedBits       = (s->pict_type == AV_PICTURE_TYPE_B && !v->bi_type) ? v->bfraction_lut_index + 9 : 0;
-    slice->wMBbitOffset        = v->p_frame_skipped ? 0xffff : get_bits_count(&s->gb);
+    slice->wMBbitOffset        = v->p_frame_skipped ? 0xffff : get_bits_count(&s->gb) + (avctx->codec_id == AV_CODEC_ID_VC1 ? 32 : 0);
     slice->wNumberMBsInSlice   = s->mb_width * s->mb_height; /* XXX We assume 1 slice */
     slice->wQuantizerScaleCode = v->pq;
     slice->wBadSliceChopping   = 0;



More information about the ffmpeg-cvslog mailing list