diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-03-31 14:24:10 +0000 |
---|---|---|
committer | Vittorio Giovara <vittorio.giovara@gmail.com> | 2014-04-01 00:10:15 +0200 |
commit | 678e455f1dc09265464b13d936d9fda62bc2bf43 (patch) | |
tree | 613a3991d62c69b46712610ec1c1e551420d450f /libavcodec/dxva2_h264.c | |
parent | f94371b1db89bf65173a763a49175ce549466602 (diff) | |
download | ffmpeg-678e455f1dc09265464b13d936d9fda62bc2bf43.tar.gz |
dxva2: Directly use AVFrames
The assumption of (MPEG) Picture and H264Picture layout matching might
not hold true in the future.
Signed-off-by: Hendrik Leppkes <h.leppkes@gmail.com>
Diffstat (limited to 'libavcodec/dxva2_h264.c')
-rw-r--r-- | libavcodec/dxva2_h264.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/dxva2_h264.c b/libavcodec/dxva2_h264.c index 663eb7d2cc..2e6f57de69 100644 --- a/libavcodec/dxva2_h264.c +++ b/libavcodec/dxva2_h264.c @@ -51,7 +51,7 @@ static void fill_picture_parameters(struct dxva_context *ctx, const H264Context memset(pp, 0, sizeof(*pp)); /* Configure current picture */ fill_picture_entry(&pp->CurrPic, - ff_dxva2_get_surface_index(ctx, current_picture), + ff_dxva2_get_surface_index(ctx, ¤t_picture->f), h->picture_structure == PICT_BOTTOM_FIELD); /* Configure the set of references */ pp->UsedForReferenceFlags = 0; @@ -67,7 +67,7 @@ static void fill_picture_parameters(struct dxva_context *ctx, const H264Context } if (r) { fill_picture_entry(&pp->RefFrameList[i], - ff_dxva2_get_surface_index(ctx, r), + ff_dxva2_get_surface_index(ctx, &r->f), r->long_ref != 0); if ((r->reference & PICT_TOP_FIELD) && r->field_poc[0] != INT_MAX) @@ -230,7 +230,7 @@ static void fill_slice_long(AVCodecContext *avctx, DXVA_Slice_H264_Long *slice, const H264Picture *r = &h->ref_list[list][i]; unsigned plane; fill_picture_entry(&slice->RefPicList[list][i], - ff_dxva2_get_surface_index(ctx, r), + ff_dxva2_get_surface_index(ctx, &r->f), r->reference == PICT_BOTTOM_FIELD); for (plane = 0; plane < 3; plane++) { int w, o; @@ -432,7 +432,7 @@ static int dxva2_h264_end_frame(AVCodecContext *avctx) if (ctx_pic->slice_count <= 0 || ctx_pic->bitstream_size <= 0) return -1; - ret = ff_dxva2_common_end_frame(avctx, h->cur_pic_ptr, + ret = ff_dxva2_common_end_frame(avctx, &h->cur_pic_ptr->f, &ctx_pic->pp, sizeof(ctx_pic->pp), &ctx_pic->qm, sizeof(ctx_pic->qm), commit_bitstream_and_slice_buffer); |