[flac-dev] [PATCH] two patches of doubtful usefulness

Miroslav Lichvar mlichvar at redhat.com
Thu Jul 3 05:52:52 PDT 2014


On Thu, Jul 03, 2014 at 04:21:59PM +0400, lvqcl wrote:
> Erik de Castro Lopo wrote:
> 
> >> There's the following code in stream_decoder.c:
> >
> > Like you, I don't see a lot of value in these. I think I'll decline
> > these.
> 
> FLAC__lpc_restore_signal_asm_ia32_mmx compares 'order' argument with 4
> and if it's greater then it jumps to FLAC__lpc_restore_signal_asm_ia32.
> 
> I wonder why the same wasn't done for PPC/Altivec: why libFLAC compares
> 'order' and 8 in C code and not in asm.

Perhaps because it's easier to do it in C than in asm? :)

Wrapping the check in #ifdef will save few instructions on
non-ppc archs, but in this case I think it doesn't really matter. It
would make the code less readable and more likely someone will forgot
about it in the future and break it for ppc.

-- 
Miroslav Lichvar


More information about the flac-dev mailing list