Commit e8c11385 authored by Johann's avatar Johann

aom_dsp: apply clang-format v5.0.0

Change-Id: I3733c974654712b3ca56f541bb642af9e8cdd504
parent 1597876d
......@@ -401,11 +401,10 @@ static void generate_luma_grain_block(
for (int j = left_pad; j < luma_block_size_x - right_pad; j++) {
int wsum = 0;
for (int pos = 0; pos < num_pos_luma; pos++) {
wsum = wsum +
params->ar_coeffs_y[pos] *
luma_grain_block[(i + pred_pos_luma[pos][0]) *
luma_grain_stride +
j + pred_pos_luma[pos][1]];
wsum = wsum + params->ar_coeffs_y[pos] *
luma_grain_block[(i + pred_pos_luma[pos][0]) *
luma_grain_stride +
j + pred_pos_luma[pos][1]];
}
luma_grain_block[i * luma_grain_stride + j] =
clamp(luma_grain_block[i * luma_grain_stride + j] +
......@@ -445,16 +444,14 @@ static void generate_chroma_grain_blocks(
int wsum_cr = 0;
for (int pos = 0; pos < num_pos_chroma; pos++) {
if (pred_pos_chroma[pos][2] == 0) {
wsum_cb = wsum_cb +
params->ar_coeffs_cb[pos] *
cb_grain_block[(i + pred_pos_chroma[pos][0]) *
chroma_grain_stride +
j + pred_pos_chroma[pos][1]];
wsum_cr = wsum_cr +
params->ar_coeffs_cr[pos] *
cr_grain_block[(i + pred_pos_chroma[pos][0]) *
chroma_grain_stride +
j + pred_pos_chroma[pos][1]];
wsum_cb = wsum_cb + params->ar_coeffs_cb[pos] *
cb_grain_block[(i + pred_pos_chroma[pos][0]) *
chroma_grain_stride +
j + pred_pos_chroma[pos][1]];
wsum_cr = wsum_cr + params->ar_coeffs_cr[pos] *
cr_grain_block[(i + pred_pos_chroma[pos][0]) *
chroma_grain_stride +
j + pred_pos_chroma[pos][1]];
} else if (pred_pos_chroma[pos][2] == 1) {
int av_luma =
(luma_grain_block[(((i - top_pad) << 1) + top_pad) *
......
......@@ -25,6 +25,7 @@ static const int sm_weight_log2_scale = 8;
#define MAX_BLOCK_DIM 32
#endif // CONFIG_TX64X64
/* clang-format off */
static const uint8_t sm_weight_arrays[2 * MAX_BLOCK_DIM] = {
// Unused, because we always offset by bs, which is at least 2.
0, 0,
......@@ -47,5 +48,6 @@ static const uint8_t sm_weight_arrays[2 * MAX_BLOCK_DIM] = {
13, 12, 10, 9, 8, 7, 6, 6, 5, 5, 4, 4, 4,
#endif // CONFIG_TX64X64
};
/* clang-format on */
#endif // _AOM_DSP_INTRAPRED_COMMON_H
......@@ -650,7 +650,7 @@ static void idct32_rows_dspr2(const int16_t *input, int16_t *output,
[cospi_16_64] "r"(cospi_16_64), [cospi_24_64] "r"(cospi_24_64),
[cospi_8_64] "r"(cospi_8_64)
);
);
__asm__ __volatile__(
"lh %[load1], 8(%[input]) \n\t"
......
This diff is collapsed.
......@@ -98,7 +98,9 @@ SIMD_INLINE v128 v128_padd_s16(v128 a) {
return vreinterpretq_s64_s32(vpaddlq_s16(vreinterpretq_s16_s64(a)));
}
typedef struct { sad64_internal hi, lo; } sad128_internal;
typedef struct {
sad64_internal hi, lo;
} sad128_internal;
SIMD_INLINE sad128_internal v128_sad_u8_init() {
sad128_internal s;
......@@ -120,7 +122,9 @@ SIMD_INLINE uint32_t v128_sad_u8_sum(sad128_internal s) {
return (uint32_t)(v64_sad_u8_sum(s.hi) + v64_sad_u8_sum(s.lo));
}
typedef struct { ssd64_internal hi, lo; } ssd128_internal;
typedef struct {
ssd64_internal hi, lo;
} ssd128_internal;
SIMD_INLINE ssd128_internal v128_ssd_u8_init() {
ssd128_internal s;
......@@ -489,18 +493,21 @@ SIMD_INLINE v128 v128_cmpeq_16(v128 x, v128 y) {
}
SIMD_INLINE v128 v128_shl_8(v128 a, unsigned int c) {
return (c > 7) ? v128_zero() : vreinterpretq_s64_u8(vshlq_u8(
vreinterpretq_u8_s64(a), vdupq_n_s8(c)));
return (c > 7) ? v128_zero()
: vreinterpretq_s64_u8(
vshlq_u8(vreinterpretq_u8_s64(a), vdupq_n_s8(c)));
}
SIMD_INLINE v128 v128_shr_u8(v128 a, unsigned int c) {
return (c > 7) ? v128_zero() : vreinterpretq_s64_u8(vshlq_u8(
vreinterpretq_u8_s64(a), vdupq_n_s8(-c)));
return (c > 7) ? v128_zero()
: vreinterpretq_s64_u8(
vshlq_u8(vreinterpretq_u8_s64(a), vdupq_n_s8(-c)));
}
SIMD_INLINE v128 v128_shr_s8(v128 a, unsigned int c) {
return (c > 7) ? v128_ones() : vreinterpretq_s64_s8(vshlq_s8(
vreinterpretq_s8_s64(a), vdupq_n_s8(-c)));
return (c > 7) ? v128_ones()
: vreinterpretq_s64_s8(
vshlq_s8(vreinterpretq_s8_s64(a), vdupq_n_s8(-c)));
}
SIMD_INLINE v128 v128_shl_16(v128 a, unsigned int c) {
......
......@@ -20,7 +20,9 @@
#include "./v128_intrinsics.h"
#endif
typedef struct { v128 lo, hi; } v256;
typedef struct {
v128 lo, hi;
} v256;
SIMD_INLINE uint32_t v256_low_u32(v256 a) { return v128_low_u32(a.lo); }
......
/*
* Copyright (c) 2018, Alliance for Open Media. All rights reserved
*
* This source code is subject to the terms of the BSD 2 Clause License and
* the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License
* was not distributed with this source code in the LICENSE file, you can
* obtain it at www.aomedia.org/license/software. If the Alliance for Open
* Media Patent License 1.0 was not distributed with this source code in the
* PATENTS file, you can obtain it at www.aomedia.org/license/patent.
*/
* Copyright (c) 2018, Alliance for Open Media. All rights reserved
*
* This source code is subject to the terms of the BSD 2 Clause License and
* the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License
* was not distributed with this source code in the LICENSE file, you can
* obtain it at www.aomedia.org/license/software. If the Alliance for Open
* Media Patent License 1.0 was not distributed with this source code in the
* PATENTS file, you can obtain it at www.aomedia.org/license/patent.
*/
#ifndef AOM_DSP_X86_CONVOLVE_AVX2_H_
#define AOM_DSP_X86_CONVOLVE_AVX2_H_
......
......@@ -779,6 +779,7 @@ void FDCT16x16_2D(const int16_t *input, tran_low_t *output, int stride) {
return;
}
#endif // DCT_HIGH_BIT_DEPTH
// Interleave to do the multiply by constants which gets us
// into 32 bits.
{
......@@ -835,6 +836,7 @@ void FDCT16x16_2D(const int16_t *input, tran_low_t *output, int stride) {
return;
}
#endif // DCT_HIGH_BIT_DEPTH
// Interleave to do the multiply by constants which gets us
// into 32 bits.
{
......
......@@ -192,11 +192,11 @@ void aom_highbd_convolve_avg_avx2(const uint8_t *src8, ptrdiff_t src_stride,
}
}
#define CONV8_ROUNDING_BITS (7)
// -----------------------------------------------------------------------------
// Horizontal and vertical filtering
#define CONV8_ROUNDING_BITS (7)
static const uint8_t signal_pattern_0[32] = { 0, 1, 2, 3, 2, 3, 4, 5, 4, 5, 6,
7, 6, 7, 8, 9, 0, 1, 2, 3, 2, 3,
4, 5, 4, 5, 6, 7, 6, 7, 8, 9 };
......
......@@ -902,7 +902,7 @@ void aom_d207e_predictor_32x32_sse2(uint8_t *dst, ptrdiff_t stride,
// -----------------------------------------------------------------------------
// D63E_PRED
//
#define D63E_STORE_4X4 \
do { \
*(uint32_t *)dst = _mm_cvtsi128_si32(y0); \
......
......@@ -2213,7 +2213,7 @@ void aom_lpf_vertical_4_dual_sse2(uint8_t *s, int p, const uint8_t *blimit0,
// Transpose back
transpose(src, 16, dst, p, 2);
#else // CONFIG_PARALLEL_DEBLOCKING
#else // CONFIG_PARALLEL_DEBLOCKING
transpose16x4(s - 2, p, t_dst + 16 * 2, 16);
#endif // !CONFIG_PARALLEL_DEBLOCKING
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment