dxva2_vc1: include the start code in wMBbitOffset

This resolves a decoding failure on Intel GPUs.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
pull/293/head
Hendrik Leppkes 11 years ago committed by Michael Niedermayer
parent 930f67b712
commit 61ff0431ba
  1. 2
      libavcodec/dxva2_vc1.c

@ -168,7 +168,7 @@ static void fill_slice(AVCodecContext *avctx, DXVA_SliceInfo *slice,
slice->dwSliceDataLocation = position; slice->dwSliceDataLocation = position;
slice->bStartCodeBitOffset = 0; slice->bStartCodeBitOffset = 0;
slice->bReservedBits = (s->pict_type == AV_PICTURE_TYPE_B && !v->bi_type) ? v->bfraction_lut_index + 9 : 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->wNumberMBsInSlice = s->mb_width * s->mb_height; /* XXX We assume 1 slice */
slice->wQuantizerScaleCode = v->pq; slice->wQuantizerScaleCode = v->pq;
slice->wBadSliceChopping = 0; slice->wBadSliceChopping = 0;

Loading…
Cancel
Save