[FFmpeg-cvslog] r25538 - trunk/libavcodec/dxva2_h264.c

fenrir subversion
Thu Oct 21 20:39:57 CEST 2010


Author: fenrir
Date: Thu Oct 21 20:39:57 2010
New Revision: 25538

Log:
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).

Modified:
   trunk/libavcodec/dxva2_h264.c

Modified: trunk/libavcodec/dxva2_h264.c
==============================================================================
--- trunk/libavcodec/dxva2_h264.c	Thu Oct 21 14:25:12 2010	(r25537)
+++ trunk/libavcodec/dxva2_h264.c	Thu Oct 21 20:39:57 2010	(r25538)
@@ -194,7 +194,7 @@ static void fill_slice_long(AVCodecConte
 
     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;



More information about the ffmpeg-cvslog mailing list