dxva2_vc1: set refdist value according to spec
authorHendrik Leppkes <h.leppkes@gmail.com>
Thu, 12 Dec 2013 20:12:48 +0000 (21:12 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 1 Jan 2014 01:57:16 +0000 (02:57 +0100)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/dxva2_vc1.c

index 2e9a00e..6ff5765 100644 (file)
@@ -122,7 +122,7 @@ static void fill_picture_parameters(AVCodecContext *avctx,
                                   (v->range_mapuv_flag << 3) |
                                   (v->range_mapuv          );
     pp->bPicBinPB               = 0;
                                   (v->range_mapuv_flag << 3) |
                                   (v->range_mapuv          );
     pp->bPicBinPB               = 0;
-    pp->bMV_RPS                 = 0;
+    pp->bMV_RPS                 = (v->fcm == ILACE_FIELD && pp->bPicBackwardPrediction) ? v->refdist + 9 : 0;
     pp->bReservedBits           = 0;
     if (s->picture_structure == PICT_FRAME) {
         pp->wBitstreamFcodes        = v->lumscale;
     pp->bReservedBits           = 0;
     if (s->picture_structure == PICT_FRAME) {
         pp->wBitstreamFcodes        = v->lumscale;