[FFmpeg-cvslog] avcodec/vaapi: fix pointer types after H264Picture changes
Michael Niedermayer
git at videolan.org
Mon Mar 17 13:09:36 CET 2014
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Mon Mar 17 12:45:36 2014 +0100| [377cfc28a226a66d6f872f0a16b3811208011ebc] | committer: Michael Niedermayer
avcodec/vaapi: fix pointer types after H264Picture changes
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=377cfc28a226a66d6f872f0a16b3811208011ebc
---
libavcodec/vaapi_h264.c | 6 +++---
libavcodec/vaapi_internal.h | 4 ++--
libavcodec/vaapi_mpeg.c | 2 +-
libavcodec/vaapi_mpeg2.c | 4 ++--
libavcodec/vaapi_mpeg4.c | 4 ++--
libavcodec/vaapi_vc1.c | 4 ++--
6 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/libavcodec/vaapi_h264.c b/libavcodec/vaapi_h264.c
index 383e998..8eb8a66 100644
--- a/libavcodec/vaapi_h264.c
+++ b/libavcodec/vaapi_h264.c
@@ -59,7 +59,7 @@ static void fill_vaapi_pic(VAPictureH264 *va_pic,
pic_structure = pic->reference;
pic_structure &= PICT_FRAME; /* PICT_TOP_FIELD|PICT_BOTTOM_FIELD */
- va_pic->picture_id = ff_vaapi_get_surface_id(pic);
+ va_pic->picture_id = ff_vaapi_get_surface_id(&pic->f);
va_pic->frame_idx = pic->long_ref ? pic->pic_id : pic->frame_num;
va_pic->flags = 0;
@@ -99,7 +99,7 @@ static int dpb_add(DPB *dpb, H264Picture *pic)
for (i = 0; i < dpb->size; i++) {
VAPictureH264 * const va_pic = &dpb->va_pics[i];
- if (va_pic->picture_id == ff_vaapi_get_surface_id(pic)) {
+ if (va_pic->picture_id == ff_vaapi_get_surface_id(&pic->f)) {
VAPictureH264 temp_va_pic;
fill_vaapi_pic(&temp_va_pic, pic, 0);
@@ -299,7 +299,7 @@ static int vaapi_h264_end_frame(AVCodecContext *avctx)
if (ret < 0)
goto finish;
- ret = ff_vaapi_render_picture(vactx, ff_vaapi_get_surface_id(h->cur_pic_ptr));
+ ret = ff_vaapi_render_picture(vactx, ff_vaapi_get_surface_id(&h->cur_pic_ptr->f));
if (ret < 0)
goto finish;
diff --git a/libavcodec/vaapi_internal.h b/libavcodec/vaapi_internal.h
index 1ac0e9f..eb23d3b 100644
--- a/libavcodec/vaapi_internal.h
+++ b/libavcodec/vaapi_internal.h
@@ -36,9 +36,9 @@
*/
/** Extract VASurfaceID from a Picture */
-static inline VASurfaceID ff_vaapi_get_surface_id(Picture *pic)
+static inline VASurfaceID ff_vaapi_get_surface_id(AVFrame *frm)
{
- return (uintptr_t)pic->f.data[3];
+ return (uintptr_t)frm->data[3];
}
/** Common AVHWAccel.end_frame() implementation */
diff --git a/libavcodec/vaapi_mpeg.c b/libavcodec/vaapi_mpeg.c
index 5afa406..0b9958d 100644
--- a/libavcodec/vaapi_mpeg.c
+++ b/libavcodec/vaapi_mpeg.c
@@ -35,7 +35,7 @@ int ff_vaapi_mpeg_end_frame(AVCodecContext *avctx)
goto finish;
ret = ff_vaapi_render_picture(vactx,
- ff_vaapi_get_surface_id(s->current_picture_ptr));
+ ff_vaapi_get_surface_id(&s->current_picture_ptr->f));
if (ret < 0)
goto finish;
diff --git a/libavcodec/vaapi_mpeg2.c b/libavcodec/vaapi_mpeg2.c
index 529cece..af6e9d2 100644
--- a/libavcodec/vaapi_mpeg2.c
+++ b/libavcodec/vaapi_mpeg2.c
@@ -73,10 +73,10 @@ static int vaapi_mpeg2_start_frame(AVCodecContext *avctx, av_unused const uint8_
switch (s->pict_type) {
case AV_PICTURE_TYPE_B:
- pic_param->backward_reference_picture = ff_vaapi_get_surface_id(&s->next_picture);
+ pic_param->backward_reference_picture = ff_vaapi_get_surface_id(&s->next_picture.f);
// fall-through
case AV_PICTURE_TYPE_P:
- pic_param->forward_reference_picture = ff_vaapi_get_surface_id(&s->last_picture);
+ pic_param->forward_reference_picture = ff_vaapi_get_surface_id(&s->last_picture.f);
break;
}
diff --git a/libavcodec/vaapi_mpeg4.c b/libavcodec/vaapi_mpeg4.c
index 9ed007f..c2eb9e3 100644
--- a/libavcodec/vaapi_mpeg4.c
+++ b/libavcodec/vaapi_mpeg4.c
@@ -95,9 +95,9 @@ static int vaapi_mpeg4_start_frame(AVCodecContext *avctx, av_unused const uint8_
pic_param->TRD = s->pp_time;
if (s->pict_type == AV_PICTURE_TYPE_B)
- pic_param->backward_reference_picture = ff_vaapi_get_surface_id(&s->next_picture);
+ pic_param->backward_reference_picture = ff_vaapi_get_surface_id(&s->next_picture.f);
if (s->pict_type != AV_PICTURE_TYPE_I)
- pic_param->forward_reference_picture = ff_vaapi_get_surface_id(&s->last_picture);
+ pic_param->forward_reference_picture = ff_vaapi_get_surface_id(&s->last_picture.f);
/* Fill in VAIQMatrixBufferMPEG4 */
/* Only the first inverse quantisation method uses the weighting matrices */
diff --git a/libavcodec/vaapi_vc1.c b/libavcodec/vaapi_vc1.c
index 266fa3c..ca49d17 100644
--- a/libavcodec/vaapi_vc1.c
+++ b/libavcodec/vaapi_vc1.c
@@ -258,10 +258,10 @@ static int vaapi_vc1_start_frame(AVCodecContext *avctx, av_unused const uint8_t
switch (s->pict_type) {
case AV_PICTURE_TYPE_B:
- pic_param->backward_reference_picture = ff_vaapi_get_surface_id(&s->next_picture);
+ pic_param->backward_reference_picture = ff_vaapi_get_surface_id(&s->next_picture.f);
// fall-through
case AV_PICTURE_TYPE_P:
- pic_param->forward_reference_picture = ff_vaapi_get_surface_id(&s->last_picture);
+ pic_param->forward_reference_picture = ff_vaapi_get_surface_id(&s->last_picture.f);
break;
}
More information about the ffmpeg-cvslog
mailing list