]> granicus.if.org Git - libvpx/commitdiff
Add VPX_SWAP macro
authorYury Gitman <yuryg@google.com>
Fri, 15 Jul 2016 17:32:04 +0000 (10:32 -0700)
committerYaowu Xu <yaowu@google.com>
Tue, 26 Jul 2016 04:08:06 +0000 (04:08 +0000)
Change-Id: I60e233eddef238ad918183392794084673f27d2d

vpx_dsp/vpx_dsp_common.h

index 82bafb5c485b38673520d8dc03527dae31e2d599..4648c34e57e0c674ccc6c03d166a6f04c8122a0b 100644 (file)
@@ -46,6 +46,13 @@ extern "C" {
 # define UNLIKELY(v)  (v)
 #endif
 
+#define VPX_SWAP(type, a, b) \
+  do {                       \
+    type c = (b);            \
+    b = a;                   \
+    a = c;                   \
+  } while (0)
+
 #if CONFIG_VP9_HIGHBITDEPTH
 // Note:
 // tran_low_t  is the datatype used for final transform coefficients.