diff options
author | Hendrik Leppkes <h.leppkes@gmail.com> | 2012-01-13 22:13:51 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-10-20 00:07:14 +0200 |
commit | b87ff3449662e4f6b8415471dd4b7c76f06fbcda (patch) | |
tree | 285b2d3f8ed445b744707138acdc51d04f00ae59 /libavcodec/dxva2_vc1.c | |
parent | 8fb8d539a4c594a58df226bc1bd7a4d149f39424 (diff) | |
download | ffmpeg-b87ff3449662e4f6b8415471dd4b7c76f06fbcda.tar.gz |
vc1: implement vc1 field interlaced dxva2 decoding
Tested-by: Gwenole Beauchesne <gb.devel@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/dxva2_vc1.c')
-rw-r--r-- | libavcodec/dxva2_vc1.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libavcodec/dxva2_vc1.c b/libavcodec/dxva2_vc1.c index e47db4d9c1..ed4836dc8b 100644 --- a/libavcodec/dxva2_vc1.c +++ b/libavcodec/dxva2_vc1.c @@ -68,7 +68,7 @@ static void fill_picture_parameters(AVCodecContext *avctx, pp->bPicStructure |= 0x01; if (s->picture_structure & PICT_BOTTOM_FIELD) pp->bPicStructure |= 0x02; - pp->bSecondField = v->interlace && v->fcm != ILACE_FIELD && !s->first_field; + pp->bSecondField = v->interlace && v->fcm == ILACE_FIELD && v->second_field; pp->bPicIntra = s->pict_type == AV_PICTURE_TYPE_I || v->bi_type; pp->bPicBackwardPrediction = s->pict_type == AV_PICTURE_TYPE_B && !v->bi_type; pp->bBidirectionalAveragingMode = (1 << 7) | @@ -183,8 +183,11 @@ static int commit_bitstream_and_slice_buffer(AVCodecContext *avctx, result = data_size <= dxva_size ? 0 : -1; if (!result) { - if (start_code_size > 0) + if (start_code_size > 0) { memcpy(dxva_data, start_code, start_code_size); + if (v->second_field) + dxva_data[3] = 0x0c; + } memcpy(dxva_data + start_code_size, ctx_pic->bitstream + slice->dwSliceDataLocation, slice_size); if (padding > 0) |