Libav
mpeg_er.c
Go to the documentation of this file.
1 /*
2  * This file is part of Libav.
3  *
4  * Libav 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  * Libav 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 Libav; 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  if (!src) {
28  dst->f = NULL;
29  dst->tf = NULL;
30  return;
31  }
32 
33  dst->f = src->f;
34  dst->tf = &src->tf;
35 
36  for (i = 0; i < 2; i++) {
37  dst->motion_val[i] = src->motion_val[i];
38  dst->ref_index[i] = src->ref_index[i];
39  }
40 
41  dst->mb_type = src->mb_type;
42  dst->field_picture = src->field_picture;
43 }
44 
46 {
47  ERContext *er = &s->er;
48 
52 
53  er->pp_time = s->pp_time;
54  er->pb_time = s->pb_time;
57 
59 }
int8_t * ref_index[2]
Definition: mpegvideo.h:116
int field_picture
whether or not the picture was encoded in separate fields
Definition: mpegvideo.h:133
uint32_t * mb_type
ERPicture last_pic
mpegvideo header.
uint16_t pp_time
ERPicture cur_pic
uint16_t pp_time
time distance between the last 2 p,s,i frames
Definition: mpegvideo.h:505
ThreadFrame tf
Definition: mpegvideo.h:101
int partitioned_frame
is current frame partitioned
Definition: mpegvideo.h:518
ERContext er
Definition: mpegvideo.h:638
ThreadFrame * tf
int quarter_sample
1->qpel, 0->half pel ME/MC
Definition: mpegvideo.h:514
static void set_erpic(ERPicture *dst, Picture *src)
Definition: mpeg_er.c:23
int16_t(*[2] motion_val)[2]
Definition: mpegvideo.h:107
Picture * current_picture_ptr
pointer to the current picture
Definition: mpegvideo.h:310
void ff_mpeg_er_frame_start(MpegEncContext *s)
Definition: mpeg_er.c:45
Picture.
Definition: mpegvideo.h:99
uint16_t pb_time
NULL
Definition: eval.c:55
ERPicture next_pic
struct AVFrame * f
Definition: mpegvideo.h:100
int8_t * ref_index[2]
MpegEncContext.
Definition: mpegvideo.h:204
Picture * next_picture_ptr
pointer to the next picture (for bidir pred)
Definition: mpegvideo.h:309
int partitioned_frame
Picture * last_picture_ptr
pointer to the previous picture.
Definition: mpegvideo.h:308
AVFrame * f
int16_t(*[2] motion_val)[2]
void ff_er_frame_start(ERContext *s)
uint32_t * mb_type
types and macros are defined in mpegutils.h
Definition: mpegvideo.h:110
uint16_t pb_time
time distance between the last b and p,s,i frame
Definition: mpegvideo.h:506