From 3d3f51262c64767ffb5502ca5fe2fcbd4366d879 Mon Sep 17 00:00:00 2001 From: Yury Gitman Date: Fri, 15 Jul 2016 10:32:04 -0700 Subject: [PATCH] Add VPX_SWAP macro Change-Id: I60e233eddef238ad918183392794084673f27d2d --- vpx_dsp/vpx_dsp_common.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/vpx_dsp/vpx_dsp_common.h b/vpx_dsp/vpx_dsp_common.h index a1d0a51..8d4f514 100644 --- a/vpx_dsp/vpx_dsp_common.h +++ b/vpx_dsp/vpx_dsp_common.h @@ -22,6 +22,13 @@ extern "C" { #define VPXMIN(x, y) (((x) < (y)) ? (x) : (y)) #define VPXMAX(x, y) (((x) > (y)) ? (x) : (y)) +#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. -- 2.7.4