Main Page
Related Pages
Modules
Data Structures
Files
Examples
File List
Globals
libavcodec
rv34.h
Go to the documentation of this file.
1
/*
2
* RV30/40 decoder common data declarations
3
* Copyright (c) 2007 Mike Melanson, Konstantin Shishkov
4
*
5
* This file is part of Libav.
6
*
7
* Libav is free software; you can redistribute it and/or
8
* modify it under the terms of the GNU Lesser General Public
9
* License as published by the Free Software Foundation; either
10
* version 2.1 of the License, or (at your option) any later version.
11
*
12
* Libav is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15
* Lesser General Public License for more details.
16
*
17
* You should have received a copy of the GNU Lesser General Public
18
* License along with Libav; if not, write to the Free Software
19
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20
*/
21
27
#ifndef AVCODEC_RV34_H
28
#define AVCODEC_RV34_H
29
30
#include "
avcodec.h
"
31
#include "
dsputil.h
"
32
#include "
mpegvideo.h
"
33
34
#include "
h264pred.h
"
35
#include "
rv34dsp.h
"
36
37
#define MB_TYPE_SEPARATE_DC 0x01000000
38
#define IS_SEPARATE_DC(a) ((a) & MB_TYPE_SEPARATE_DC)
39
43
enum
RV40BlockTypes
{
44
RV34_MB_TYPE_INTRA
,
45
RV34_MB_TYPE_INTRA16x16
,
46
RV34_MB_P_16x16
,
47
RV34_MB_P_8x8
,
48
RV34_MB_B_FORWARD
,
49
RV34_MB_B_BACKWARD
,
50
RV34_MB_SKIP
,
51
RV34_MB_B_DIRECT
,
52
RV34_MB_P_16x8
,
53
RV34_MB_P_8x16
,
54
RV34_MB_B_BIDIR
,
55
RV34_MB_P_MIX16x16
,
56
RV34_MB_TYPES
57
};
58
64
typedef
struct
RV34VLC
{
65
VLC
cbppattern
[2];
66
VLC
cbp
[2][4];
67
VLC
first_pattern
[4];
68
VLC
second_pattern
[2];
69
VLC
third_pattern
[2];
70
VLC
coefficient
;
71
}
RV34VLC
;
72
74
typedef
struct
SliceInfo
{
75
int
type
;
76
int
quant
;
77
int
vlc_set
;
78
int
start
,
end
;
79
int
width
;
80
int
height
;
81
int
pts
;
82
}
SliceInfo
;
83
85
typedef
struct
RV34DecContext
{
86
MpegEncContext
s
;
87
RV34DSPContext
rdsp
;
88
int8_t *
intra_types_hist
;
89
int8_t *
intra_types
;
90
int
intra_types_stride
;
91
const
uint8_t *
luma_dc_quant_i
;
92
const
uint8_t *
luma_dc_quant_p
;
93
94
RV34VLC
*
cur_vlcs
;
95
H264PredContext
h
;
96
SliceInfo
si
;
97
98
int
*
mb_type
;
99
int
block_type
;
100
int
luma_vlc
;
101
int
chroma_vlc
;
102
int
is16
;
103
int
dmv
[4][2];
104
105
int
rv30
;
106
int
rpr
;
107
108
int
cur_pts
,
last_pts
,
next_pts
;
109
int
weight1
,
weight2
;
110
111
uint16_t *
cbp_luma
;
112
uint8_t *
cbp_chroma
;
113
int
*
deblock_coefs
;
114
116
DECLARE_ALIGNED
(8, uint32_t,
avail_cache
)[3*4];
117
119
uint8_t *
tmp_b_block_y
[2];
120
uint8_t *
tmp_b_block_uv
[4];
121
uint8_t *
tmp_b_block_base
;
122
123
int (*
parse_slice_header
)(
struct
RV34DecContext
*
r
,
GetBitContext
*gb,
SliceInfo
*
si
);
124
int (*
decode_mb_info
)(
struct
RV34DecContext
*
r
);
125
int (*
decode_intra_types
)(
struct
RV34DecContext
*
r
,
GetBitContext
*gb, int8_t *dst);
126
void
(*
loop_filter
)(
struct
RV34DecContext
*
r
,
int
row);
127
}
RV34DecContext
;
128
132
int
ff_rv34_get_start_offset
(
GetBitContext
*gb,
int
blocks);
133
int
ff_rv34_decode_init
(
AVCodecContext
*avctx);
134
int
ff_rv34_decode_frame
(
AVCodecContext
*avctx,
void
*
data
,
int
*data_size,
AVPacket
*avpkt);
135
int
ff_rv34_decode_end
(
AVCodecContext
*avctx);
136
int
ff_rv34_decode_init_thread_copy
(
AVCodecContext
*avctx);
137
int
ff_rv34_decode_update_thread_context
(
AVCodecContext
*dst,
const
AVCodecContext
*src);
138
139
#endif
/* AVCODEC_RV34_H */