shithub: libvpx

Download patch

ref: 2c56bb97f2363a21fc26c1e20f86e01657a87bb5
parent: c02fdd0258abaa9cf81e3b685bb13dae6417d786
author: Johann <johannkoenig@google.com>
date: Mon Aug 21 07:15:39 EDT 2017

quantize: ignore skip_block in arm

Change-Id: Icfb70687476b2edb25d255793ba325b261d40584

--- a/vpx_dsp/arm/quantize_neon.c
+++ b/vpx_dsp/arm/quantize_neon.c
@@ -9,6 +9,7 @@
  */
 
 #include <arm_neon.h>
+#include <assert.h>
 
 #include "./vpx_dsp_rtcd.h"
 #include "vpx_dsp/arm/mem_neon.h"
@@ -20,25 +21,13 @@
                          tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr,
                          uint16_t *eob_ptr, const int16_t *scan_ptr,
                          const int16_t *iscan_ptr) {
-  const int16x8_t zero = vdupq_n_s16(0);
   const int16x8_t one = vdupq_n_s16(1);
   const int16x8_t neg_one = vdupq_n_s16(-1);
   uint16x8_t eob_max;
   (void)scan_ptr;
+  (void)skip_block;
+  assert(!skip_block);
 
-  if (skip_block) {
-    do {
-      store_s16q_to_tran_low(qcoeff_ptr, zero);
-      store_s16q_to_tran_low(dqcoeff_ptr, zero);
-      qcoeff_ptr += 8;
-      dqcoeff_ptr += 8;
-      n_coeffs -= 8;
-    } while (n_coeffs > 0);
-
-    *eob_ptr = 0;
-    return;
-  }
-
   // Process first 8 values which include a dc component.
   {
     // Only the first element of each vector is DC.
@@ -162,7 +151,6 @@
     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) {
-  const int16x8_t zero = vdupq_n_s16(0);
   const int16x8_t one = vdupq_n_s16(1);
   const int16x8_t neg_one = vdupq_n_s16(-1);
   uint16x8_t eob_max;
@@ -169,17 +157,8 @@
   int i;
   (void)scan_ptr;
   (void)n_coeffs;  // Because we will always calculate 32*32.
-
-  if (skip_block) {
-    for (i = 0; i < 32 * 32 / 8; ++i) {
-      store_s16q_to_tran_low(qcoeff_ptr, zero);
-      store_s16q_to_tran_low(dqcoeff_ptr, zero);
-      qcoeff_ptr += 8;
-      dqcoeff_ptr += 8;
-    }
-    *eob_ptr = 0;
-    return;
-  }
+  (void)skip_block;
+  assert(!skip_block);
 
   // Process first 8 values which include a dc component.
   {