| @@ -113,7 +113,12 @@ static void decode_file(FILE *file_mp3, FILE *file_ref, FILE *file_out, const in · 112 unmodified lines |
| 113 | fclose(file_out); | 113 | fclose(file_out); |
| 114 | } | 114 | } |
| 115 | | 115 | |
| | 116 | #ifdef __arm__ |
| | 117 | int main2(int argc, char *argv[]); |
| | 118 | int main2(int argc, char *argv[]) |
| | 119 | #else |
| 116 | int main(int argc, char *argv[]) | 120 | int main(int argc, char *argv[]) |
| | 121 | #endif |
| 117 | { | 122 | { |
| 118 | char *input_file_name = (argc > 1) ? argv[1] : NULL; | 123 | char *input_file_name = (argc > 1) ? argv[1] : NULL; |
| 119 | char *ref_file_name = (argc > 2) ? argv[2] : NULL; | 124 | char *ref_file_name = (argc > 2) ? argv[2] : NULL; |
| @@ -123,7 +128,7 @@ int main(int argc, char *argv[]) · 3 unmodified lines |
| 123 | if (output_file_name) | 128 | if (output_file_name) |
| 124 | { | 129 | { |
| 125 | char *ext = strrchr(output_file_name, '.'); | 130 | char *ext = strrchr(output_file_name, '.'); |
| 126 | if (ext && !strcasecmp(ext+1, "wav")) | 131 | if (ext && !strcasecmp(ext + 1, "wav")) |
| 127 | wave_out = 1; | 132 | wave_out = 1; |
| 128 | } | 133 | } |
| 129 | #endif | 134 | #endif |
| @@ -135,3 +140,97 @@ int main(int argc, char *argv[]) · 5 unmodified lines |
| 135 | decode_file(fopen(input_file_name, "rb"), fopen(ref_file_name, "rb"), output_file_name ? fopen(output_file_name, "wb") : NULL, wave_out); | 140 | decode_file(fopen(input_file_name, "rb"), fopen(ref_file_name, "rb"), output_file_name ? fopen(output_file_name, "wb") : NULL, wave_out); |
| 136 | return 0; | 141 | return 0; |
| 137 | } | 142 | } |
| | 143 | |
| | 144 | #ifdef __arm__ |
| | 145 | static const char *g_files[] = { |
| | 146 | "vectors/ILL2_center2.bit", |
| | 147 | "vectors/ILL2_dual.bit", |
| | 148 | "vectors/ILL2_dynx22.bit", |
| | 149 | "vectors/ILL2_dynx31.bit", |
| | 150 | "vectors/ILL2_dynx32.bit", |
| | 151 | "vectors/ILL2_ext_switching.bit", |
| | 152 | "vectors/ILL2_layer1.bit", |
| | 153 | "vectors/ILL2_layer3.bit", |
| | 154 | "vectors/ILL2_mono.bit", |
| | 155 | "vectors/ILL2_multilingual.bit", |
| | 156 | "vectors/ILL2_overalloc1.bit", |
| | 157 | "vectors/ILL2_overalloc2.bit", |
| | 158 | "vectors/ILL2_prediction.bit", |
| | 159 | "vectors/ILL2_samples.bit", |
| | 160 | "vectors/ILL2_scf63.bit", |
| | 161 | "vectors/ILL2_tca21.bit", |
| | 162 | "vectors/ILL2_tca30.bit", |
| | 163 | "vectors/ILL2_tca30_PC.bit", |
| | 164 | "vectors/ILL2_tca31_mtx0.bit", |
| | 165 | "vectors/ILL2_tca31_mtx2.bit", |
| | 166 | "vectors/ILL2_tca31_PC.bit", |
| | 167 | "vectors/ILL2_tca32_PC.bit", |
| | 168 | "vectors/ILL2_wrongcrc.bit", |
| | 169 | "vectors/ILL4_ext_id1.bit", |
| | 170 | "vectors/ILL4_sync.bit", |
| | 171 | "vectors/ILL4_wrongcrc.bit", |
| | 172 | "vectors/ILL4_wrong_length1.bit", |
| | 173 | "vectors/ILL4_wrong_length2.bit", |
| | 174 | "vectors/l1-fl1.bit", |
| | 175 | "vectors/l1-fl2.bit", |
| | 176 | "vectors/l1-fl3.bit", |
| | 177 | "vectors/l1-fl4.bit", |
| | 178 | "vectors/l1-fl5.bit", |
| | 179 | "vectors/l1-fl6.bit", |
| | 180 | "vectors/l1-fl7.bit", |
| | 181 | "vectors/l1-fl8.bit", |
| | 182 | "vectors/l2-fl10.bit", |
| | 183 | "vectors/l2-fl11.bit", |
| | 184 | "vectors/l2-fl12.bit", |
| | 185 | "vectors/l2-fl13.bit", |
| | 186 | "vectors/l2-fl14.bit", |
| | 187 | "vectors/l2-fl15.bit", |
| | 188 | "vectors/l2-fl16.bit", |
| | 189 | "vectors/l2-nonstandard-fl1_fl2_ff.bit", |
| | 190 | "vectors/l2-nonstandard-free_format.bit", |
| | 191 | "vectors/l2-nonstandard-test32-size.bit", |
| | 192 | "vectors/l2-test32.bit", |
| | 193 | "vectors/l3-compl.bit", |
| | 194 | "vectors/l3-he_32khz.bit", |
| | 195 | "vectors/l3-he_44khz.bit", |
| | 196 | "vectors/l3-he_48khz.bit", |
| | 197 | "vectors/l3-hecommon.bit", |
| | 198 | "vectors/l3-he_free.bit", |
| | 199 | "vectors/l3-he_mode.bit", |
| | 200 | "vectors/l3-nonstandard-compl-sideinfo-bigvalues.bit", |
| | 201 | "vectors/l3-nonstandard-compl-sideinfo-blocktype.bit", |
| | 202 | "vectors/l3-nonstandard-compl-sideinfo-size.bit", |
| | 203 | "vectors/l3-si.bit", |
| | 204 | "vectors/l3-si_block.bit", |
| | 205 | "vectors/l3-si_huff.bit", |
| | 206 | "vectors/l3-sin1k0db.bit", |
| | 207 | "vectors/M2L3_bitrate_16_all.bit", |
| | 208 | "vectors/M2L3_bitrate_22_all.bit", |
| | 209 | "vectors/M2L3_bitrate_24_all.bit", |
| | 210 | "vectors/M2L3_compl24.bit", |
| | 211 | "vectors/M2L3_noise.bit" |
| | 212 | }; |
| | 213 | int main() |
| | 214 | { |
| | 215 | size_t i; |
| | 216 | char buf[256]; |
| | 217 | char *v[3]; |
| | 218 | v[2] = buf; |
| | 219 | for (i = 0; i < sizeof(g_files)/sizeof(g_files[0]); i++) |
| | 220 | { |
| | 221 | int ret; |
| | 222 | const char *file = g_files[i]; |
| | 223 | size_t len = strlen(file); |
| | 224 | strcpy(buf, file); |
| | 225 | buf[len - 3] = 'p'; |
| | 226 | buf[len - 2] = 'c'; |
| | 227 | buf[len - 1] = 'm'; |
| | 228 | v[1] = (char*)file; |
| | 229 | printf("%s\n", file); |
| | 230 | ret = main2(3, v); |
| | 231 | if (ret) |
| | 232 | return ret; |
| | 233 | } |
| | 234 | return 0; |
| | 235 | } |
| | 236 | #endif |