From: Yury Gitman Date: Fri, 15 Jul 2016 17:32:04 +0000 (-0700) Subject: Add VPX_SWAP macro X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a8de3c0c8935b090d205644a1e84b65a7d632d03;p=libvpx Add VPX_SWAP macro Change-Id: I60e233eddef238ad918183392794084673f27d2d --- diff --git a/vpx_dsp/vpx_dsp_common.h b/vpx_dsp/vpx_dsp_common.h index 82bafb5c4..4648c34e5 100644 --- a/vpx_dsp/vpx_dsp_common.h +++ b/vpx_dsp/vpx_dsp_common.h @@ -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.