summaryrefslogtreecommitdiff
path: root/vp8/common/x86
diff options
context:
space:
mode:
authorclang-tidy <noreply@google.com>2016-07-18 23:15:57 -0700
committerJames Zern <jzern@google.com>2016-07-19 12:38:03 -0700
commit7f3e07f1c842c586508a36ade0ca6cdcc809645b (patch)
tree1b7fe8bf2d958972749090da92d3594da14d951e /vp8/common/x86
parentc69cc4ce1f384827d0a0aef349b9c6396b07014f (diff)
downloadlibvpx-7f3e07f1c842c586508a36ade0ca6cdcc809645b.tar
libvpx-7f3e07f1c842c586508a36ade0ca6cdcc809645b.tar.gz
libvpx-7f3e07f1c842c586508a36ade0ca6cdcc809645b.tar.bz2
libvpx-7f3e07f1c842c586508a36ade0ca6cdcc809645b.zip
vp8: apply clang-tidy google-readability-braces-around-statements
applied against an x86_64 configure clang-tidy-3.7.1 \ -checks='-*,google-readability-braces-around-statements' \ -header-filter='.*' -fix + clang-format afterward Change-Id: I6694edeaee89b58b8b3082187e6756561136b459
Diffstat (limited to 'vp8/common/x86')
-rw-r--r--vp8/common/x86/idct_blk_mmx.c32
-rw-r--r--vp8/common/x86/idct_blk_sse2.c30
-rw-r--r--vp8/common/x86/loopfilter_x86.c36
3 files changed, 58 insertions, 40 deletions
diff --git a/vp8/common/x86/idct_blk_mmx.c b/vp8/common/x86/idct_blk_mmx.c
index 7be8f2bbe..6194cdf8f 100644
--- a/vp8/common/x86/idct_blk_mmx.c
+++ b/vp8/common/x86/idct_blk_mmx.c
@@ -27,30 +27,30 @@ void vp8_dequant_idct_add_y_block_mmx(short *q, short *dq, unsigned char *dst,
int i;
for (i = 0; i < 4; ++i) {
- if (eobs[0] > 1)
+ if (eobs[0] > 1) {
vp8_dequant_idct_add_mmx(q, dq, dst, stride);
- else if (eobs[0] == 1) {
+ } else if (eobs[0] == 1) {
vp8_dc_only_idct_add_mmx(q[0] * dq[0], dst, stride, dst, stride);
memset(q, 0, 2 * sizeof(q[0]));
}
- if (eobs[1] > 1)
+ if (eobs[1] > 1) {
vp8_dequant_idct_add_mmx(q + 16, dq, dst + 4, stride);
- else if (eobs[1] == 1) {
+ } else if (eobs[1] == 1) {
vp8_dc_only_idct_add_mmx(q[16] * dq[0], dst + 4, stride, dst + 4, stride);
memset(q + 16, 0, 2 * sizeof(q[0]));
}
- if (eobs[2] > 1)
+ if (eobs[2] > 1) {
vp8_dequant_idct_add_mmx(q + 32, dq, dst + 8, stride);
- else if (eobs[2] == 1) {
+ } else if (eobs[2] == 1) {
vp8_dc_only_idct_add_mmx(q[32] * dq[0], dst + 8, stride, dst + 8, stride);
memset(q + 32, 0, 2 * sizeof(q[0]));
}
- if (eobs[3] > 1)
+ if (eobs[3] > 1) {
vp8_dequant_idct_add_mmx(q + 48, dq, dst + 12, stride);
- else if (eobs[3] == 1) {
+ } else if (eobs[3] == 1) {
vp8_dc_only_idct_add_mmx(q[48] * dq[0], dst + 12, stride, dst + 12,
stride);
memset(q + 48, 0, 2 * sizeof(q[0]));
@@ -68,16 +68,16 @@ void vp8_dequant_idct_add_uv_block_mmx(short *q, short *dq, unsigned char *dstu,
int i;
for (i = 0; i < 2; ++i) {
- if (eobs[0] > 1)
+ if (eobs[0] > 1) {
vp8_dequant_idct_add_mmx(q, dq, dstu, stride);
- else if (eobs[0] == 1) {
+ } else if (eobs[0] == 1) {
vp8_dc_only_idct_add_mmx(q[0] * dq[0], dstu, stride, dstu, stride);
memset(q, 0, 2 * sizeof(q[0]));
}
- if (eobs[1] > 1)
+ if (eobs[1] > 1) {
vp8_dequant_idct_add_mmx(q + 16, dq, dstu + 4, stride);
- else if (eobs[1] == 1) {
+ } else if (eobs[1] == 1) {
vp8_dc_only_idct_add_mmx(q[16] * dq[0], dstu + 4, stride, dstu + 4,
stride);
memset(q + 16, 0, 2 * sizeof(q[0]));
@@ -89,16 +89,16 @@ void vp8_dequant_idct_add_uv_block_mmx(short *q, short *dq, unsigned char *dstu,
}
for (i = 0; i < 2; ++i) {
- if (eobs[0] > 1)
+ if (eobs[0] > 1) {
vp8_dequant_idct_add_mmx(q, dq, dstv, stride);
- else if (eobs[0] == 1) {
+ } else if (eobs[0] == 1) {
vp8_dc_only_idct_add_mmx(q[0] * dq[0], dstv, stride, dstv, stride);
memset(q, 0, 2 * sizeof(q[0]));
}
- if (eobs[1] > 1)
+ if (eobs[1] > 1) {
vp8_dequant_idct_add_mmx(q + 16, dq, dstv + 4, stride);
- else if (eobs[1] == 1) {
+ } else if (eobs[1] == 1) {
vp8_dc_only_idct_add_mmx(q[16] * dq[0], dstv + 4, stride, dstv + 4,
stride);
memset(q + 16, 0, 2 * sizeof(q[0]));
diff --git a/vp8/common/x86/idct_blk_sse2.c b/vp8/common/x86/idct_blk_sse2.c
index 6830063f2..8aefb2799 100644
--- a/vp8/common/x86/idct_blk_sse2.c
+++ b/vp8/common/x86/idct_blk_sse2.c
@@ -22,16 +22,18 @@ void vp8_dequant_idct_add_y_block_sse2(short *q, short *dq, unsigned char *dst,
for (i = 0; i < 4; ++i) {
if (((short *)(eobs))[0]) {
- if (((short *)(eobs))[0] & 0xfefe)
+ if (((short *)(eobs))[0] & 0xfefe) {
vp8_idct_dequant_full_2x_sse2(q, dq, dst, stride);
- else
+ } else {
vp8_idct_dequant_0_2x_sse2(q, dq, dst, stride);
+ }
}
if (((short *)(eobs))[1]) {
- if (((short *)(eobs))[1] & 0xfefe)
+ if (((short *)(eobs))[1] & 0xfefe) {
vp8_idct_dequant_full_2x_sse2(q + 32, dq, dst + 8, stride);
- else
+ } else {
vp8_idct_dequant_0_2x_sse2(q + 32, dq, dst + 8, stride);
+ }
}
q += 64;
dst += stride * 4;
@@ -44,35 +46,39 @@ void vp8_dequant_idct_add_uv_block_sse2(short *q, short *dq,
unsigned char *dstv, int stride,
char *eobs) {
if (((short *)(eobs))[0]) {
- if (((short *)(eobs))[0] & 0xfefe)
+ if (((short *)(eobs))[0] & 0xfefe) {
vp8_idct_dequant_full_2x_sse2(q, dq, dstu, stride);
- else
+ } else {
vp8_idct_dequant_0_2x_sse2(q, dq, dstu, stride);
+ }
}
q += 32;
dstu += stride * 4;
if (((short *)(eobs))[1]) {
- if (((short *)(eobs))[1] & 0xfefe)
+ if (((short *)(eobs))[1] & 0xfefe) {
vp8_idct_dequant_full_2x_sse2(q, dq, dstu, stride);
- else
+ } else {
vp8_idct_dequant_0_2x_sse2(q, dq, dstu, stride);
+ }
}
q += 32;
if (((short *)(eobs))[2]) {
- if (((short *)(eobs))[2] & 0xfefe)
+ if (((short *)(eobs))[2] & 0xfefe) {
vp8_idct_dequant_full_2x_sse2(q, dq, dstv, stride);
- else
+ } else {
vp8_idct_dequant_0_2x_sse2(q, dq, dstv, stride);
+ }
}
q += 32;
dstv += stride * 4;
if (((short *)(eobs))[3]) {
- if (((short *)(eobs))[3] & 0xfefe)
+ if (((short *)(eobs))[3] & 0xfefe) {
vp8_idct_dequant_full_2x_sse2(q, dq, dstv, stride);
- else
+ } else {
vp8_idct_dequant_0_2x_sse2(q, dq, dstv, stride);
+ }
}
}
diff --git a/vp8/common/x86/loopfilter_x86.c b/vp8/common/x86/loopfilter_x86.c
index d26f7062e..aa2f8f1ac 100644
--- a/vp8/common/x86/loopfilter_x86.c
+++ b/vp8/common/x86/loopfilter_x86.c
@@ -52,13 +52,15 @@ void vp8_loop_filter_mbh_mmx(unsigned char *y_ptr, unsigned char *u_ptr,
vp8_mbloop_filter_horizontal_edge_mmx(y_ptr, y_stride, lfi->mblim, lfi->lim,
lfi->hev_thr, 2);
- if (u_ptr)
+ if (u_ptr) {
vp8_mbloop_filter_horizontal_edge_mmx(u_ptr, uv_stride, lfi->mblim,
lfi->lim, lfi->hev_thr, 1);
+ }
- if (v_ptr)
+ if (v_ptr) {
vp8_mbloop_filter_horizontal_edge_mmx(v_ptr, uv_stride, lfi->mblim,
lfi->lim, lfi->hev_thr, 1);
+ }
}
/* Vertical MB Filtering */
@@ -68,13 +70,15 @@ void vp8_loop_filter_mbv_mmx(unsigned char *y_ptr, unsigned char *u_ptr,
vp8_mbloop_filter_vertical_edge_mmx(y_ptr, y_stride, lfi->mblim, lfi->lim,
lfi->hev_thr, 2);
- if (u_ptr)
+ if (u_ptr) {
vp8_mbloop_filter_vertical_edge_mmx(u_ptr, uv_stride, lfi->mblim, lfi->lim,
lfi->hev_thr, 1);
+ }
- if (v_ptr)
+ if (v_ptr) {
vp8_mbloop_filter_vertical_edge_mmx(v_ptr, uv_stride, lfi->mblim, lfi->lim,
lfi->hev_thr, 1);
+ }
}
/* Horizontal B Filtering */
@@ -88,13 +92,15 @@ void vp8_loop_filter_bh_mmx(unsigned char *y_ptr, unsigned char *u_ptr,
vp8_loop_filter_horizontal_edge_mmx(y_ptr + 12 * y_stride, y_stride,
lfi->blim, lfi->lim, lfi->hev_thr, 2);
- if (u_ptr)
+ if (u_ptr) {
vp8_loop_filter_horizontal_edge_mmx(u_ptr + 4 * uv_stride, uv_stride,
lfi->blim, lfi->lim, lfi->hev_thr, 1);
+ }
- if (v_ptr)
+ if (v_ptr) {
vp8_loop_filter_horizontal_edge_mmx(v_ptr + 4 * uv_stride, uv_stride,
lfi->blim, lfi->lim, lfi->hev_thr, 1);
+ }
}
void vp8_loop_filter_bhs_mmx(unsigned char *y_ptr, int y_stride,
@@ -118,13 +124,15 @@ void vp8_loop_filter_bv_mmx(unsigned char *y_ptr, unsigned char *u_ptr,
vp8_loop_filter_vertical_edge_mmx(y_ptr + 12, y_stride, lfi->blim, lfi->lim,
lfi->hev_thr, 2);
- if (u_ptr)
+ if (u_ptr) {
vp8_loop_filter_vertical_edge_mmx(u_ptr + 4, uv_stride, lfi->blim, lfi->lim,
lfi->hev_thr, 1);
+ }
- if (v_ptr)
+ if (v_ptr) {
vp8_loop_filter_vertical_edge_mmx(v_ptr + 4, uv_stride, lfi->blim, lfi->lim,
lfi->hev_thr, 1);
+ }
}
void vp8_loop_filter_bvs_mmx(unsigned char *y_ptr, int y_stride,
@@ -143,9 +151,10 @@ void vp8_loop_filter_mbh_sse2(unsigned char *y_ptr, unsigned char *u_ptr,
vp8_mbloop_filter_horizontal_edge_sse2(y_ptr, y_stride, lfi->mblim, lfi->lim,
lfi->hev_thr);
- if (u_ptr)
+ if (u_ptr) {
vp8_mbloop_filter_horizontal_edge_uv_sse2(u_ptr, uv_stride, lfi->mblim,
lfi->lim, lfi->hev_thr, v_ptr);
+ }
}
/* Vertical MB Filtering */
@@ -155,9 +164,10 @@ void vp8_loop_filter_mbv_sse2(unsigned char *y_ptr, unsigned char *u_ptr,
vp8_mbloop_filter_vertical_edge_sse2(y_ptr, y_stride, lfi->mblim, lfi->lim,
lfi->hev_thr);
- if (u_ptr)
+ if (u_ptr) {
vp8_mbloop_filter_vertical_edge_uv_sse2(u_ptr, uv_stride, lfi->mblim,
lfi->lim, lfi->hev_thr, v_ptr);
+ }
}
/* Horizontal B Filtering */
@@ -176,10 +186,11 @@ void vp8_loop_filter_bh_sse2(unsigned char *y_ptr, unsigned char *u_ptr,
lfi->blim, lfi->lim, lfi->hev_thr);
#endif
- if (u_ptr)
+ if (u_ptr) {
vp8_loop_filter_horizontal_edge_uv_sse2(u_ptr + 4 * uv_stride, uv_stride,
lfi->blim, lfi->lim, lfi->hev_thr,
v_ptr + 4 * uv_stride);
+ }
}
void vp8_loop_filter_bhs_sse2(unsigned char *y_ptr, int y_stride,
@@ -208,9 +219,10 @@ void vp8_loop_filter_bv_sse2(unsigned char *y_ptr, unsigned char *u_ptr,
lfi->hev_thr);
#endif
- if (u_ptr)
+ if (u_ptr) {
vp8_loop_filter_vertical_edge_uv_sse2(u_ptr + 4, uv_stride, lfi->blim,
lfi->lim, lfi->hev_thr, v_ptr + 4);
+ }
}
void vp8_loop_filter_bvs_sse2(unsigned char *y_ptr, int y_stride,