Mercurial > mplayer.hg
comparison liba52/downmix.c @ 3738:5c1da9bc17a3
memset(?, 0, 256*sizeof(float)) in MMX
author | michael |
---|---|
date | Tue, 25 Dec 2001 17:19:18 +0000 |
parents | f74f4524de6a |
children | b6040dbc751a |
comparison
equal
deleted
inserted
replaced
3737:04ca2b6ddb1e | 3738:5c1da9bc17a3 |
---|---|
63 int output; | 63 int output; |
64 | 64 |
65 output = flags & A52_CHANNEL_MASK; | 65 output = flags & A52_CHANNEL_MASK; |
66 if (output > A52_DOLBY) | 66 if (output > A52_DOLBY) |
67 return -1; | 67 return -1; |
68 | 68 |
69 output = table[output][input & 7]; | 69 output = table[output][input & 7]; |
70 | 70 |
71 if ((output == A52_STEREO) && | 71 if ((output == A52_STEREO) && |
72 ((input == A52_DOLBY) || ((input == A52_3F) && (clev == LEVEL_3DB)))) | 72 ((input == A52_DOLBY) || ((input == A52_3F) && (clev == LEVEL_3DB)))) |
73 output = A52_DOLBY; | 73 output = A52_DOLBY; |
591 } | 591 } |
592 | 592 |
593 static void zero (sample_t * samples) | 593 static void zero (sample_t * samples) |
594 { | 594 { |
595 int i; | 595 int i; |
596 | 596 #ifdef HAVE_MMX |
597 asm volatile( | |
598 "movl $-1024, %%esi \n\t" | |
599 "pxor %%mm0, %%mm0 \n\t" | |
600 "1: \n\t" | |
601 "movq %%mm0, (%0, %%esi) \n\t" | |
602 "movq %%mm0, 8(%0, %%esi) \n\t" | |
603 "movq %%mm0, 16(%0, %%esi) \n\t" | |
604 "movq %%mm0, 24(%0, %%esi) \n\t" | |
605 "addl $32, %%esi \n\t" | |
606 " jnz 1b \n\t" | |
607 "emms" | |
608 :: "r" (samples+256) | |
609 : "%esi" | |
610 ); | |
611 #else | |
597 for (i = 0; i < 256; i++) | 612 for (i = 0; i < 256; i++) |
598 samples[i] = 0; | 613 samples[i] = 0; |
614 #endif | |
599 } | 615 } |
600 | 616 |
601 void downmix (sample_t * samples, int acmod, int output, sample_t bias, | 617 void downmix (sample_t * samples, int acmod, int output, sample_t bias, |
602 sample_t clev, sample_t slev) | 618 sample_t clev, sample_t slev) |
603 { | 619 { |