This source file includes following definitions.
- set_erpic
- ff_mpeg_er_frame_start
#include "error_resilience.h"
#include "mpegvideo.h"
#include "mpeg_er.h"
static void set_erpic(ERPicture *dst, Picture *src)
{
int i;
memset(dst, 0, sizeof(*dst));
if (!src) {
dst->f = NULL;
dst->tf = NULL;
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;
set_erpic(&er->cur_pic, s->current_picture_ptr);
set_erpic(&er->next_pic, s->next_picture_ptr);
set_erpic(&er->last_pic, s->last_picture_ptr);
er->pp_time = s->pp_time;
er->pb_time = s->pb_time;
er->quarter_sample = s->quarter_sample;
er->partitioned_frame = s->partitioned_frame;
ff_er_frame_start(er);
}