Commit 6885324b authored by clang-format's avatar clang-format Committed by James Zern

apply clang-format

post DerivePointerAlignment change

Change-Id: Ibdabea5710ea364f45d70fff018d260355124817
parent 06b2eb57
......@@ -15,39 +15,39 @@
#include "./aom_dsp_rtcd.h"
#include "aom/aom_integer.h"
static INLINE __m128i load_coefficients(const tran_low_t* coeff_ptr) {
static INLINE __m128i load_coefficients(const tran_low_t *coeff_ptr) {
#if CONFIG_AOM_HIGHBITDEPTH
return _mm_setr_epi16((int16_t)coeff_ptr[0], (int16_t)coeff_ptr[1],
(int16_t)coeff_ptr[2], (int16_t)coeff_ptr[3],
(int16_t)coeff_ptr[4], (int16_t)coeff_ptr[5],
(int16_t)coeff_ptr[6], (int16_t)coeff_ptr[7]);
#else
return _mm_load_si128((const __m128i*)coeff_ptr);
return _mm_load_si128((const __m128i *)coeff_ptr);
#endif
}
static INLINE void store_coefficients(__m128i coeff_vals,
tran_low_t* coeff_ptr) {
tran_low_t *coeff_ptr) {
#if CONFIG_AOM_HIGHBITDEPTH
__m128i one = _mm_set1_epi16(1);
__m128i coeff_vals_hi = _mm_mulhi_epi16(coeff_vals, one);
__m128i coeff_vals_lo = _mm_mullo_epi16(coeff_vals, one);
__m128i coeff_vals_1 = _mm_unpacklo_epi16(coeff_vals_lo, coeff_vals_hi);
__m128i coeff_vals_2 = _mm_unpackhi_epi16(coeff_vals_lo, coeff_vals_hi);
_mm_store_si128((__m128i*)(coeff_ptr), coeff_vals_1);
_mm_store_si128((__m128i*)(coeff_ptr + 4), coeff_vals_2);
_mm_store_si128((__m128i *)(coeff_ptr), coeff_vals_1);
_mm_store_si128((__m128i *)(coeff_ptr + 4), coeff_vals_2);
#else
_mm_store_si128((__m128i*)(coeff_ptr), coeff_vals);
_mm_store_si128((__m128i *)(coeff_ptr), coeff_vals);
#endif
}
void aom_quantize_b_sse2(const tran_low_t* coeff_ptr, intptr_t n_coeffs,
int skip_block, const int16_t* zbin_ptr,
const int16_t* round_ptr, const int16_t* quant_ptr,
const int16_t* quant_shift_ptr, tran_low_t* qcoeff_ptr,
tran_low_t* dqcoeff_ptr, const int16_t* dequant_ptr,
uint16_t* eob_ptr, const int16_t* scan_ptr,
const int16_t* iscan_ptr) {
void aom_quantize_b_sse2(const tran_low_t *coeff_ptr, intptr_t n_coeffs,
int skip_block, const int16_t *zbin_ptr,
const int16_t *round_ptr, const int16_t *quant_ptr,
const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr,
tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr,
uint16_t *eob_ptr, const int16_t *scan_ptr,
const int16_t *iscan_ptr) {
__m128i zero;
(void)scan_ptr;
......@@ -67,13 +67,13 @@ void aom_quantize_b_sse2(const tran_low_t* coeff_ptr, intptr_t n_coeffs,
// Setup global values
{
__m128i pw_1;
zbin = _mm_load_si128((const __m128i*)zbin_ptr);
round = _mm_load_si128((const __m128i*)round_ptr);
quant = _mm_load_si128((const __m128i*)quant_ptr);
zbin = _mm_load_si128((const __m128i *)zbin_ptr);
round = _mm_load_si128((const __m128i *)round_ptr);
quant = _mm_load_si128((const __m128i *)quant_ptr);
pw_1 = _mm_set1_epi16(1);
zbin = _mm_sub_epi16(zbin, pw_1);
dequant = _mm_load_si128((const __m128i*)dequant_ptr);
shift = _mm_load_si128((const __m128i*)quant_shift_ptr);
dequant = _mm_load_si128((const __m128i *)dequant_ptr);
shift = _mm_load_si128((const __m128i *)quant_shift_ptr);
}
{
......@@ -139,8 +139,8 @@ void aom_quantize_b_sse2(const tran_low_t* coeff_ptr, intptr_t n_coeffs,
zero_coeff1 = _mm_cmpeq_epi16(coeff1, zero);
nzero_coeff0 = _mm_cmpeq_epi16(zero_coeff0, zero);
nzero_coeff1 = _mm_cmpeq_epi16(zero_coeff1, zero);
iscan0 = _mm_load_si128((const __m128i*)(iscan_ptr + n_coeffs));
iscan1 = _mm_load_si128((const __m128i*)(iscan_ptr + n_coeffs) + 1);
iscan0 = _mm_load_si128((const __m128i *)(iscan_ptr + n_coeffs));
iscan1 = _mm_load_si128((const __m128i *)(iscan_ptr + n_coeffs) + 1);
// Add one to convert from indices to counts
iscan0 = _mm_sub_epi16(iscan0, nzero_coeff0);
iscan1 = _mm_sub_epi16(iscan1, nzero_coeff1);
......@@ -212,8 +212,8 @@ void aom_quantize_b_sse2(const tran_low_t* coeff_ptr, intptr_t n_coeffs,
zero_coeff1 = _mm_cmpeq_epi16(coeff1, zero);
nzero_coeff0 = _mm_cmpeq_epi16(zero_coeff0, zero);
nzero_coeff1 = _mm_cmpeq_epi16(zero_coeff1, zero);
iscan0 = _mm_load_si128((const __m128i*)(iscan_ptr + n_coeffs));
iscan1 = _mm_load_si128((const __m128i*)(iscan_ptr + n_coeffs) + 1);
iscan0 = _mm_load_si128((const __m128i *)(iscan_ptr + n_coeffs));
iscan1 = _mm_load_si128((const __m128i *)(iscan_ptr + n_coeffs) + 1);
// Add one to convert from indices to counts
iscan0 = _mm_sub_epi16(iscan0, nzero_coeff0);
iscan1 = _mm_sub_epi16(iscan1, nzero_coeff1);
......
......@@ -52,15 +52,15 @@ extern "C" {
typedef uint8_t InterpFilter;
extern const InterpKernel* av1_filter_kernels[4];
extern const InterpKernel *av1_filter_kernels[4];
typedef struct InterpFilterParams {
const int16_t* filter_ptr;
const int16_t *filter_ptr;
uint16_t taps;
uint16_t subpel_shifts;
InterpFilter interp_filter;
} InterpFilterParams;
static INLINE const int16_t* get_interp_filter_subpel_kernel(
static INLINE const int16_t *get_interp_filter_subpel_kernel(
const InterpFilterParams filter_params, const int subpel) {
return filter_params.filter_ptr + filter_params.taps * subpel;
}
......
......@@ -15,8 +15,8 @@
#include "av1/common/seg_common.h"
#if CONFIG_AOM_QM
static void make_qmatrices(qm_val_t* wmatrix[NUM_QM_LEVELS][2][2][TX_SIZES],
qm_val_t* iwmatrix[NUM_QM_LEVELS][2][2][TX_SIZES]);
static void make_qmatrices(qm_val_t *wmatrix[NUM_QM_LEVELS][2][2][TX_SIZES],
qm_val_t *iwmatrix[NUM_QM_LEVELS][2][2][TX_SIZES]);
#endif
static const int16_t dc_qlookup[QINDEX_RANGE] = {
......@@ -200,7 +200,7 @@ int16_t av1_ac_quant(int qindex, int delta, aom_bit_depth_t bit_depth) {
#endif
}
int av1_get_qindex(const struct segmentation* seg, int segment_id,
int av1_get_qindex(const struct segmentation *seg, int segment_id,
int base_qindex) {
if (segfeature_active(seg, segment_id, SEG_LVL_ALT_Q)) {
const int data = get_segdata(seg, segment_id, SEG_LVL_ALT_Q);
......@@ -213,11 +213,11 @@ int av1_get_qindex(const struct segmentation* seg, int segment_id,
}
#if CONFIG_AOM_QM
qm_val_t* aom_iqmatrix(AV1_COMMON* cm, int qmlevel, int is_chroma,
qm_val_t *aom_iqmatrix(AV1_COMMON *cm, int qmlevel, int is_chroma,
int log2sizem2, int is_intra) {
return &cm->giqmatrix[qmlevel][!!is_chroma][!!is_intra][log2sizem2][0];
}
qm_val_t* aom_qmatrix(AV1_COMMON* cm, int qmlevel, int is_chroma,
qm_val_t *aom_qmatrix(AV1_COMMON *cm, int qmlevel, int is_chroma,
int log2sizem2, int is_intra) {
return &cm->gqmatrix[qmlevel][!!is_chroma][!!is_intra][log2sizem2][0];
}
......@@ -227,7 +227,7 @@ static uint16_t
static uint16_t
wt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 32 * 32];
void aom_qm_init(AV1_COMMON* cm) {
void aom_qm_init(AV1_COMMON *cm) {
int q, c, f, t, size;
int current;
for (q = 0; q < NUM_QM_LEVELS; ++q) {
......
......@@ -18,14 +18,14 @@
#include "av1/common/blockd.h"
#include "aom_dsp/txfm_common.h"
void av1_fdct8x8_quant_neon(const int16_t* input, int stride,
int16_t* coeff_ptr, intptr_t n_coeffs,
int skip_block, const int16_t* zbin_ptr,
const int16_t* round_ptr, const int16_t* quant_ptr,
const int16_t* quant_shift_ptr, int16_t* qcoeff_ptr,
int16_t* dqcoeff_ptr, const int16_t* dequant_ptr,
uint16_t* eob_ptr, const int16_t* scan_ptr,
const int16_t* iscan_ptr) {
void av1_fdct8x8_quant_neon(const int16_t *input, int stride,
int16_t *coeff_ptr, intptr_t n_coeffs,
int skip_block, const int16_t *zbin_ptr,
const int16_t *round_ptr, const int16_t *quant_ptr,
const int16_t *quant_shift_ptr, int16_t *qcoeff_ptr,
int16_t *dqcoeff_ptr, const int16_t *dequant_ptr,
uint16_t *eob_ptr, const int16_t *scan_ptr,
const int16_t *iscan_ptr) {
int16_t temp_buffer[64];
(void)coeff_ptr;
......
......@@ -22,11 +22,11 @@
#include "aom_dsp/x86/txfm_common_sse2.h"
void av1_fdct8x8_quant_ssse3(
const int16_t* input, int stride, int16_t* coeff_ptr, intptr_t n_coeffs,
int skip_block, const int16_t* zbin_ptr, const int16_t* round_ptr,
const int16_t* quant_ptr, const int16_t* quant_shift_ptr,
int16_t* qcoeff_ptr, int16_t* dqcoeff_ptr, const int16_t* dequant_ptr,
uint16_t* eob_ptr, const int16_t* scan_ptr, const int16_t* iscan_ptr) {
const int16_t *input, int stride, int16_t *coeff_ptr, intptr_t n_coeffs,
int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr,
const int16_t *quant_ptr, const int16_t *quant_shift_ptr,
int16_t *qcoeff_ptr, int16_t *dqcoeff_ptr, const int16_t *dequant_ptr,
uint16_t *eob_ptr, const int16_t *scan_ptr, const int16_t *iscan_ptr) {
__m128i zero;
int pass;
// Constants
......@@ -44,15 +44,15 @@ void av1_fdct8x8_quant_ssse3(
const __m128i k__cospi_m20_p12 = pair_set_epi16(-cospi_20_64, cospi_12_64);
const __m128i k__DCT_CONST_ROUNDING = _mm_set1_epi32(DCT_CONST_ROUNDING);
// Load input
__m128i in0 = _mm_load_si128((const __m128i*)(input + 0 * stride));
__m128i in1 = _mm_load_si128((const __m128i*)(input + 1 * stride));
__m128i in2 = _mm_load_si128((const __m128i*)(input + 2 * stride));
__m128i in3 = _mm_load_si128((const __m128i*)(input + 3 * stride));
__m128i in4 = _mm_load_si128((const __m128i*)(input + 4 * stride));
__m128i in5 = _mm_load_si128((const __m128i*)(input + 5 * stride));
__m128i in6 = _mm_load_si128((const __m128i*)(input + 6 * stride));
__m128i in7 = _mm_load_si128((const __m128i*)(input + 7 * stride));
__m128i* in[8];
__m128i in0 = _mm_load_si128((const __m128i *)(input + 0 * stride));
__m128i in1 = _mm_load_si128((const __m128i *)(input + 1 * stride));
__m128i in2 = _mm_load_si128((const __m128i *)(input + 2 * stride));
__m128i in3 = _mm_load_si128((const __m128i *)(input + 3 * stride));
__m128i in4 = _mm_load_si128((const __m128i *)(input + 4 * stride));
__m128i in5 = _mm_load_si128((const __m128i *)(input + 5 * stride));
__m128i in6 = _mm_load_si128((const __m128i *)(input + 6 * stride));
__m128i in7 = _mm_load_si128((const __m128i *)(input + 7 * stride));
__m128i *in[8];
int index = 0;
(void)scan_ptr;
......@@ -300,9 +300,9 @@ void av1_fdct8x8_quant_ssse3(
// Setup global values
{
round = _mm_load_si128((const __m128i*)round_ptr);
quant = _mm_load_si128((const __m128i*)quant_ptr);
dequant = _mm_load_si128((const __m128i*)dequant_ptr);
round = _mm_load_si128((const __m128i *)round_ptr);
quant = _mm_load_si128((const __m128i *)quant_ptr);
dequant = _mm_load_si128((const __m128i *)dequant_ptr);
}
{
......@@ -334,15 +334,15 @@ void av1_fdct8x8_quant_ssse3(
qcoeff0 = _mm_sub_epi16(qcoeff0, coeff0_sign);
qcoeff1 = _mm_sub_epi16(qcoeff1, coeff1_sign);
_mm_store_si128((__m128i*)(qcoeff_ptr + n_coeffs), qcoeff0);
_mm_store_si128((__m128i*)(qcoeff_ptr + n_coeffs) + 1, qcoeff1);
_mm_store_si128((__m128i *)(qcoeff_ptr + n_coeffs), qcoeff0);
_mm_store_si128((__m128i *)(qcoeff_ptr + n_coeffs) + 1, qcoeff1);
coeff0 = _mm_mullo_epi16(qcoeff0, dequant);
dequant = _mm_unpackhi_epi64(dequant, dequant);
coeff1 = _mm_mullo_epi16(qcoeff1, dequant);
_mm_store_si128((__m128i*)(dqcoeff_ptr + n_coeffs), coeff0);
_mm_store_si128((__m128i*)(dqcoeff_ptr + n_coeffs) + 1, coeff1);
_mm_store_si128((__m128i *)(dqcoeff_ptr + n_coeffs), coeff0);
_mm_store_si128((__m128i *)(dqcoeff_ptr + n_coeffs) + 1, coeff1);
}
{
......@@ -355,8 +355,8 @@ void av1_fdct8x8_quant_ssse3(
zero_coeff1 = _mm_cmpeq_epi16(coeff1, zero);
nzero_coeff0 = _mm_cmpeq_epi16(zero_coeff0, zero);
nzero_coeff1 = _mm_cmpeq_epi16(zero_coeff1, zero);
iscan0 = _mm_load_si128((const __m128i*)(iscan_ptr + n_coeffs));
iscan1 = _mm_load_si128((const __m128i*)(iscan_ptr + n_coeffs) + 1);
iscan0 = _mm_load_si128((const __m128i *)(iscan_ptr + n_coeffs));
iscan1 = _mm_load_si128((const __m128i *)(iscan_ptr + n_coeffs) + 1);
// Add one to convert from indices to counts
iscan0 = _mm_sub_epi16(iscan0, nzero_coeff0);
iscan1 = _mm_sub_epi16(iscan1, nzero_coeff1);
......@@ -404,20 +404,20 @@ void av1_fdct8x8_quant_ssse3(
qcoeff0 = _mm_sub_epi16(qcoeff0, coeff0_sign);
qcoeff1 = _mm_sub_epi16(qcoeff1, coeff1_sign);
_mm_store_si128((__m128i*)(qcoeff_ptr + n_coeffs), qcoeff0);
_mm_store_si128((__m128i*)(qcoeff_ptr + n_coeffs) + 1, qcoeff1);
_mm_store_si128((__m128i *)(qcoeff_ptr + n_coeffs), qcoeff0);
_mm_store_si128((__m128i *)(qcoeff_ptr + n_coeffs) + 1, qcoeff1);
coeff0 = _mm_mullo_epi16(qcoeff0, dequant);
coeff1 = _mm_mullo_epi16(qcoeff1, dequant);
_mm_store_si128((__m128i*)(dqcoeff_ptr + n_coeffs), coeff0);
_mm_store_si128((__m128i*)(dqcoeff_ptr + n_coeffs) + 1, coeff1);
_mm_store_si128((__m128i *)(dqcoeff_ptr + n_coeffs), coeff0);
_mm_store_si128((__m128i *)(dqcoeff_ptr + n_coeffs) + 1, coeff1);
} else {
_mm_store_si128((__m128i*)(qcoeff_ptr + n_coeffs), zero);
_mm_store_si128((__m128i*)(qcoeff_ptr + n_coeffs) + 1, zero);
_mm_store_si128((__m128i *)(qcoeff_ptr + n_coeffs), zero);
_mm_store_si128((__m128i *)(qcoeff_ptr + n_coeffs) + 1, zero);
_mm_store_si128((__m128i*)(dqcoeff_ptr + n_coeffs), zero);
_mm_store_si128((__m128i*)(dqcoeff_ptr + n_coeffs) + 1, zero);
_mm_store_si128((__m128i *)(dqcoeff_ptr + n_coeffs), zero);
_mm_store_si128((__m128i *)(dqcoeff_ptr + n_coeffs) + 1, zero);
}
}
......@@ -431,8 +431,8 @@ void av1_fdct8x8_quant_ssse3(
zero_coeff1 = _mm_cmpeq_epi16(coeff1, zero);
nzero_coeff0 = _mm_cmpeq_epi16(zero_coeff0, zero);
nzero_coeff1 = _mm_cmpeq_epi16(zero_coeff1, zero);
iscan0 = _mm_load_si128((const __m128i*)(iscan_ptr + n_coeffs));
iscan1 = _mm_load_si128((const __m128i*)(iscan_ptr + n_coeffs) + 1);
iscan0 = _mm_load_si128((const __m128i *)(iscan_ptr + n_coeffs));
iscan1 = _mm_load_si128((const __m128i *)(iscan_ptr + n_coeffs) + 1);
// Add one to convert from indices to counts
iscan0 = _mm_sub_epi16(iscan0, nzero_coeff0);
iscan1 = _mm_sub_epi16(iscan1, nzero_coeff1);
......@@ -458,10 +458,10 @@ void av1_fdct8x8_quant_ssse3(
}
} else {
do {
_mm_store_si128((__m128i*)(dqcoeff_ptr + n_coeffs), zero);
_mm_store_si128((__m128i*)(dqcoeff_ptr + n_coeffs) + 1, zero);
_mm_store_si128((__m128i*)(qcoeff_ptr + n_coeffs), zero);
_mm_store_si128((__m128i*)(qcoeff_ptr + n_coeffs) + 1, zero);
_mm_store_si128((__m128i *)(dqcoeff_ptr + n_coeffs), zero);
_mm_store_si128((__m128i *)(dqcoeff_ptr + n_coeffs) + 1, zero);
_mm_store_si128((__m128i *)(qcoeff_ptr + n_coeffs), zero);
_mm_store_si128((__m128i *)(qcoeff_ptr + n_coeffs) + 1, zero);
n_coeffs += 8 * 2;
} while (n_coeffs < 0);
*eob_ptr = 0;
......
......@@ -15,13 +15,13 @@
#include "./av1_rtcd.h"
#include "aom/aom_integer.h"
void av1_quantize_fp_sse2(const int16_t* coeff_ptr, intptr_t n_coeffs,
int skip_block, const int16_t* zbin_ptr,
const int16_t* round_ptr, const int16_t* quant_ptr,
const int16_t* quant_shift_ptr, int16_t* qcoeff_ptr,
int16_t* dqcoeff_ptr, const int16_t* dequant_ptr,
uint16_t* eob_ptr, const int16_t* scan_ptr,
const int16_t* iscan_ptr) {
void av1_quantize_fp_sse2(const int16_t *coeff_ptr, intptr_t n_coeffs,
int skip_block, const int16_t *zbin_ptr,
const int16_t *round_ptr, const int16_t *quant_ptr,
const int16_t *quant_shift_ptr, int16_t *qcoeff_ptr,
int16_t *dqcoeff_ptr, const int16_t *dequant_ptr,
uint16_t *eob_ptr, const int16_t *scan_ptr,
const int16_t *iscan_ptr) {
__m128i zero;
__m128i thr;
int16_t nzflag;
......@@ -44,9 +44,9 @@ void av1_quantize_fp_sse2(const int16_t* coeff_ptr, intptr_t n_coeffs,
// Setup global values
{
round = _mm_load_si128((const __m128i*)round_ptr);
quant = _mm_load_si128((const __m128i*)quant_ptr);
dequant = _mm_load_si128((const __m128i*)dequant_ptr);
round = _mm_load_si128((const __m128i *)round_ptr);
quant = _mm_load_si128((const __m128i *)quant_ptr);
dequant = _mm_load_si128((const __m128i *)dequant_ptr);
}
{
......@@ -54,8 +54,8 @@ void av1_quantize_fp_sse2(const int16_t* coeff_ptr, intptr_t n_coeffs,
__m128i qcoeff0, qcoeff1;
__m128i qtmp0, qtmp1;
// Do DC and first 15 AC
coeff0 = _mm_load_si128((const __m128i*)(coeff_ptr + n_coeffs));
coeff1 = _mm_load_si128((const __m128i*)(coeff_ptr + n_coeffs) + 1);
coeff0 = _mm_load_si128((const __m128i *)(coeff_ptr + n_coeffs));
coeff1 = _mm_load_si128((const __m128i *)(coeff_ptr + n_coeffs) + 1);
// Poor man's sign extract
coeff0_sign = _mm_srai_epi16(coeff0, 15);
......@@ -78,15 +78,15 @@ void av1_quantize_fp_sse2(const int16_t* coeff_ptr, intptr_t n_coeffs,
qcoeff0 = _mm_sub_epi16(qcoeff0, coeff0_sign);
qcoeff1 = _mm_sub_epi16(qcoeff1, coeff1_sign);
_mm_store_si128((__m128i*)(qcoeff_ptr + n_coeffs), qcoeff0);
_mm_store_si128((__m128i*)(qcoeff_ptr + n_coeffs) + 1, qcoeff1);
_mm_store_si128((__m128i *)(qcoeff_ptr + n_coeffs), qcoeff0);
_mm_store_si128((__m128i *)(qcoeff_ptr + n_coeffs) + 1, qcoeff1);
coeff0 = _mm_mullo_epi16(qcoeff0, dequant);
dequant = _mm_unpackhi_epi64(dequant, dequant);
coeff1 = _mm_mullo_epi16(qcoeff1, dequant);
_mm_store_si128((__m128i*)(dqcoeff_ptr + n_coeffs), coeff0);
_mm_store_si128((__m128i*)(dqcoeff_ptr + n_coeffs) + 1, coeff1);
_mm_store_si128((__m128i *)(dqcoeff_ptr + n_coeffs), coeff0);
_mm_store_si128((__m128i *)(dqcoeff_ptr + n_coeffs) + 1, coeff1);
}
{
......@@ -99,8 +99,8 @@ void av1_quantize_fp_sse2(const int16_t* coeff_ptr, intptr_t n_coeffs,
zero_coeff1 = _mm_cmpeq_epi16(coeff1, zero);
nzero_coeff0 = _mm_cmpeq_epi16(zero_coeff0, zero);
nzero_coeff1 = _mm_cmpeq_epi16(zero_coeff1, zero);
iscan0 = _mm_load_si128((const __m128i*)(iscan_ptr + n_coeffs));
iscan1 = _mm_load_si128((const __m128i*)(iscan_ptr + n_coeffs) + 1);
iscan0 = _mm_load_si128((const __m128i *)(iscan_ptr + n_coeffs));
iscan1 = _mm_load_si128((const __m128i *)(iscan_ptr + n_coeffs) + 1);
// Add one to convert from indices to counts
iscan0 = _mm_sub_epi16(iscan0, nzero_coeff0);
iscan1 = _mm_sub_epi16(iscan1, nzero_coeff1);
......@@ -121,8 +121,8 @@ void av1_quantize_fp_sse2(const int16_t* coeff_ptr, intptr_t n_coeffs,
__m128i qcoeff0, qcoeff1;
__m128i qtmp0, qtmp1;
coeff0 = _mm_load_si128((const __m128i*)(coeff_ptr + n_coeffs));
coeff1 = _mm_load_si128((const __m128i*)(coeff_ptr + n_coeffs) + 1);
coeff0 = _mm_load_si128((const __m128i *)(coeff_ptr + n_coeffs));
coeff1 = _mm_load_si128((const __m128i *)(coeff_ptr + n_coeffs) + 1);
// Poor man's sign extract
coeff0_sign = _mm_srai_epi16(coeff0, 15);
......@@ -147,20 +147,20 @@ void av1_quantize_fp_sse2(const int16_t* coeff_ptr, intptr_t n_coeffs,
qcoeff0 = _mm_sub_epi16(qcoeff0, coeff0_sign);
qcoeff1 = _mm_sub_epi16(qcoeff1, coeff1_sign);
_mm_store_si128((__m128i*)(qcoeff_ptr + n_coeffs), qcoeff0);
_mm_store_si128((__m128i*)(qcoeff_ptr + n_coeffs) + 1, qcoeff1);
_mm_store_si128((__m128i *)(qcoeff_ptr + n_coeffs), qcoeff0);
_mm_store_si128((__m128i *)(qcoeff_ptr + n_coeffs) + 1, qcoeff1);
coeff0 = _mm_mullo_epi16(qcoeff0, dequant);
coeff1 = _mm_mullo_epi16(qcoeff1, dequant);
_mm_store_si128((__m128i*)(dqcoeff_ptr + n_coeffs), coeff0);
_mm_store_si128((__m128i*)(dqcoeff_ptr + n_coeffs) + 1, coeff1);
_mm_store_si128((__m128i *)(dqcoeff_ptr + n_coeffs), coeff0);
_mm_store_si128((__m128i *)(dqcoeff_ptr + n_coeffs) + 1, coeff1);
} else {
_mm_store_si128((__m128i*)(qcoeff_ptr + n_coeffs), zero);
_mm_store_si128((__m128i*)(qcoeff_ptr + n_coeffs) + 1, zero);
_mm_store_si128((__m128i *)(qcoeff_ptr + n_coeffs), zero);
_mm_store_si128((__m128i *)(qcoeff_ptr + n_coeffs) + 1, zero);
_mm_store_si128((__m128i*)(dqcoeff_ptr + n_coeffs), zero);
_mm_store_si128((__m128i*)(dqcoeff_ptr + n_coeffs) + 1, zero);
_mm_store_si128((__m128i *)(dqcoeff_ptr + n_coeffs), zero);
_mm_store_si128((__m128i *)(dqcoeff_ptr + n_coeffs) + 1, zero);
}
}
......@@ -174,8 +174,8 @@ void av1_quantize_fp_sse2(const int16_t* coeff_ptr, intptr_t n_coeffs,
zero_coeff1 = _mm_cmpeq_epi16(coeff1, zero);
nzero_coeff0 = _mm_cmpeq_epi16(zero_coeff0, zero);
nzero_coeff1 = _mm_cmpeq_epi16(zero_coeff1, zero);
iscan0 = _mm_load_si128((const __m128i*)(iscan_ptr + n_coeffs));
iscan1 = _mm_load_si128((const __m128i*)(iscan_ptr + n_coeffs) + 1);
iscan0 = _mm_load_si128((const __m128i *)(iscan_ptr + n_coeffs));
iscan1 = _mm_load_si128((const __m128i *)(iscan_ptr + n_coeffs) + 1);
// Add one to convert from indices to counts
iscan0 = _mm_sub_epi16(iscan0, nzero_coeff0);
iscan1 = _mm_sub_epi16(iscan1, nzero_coeff1);
......@@ -200,10 +200,10 @@ void av1_quantize_fp_sse2(const int16_t* coeff_ptr, intptr_t n_coeffs,
}
} else {
do {
_mm_store_si128((__m128i*)(dqcoeff_ptr + n_coeffs), zero);
_mm_store_si128((__m128i*)(dqcoeff_ptr + n_coeffs) + 1, zero);
_mm_store_si128((__m128i*)(qcoeff_ptr + n_coeffs), zero);
_mm_store_si128((__m128i*)(qcoeff_ptr + n_coeffs) + 1, zero);
_mm_store_si128((__m128i *)(dqcoeff_ptr + n_coeffs), zero);
_mm_store_si128((__m128i *)(dqcoeff_ptr + n_coeffs) + 1, zero);
_mm_store_si128((__m128i *)(qcoeff_ptr + n_coeffs), zero);
_mm_store_si128((__m128i *)(qcoeff_ptr + n_coeffs) + 1, zero);
n_coeffs += 8 * 2;
} while (n_coeffs < 0);
*eob_ptr = 0;
......
......@@ -49,9 +49,9 @@ TEST(AV1ConvolveTest, av1_convolve8) {
dst, dst_stride, w, h, &interp_filter, subpel_x_q4, x_step_q4,
subpel_y_q4, y_step_q4, avg);
const int16_t* x_filter =
const int16_t *x_filter =
get_interp_filter_subpel_kernel(filter_params, subpel_x_q4);
const int16_t* y_filter =
const int16_t *y_filter =
get_interp_filter_subpel_kernel(filter_params, subpel_y_q4);
aom_convolve8_c(src + src_stride * filter_center + filter_center, src_stride,
......@@ -87,9 +87,9 @@ TEST(AV1ConvolveTest, av1_convolve) {
dst, dst_stride, w, h, &interp_filter, subpel_x_q4,
x_step_q4, subpel_y_q4, y_step_q4, avg);
const int16_t* x_filter =
const int16_t *x_filter =
get_interp_filter_subpel_kernel(filter_params, subpel_x_q4);
const int16_t* y_filter =
const int16_t *y_filter =
get_interp_filter_subpel_kernel(filter_params, subpel_y_q4);
int temp[12];
......@@ -194,9 +194,9 @@ TEST(AV1ConvolveTest, av1_highbd_convolve) {
src_stride, CONVERT_TO_BYTEPTR(dst), dst_stride, w, h, &interp_filter,
subpel_x_q4, x_step_q4, subpel_y_q4, y_step_q4, avg, bd);
const int16_t* x_filter =
const int16_t *x_filter =
get_interp_filter_subpel_kernel(filter_params, subpel_x_q4);
const int16_t* y_filter =
const int16_t *y_filter =
get_interp_filter_subpel_kernel(filter_params, subpel_y_q4);
int temp[12];
......
......@@ -33,20 +33,20 @@ class CodecFactory {
virtual ~CodecFactory() {}
virtual Decoder* CreateDecoder(aom_codec_dec_cfg_t cfg,
virtual Decoder *CreateDecoder(aom_codec_dec_cfg_t cfg,
unsigned long deadline) const = 0;
virtual Decoder* CreateDecoder(aom_codec_dec_cfg_t cfg,
virtual Decoder *CreateDecoder(aom_codec_dec_cfg_t cfg,
const aom_codec_flags_t flags,
unsigned long deadline) // NOLINT(runtime/int)
const = 0;
virtual Encoder* CreateEncoder(aom_codec_enc_cfg_t cfg,
virtual Encoder *CreateEncoder(aom_codec_enc_cfg_t cfg,
unsigned long deadline,
const unsigned long init_flags,
TwopassStatsStore* stats) const = 0;
TwopassStatsStore *stats) const = 0;
virtual aom_codec_err_t DefaultEncoderConfig(aom_codec_enc_cfg_t* cfg,
virtual aom_codec_err_t DefaultEncoderConfig(aom_codec_enc_cfg_t *cfg,
int usage) const = 0;
};
......@@ -57,17 +57,17 @@ class CodecFactory {
template <class T1>
class CodecTestWithParam
: public ::testing::TestWithParam<
std::tr1::tuple<const libaom_test::CodecFactory*, T1> > {};
std::tr1::tuple<const libaom_test::CodecFactory *, T1> > {};
template <class T1, class T2>
class CodecTestWith2Params
: public ::testing::TestWithParam<
std::tr1::tuple<const libaom_test::CodecFactory*, T1, T2> > {};
std::tr1::tuple<const libaom_test::CodecFactory *, T1, T2> > {};
template <class T1, class T2, class T3>
class CodecTestWith3Params
: public ::testing::TestWithParam<
std::tr1::tuple<const libaom_test::CodecFactory*, T1, T2, T3> > {};
std::tr1::tuple<const libaom_test::CodecFactory *, T1, T2, T3> > {};
/*
* AV1 Codec Definitions
......@@ -83,7 +83,7 @@ class AV1Decoder : public Decoder {
: Decoder(cfg, flag, deadline) {}
protected:
virtual aom_codec_iface_t* CodecInterface() const {
virtual aom_codec_iface_t *CodecInterface() const {
#if CONFIG_AV1_DECODER
return &aom_codec_av1_dx_algo;
#else
......@@ -95,11 +95,11 @@ class AV1Decoder : public Decoder {
class AV1Encoder : public Encoder {
public:
AV1Encoder(aom_codec_enc_cfg_t cfg, unsigned long deadline,
const unsigned long init_flags, TwopassStatsStore* stats)
const unsigned long init_flags, TwopassStatsStore *stats)
: Encoder(cfg, deadline, init_flags, stats) {}
protected:
virtual aom_codec_iface_t* CodecInterface() const {
virtual aom_codec_iface_t *CodecInterface() const {
#if CONFIG_AV1_ENCODER
return &aom_codec_av1_cx_algo;
#else
......@@ -112,12 +112,12 @@ class AV1CodecFactory : public CodecFactory {
public:
AV1CodecFactory() : CodecFactory() {}
virtual Decoder* CreateDecoder(aom_codec_dec_cfg_t cfg,
virtual Decoder *CreateDecoder(aom_codec_dec_cfg_t cfg,
unsigned long deadline) const {
return CreateDecoder(cfg, 0, deadline);
}
virtual Decoder* CreateDecoder(aom_codec_dec_cfg_t cfg,
virtual Decoder *CreateDecoder(aom_codec_dec_cfg_t cfg,
const aom_codec_flags_t flags,
unsigned long deadline) const { // NOLINT
#if CONFIG_AV1_DECODER
......@@ -127,10 +127,10 @@ class AV1CodecFactory : public CodecFactory {
#endif
}
virtual Encoder* CreateEncoder(aom_codec_enc_cfg_t cfg,
virtual Encoder *CreateEncoder(aom_codec_enc_cfg_t cfg,
unsigned long deadline,
const unsigned long init_flags,
TwopassStatsStore* stats) const {
TwopassStatsStore *stats) const {
#if CONFIG_AV1_ENCODER
return new AV1Encoder(cfg, deadline, init_flags, stats);
#else
......@@ -138,7 +138,7 @@ class AV1CodecFactory : public CodecFactory {
#endif
}
virtual aom_codec_err_t DefaultEncoderConfig(aom_codec_enc_cfg_t* cfg,
virtual aom_codec_err_t DefaultEncoderConfig(aom_codec_enc_cfg_t *cfg,
int usage) const {
#if CONFIG_AV1_ENCODER
return aom_codec_enc_config_default(&aom_codec_av1_cx_algo, cfg, usage);
......@@ -150,12 +150,12 @@ class AV1CodecFactory : public CodecFactory {
const libaom_test::AV1CodecFactory kAV1;
#define AV1_INSTANTIATE_TEST_CASE(test, ...) \
INSTANTIATE_TEST_CASE_P( \
AV1, test, \
::testing::Combine( \
::testing::Values(static_cast<const libaom_test::CodecFactory*>( \
&libaom_test::kAV1)), \
#define AV1_INSTANTIATE_TEST_CASE(test, ...) \
INSTANTIATE_TEST_CASE_P( \
AV1, test, \
::testing::Combine( \
::testing::Values(static_cast<const libaom_test::CodecFactory *>( \
&libaom_test::kAV1)), \
__VA_ARGS__))
#else
#define AV1_INSTANTIATE_TEST_CASE(test, ...)
......
......@@ -40,7 +40,7 @@
namespace testing {
namespace internal {
inline bool operator==(const M128A& lhs, const M128A& rhs) {
inline bool operator==(const M128A &lhs, const M128A &rhs) {
return (lhs.Low == rhs.Low && lhs.High == rhs.High);
}
......@@ -58,7 +58,7 @@ class RegisterStateCheck {
~RegisterStateCheck() { EXPECT_TRUE(Check()); }
private:
static bool StoreRegisters(CONTEXT* const context) {
static bool StoreRegisters(CONTEXT *const context) {
const HANDLE this_thread = GetCurrentThread();
EXPECT_TRUE(this_thread != NULL);
context->ContextFlags = CONTEXT_FLOATING_POINT;
......@@ -73,8 +73,8 @@ class RegisterStateCheck {
CONTEXT post_context;
if (!StoreRegisters(&post_context)) return false;
const M128A* xmm_pre = &pre_context_.Xmm6;
const M128A* xmm_post = &post_context.Xmm6;
const M128A *xmm_pre = &pre_context_.Xmm6;
const M128A *xmm_post = &post_context.Xmm6;
for (int i = 6; i <= 15; ++i) {
EXPECT_EQ(*xmm_pre, *xmm_post) << "xmm" << i << " has been modified!";
++xmm_pre;
......
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