mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
dxva2_vc1: fix decoding of BI frames
Signed-off-by: Anton Khirnov <anton@khirnov.net>
This commit is contained in:
parent
6efe180782
commit
b2b0aa70ea
@ -42,11 +42,11 @@ static void fill_picture_parameters(AVCodecContext *avctx,
|
|||||||
memset(pp, 0, sizeof(*pp));
|
memset(pp, 0, sizeof(*pp));
|
||||||
pp->wDecodedPictureIndex =
|
pp->wDecodedPictureIndex =
|
||||||
pp->wDeblockedPictureIndex = ff_dxva2_get_surface_index(ctx, current_picture);
|
pp->wDeblockedPictureIndex = ff_dxva2_get_surface_index(ctx, current_picture);
|
||||||
if (s->pict_type != AV_PICTURE_TYPE_I)
|
if (s->pict_type != AV_PICTURE_TYPE_I && !v->bi_type)
|
||||||
pp->wForwardRefPictureIndex = ff_dxva2_get_surface_index(ctx, &s->last_picture);
|
pp->wForwardRefPictureIndex = ff_dxva2_get_surface_index(ctx, &s->last_picture);
|
||||||
else
|
else
|
||||||
pp->wForwardRefPictureIndex = 0xffff;
|
pp->wForwardRefPictureIndex = 0xffff;
|
||||||
if (s->pict_type == AV_PICTURE_TYPE_B)
|
if (s->pict_type == AV_PICTURE_TYPE_B && !v->bi_type)
|
||||||
pp->wBackwardRefPictureIndex = ff_dxva2_get_surface_index(ctx, &s->next_picture);
|
pp->wBackwardRefPictureIndex = ff_dxva2_get_surface_index(ctx, &s->next_picture);
|
||||||
else
|
else
|
||||||
pp->wBackwardRefPictureIndex = 0xffff;
|
pp->wBackwardRefPictureIndex = 0xffff;
|
||||||
@ -69,8 +69,8 @@ static void fill_picture_parameters(AVCodecContext *avctx,
|
|||||||
if (s->picture_structure & PICT_BOTTOM_FIELD)
|
if (s->picture_structure & PICT_BOTTOM_FIELD)
|
||||||
pp->bPicStructure |= 0x02;
|
pp->bPicStructure |= 0x02;
|
||||||
pp->bSecondField = v->interlace && v->fcm != ILACE_FIELD && !s->first_field;
|
pp->bSecondField = v->interlace && v->fcm != ILACE_FIELD && !s->first_field;
|
||||||
pp->bPicIntra = s->pict_type == AV_PICTURE_TYPE_I;
|
pp->bPicIntra = s->pict_type == AV_PICTURE_TYPE_I || v->bi_type;
|
||||||
pp->bPicBackwardPrediction = s->pict_type == AV_PICTURE_TYPE_B;
|
pp->bPicBackwardPrediction = s->pict_type == AV_PICTURE_TYPE_B && !v->bi_type;
|
||||||
pp->bBidirectionalAveragingMode = (1 << 7) |
|
pp->bBidirectionalAveragingMode = (1 << 7) |
|
||||||
((ctx->cfg->ConfigIntraResidUnsigned != 0) << 6) |
|
((ctx->cfg->ConfigIntraResidUnsigned != 0) << 6) |
|
||||||
((ctx->cfg->ConfigResidDiffAccelerator != 0) << 5) |
|
((ctx->cfg->ConfigResidDiffAccelerator != 0) << 5) |
|
||||||
|
Loading…
Reference in New Issue
Block a user