comparison mpegaudiodec.c @ 11374:1cd8731bbe7f libavcodec

Make some functions static These functions are not used outside their respective files, and they lack a prototype in a header.
author mru
date Sat, 06 Mar 2010 22:36:41 +0000
parents 98970e51365a
children 8a4984c5cacc
comparison
equal deleted inserted replaced
11373:b57409c0c286 11374:1cd8731bbe7f
99 99
100 /** 100 /**
101 * Convert region offsets to region sizes and truncate 101 * Convert region offsets to region sizes and truncate
102 * size to big_values. 102 * size to big_values.
103 */ 103 */
104 void ff_region_offset2size(GranuleDef *g){ 104 static void ff_region_offset2size(GranuleDef *g){
105 int i, k, j=0; 105 int i, k, j=0;
106 g->region_size[2] = (576 / 2); 106 g->region_size[2] = (576 / 2);
107 for(i=0;i<3;i++) { 107 for(i=0;i<3;i++) {
108 k = FFMIN(g->region_size[i], g->big_values); 108 k = FFMIN(g->region_size[i], g->big_values);
109 g->region_size[i] = k - j; 109 g->region_size[i] = k - j;
110 j = k; 110 j = k;
111 } 111 }
112 } 112 }
113 113
114 void ff_init_short_region(MPADecodeContext *s, GranuleDef *g){ 114 static void ff_init_short_region(MPADecodeContext *s, GranuleDef *g){
115 if (g->block_type == 2) 115 if (g->block_type == 2)
116 g->region_size[0] = (36 / 2); 116 g->region_size[0] = (36 / 2);
117 else { 117 else {
118 if (s->sample_rate_index <= 2) 118 if (s->sample_rate_index <= 2)
119 g->region_size[0] = (36 / 2); 119 g->region_size[0] = (36 / 2);
123 g->region_size[0] = (108 / 2); 123 g->region_size[0] = (108 / 2);
124 } 124 }
125 g->region_size[1] = (576 / 2); 125 g->region_size[1] = (576 / 2);
126 } 126 }
127 127
128 void ff_init_long_region(MPADecodeContext *s, GranuleDef *g, int ra1, int ra2){ 128 static void ff_init_long_region(MPADecodeContext *s, GranuleDef *g, int ra1, int ra2){
129 int l; 129 int l;
130 g->region_size[0] = 130 g->region_size[0] =
131 band_index_long[s->sample_rate_index][ra1 + 1] >> 1; 131 band_index_long[s->sample_rate_index][ra1 + 1] >> 1;
132 /* should not overflow */ 132 /* should not overflow */
133 l = FFMIN(ra1 + ra2 + 2, 22); 133 l = FFMIN(ra1 + ra2 + 2, 22);
134 g->region_size[1] = 134 g->region_size[1] =
135 band_index_long[s->sample_rate_index][l] >> 1; 135 band_index_long[s->sample_rate_index][l] >> 1;
136 } 136 }
137 137
138 void ff_compute_band_indexes(MPADecodeContext *s, GranuleDef *g){ 138 static void ff_compute_band_indexes(MPADecodeContext *s, GranuleDef *g){
139 if (g->block_type == 2) { 139 if (g->block_type == 2) {
140 if (g->switch_point) { 140 if (g->switch_point) {
141 /* if switched mode, we handle the 36 first samples as 141 /* if switched mode, we handle the 36 first samples as
142 long blocks. For 8000Hz, we handle the 48 first 142 long blocks. For 8000Hz, we handle the 48 first
143 exponents as long blocks (XXX: check this!) */ 143 exponents as long blocks (XXX: check this!) */