dxva2_h264: fix reference field marking in long slice struct
authorHendrik Leppkes <h.leppkes@gmail.com>
Fri, 22 Jan 2016 12:50:42 +0000 (13:50 +0100)
committerHendrik Leppkes <h.leppkes@gmail.com>
Sat, 23 Jan 2016 12:29:46 +0000 (13:29 +0100)
Fixes artifacts in interlaced decoding on old Intel GPUs.

libavcodec/dxva2_h264.c

index 2f03114..61cce3a 100644 (file)
@@ -252,7 +252,7 @@ static void fill_slice_long(AVCodecContext *avctx, DXVA_Slice_H264_Long *slice,
                 else
                     index = get_refpic_index(pp, ff_dxva2_get_surface_index(avctx, ctx, r->f));
                 fill_picture_entry(&slice->RefPicList[list][i], index,
                 else
                     index = get_refpic_index(pp, ff_dxva2_get_surface_index(avctx, ctx, r->f));
                 fill_picture_entry(&slice->RefPicList[list][i], index,
-                                   r->reference == PICT_BOTTOM_FIELD);
+                                   sl->ref_list[list][i].reference == PICT_BOTTOM_FIELD);
                 for (plane = 0; plane < 3; plane++) {
                     int w, o;
                     if (plane == 0 && sl->luma_weight_flag[list]) {
                 for (plane = 0; plane < 3; plane++) {
                     int w, o;
                     if (plane == 0 && sl->luma_weight_flag[list]) {