1
0
mirror of https://github.com/mpv-player/mpv synced 2025-04-04 23:40:47 +00:00

pass accel flags to a52_resample_init

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@3908 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
arpi 2001-12-30 20:42:49 +00:00
parent 44d581c003
commit 2addc399ab
5 changed files with 13 additions and 13 deletions

View File

@ -33,8 +33,10 @@ extern int verbose; // defined in mplayer.c
#endif #endif
#include "liba52/a52.h" #include "liba52/a52.h"
#include "liba52/mm_accel.h"
static sample_t * a52_samples; static sample_t * a52_samples;
static a52_state_t a52_state; static a52_state_t a52_state;
static uint32_t a52_accel=0;
#ifdef USE_G72X #ifdef USE_G72X
#include "g72x/g72x.h" #include "g72x/g72x.h"
@ -536,12 +538,11 @@ if(gCpuCaps.has3DNow){
} }
case AFM_A52: { case AFM_A52: {
// Dolby AC3 audio: // Dolby AC3 audio:
int accel=0; // should contain mmx/sse/etc flags if(gCpuCaps.hasSSE) a52_accel|=MM_ACCEL_X86_SSE;
if(gCpuCaps.hasSSE) accel|=MM_ACCEL_X86_SSE; if(gCpuCaps.hasMMX) a52_accel|=MM_ACCEL_X86_MMX;
if(gCpuCaps.hasMMX) accel|=MM_ACCEL_X86_MMX; if(gCpuCaps.hasMMX2) a52_accel|=MM_ACCEL_X86_MMXEXT;
if(gCpuCaps.hasMMX2) accel|=MM_ACCEL_X86_MMXEXT; if(gCpuCaps.has3DNow) a52_accel|=MM_ACCEL_X86_3DNOW;
if(gCpuCaps.has3DNow) accel|=MM_ACCEL_X86_3DNOW; a52_samples=a52_init (a52_accel);
a52_samples=a52_init (accel);
if (a52_samples == NULL) { if (a52_samples == NULL) {
mp_msg(MSGT_DECAUDIO,MSGL_ERR,"A52 init failed\n"); mp_msg(MSGT_DECAUDIO,MSGL_ERR,"A52 init failed\n");
driver=0;break; driver=0;break;
@ -562,8 +563,7 @@ case AFM_A52: {
} }
case AFM_HWAC3: { case AFM_HWAC3: {
// Dolby AC3 passthrough: // Dolby AC3 passthrough:
int accel=0; // should contain mmx/sse/etc flags a52_samples=a52_init (a52_accel);
a52_samples=a52_init (accel);
if (a52_samples == NULL) { if (a52_samples == NULL) {
mp_msg(MSGT_DECAUDIO,MSGL_ERR,"A52 init failed\n"); mp_msg(MSGT_DECAUDIO,MSGL_ERR,"A52 init failed\n");
driver=0;break; driver=0;break;
@ -1144,7 +1144,7 @@ int decode_audio(sh_audio_t *sh_audio,unsigned char *buf,int minlen,int maxlen){
// a52_dynrng (&state, NULL, NULL); // disable dynamic range compensation // a52_dynrng (&state, NULL, NULL); // disable dynamic range compensation
// frame decoded, let's resample: // frame decoded, let's resample:
a52_resample_init(flags,sh_audio->channels); a52_resample_init(a52_accel,flags,sh_audio->channels);
len=0; len=0;
for (i = 0; i < 6; i++) { for (i = 0; i < 6; i++) {
if (a52_block (&a52_state, a52_samples)){ if (a52_block (&a52_state, a52_samples)){

View File

@ -119,7 +119,7 @@ void a52_dynrng (a52_state_t * state,
sample_t (* call) (sample_t, void *), void * data); sample_t (* call) (sample_t, void *), void * data);
int a52_block (a52_state_t * state, sample_t * samples); int a52_block (a52_state_t * state, sample_t * samples);
void a52_resample_init(int _flags,int _chans); void a52_resample_init(uint32_t mm_accel,int _flags,int _chans);
extern int (* a52_resample) (float * _f, int16_t * s16); extern int (* a52_resample) (float * _f, int16_t * s16);
uint16_t crc16_block(uint8_t *data,uint32_t num_bytes); uint16_t crc16_block(uint8_t *data,uint32_t num_bytes);

View File

@ -586,7 +586,7 @@ int a52_resample_MMX(float * _f, int16_t * s16)
} }
#endif //arch_x86 #endif //arch_x86
void a52_resample_init(int _flags,int _chans){ void a52_resample_init(uint32_t mm_accel,int _flags,int _chans){
chans=_chans; chans=_chans;
flags=_flags; flags=_flags;

View File

@ -586,7 +586,7 @@ int a52_resample_MMX(float * _f, int16_t * s16)
} }
#endif //arch_x86 #endif //arch_x86
void a52_resample_init(int _flags,int _chans){ void a52_resample_init(uint32_t mm_accel,int _flags,int _chans){
chans=_chans; chans=_chans;
flags=_flags; flags=_flags;

View File

@ -586,7 +586,7 @@ int a52_resample_MMX(float * _f, int16_t * s16)
} }
#endif //arch_x86 #endif //arch_x86
void a52_resample_init(int _flags,int _chans){ void a52_resample_init(uint32_t mm_accel,int _flags,int _chans){
chans=_chans; chans=_chans;
flags=_flags; flags=_flags;