diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-03-17 04:59:21 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-03-17 05:08:46 +0100 |
commit | 533bc4c0a30db6a6a4b75bb1094ad2e25f11ae51 (patch) | |
tree | bbbbf157d57e32706fb35e0add19bfb9f7e8bcc5 /libavcodec/mpegvideo.c | |
parent | 3dab9e804afe7f971a2dc6089c5615628fb4d81c (diff) | |
parent | d66e305bd1b4f3e91ae4e7e549148509d0811672 (diff) | |
download | ffmpeg-533bc4c0a30db6a6a4b75bb1094ad2e25f11ae51.tar.gz |
Merge commit 'd66e305bd1b4f3e91ae4e7e549148509d0811672'
* commit 'd66e305bd1b4f3e91ae4e7e549148509d0811672':
er: move relevant fields from Picture to ERPicture
Conflicts:
libavcodec/error_resilience.c
libavcodec/h264.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/mpegvideo.c')
-rw-r--r-- | libavcodec/mpegvideo.c | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c index 148484cb7c..6402a1f3d4 100644 --- a/libavcodec/mpegvideo.c +++ b/libavcodec/mpegvideo.c @@ -3195,13 +3195,32 @@ void ff_MPV_report_decode_progress(MpegEncContext *s) } #if CONFIG_ERROR_RESILIENCE +void ff_mpeg_set_erpic(ERPicture *dst, Picture *src) +{ + int i; + + if (!src) + return; + + dst->f = &src->f; + dst->tf = &src->tf; + + for (i = 0; i < 2; i++) { + dst->motion_val[i] = src->motion_val[i]; + dst->ref_index[i] = src->ref_index[i]; + } + + dst->mb_type = src->mb_type; + dst->field_picture = src->field_picture; +} + void ff_mpeg_er_frame_start(MpegEncContext *s) { ERContext *er = &s->er; - er->cur_pic = s->current_picture_ptr; - er->last_pic = s->last_picture_ptr; - er->next_pic = s->next_picture_ptr; + ff_mpeg_set_erpic(&er->cur_pic, s->current_picture_ptr); + ff_mpeg_set_erpic(&er->next_pic, s->next_picture_ptr); + ff_mpeg_set_erpic(&er->last_pic, s->last_picture_ptr); er->pp_time = s->pp_time; er->pb_time = s->pb_time; |