ref: 759f0550f4dd60918423ef539e332a73a6065622
parent: 7f0f0d0ced27567d04f0d831cbea513db0f28a48
author: lieff <[email protected]>
date: Thu Feb 6 09:54:03 EST 2020
relax length test only for standard vectors
--- a/minimp3_test.c
+++ b/minimp3_test.c
@@ -101,6 +101,7 @@
{
mp3dec_t mp3d;
int i, res = -1, data_bytes, total_samples = 0, maxdiff = 0;
+ int no_std_vec = strstr(input_file_name, "nonstandard") || strstr(input_file_name, "ILL");
double MSE = 0.0, psnr;
mp3dec_file_info_t info;
@@ -180,8 +181,10 @@
if (buf_ref)
{
size_t ref_samples = ref_size/2;
- if (((ref_samples != info.samples && (ref_samples + 1152) != info.samples && (ref_samples + 2304) != info.samples && 2 != mode) ||
- (ref_samples > info.samples) || (ref_samples + 2304) < info.samples) && 3 == info.layer)
+ int len_match = ref_samples == info.samples;
+ int relaxed_len_match = len_match || (ref_samples + 1152) == info.samples || (ref_samples + 2304) == info.samples;
+ int seek_len_match = (ref_samples <= info.samples) || (ref_samples + 2304) >= info.samples;
+ if ((((!relaxed_len_match && 2 != mode) || !seek_len_match) && 3 == info.layer && !no_std_vec) || (no_std_vec && !len_match))
{ /* some standard vectors are for some reason a little shorter */
printf("error: reference and produced number of samples do not match (%d/%d)\n", (int)ref_samples, (int)info.samples);
exit(1);
binary files a/vectors/ILL2_center2.pcm b/vectors/ILL2_center2.pcm differ
binary files a/vectors/ILL2_dual.pcm b/vectors/ILL2_dual.pcm differ
binary files a/vectors/ILL2_dynx22.pcm b/vectors/ILL2_dynx22.pcm differ
binary files a/vectors/ILL2_dynx31.pcm b/vectors/ILL2_dynx31.pcm differ
binary files a/vectors/ILL2_dynx32.pcm b/vectors/ILL2_dynx32.pcm differ
binary files a/vectors/ILL2_mono.pcm b/vectors/ILL2_mono.pcm differ
binary files a/vectors/ILL2_multilingual.pcm b/vectors/ILL2_multilingual.pcm differ
binary files a/vectors/ILL2_overalloc1.pcm b/vectors/ILL2_overalloc1.pcm differ
binary files a/vectors/ILL2_prediction.pcm b/vectors/ILL2_prediction.pcm differ
binary files a/vectors/ILL2_samples.pcm b/vectors/ILL2_samples.pcm differ
binary files a/vectors/ILL2_scf63.pcm b/vectors/ILL2_scf63.pcm differ
binary files a/vectors/ILL2_tca21.pcm b/vectors/ILL2_tca21.pcm differ
binary files a/vectors/ILL2_tca30.pcm b/vectors/ILL2_tca30.pcm differ
binary files a/vectors/ILL2_tca30_PC.pcm b/vectors/ILL2_tca30_PC.pcm differ
binary files a/vectors/ILL2_tca31_PC.pcm b/vectors/ILL2_tca31_PC.pcm differ
binary files a/vectors/ILL2_tca31_mtx0.pcm b/vectors/ILL2_tca31_mtx0.pcm differ
binary files a/vectors/ILL2_tca31_mtx2.pcm b/vectors/ILL2_tca31_mtx2.pcm differ
binary files a/vectors/ILL2_tca32_PC.pcm b/vectors/ILL2_tca32_PC.pcm differ
binary files a/vectors/ILL2_wrongcrc.pcm b/vectors/ILL2_wrongcrc.pcm differ
binary files a/vectors/ILL4_ext_id1.pcm b/vectors/ILL4_ext_id1.pcm differ
binary files a/vectors/ILL4_sync.pcm b/vectors/ILL4_sync.pcm differ
binary files a/vectors/ILL4_wrong_length1.pcm b/vectors/ILL4_wrong_length1.pcm differ
binary files a/vectors/ILL4_wrong_length2.pcm b/vectors/ILL4_wrong_length2.pcm differ
binary files a/vectors/ILL4_wrongcrc.pcm b/vectors/ILL4_wrongcrc.pcm differ