On Thu, 10 Dec 2015, Janne Grunau wrote:

On 2015-12-10 15:46:17 +0200, Martin Storsjö wrote:
On Wed, 9 Dec 2015, Janne Grunau wrote:

+
+#define check_lfe_fir(decifactor, eps)                                  \
+    do {                                                                \
+        LOCAL_ALIGNED_16(float, in,     [256 / decifactor]);            \
+        LOCAL_ALIGNED_16(float, out0,   [decifactor * 2]);              \
+        LOCAL_ALIGNED_16(float, out1,   [decifactor * 2]);              \
+        LOCAL_ALIGNED_16(float, coeffs, [256]);                         \
+        int i;                                                          \
+        const float * in_ptr = in + (256 / decifactor) - 1;             \
+        declare_func(void, float *out, const float *in, const float *coeffs); \
+        /* repeat the test several times */                             \
+        for (i = 0; i < 32; i++) {                                      \
+            int j;                                                      \
+            memset(out0,    0, sizeof(*out0) * 2 * decifactor);         \
+            memset(out1, 0xFF, sizeof(*out1) * 2 * decifactor);         \
+            randomize_lfe_fir(256 / decifactor);                        \
+            call_ref(out0, in_ptr, coeffs);                             \
+            call_new(out1, in_ptr, coeffs);                             \
+            for (j = 0; j < 2 * decifactor; j++) {                      \
+                if (!float_near_abs_eps(out0[j], out1[j], eps)) {       \
+                    if (0) {                                            \
+                        union av_intfloat32 x, y; x.f = out0[j]; y.f = 
out1[j]; \
+                        fprintf(stderr, "%3d: %11g (0x%08x); %11g (0x%08x)\n", 
\
+                                j, x.f, x.i, y.f, y.i);                 \
+                    }                                                   \

Is this a leftover, or is it intentionally kept in if (0)?

left semi-intentionally but I don't know how such debugging outputs
should be handled. I removed them in other checks.

In that case I guess it's ok with me. Compared to commented out code, this at least gets compile tested so it won't rot.

// Martin
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to