Originally committed as revision 16067 to svn://svn.ffmpeg.org/ffmpeg/trunk
Aurelien Jacobs authored on 2008/12/12 07:34:14... | ... |
@@ -25,35 +25,35 @@ |
25 | 25 |
|
26 | 26 |
typedef struct { |
27 | 27 |
AVFrame picture; |
28 |
-} avs_context_t; |
|
28 |
+} AvsContext; |
|
29 | 29 |
|
30 | 30 |
typedef enum { |
31 | 31 |
AVS_VIDEO = 0x01, |
32 | 32 |
AVS_AUDIO = 0x02, |
33 | 33 |
AVS_PALETTE = 0x03, |
34 | 34 |
AVS_GAME_DATA = 0x04, |
35 |
-} avs_block_type_t; |
|
35 |
+} AvsBlockType; |
|
36 | 36 |
|
37 | 37 |
typedef enum { |
38 | 38 |
AVS_I_FRAME = 0x00, |
39 | 39 |
AVS_P_FRAME_3X3 = 0x01, |
40 | 40 |
AVS_P_FRAME_2X2 = 0x02, |
41 | 41 |
AVS_P_FRAME_2X3 = 0x03, |
42 |
-} avs_video_sub_type_t; |
|
42 |
+} AvsVideoSubType; |
|
43 | 43 |
|
44 | 44 |
|
45 | 45 |
static int |
46 | 46 |
avs_decode_frame(AVCodecContext * avctx, |
47 | 47 |
void *data, int *data_size, const uint8_t * buf, int buf_size) |
48 | 48 |
{ |
49 |
- avs_context_t *const avs = avctx->priv_data; |
|
49 |
+ AvsContext *const avs = avctx->priv_data; |
|
50 | 50 |
AVFrame *picture = data; |
51 | 51 |
AVFrame *const p = (AVFrame *) & avs->picture; |
52 | 52 |
const uint8_t *table, *vect; |
53 | 53 |
uint8_t *out; |
54 | 54 |
int i, j, x, y, stride, vect_w = 3, vect_h = 3; |
55 |
- int sub_type; |
|
56 |
- avs_block_type_t type; |
|
55 |
+ AvsVideoSubType sub_type; |
|
56 |
+ AvsBlockType type; |
|
57 | 57 |
GetBitContext change_map; |
58 | 58 |
|
59 | 59 |
if (avctx->reget_buffer(avctx, p)) { |
... | ... |
@@ -152,7 +152,7 @@ AVCodec avs_decoder = { |
152 | 152 |
"avs", |
153 | 153 |
CODEC_TYPE_VIDEO, |
154 | 154 |
CODEC_ID_AVS, |
155 |
- sizeof(avs_context_t), |
|
155 |
+ sizeof(AvsContext), |
|
156 | 156 |
avs_decode_init, |
157 | 157 |
NULL, |
158 | 158 |
NULL, |
... | ... |
@@ -24,7 +24,7 @@ |
24 | 24 |
|
25 | 25 |
|
26 | 26 |
typedef struct avs_format { |
27 |
- voc_dec_context_t voc; |
|
27 |
+ VocDecContext voc; |
|
28 | 28 |
AVStream *st_video; |
29 | 29 |
AVStream *st_audio; |
30 | 30 |
int width; |
... | ... |
@@ -34,7 +34,7 @@ typedef struct avs_format { |
34 | 34 |
int nb_frames; |
35 | 35 |
int remaining_frame_size; |
36 | 36 |
int remaining_audio_size; |
37 |
-} avs_format_t; |
|
37 |
+} AvsFormat; |
|
38 | 38 |
|
39 | 39 |
typedef enum avs_block_type { |
40 | 40 |
AVS_NONE = 0x00, |
... | ... |
@@ -42,7 +42,7 @@ typedef enum avs_block_type { |
42 | 42 |
AVS_AUDIO = 0x02, |
43 | 43 |
AVS_PALETTE = 0x03, |
44 | 44 |
AVS_GAME_DATA = 0x04, |
45 |
-} avs_block_type_t; |
|
45 |
+} AvsBlockType; |
|
46 | 46 |
|
47 | 47 |
static int avs_probe(AVProbeData * p) |
48 | 48 |
{ |
... | ... |
@@ -57,7 +57,7 @@ static int avs_probe(AVProbeData * p) |
57 | 57 |
|
58 | 58 |
static int avs_read_header(AVFormatContext * s, AVFormatParameters * ap) |
59 | 59 |
{ |
60 |
- avs_format_t *avs = s->priv_data; |
|
60 |
+ AvsFormat *avs = s->priv_data; |
|
61 | 61 |
|
62 | 62 |
s->ctx_flags |= AVFMTCTX_NOHEADER; |
63 | 63 |
|
... | ... |
@@ -82,10 +82,10 @@ static int avs_read_header(AVFormatContext * s, AVFormatParameters * ap) |
82 | 82 |
|
83 | 83 |
static int |
84 | 84 |
avs_read_video_packet(AVFormatContext * s, AVPacket * pkt, |
85 |
- avs_block_type_t type, int sub_type, int size, |
|
85 |
+ AvsBlockType type, int sub_type, int size, |
|
86 | 86 |
uint8_t * palette, int palette_size) |
87 | 87 |
{ |
88 |
- avs_format_t *avs = s->priv_data; |
|
88 |
+ AvsFormat *avs = s->priv_data; |
|
89 | 89 |
int ret; |
90 | 90 |
|
91 | 91 |
ret = av_new_packet(pkt, size + palette_size); |
... | ... |
@@ -120,7 +120,7 @@ avs_read_video_packet(AVFormatContext * s, AVPacket * pkt, |
120 | 120 |
|
121 | 121 |
static int avs_read_audio_packet(AVFormatContext * s, AVPacket * pkt) |
122 | 122 |
{ |
123 |
- avs_format_t *avs = s->priv_data; |
|
123 |
+ AvsFormat *avs = s->priv_data; |
|
124 | 124 |
int ret, size; |
125 | 125 |
|
126 | 126 |
size = url_ftell(s->pb); |
... | ... |
@@ -141,9 +141,9 @@ static int avs_read_audio_packet(AVFormatContext * s, AVPacket * pkt) |
141 | 141 |
|
142 | 142 |
static int avs_read_packet(AVFormatContext * s, AVPacket * pkt) |
143 | 143 |
{ |
144 |
- avs_format_t *avs = s->priv_data; |
|
144 |
+ AvsFormat *avs = s->priv_data; |
|
145 | 145 |
int sub_type = 0, size = 0; |
146 |
- avs_block_type_t type = AVS_NONE; |
|
146 |
+ AvsBlockType type = AVS_NONE; |
|
147 | 147 |
int palette_size = 0; |
148 | 148 |
uint8_t palette[4 + 3 * 256]; |
149 | 149 |
int ret; |
... | ... |
@@ -218,7 +218,7 @@ static int avs_read_close(AVFormatContext * s) |
218 | 218 |
AVInputFormat avs_demuxer = { |
219 | 219 |
"avs", |
220 | 220 |
NULL_IF_CONFIG_SMALL("AVS format"), |
221 |
- sizeof(avs_format_t), |
|
221 |
+ sizeof(AvsFormat), |
|
222 | 222 |
avs_probe, |
223 | 223 |
avs_read_header, |
224 | 224 |
avs_read_packet, |
... | ... |
@@ -27,7 +27,7 @@ |
27 | 27 |
|
28 | 28 |
typedef struct voc_dec_context { |
29 | 29 |
int remaining_size; |
30 |
-} voc_dec_context_t; |
|
30 |
+} VocDecContext; |
|
31 | 31 |
|
32 | 32 |
typedef enum voc_type { |
33 | 33 |
VOC_TYPE_EOF = 0x00, |
... | ... |
@@ -40,7 +40,7 @@ typedef enum voc_type { |
40 | 40 |
VOC_TYPE_REPETITION_END = 0x07, |
41 | 41 |
VOC_TYPE_EXTENDED = 0x08, |
42 | 42 |
VOC_TYPE_NEW_VOICE_DATA = 0x09, |
43 |
-} voc_type_t; |
|
43 |
+} VocType; |
|
44 | 44 |
|
45 | 45 |
extern const unsigned char ff_voc_magic[21]; |
46 | 46 |
extern const AVCodecTag ff_voc_codec_tags[]; |
... | ... |
@@ -38,7 +38,7 @@ static int voc_probe(AVProbeData *p) |
38 | 38 |
|
39 | 39 |
static int voc_read_header(AVFormatContext *s, AVFormatParameters *ap) |
40 | 40 |
{ |
41 |
- voc_dec_context_t *voc = s->priv_data; |
|
41 |
+ VocDecContext *voc = s->priv_data; |
|
42 | 42 |
ByteIOContext *pb = s->pb; |
43 | 43 |
int header_size; |
44 | 44 |
AVStream *st; |
... | ... |
@@ -62,10 +62,10 @@ static int voc_read_header(AVFormatContext *s, AVFormatParameters *ap) |
62 | 62 |
int |
63 | 63 |
voc_get_packet(AVFormatContext *s, AVPacket *pkt, AVStream *st, int max_size) |
64 | 64 |
{ |
65 |
- voc_dec_context_t *voc = s->priv_data; |
|
65 |
+ VocDecContext *voc = s->priv_data; |
|
66 | 66 |
AVCodecContext *dec = st->codec; |
67 | 67 |
ByteIOContext *pb = s->pb; |
68 |
- voc_type_t type; |
|
68 |
+ VocType type; |
|
69 | 69 |
int size; |
70 | 70 |
int sample_rate = 0; |
71 | 71 |
int channels = 1; |
... | ... |
@@ -137,7 +137,7 @@ static int voc_read_packet(AVFormatContext *s, AVPacket *pkt) |
137 | 137 |
AVInputFormat voc_demuxer = { |
138 | 138 |
"voc", |
139 | 139 |
NULL_IF_CONFIG_SMALL("Creative Voice file format"), |
140 |
- sizeof(voc_dec_context_t), |
|
140 |
+ sizeof(VocDecContext), |
|
141 | 141 |
voc_probe, |
142 | 142 |
voc_read_header, |
143 | 143 |
voc_read_packet, |
... | ... |
@@ -24,7 +24,7 @@ |
24 | 24 |
|
25 | 25 |
typedef struct voc_enc_context { |
26 | 26 |
int param_written; |
27 |
-} voc_enc_context_t; |
|
27 |
+} VocEncContext; |
|
28 | 28 |
|
29 | 29 |
static int voc_write_header(AVFormatContext *s) |
30 | 30 |
{ |
... | ... |
@@ -46,7 +46,7 @@ static int voc_write_header(AVFormatContext *s) |
46 | 46 |
|
47 | 47 |
static int voc_write_packet(AVFormatContext *s, AVPacket *pkt) |
48 | 48 |
{ |
49 |
- voc_enc_context_t *voc = s->priv_data; |
|
49 |
+ VocEncContext *voc = s->priv_data; |
|
50 | 50 |
AVCodecContext *enc = s->streams[0]->codec; |
51 | 51 |
ByteIOContext *pb = s->pb; |
52 | 52 |
|
... | ... |
@@ -93,7 +93,7 @@ AVOutputFormat voc_muxer = { |
93 | 93 |
NULL_IF_CONFIG_SMALL("Creative Voice file format"), |
94 | 94 |
"audio/x-voc", |
95 | 95 |
"voc", |
96 |
- sizeof(voc_enc_context_t), |
|
96 |
+ sizeof(VocEncContext), |
|
97 | 97 |
CODEC_ID_PCM_U8, |
98 | 98 |
CODEC_ID_NONE, |
99 | 99 |
voc_write_header, |