shithub: libvpx

Download patch

ref: 956af1d478c910ee0aa0c0f124311c2d079b42e8
parent: 6b374abc8654c93cdd42091164762150fd7951f0
author: clang-format <noreply@google.com>
date: Wed Jul 27 17:41:18 EDT 2016

vpx_dsp/x86/quantize_sse2.c: apply clang-format

post:
e429080 .clang-format: disable DerivePointerAlignment

Change-Id: I21a0546668edb2b09660e216d4875a1d2ad24d53

--- a/vpx_dsp/x86/quantize_sse2.c
+++ b/vpx_dsp/x86/quantize_sse2.c
@@ -14,7 +14,7 @@
 #include "./vpx_dsp_rtcd.h"
 #include "vpx/vpx_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_VP9_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],
@@ -21,12 +21,12 @@
                         (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_VP9_HIGHBITDEPTH
   __m128i one = _mm_set1_epi16(1);
   __m128i coeff_vals_hi = _mm_mulhi_epi16(coeff_vals, one);
@@ -33,20 +33,20 @@
   __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 vpx_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 vpx_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;
 
@@ -66,13 +66,13 @@
       // 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);
       }
 
       {
@@ -138,8 +138,8 @@
         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);
@@ -211,8 +211,8 @@
         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);