On Mon, 2 Feb 2015, Diego Biurrun wrote:

On Mon, Feb 02, 2015 at 11:49:29AM +0100, Peter Meerwald wrote:
--- a/libavcodec/g722.c
+++ b/libavcodec/g722.c
+    int s_zero = 0;
+
+    #define ACCUM(k, x, d) do { \
+            int tmp = x; \
+            band->zero_mem[k] = ((band->zero_mem[k]*255) >> 8) + \
+               d*((band->diff_mem[k]^cur_diff) < 0 ? -128 : 128); \
+            band->diff_mem[k] = tmp; \
+            s_zero += (tmp * band->zero_mem[k]) >> 15; \
+        } while (0)

The macro has an odd amount of indentation.  I'd move it before the function
and add some spaces around operators.

I would keep it here. The macro is just for repeating a snippet of code which only makes sense within this function (it uses local variables belonging to this function), so it is more correct style to keep it within the function. The indentation can of course be discussed, I don't have much opinion there.

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

Reply via email to