Originally committed as revision 4913 to svn://svn.ffmpeg.org/ffmpeg/trunk
Dieter authored on 2006/01/31 08:33:19... | ... |
@@ -3790,7 +3790,7 @@ static void show_formats(void) |
3790 | 3790 |
exit(1); |
3791 | 3791 |
} |
3792 | 3792 |
|
3793 |
-void parse_matrix_coeffs(uint16_t *dest, const char *str) |
|
3793 |
+static void parse_matrix_coeffs(uint16_t *dest, const char *str) |
|
3794 | 3794 |
{ |
3795 | 3795 |
int i; |
3796 | 3796 |
const char *p = str; |
... | ... |
@@ -3807,13 +3807,13 @@ void parse_matrix_coeffs(uint16_t *dest, const char *str) |
3807 | 3807 |
} |
3808 | 3808 |
} |
3809 | 3809 |
|
3810 |
-void opt_inter_matrix(const char *arg) |
|
3810 |
+static void opt_inter_matrix(const char *arg) |
|
3811 | 3811 |
{ |
3812 | 3812 |
inter_matrix = av_mallocz(sizeof(uint16_t) * 64); |
3813 | 3813 |
parse_matrix_coeffs(inter_matrix, arg); |
3814 | 3814 |
} |
3815 | 3815 |
|
3816 |
-void opt_intra_matrix(const char *arg) |
|
3816 |
+static void opt_intra_matrix(const char *arg) |
|
3817 | 3817 |
{ |
3818 | 3818 |
intra_matrix = av_mallocz(sizeof(uint16_t) * 64); |
3819 | 3819 |
parse_matrix_coeffs(intra_matrix, arg); |
... | ... |
@@ -28,12 +28,12 @@ static int dvdsub_init_decoder(AVCodecContext *avctx) |
28 | 28 |
return 0; |
29 | 29 |
} |
30 | 30 |
|
31 |
-uint16_t getbe16(const uint8_t *p) |
|
31 |
+static uint16_t getbe16(const uint8_t *p) |
|
32 | 32 |
{ |
33 | 33 |
return (p[0] << 8) | p[1]; |
34 | 34 |
} |
35 | 35 |
|
36 |
-int get_nibble(const uint8_t *buf, int nibble_offset) |
|
36 |
+static int get_nibble(const uint8_t *buf, int nibble_offset) |
|
37 | 37 |
{ |
38 | 38 |
return (buf[nibble_offset >> 1] >> ((1 - (nibble_offset & 1)) << 2)) & 0xf; |
39 | 39 |
} |
... | ... |
@@ -1576,7 +1576,7 @@ static void spatial_compose97i(DWTELEM *buffer, int width, int height, int strid |
1576 | 1576 |
spatial_compose97i_dy(&cs, buffer, width, height, stride); |
1577 | 1577 |
} |
1578 | 1578 |
|
1579 |
-void ff_spatial_idwt_buffered_init(dwt_compose_t *cs, slice_buffer * sb, int width, int height, int stride_line, int type, int decomposition_count){ |
|
1579 |
+static void ff_spatial_idwt_buffered_init(dwt_compose_t *cs, slice_buffer * sb, int width, int height, int stride_line, int type, int decomposition_count){ |
|
1580 | 1580 |
int level; |
1581 | 1581 |
for(level=decomposition_count-1; level>=0; level--){ |
1582 | 1582 |
switch(type){ |
... | ... |
@@ -1589,7 +1589,7 @@ void ff_spatial_idwt_buffered_init(dwt_compose_t *cs, slice_buffer * sb, int wid |
1589 | 1589 |
} |
1590 | 1590 |
} |
1591 | 1591 |
|
1592 |
-void ff_spatial_idwt_init(dwt_compose_t *cs, DWTELEM *buffer, int width, int height, int stride, int type, int decomposition_count){ |
|
1592 |
+static void ff_spatial_idwt_init(dwt_compose_t *cs, DWTELEM *buffer, int width, int height, int stride, int type, int decomposition_count){ |
|
1593 | 1593 |
int level; |
1594 | 1594 |
for(level=decomposition_count-1; level>=0; level--){ |
1595 | 1595 |
switch(type){ |
... | ... |
@@ -1601,7 +1601,7 @@ void ff_spatial_idwt_init(dwt_compose_t *cs, DWTELEM *buffer, int width, int hei |
1601 | 1601 |
} |
1602 | 1602 |
} |
1603 | 1603 |
|
1604 |
-void ff_spatial_idwt_slice(dwt_compose_t *cs, DWTELEM *buffer, int width, int height, int stride, int type, int decomposition_count, int y){ |
|
1604 |
+static void ff_spatial_idwt_slice(dwt_compose_t *cs, DWTELEM *buffer, int width, int height, int stride, int type, int decomposition_count, int y){ |
|
1605 | 1605 |
const int support = type==1 ? 3 : 5; |
1606 | 1606 |
int level; |
1607 | 1607 |
if(type==2) return; |
... | ... |
@@ -1619,7 +1619,7 @@ void ff_spatial_idwt_slice(dwt_compose_t *cs, DWTELEM *buffer, int width, int he |
1619 | 1619 |
} |
1620 | 1620 |
} |
1621 | 1621 |
|
1622 |
-void ff_spatial_idwt_buffered_slice(dwt_compose_t *cs, slice_buffer * slice_buf, int width, int height, int stride_line, int type, int decomposition_count, int y){ |
|
1622 |
+static void ff_spatial_idwt_buffered_slice(dwt_compose_t *cs, slice_buffer * slice_buf, int width, int height, int stride_line, int type, int decomposition_count, int y){ |
|
1623 | 1623 |
const int support = type==1 ? 3 : 5; |
1624 | 1624 |
int level; |
1625 | 1625 |
if(type==2) return; |
... | ... |
@@ -1637,7 +1637,7 @@ void ff_spatial_idwt_buffered_slice(dwt_compose_t *cs, slice_buffer * slice_buf, |
1637 | 1637 |
} |
1638 | 1638 |
} |
1639 | 1639 |
|
1640 |
-void ff_spatial_idwt(DWTELEM *buffer, int width, int height, int stride, int type, int decomposition_count){ |
|
1640 |
+static void ff_spatial_idwt(DWTELEM *buffer, int width, int height, int stride, int type, int decomposition_count){ |
|
1641 | 1641 |
if(type==2){ |
1642 | 1642 |
int level; |
1643 | 1643 |
for(level=decomposition_count-1; level>=0; level--) |
... | ... |
@@ -3776,7 +3776,7 @@ static int decode_header(SnowContext *s){ |
3776 | 3776 |
return 0; |
3777 | 3777 |
} |
3778 | 3778 |
|
3779 |
-static void init_qexp(){ |
|
3779 |
+static void init_qexp(void){ |
|
3780 | 3780 |
int i; |
3781 | 3781 |
double v=128; |
3782 | 3782 |
|
... | ... |
@@ -149,9 +149,9 @@ void av_free_static(void) |
149 | 149 |
* Call av_free_static automatically before it's too late |
150 | 150 |
*/ |
151 | 151 |
|
152 |
-static void do_free() __attribute__ ((destructor)); |
|
152 |
+static void do_free(void) __attribute__ ((destructor)); |
|
153 | 153 |
|
154 |
-static void do_free() |
|
154 |
+static void do_free(void) |
|
155 | 155 |
{ |
156 | 156 |
av_free_static(); |
157 | 157 |
} |
... | ... |
@@ -929,7 +929,7 @@ static int advanced_entry_point_process(AVCodecContext *avctx, GetBitContext *gb |
929 | 929 |
* @todo TODO: Take into account stride |
930 | 930 |
* @todo TODO: Allow use of external buffers ? |
931 | 931 |
*/ |
932 |
-int alloc_bitplane(BitPlane *bp, int width, int height) |
|
932 |
+static int alloc_bitplane(BitPlane *bp, int width, int height) |
|
933 | 933 |
{ |
934 | 934 |
if (!bp || bp->width<0 || bp->height<0) return -1; |
935 | 935 |
bp->data = (uint8_t*)av_malloc(width*height); |
... | ... |
@@ -942,7 +942,7 @@ int alloc_bitplane(BitPlane *bp, int width, int height) |
942 | 942 |
/** Free the bitplane's buffer |
943 | 943 |
* @param bp Bitplane which buffer is to free |
944 | 944 |
*/ |
945 |
-void free_bitplane(BitPlane *bp) |
|
945 |
+static void free_bitplane(BitPlane *bp) |
|
946 | 946 |
{ |
947 | 947 |
bp->width = bp->stride = bp->height = 0; |
948 | 948 |
if (bp->data) av_freep(&bp->data); |
... | ... |
@@ -1832,7 +1832,7 @@ static inline int vc9_pred_dc(MpegEncContext *s, int n, |
1832 | 1832 |
* @todo TODO: Process the blocks |
1833 | 1833 |
* @todo TODO: Use M$ MPEG-4 cbp prediction |
1834 | 1834 |
*/ |
1835 |
-int vc9_decode_block(VC9Context *v, DCTELEM block[64], int n, int coded, int mquant) |
|
1835 |
+static int vc9_decode_block(VC9Context *v, DCTELEM block[64], int n, int coded, int mquant) |
|
1836 | 1836 |
{ |
1837 | 1837 |
GetBitContext *gb = &v->s.gb; |
1838 | 1838 |
MpegEncContext *s = &v->s; |
... | ... |
@@ -1979,7 +1979,7 @@ static inline int vc9_coded_block_pred(MpegEncContext * s, int n, uint8_t **code |
1979 | 1979 |
/** Decode one I-frame MB (in Simple/Main profile) |
1980 | 1980 |
* @todo TODO: Extend to AP |
1981 | 1981 |
*/ |
1982 |
-int vc9_decode_i_mb(VC9Context *v, DCTELEM block[6][64]) |
|
1982 |
+static int vc9_decode_i_mb(VC9Context *v, DCTELEM block[6][64]) |
|
1983 | 1983 |
{ |
1984 | 1984 |
int i, cbp, val; |
1985 | 1985 |
uint8_t *coded_val; |
... | ... |
@@ -2013,7 +2013,7 @@ int vc9_decode_i_mb(VC9Context *v, DCTELEM block[6][64]) |
2013 | 2013 |
* @todo TODO: Extend to AP |
2014 | 2014 |
* @fixme FIXME: DC value for inter blocks not set |
2015 | 2015 |
*/ |
2016 |
-int vc9_decode_p_mb(VC9Context *v, DCTELEM block[6][64]) |
|
2016 |
+static int vc9_decode_p_mb(VC9Context *v, DCTELEM block[6][64]) |
|
2017 | 2017 |
{ |
2018 | 2018 |
MpegEncContext *s = &v->s; |
2019 | 2019 |
GetBitContext *gb = &s->gb; |
... | ... |
@@ -2160,7 +2160,7 @@ int vc9_decode_p_mb(VC9Context *v, DCTELEM block[6][64]) |
2160 | 2160 |
* @warning XXX: Used for decoding BI MBs |
2161 | 2161 |
* @fixme FIXME: DC value for inter blocks not set |
2162 | 2162 |
*/ |
2163 |
-int vc9_decode_b_mb(VC9Context *v, DCTELEM block[6][64]) |
|
2163 |
+static int vc9_decode_b_mb(VC9Context *v, DCTELEM block[6][64]) |
|
2164 | 2164 |
{ |
2165 | 2165 |
MpegEncContext *s = &v->s; |
2166 | 2166 |
GetBitContext *gb = &v->s.gb; |
... | ... |
@@ -46,7 +46,7 @@ |
46 | 46 |
/** |
47 | 47 |
* reads 0-32 bits when using the ALT_BITSTREAM_READER_LE bitstream reader |
48 | 48 |
*/ |
49 |
-unsigned int get_bits_long_le(GetBitContext *s, int n){ |
|
49 |
+static unsigned int get_bits_long_le(GetBitContext *s, int n){ |
|
50 | 50 |
if(n<=17) return get_bits(s, n); |
51 | 51 |
else{ |
52 | 52 |
int ret= get_bits(s, 16); |
... | ... |
@@ -51,7 +51,7 @@ int audio_input_frame_size; |
51 | 51 |
/* |
52 | 52 |
* add an audio output stream |
53 | 53 |
*/ |
54 |
-AVStream *add_audio_stream(AVFormatContext *oc, int codec_id) |
|
54 |
+static AVStream *add_audio_stream(AVFormatContext *oc, int codec_id) |
|
55 | 55 |
{ |
56 | 56 |
AVCodecContext *c; |
57 | 57 |
AVStream *st; |
... | ... |
@@ -73,7 +73,7 @@ AVStream *add_audio_stream(AVFormatContext *oc, int codec_id) |
73 | 73 |
return st; |
74 | 74 |
} |
75 | 75 |
|
76 |
-void open_audio(AVFormatContext *oc, AVStream *st) |
|
76 |
+static void open_audio(AVFormatContext *oc, AVStream *st) |
|
77 | 77 |
{ |
78 | 78 |
AVCodecContext *c; |
79 | 79 |
AVCodec *codec; |
... | ... |
@@ -124,7 +124,7 @@ void open_audio(AVFormatContext *oc, AVStream *st) |
124 | 124 |
|
125 | 125 |
/* prepare a 16 bit dummy audio frame of 'frame_size' samples and |
126 | 126 |
'nb_channels' channels */ |
127 |
-void get_audio_frame(int16_t *samples, int frame_size, int nb_channels) |
|
127 |
+static void get_audio_frame(int16_t *samples, int frame_size, int nb_channels) |
|
128 | 128 |
{ |
129 | 129 |
int j, i, v; |
130 | 130 |
int16_t *q; |
... | ... |
@@ -139,7 +139,7 @@ void get_audio_frame(int16_t *samples, int frame_size, int nb_channels) |
139 | 139 |
} |
140 | 140 |
} |
141 | 141 |
|
142 |
-void write_audio_frame(AVFormatContext *oc, AVStream *st) |
|
142 |
+static void write_audio_frame(AVFormatContext *oc, AVStream *st) |
|
143 | 143 |
{ |
144 | 144 |
AVCodecContext *c; |
145 | 145 |
AVPacket pkt; |
... | ... |
@@ -163,7 +163,7 @@ void write_audio_frame(AVFormatContext *oc, AVStream *st) |
163 | 163 |
} |
164 | 164 |
} |
165 | 165 |
|
166 |
-void close_audio(AVFormatContext *oc, AVStream *st) |
|
166 |
+static void close_audio(AVFormatContext *oc, AVStream *st) |
|
167 | 167 |
{ |
168 | 168 |
avcodec_close(st->codec); |
169 | 169 |
|
... | ... |
@@ -179,7 +179,7 @@ uint8_t *video_outbuf; |
179 | 179 |
int frame_count, video_outbuf_size; |
180 | 180 |
|
181 | 181 |
/* add a video output stream */ |
182 |
-AVStream *add_video_stream(AVFormatContext *oc, int codec_id) |
|
182 |
+static AVStream *add_video_stream(AVFormatContext *oc, int codec_id) |
|
183 | 183 |
{ |
184 | 184 |
AVCodecContext *c; |
185 | 185 |
AVStream *st; |
... | ... |
@@ -224,7 +224,7 @@ AVStream *add_video_stream(AVFormatContext *oc, int codec_id) |
224 | 224 |
return st; |
225 | 225 |
} |
226 | 226 |
|
227 |
-AVFrame *alloc_picture(int pix_fmt, int width, int height) |
|
227 |
+static AVFrame *alloc_picture(int pix_fmt, int width, int height) |
|
228 | 228 |
{ |
229 | 229 |
AVFrame *picture; |
230 | 230 |
uint8_t *picture_buf; |
... | ... |
@@ -244,7 +244,7 @@ AVFrame *alloc_picture(int pix_fmt, int width, int height) |
244 | 244 |
return picture; |
245 | 245 |
} |
246 | 246 |
|
247 |
-void open_video(AVFormatContext *oc, AVStream *st) |
|
247 |
+static void open_video(AVFormatContext *oc, AVStream *st) |
|
248 | 248 |
{ |
249 | 249 |
AVCodec *codec; |
250 | 250 |
AVCodecContext *c; |
... | ... |
@@ -293,7 +293,7 @@ void open_video(AVFormatContext *oc, AVStream *st) |
293 | 293 |
} |
294 | 294 |
|
295 | 295 |
/* prepare a dummy image */ |
296 |
-void fill_yuv_image(AVFrame *pict, int frame_index, int width, int height) |
|
296 |
+static void fill_yuv_image(AVFrame *pict, int frame_index, int width, int height) |
|
297 | 297 |
{ |
298 | 298 |
int x, y, i; |
299 | 299 |
|
... | ... |
@@ -315,7 +315,7 @@ void fill_yuv_image(AVFrame *pict, int frame_index, int width, int height) |
315 | 315 |
} |
316 | 316 |
} |
317 | 317 |
|
318 |
-void write_video_frame(AVFormatContext *oc, AVStream *st) |
|
318 |
+static void write_video_frame(AVFormatContext *oc, AVStream *st) |
|
319 | 319 |
{ |
320 | 320 |
int out_size, ret; |
321 | 321 |
AVCodecContext *c; |
... | ... |
@@ -380,7 +380,7 @@ void write_video_frame(AVFormatContext *oc, AVStream *st) |
380 | 380 |
frame_count++; |
381 | 381 |
} |
382 | 382 |
|
383 |
-void close_video(AVFormatContext *oc, AVStream *st) |
|
383 |
+static void close_video(AVFormatContext *oc, AVStream *st) |
|
384 | 384 |
{ |
385 | 385 |
avcodec_close(st->codec); |
386 | 386 |
av_free(picture->data[0]); |
... | ... |
@@ -40,7 +40,7 @@ rwpipe; |
40 | 40 |
/** Create a bidirectional pipe for the given command. |
41 | 41 |
*/ |
42 | 42 |
|
43 |
-rwpipe *rwpipe_open( int argc, char *argv[] ) |
|
43 |
+static rwpipe *rwpipe_open( int argc, char *argv[] ) |
|
44 | 44 |
{ |
45 | 45 |
rwpipe *this = av_mallocz( sizeof( rwpipe ) ); |
46 | 46 |
|
... | ... |
@@ -94,7 +94,7 @@ rwpipe *rwpipe_open( int argc, char *argv[] ) |
94 | 94 |
/** Read data from the pipe. |
95 | 95 |
*/ |
96 | 96 |
|
97 |
-FILE *rwpipe_reader( rwpipe *this ) |
|
97 |
+static FILE *rwpipe_reader( rwpipe *this ) |
|
98 | 98 |
{ |
99 | 99 |
if ( this != NULL ) |
100 | 100 |
return this->reader; |
... | ... |
@@ -105,7 +105,7 @@ FILE *rwpipe_reader( rwpipe *this ) |
105 | 105 |
/** Write data to the pipe. |
106 | 106 |
*/ |
107 | 107 |
|
108 |
-FILE *rwpipe_writer( rwpipe *this ) |
|
108 |
+static FILE *rwpipe_writer( rwpipe *this ) |
|
109 | 109 |
{ |
110 | 110 |
if ( this != NULL ) |
111 | 111 |
return this->writer; |
... | ... |
@@ -116,7 +116,7 @@ FILE *rwpipe_writer( rwpipe *this ) |
116 | 116 |
/* Read a number from the pipe - assumes PNM style headers. |
117 | 117 |
*/ |
118 | 118 |
|
119 |
-int rwpipe_read_number( rwpipe *rw ) |
|
119 |
+static int rwpipe_read_number( rwpipe *rw ) |
|
120 | 120 |
{ |
121 | 121 |
int value = 0; |
122 | 122 |
int c = 0; |
... | ... |
@@ -147,7 +147,7 @@ int rwpipe_read_number( rwpipe *rw ) |
147 | 147 |
/** Read a PPM P6 header. |
148 | 148 |
*/ |
149 | 149 |
|
150 |
-int rwpipe_read_ppm_header( rwpipe *rw, int *width, int *height ) |
|
150 |
+static int rwpipe_read_ppm_header( rwpipe *rw, int *width, int *height ) |
|
151 | 151 |
{ |
152 | 152 |
char line[ 3 ]; |
153 | 153 |
FILE *in = rwpipe_reader( rw ); |
... | ... |
@@ -167,7 +167,7 @@ int rwpipe_read_ppm_header( rwpipe *rw, int *width, int *height ) |
167 | 167 |
/** Close the pipe and process. |
168 | 168 |
*/ |
169 | 169 |
|
170 |
-void rwpipe_close( rwpipe *this ) |
|
170 |
+static void rwpipe_close( rwpipe *this ) |
|
171 | 171 |
{ |
172 | 172 |
if ( this != NULL ) |
173 | 173 |
{ |