Commit 1c1e8bea authored by Rafaël Carré's avatar Rafaël Carré

win32 contribs: Fix dxva2 decoding for Intel cards

Tested on GMA HD, ATI/NVIDIA
Untested on GMA4500

Needs testing on more cards and samples before it is committed upstream
parent 3babb405
......@@ -1057,6 +1057,7 @@ ifdef HAVE_UCLIBC
patch -p0 < Patches/ffmpeg-svn-libavformat.patch
endif
ifdef HAVE_WIN32
patch -p0 < Patches/ffmpeg-dxva2_h264.patch
sed -i "s/std=c99/std=gnu99/" ffmpeg/configure
endif
else
......
diff -u ffmpeg/libavcodec/dxva2_h264.c ffmpeg/libavcodec/dxva2_h264.c
--- ffmpeg/libavcodec/dxva2_h264.c
+++ ffmpeg/libavcodec/dxva2_h264.c
@@ -194,7 +194,7 @@ static void fill_slice_long(AVCodecContext *avctx, DXVA_Slice_H264_Long *slice,
slice->first_mb_in_slice = (s->mb_y >> FIELD_OR_MBAFF_PICTURE) * s->mb_width + s->mb_x;
slice->NumMbsForSlice = 0; /* XXX it is set once we have all slices */
- slice->BitOffsetToSliceData = get_bits_count(&s->gb) + 8;
+ slice->BitOffsetToSliceData = get_bits_count(&s->gb);
slice->slice_type = ff_h264_get_slice_type(h);
if (h->slice_type_fixed)
slice->slice_type += 5;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment