| OLD | NEW |
| 1 /* | 1 /* |
| 2 * (c) 2002 Fabrice Bellard | 2 * (c) 2002 Fabrice Bellard |
| 3 * | 3 * |
| 4 * This file is part of FFmpeg. | 4 * This file is part of FFmpeg. |
| 5 * | 5 * |
| 6 * FFmpeg is free software; you can redistribute it and/or | 6 * FFmpeg is free software; you can redistribute it and/or |
| 7 * modify it under the terms of the GNU Lesser General Public | 7 * modify it under the terms of the GNU Lesser General Public |
| 8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
| 9 * version 2.1 of the License, or (at your option) any later version. | 9 * version 2.1 of the License, or (at your option) any later version. |
| 10 * | 10 * |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 static int check_diff(float *tab1, float *tab2, int n, double scale) | 179 static int check_diff(float *tab1, float *tab2, int n, double scale) |
| 180 { | 180 { |
| 181 int i; | 181 int i; |
| 182 double max= 0; | 182 double max= 0; |
| 183 double error= 0; | 183 double error= 0; |
| 184 int err = 0; | 184 int err = 0; |
| 185 | 185 |
| 186 for (i = 0; i < n; i++) { | 186 for (i = 0; i < n; i++) { |
| 187 double e= fabsf(tab1[i] - (tab2[i] / scale)); | 187 double e= fabsf(tab1[i] - (tab2[i] / scale)); |
| 188 if (e >= 1e-3) { | 188 if (e >= 1e-3) { |
| 189 av_log(NULL, AV_LOG_ERROR, "ERROR %d: %f %f\n", | 189 av_log(NULL, AV_LOG_ERROR, "ERROR %5d: %10.6f %10.6f\n", |
| 190 i, tab1[i], tab2[i]); | 190 i, tab1[i], tab2[i]); |
| 191 err = 1; | 191 err = 1; |
| 192 } | 192 } |
| 193 error+= e*e; | 193 error+= e*e; |
| 194 if(e>max) max= e; | 194 if(e>max) max= e; |
| 195 } | 195 } |
| 196 av_log(NULL, AV_LOG_INFO, "max:%f e:%g\n", max, sqrt(error)/n); | 196 av_log(NULL, AV_LOG_INFO, "max:%f e:%g\n", max, sqrt(error)/n); |
| 197 return err; | 197 return err; |
| 198 } | 198 } |
| 199 | 199 |
| (...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 448 } | 448 } |
| 449 | 449 |
| 450 av_free(tab); | 450 av_free(tab); |
| 451 av_free(tab1); | 451 av_free(tab1); |
| 452 av_free(tab2); | 452 av_free(tab2); |
| 453 av_free(tab_ref); | 453 av_free(tab_ref); |
| 454 av_free(exptab); | 454 av_free(exptab); |
| 455 | 455 |
| 456 return err; | 456 return err; |
| 457 } | 457 } |
| OLD | NEW |