summaryrefslogtreecommitdiff
path: root/tools/tiny_ssim.c
diff options
context:
space:
mode:
authorJames Zern <jzern@google.com>2021-12-02 13:11:56 -0800
committerJames Zern <jzern@google.com>2021-12-02 16:53:20 -0800
commit31b954debe62026f957e9a13354c8c75b12e537a (patch)
treee803b50c646bf50f23f7c3b863d08375739c2ae0 /tools/tiny_ssim.c
parent13f984c2162d8392d3fd0ffb8666ee518f60665a (diff)
downloadlibvpx-31b954debe62026f957e9a13354c8c75b12e537a.tar
libvpx-31b954debe62026f957e9a13354c8c75b12e537a.tar.gz
libvpx-31b954debe62026f957e9a13354c8c75b12e537a.tar.bz2
libvpx-31b954debe62026f957e9a13354c8c75b12e537a.zip
clear -Wextra-semi/-Wextra-semi-stmt warnings
Bug: chromium:1257449 Change-Id: Ia9aafccc09b611521d4a7aedfe3723393a840c62
Diffstat (limited to 'tools/tiny_ssim.c')
-rw-r--r--tools/tiny_ssim.c30
1 files changed, 17 insertions, 13 deletions
diff --git a/tools/tiny_ssim.c b/tools/tiny_ssim.c
index ff4634ade..157797048 100644
--- a/tools/tiny_ssim.c
+++ b/tools/tiny_ssim.c
@@ -425,20 +425,24 @@ int main(int argc, char *argv[]) {
break;
}
#if CONFIG_VP9_HIGHBITDEPTH
-#define psnr_and_ssim(ssim, psnr, buf0, buf1, w, h) \
- if (bit_depth < 9) { \
- ssim = ssim2(buf0, buf1, w, w, w, h); \
- psnr = calc_plane_error(buf0, w, buf1, w, w, h); \
- } else { \
- ssim = highbd_ssim2(CONVERT_TO_BYTEPTR(buf0), CONVERT_TO_BYTEPTR(buf1), w, \
- w, w, h, bit_depth); \
- psnr = calc_plane_error16(CAST_TO_SHORTPTR(buf0), w, \
- CAST_TO_SHORTPTR(buf1), w, w, h); \
- }
+#define psnr_and_ssim(ssim, psnr, buf0, buf1, w, h) \
+ do { \
+ if (bit_depth < 9) { \
+ ssim = ssim2(buf0, buf1, w, w, w, h); \
+ psnr = calc_plane_error(buf0, w, buf1, w, w, h); \
+ } else { \
+ ssim = highbd_ssim2(CONVERT_TO_BYTEPTR(buf0), CONVERT_TO_BYTEPTR(buf1), \
+ w, w, w, h, bit_depth); \
+ psnr = calc_plane_error16(CAST_TO_SHORTPTR(buf0), w, \
+ CAST_TO_SHORTPTR(buf1), w, w, h); \
+ } \
+ } while (0)
#else
-#define psnr_and_ssim(ssim, psnr, buf0, buf1, w, h) \
- ssim = ssim2(buf0, buf1, w, w, w, h); \
- psnr = calc_plane_error(buf0, w, buf1, w, w, h);
+#define psnr_and_ssim(ssim, psnr, buf0, buf1, w, h) \
+ do { \
+ ssim = ssim2(buf0, buf1, w, w, w, h); \
+ psnr = calc_plane_error(buf0, w, buf1, w, w, h); \
+ } while (0)
#endif // CONFIG_VP9_HIGHBITDEPTH
if (n_frames == allocated_frames) {