FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
mpeg_er.c
Go to the documentation of this file.
1 /*
2  * This file is part of FFmpeg.
3  *
4  * FFmpeg is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * FFmpeg is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with FFmpeg; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17  */
18 
19 #include "error_resilience.h"
20 #include "mpegvideo.h"
21 #include "mpeg_er.h"
22 
23 static void set_erpic(ERPicture *dst, Picture *src)
24 {
25  int i;
26 
27  memset(dst, 0, sizeof(*dst));
28  if (!src) {
29  dst->f = NULL;
30  dst->tf = NULL;
31  return;
32  }
33 
34  dst->f = src->f;
35  dst->tf = &src->tf;
36 
37  for (i = 0; i < 2; i++) {
38  dst->motion_val[i] = src->motion_val[i];
39  dst->ref_index[i] = src->ref_index[i];
40  }
41 
42  dst->mb_type = src->mb_type;
43  dst->field_picture = src->field_picture;
44 }
45 
47 {
48  ERContext *er = &s->er;
49 
53 
54  er->pp_time = s->pp_time;
55  er->pb_time = s->pb_time;
58 
60 }