minor tweaks to asm routine selection
authorJosh Coalson <jcoalson@users.sourceforce.net>
Wed, 30 May 2001 19:20:36 +0000 (19:20 +0000)
committerJosh Coalson <jcoalson@users.sourceforce.net>
Wed, 30 May 2001 19:20:36 +0000 (19:20 +0000)
src/libFLAC/encoder.c
src/libFLAC/stream_decoder.c

index 8987380..de7d461 100644 (file)
@@ -336,24 +336,29 @@ FLAC__EncoderState FLAC__encoder_init(FLAC__Encoder *encoder, FLAC__EncoderWrite
 #ifdef FLAC__HAS_NASM
 #if 0
        /* @@@ SSE version not working yet */
-       if(encoder->guts->cpuinfo.data.ia32.sse)
+       if(encoder->guts->cpuinfo.data.ia32.sse && encoder->max_lpc_order == 7)
+{//@@@
                encoder->guts->local_lpc_compute_autocorrelation = FLAC__lpc_compute_autocorrelation_asm_i386_sse;
+fprintf(stderr,"@@@ got _asm_i386_sse of lpc_compute_autocorrelation()\n");}
        else
 #endif
-fprintf(stderr,"@@@ got _asm_i386 of lpc_compute_autocorrelation()\n");
+{//@@@
                encoder->guts->local_lpc_compute_autocorrelation = FLAC__lpc_compute_autocorrelation_asm_i386;
+fprintf(stderr,"@@@ got _asm_i386 of lpc_compute_autocorrelation()\n");}
        if(encoder->guts->cpuinfo.data.ia32.mmx && encoder->guts->cpuinfo.data.ia32.cmov)
-{
+{//@@@
                encoder->guts->local_fixed_compute_best_predictor = FLAC__fixed_compute_best_predictor_asm_i386_mmx_cmov;
 fprintf(stderr,"@@@ got _asm_i386_mmx_cmov of fixed_compute_best_predictor()\n");}
 #if 0
        /* @@@ MMX version needs bps check */
-       if(decoder->guts->cpuinfo.data.ia32.mmx && @@@bps check here@@@)
+       if(encoder->guts->cpuinfo.data.ia32.mmx && @@@bps check here@@@)
+{//@@@
                encoder->guts->local_lpc_compute_residual_from_qlp_coefficients = FLAC__lpc_compute_residual_from_qlp_coefficients_asm_i386_mmx;
+fprintf(stderr,"@@@ got _asm_i386_mmx of lpc_compute_residual_from_qlp_coefficients()\n");}
        else
 #endif
-{
-       encoder->guts->local_lpc_compute_residual_from_qlp_coefficients = FLAC__lpc_compute_residual_from_qlp_coefficients_asm_i386;
+{//@@@
+               encoder->guts->local_lpc_compute_residual_from_qlp_coefficients = FLAC__lpc_compute_residual_from_qlp_coefficients_asm_i386;
 fprintf(stderr,"@@@ got _asm_i386 of lpc_compute_residual_from_qlp_coefficients()\n");}
 #endif
 #endif
index 31c3c9d..2c2a6f1 100644 (file)
@@ -175,11 +175,14 @@ FLAC__StreamDecoderState FLAC__stream_decoder_init(
 #if 0
        /* @@@ MMX version needs bps check */
        if(decoder->guts->cpuinfo.data.ia32.mmx && @@@bps check here@@@)
+{//@@@
                decoder->guts->local_lpc_restore_signal = FLAC__lpc_restore_signal_asm_i386_mmx;
+fprintf(stderr,"@@@ got _asm_i386_mmx of lpc_restore_signal()\n");}
        else
 #endif
-fprintf(stderr,"@@@ got _asm_i386 of lpc_restore_signal()\n");
+{//@@@
                decoder->guts->local_lpc_restore_signal = FLAC__lpc_restore_signal_asm_i386;
+fprintf(stderr,"@@@ got _asm_i386 of lpc_restore_signal()\n");}
 #endif
 #endif
 #endif