Re: [PATCH v4 09/16] sbc: Use simd primitive if doing msbc on neon

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 15 Nov 2012 11:23:59 +0100
Frédéric Dalleau <frederic.dalleau@xxxxxxxxxxxxxxx> wrote:

> Hi,
> On 11/14/2012 08:27 PM, Siarhei Siamashka wrote:
> > On Tue, 30 Oct 2012 10:39:28 +0100
> >> +	if (state->increment == 1)
> >> +		state->sbc_analyze_8s = sbc_analyze_1b_8s_simd;
> >>   #endif
> >>   }
> >
> > This is not enough. As I commented earlier in
> >      http://permalink.gmane.org/gmane.linux.bluez.kernel/31567
> >
> > "neon code also provides optimized "sbc_enc_process_input_*" functions,
> > which are not going to work correctly for mSBC:
> >
> > 	state->sbc_enc_process_input_8s_le = sbc_enc_process_input_8s_le_neon;
> > 	state->sbc_enc_process_input_8s_be = sbc_enc_process_input_8s_be_neon;"
> 
> Indeed, this is a mistake :
> I wanted to use the neon analysis in conjonction with simd input processing.
> 
> Instead, the patch would look like this :
> + if (state->increment == 1) {
> + 	state->sbc_enc_process_input_8s_be = 	
> +					sbc_enc_process_input_8s_be;
> +	state->sbc_enc_process_input_8s_le =
> +					sbc_enc_process_input_8s_le;
> + }
> Damned it is 82 chars long!
> 
> Unfortunately I can't test this one. I can't even build it. I could but 
> that's gonna take a lot of time.

I can test the patches on ARM. But what I'm asking is just to restore
*all* function pointers (not state->sbc_analyze_8s alone) to C
implementations for ARM NEON in the case if "state->increment == 1".
This minor modification should be enough.

Also building and testing is not too difficult when having an arm
crosscompiler (I believe ubuntu even has it packaged) and qemu. The
whole process may look like this:

$ apt-get install qemu-user
$ apt-get install gcc-arm-linux-gnueabihf
$ arm-linux-gnueabihf-gcc -O2 -march=armv7-a -mfpu=neon \
          -static -I. -DVERSION=\"\" \
          -o sbcenc src/sbcenc.c sbc/*.c
$ qemu-arm -cpu cortex-a8 ./sbcenc test.au > test.sbc

-- 
Best regards,
Siarhei Siamashka
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux