error_resilience.h
Go to the documentation of this file.
1 /*
2  *
3  * This file is part of FFmpeg.
4  *
5  * FFmpeg is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * FFmpeg is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with FFmpeg; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18  */
19 
20 #ifndef AVCODEC_ERROR_RESILIENCE_H
21 #define AVCODEC_ERROR_RESILIENCE_H
22 
23 #include <stdint.h>
24 
25 #include "avcodec.h"
26 #include "dsputil.h"
27 
28 ///< current MB is the first after a resync marker
29 #define VP_START 1
30 #define ER_AC_ERROR 2
31 #define ER_DC_ERROR 4
32 #define ER_MV_ERROR 8
33 #define ER_AC_END 16
34 #define ER_DC_END 32
35 #define ER_MV_END 64
36 
37 #define ER_MB_ERROR (ER_AC_ERROR|ER_DC_ERROR|ER_MV_ERROR)
38 #define ER_MB_END (ER_AC_END|ER_DC_END|ER_MV_END)
39 
40 typedef struct ERContext {
43 
45  int mb_num;
47  int mb_stride;
48  int b8_stride;
49 
53  int16_t *dc_val[3];
56  int mv[2][4][2];
57 
58  struct Picture *cur_pic;
59  struct Picture *last_pic;
60  struct Picture *next_pic;
61 
62  uint16_t pp_time;
63  uint16_t pb_time;
66  int ref_count;
67 
68  void (*decode_mb)(void *opaque, int ref, int mv_dir, int mv_type,
69  int (*mv)[2][4][2],
70  int mb_x, int mb_y, int mb_intra, int mb_skipped);
71  void *opaque;
72 } ERContext;
73 
76 void ff_er_add_slice(ERContext *s, int startx, int starty, int endx, int endy,
77  int status);
78 
79 #endif /* AVCODEC_ERROR_RESILIENCE_H */
const char * s
Definition: avisynth_c.h:668
FIXME Range Coding of cr are ref
Definition: snow.txt:367
uint16_t pp_time
uint8_t
struct ERContext ERContext
struct Picture * next_pic
external API header
uint8_t * mbintra_table
int * mb_index2xy
uint8_t * error_status_table
struct Picture * last_pic
uint8_t * er_temp_buffer
void ff_er_frame_end(ERContext *s)
Picture.
Definition: mpegvideo.h:97
uint16_t pb_time
DSPContext * dsp
struct Picture * cur_pic
typedef void(RENAME(mix_any_func_type))
main external API structure.
void ff_er_frame_start(ERContext *s)
AVCodecContext * avctx
void ff_er_add_slice(ERContext *s, int startx, int starty, int endx, int endy, int status)
Add a slice.
int partitioned_frame
int16_t * dc_val[3]
DSP utils.
int mv[2][4][2]
uint8_t * mbskip_table
void(* decode_mb)(void *opaque, int ref, int mv_dir, int mv_type, int(*mv)[2][4][2], int mb_x, int mb_y, int mb_intra, int mb_skipped)
DSPContext.
Definition: dsputil.h:127