summaryrefslogtreecommitdiff
path: root/libavcodec/dxva2_h264.c
diff options
context:
space:
mode:
authorRafaël Carré <rafael.carre@gmail.com>2010-10-21 18:39:57 +0000
committerLaurent Aimar <fenrir@videolan.org>2010-10-21 18:39:57 +0000
commitfc068f9f2762bf7b24ced5d02b93f4d098b6ce23 (patch)
treeb9a73cce81ad85eb809754b79f5142bd7cd47ba6 /libavcodec/dxva2_h264.c
parenteced8fa02ea237abd9c6a6e9287bb7524addb8f4 (diff)
Fixed DXVA_Slice_H264_Long::BitOffsetToSliceData value.
The 8 bits offset (nal unit type) should not be added, as the spec says: "This bit offset is the offset within the RBSP data for the slice, relative to the starting position of the slice_header() in the RBSP" This fixes DXVA2 support for intel GPU. Patch by Rafaël Carré (funman _AT_ videolan _DOT_ org). Originally committed as revision 25538 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/dxva2_h264.c')
-rw-r--r--libavcodec/dxva2_h264.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/dxva2_h264.c b/libavcodec/dxva2_h264.c
index 332a76302b..bdb42df3f7 100644
--- a/libavcodec/dxva2_h264.c
+++ b/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;