Main Page
Related Pages
Modules
Data Structures
Files
Examples
File List
Globals
libavcodec
error_resilience.h
Go to the documentation of this file.
1
/*
2
*
3
* This file is part of Libav.
4
*
5
* Libav 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
* Libav 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 Libav; 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
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
{
41
AVCodecContext
*
avctx
;
42
DSPContext
*
dsp
;
43
44
int
*
mb_index2xy
;
45
int
mb_num
;
46
int
mb_width
,
mb_height
;
47
int
mb_stride
;
48
int
b8_stride
;
49
50
int
error_count
,
error_occurred
;
51
uint8_t
*
error_status_table
;
52
uint8_t
*
er_temp_buffer
;
53
int16_t *
dc_val
[3];
54
uint8_t
*
mbskip_table
;
55
uint8_t
*
mbintra_table
;
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
;
64
int
quarter_sample
;
65
int
partitioned_frame
;
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
74
void
ff_er_frame_start
(
ERContext
*s);
75
void
ff_er_frame_end
(
ERContext
*s);
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 */
ERContext
Definition:
error_resilience.h:40
ERContext::mb_height
int mb_height
Definition:
error_resilience.h:46
ERContext::opaque
void * opaque
Definition:
error_resilience.h:71
ERContext::pp_time
uint16_t pp_time
Definition:
error_resilience.h:62
ERContext::quarter_sample
int quarter_sample
Definition:
error_resilience.h:64
uint8_t
uint8_t
Definition:
audio_convert.c:194
ERContext::ref_count
int ref_count
Definition:
error_resilience.h:66
ERContext::mb_width
int mb_width
Definition:
error_resilience.h:46
ERContext
struct ERContext ERContext
ERContext::decode_mb
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)
Definition:
error_resilience.h:68
ERContext::next_pic
struct Picture * next_pic
Definition:
error_resilience.h:60
ERContext::mbintra_table
uint8_t * mbintra_table
Definition:
error_resilience.h:55
ERContext::mb_index2xy
int * mb_index2xy
Definition:
error_resilience.h:44
ERContext::error_status_table
uint8_t * error_status_table
Definition:
error_resilience.h:51
ERContext::last_pic
struct Picture * last_pic
Definition:
error_resilience.h:59
ERContext::er_temp_buffer
uint8_t * er_temp_buffer
Definition:
error_resilience.h:52
ff_er_frame_end
void ff_er_frame_end(ERContext *s)
Definition:
error_resilience.c:814
Picture
Picture.
Definition:
mpegvideo.h:95
ERContext::pb_time
uint16_t pb_time
Definition:
error_resilience.h:63
ERContext::dsp
DSPContext * dsp
Definition:
error_resilience.h:42
ERContext::cur_pic
struct Picture * cur_pic
Definition:
error_resilience.h:58
avcodec.h
external API header
AVCodecContext
main external API structure.
Definition:
avcodec.h:1339
void
static void(WINAPI *cond_broadcast)(pthread_cond_t *cond)
ff_er_frame_start
void ff_er_frame_start(ERContext *s)
Definition:
error_resilience.c:728
ERContext::avctx
AVCodecContext * avctx
Definition:
error_resilience.h:41
ff_er_add_slice
void ff_er_add_slice(ERContext *s, int startx, int starty, int endx, int endy, int status)
Add a slice.
Definition:
error_resilience.c:746
ERContext::partitioned_frame
int partitioned_frame
Definition:
error_resilience.h:65
ERContext::mb_stride
int mb_stride
Definition:
error_resilience.h:47
ERContext::dc_val
int16_t * dc_val[3]
Definition:
error_resilience.h:53
dsputil.h
DSP utils.
ERContext::mb_num
int mb_num
Definition:
error_resilience.h:45
ERContext::error_occurred
int error_occurred
Definition:
error_resilience.h:50
ERContext::mv
int mv[2][4][2]
Definition:
error_resilience.h:56
ERContext::b8_stride
int b8_stride
Definition:
error_resilience.h:48
ERContext::error_count
int error_count
Definition:
error_resilience.h:50
ERContext::mbskip_table
uint8_t * mbskip_table
Definition:
error_resilience.h:54
DSPContext
DSPContext.
Definition:
dsputil.h:194