OSDN Git Service

sbc: Use plain C primitive if doing msbc on neon
authorFrédéric Dalleau <frederic.dalleau@linux.intel.com>
Mon, 8 Apr 2013 13:24:10 +0000 (15:24 +0200)
committerJohan Hedberg <johan.hedberg@intel.com>
Mon, 15 Apr 2013 08:03:11 +0000 (11:03 +0300)
neon has it's own optimized input reordering. Until this code gets optimized,
the neon assembly code will not work with the mSBC input reordering.
However, the plain C version of mSBC can be used in this case.
This patch makes use of plain C code if the block increment is 1 which is
typical for mSBC.

sbc/sbc_primitives.c

index f232f65..bf9937d 100644 (file)
@@ -570,5 +570,13 @@ void sbc_init_primitives(struct sbc_encoder_state *state)
 #endif
 #ifdef SBC_BUILD_WITH_NEON_SUPPORT
        sbc_init_primitives_neon(state);
+
+       if (state->increment == 1) {
+               state->sbc_analyze_8s = sbc_analyze_1b_8s_simd_odd;
+               state->sbc_enc_process_input_4s_le = sbc_enc_process_input_4s_le;
+               state->sbc_enc_process_input_4s_be = sbc_enc_process_input_4s_be;
+               state->sbc_enc_process_input_8s_le = sbc_enc_process_input_8s_le;
+               state->sbc_enc_process_input_8s_be = sbc_enc_process_input_8s_be;
+       }
 #endif
 }