annotate loader/dshow/DS_AudioDec.c @ 2895:dd3fabd01df0

temp denoiser changes: (a-b)^2 instead of |a-b| and MMX2/3DNOW version
author michael
date Wed, 14 Nov 2001 02:46:58 +0000
parents 4b3f3f850896
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
189
45778577e6aa added DS_AudioDec
arpi_esp
parents:
diff changeset
1
45778577e6aa added DS_AudioDec
arpi_esp
parents:
diff changeset
2 #include "guids.h"
45778577e6aa added DS_AudioDec
arpi_esp
parents:
diff changeset
3 #include "interfaces.h"
1545
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 1082
diff changeset
4
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 1082
diff changeset
5 #include "DS_AudioDecoder.h"
2072
4b3f3f850896 killed unneeded dependency on c++ headers
arpi
parents: 2067
diff changeset
6 #include "wine/winerror.h"
4b3f3f850896 killed unneeded dependency on c++ headers
arpi
parents: 2067
diff changeset
7 #include "libwin32.h"
1545
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 1082
diff changeset
8 //#include <cpuinfo.h>
189
45778577e6aa added DS_AudioDec
arpi_esp
parents:
diff changeset
9
2072
4b3f3f850896 killed unneeded dependency on c++ headers
arpi
parents: 2067
diff changeset
10 //#include <unistd.h>
4b3f3f850896 killed unneeded dependency on c++ headers
arpi
parents: 2067
diff changeset
11 //#include <fcntl.h>
4b3f3f850896 killed unneeded dependency on c++ headers
arpi
parents: 2067
diff changeset
12 //#include <errno.h>
4b3f3f850896 killed unneeded dependency on c++ headers
arpi
parents: 2067
diff changeset
13 //#include <sys/types.h>
4b3f3f850896 killed unneeded dependency on c++ headers
arpi
parents: 2067
diff changeset
14 //#include <sys/mman.h>
4b3f3f850896 killed unneeded dependency on c++ headers
arpi
parents: 2067
diff changeset
15 //#include <cstdio>
4b3f3f850896 killed unneeded dependency on c++ headers
arpi
parents: 2067
diff changeset
16 //#include <iostream>
4b3f3f850896 killed unneeded dependency on c++ headers
arpi
parents: 2067
diff changeset
17 //#include <strstream>
189
45778577e6aa added DS_AudioDec
arpi_esp
parents:
diff changeset
18
45778577e6aa added DS_AudioDec
arpi_esp
parents:
diff changeset
19 #include "DS_AudioDec.h"
45778577e6aa added DS_AudioDec
arpi_esp
parents:
diff changeset
20
2067
a5a4143d5599 setup_FS.c -> ldt_keeper.c (avifile sync)
arpi
parents: 1545
diff changeset
21 #include "ldt_keeper.h"
a5a4143d5599 setup_FS.c -> ldt_keeper.c (avifile sync)
arpi
parents: 1545
diff changeset
22
1545
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 1082
diff changeset
23 // DS_Decoder(const CodecInfo& info, const WAVEFORMATEX*);
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 1082
diff changeset
24 // virtual ~DS_Decoder();
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 1082
diff changeset
25 // virtual int Convert(const void*, size_t, void*, size_t, size_t*, size_t*);
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 1082
diff changeset
26 // virtual int GetSrcSize(int);
189
45778577e6aa added DS_AudioDec
arpi_esp
parents:
diff changeset
27
1545
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 1082
diff changeset
28 static void* _handle;
189
45778577e6aa added DS_AudioDec
arpi_esp
parents:
diff changeset
29
1545
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 1082
diff changeset
30 extern "C" int DS_AudioDecoder_Open(char* dllname, GUID* guid, WAVEFORMATEX* wf){
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 1082
diff changeset
31
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 1082
diff changeset
32 Setup_LDT_Keeper();
2067
a5a4143d5599 setup_FS.c -> ldt_keeper.c (avifile sync)
arpi
parents: 1545
diff changeset
33 Setup_FS_Segment();
189
45778577e6aa added DS_AudioDec
arpi_esp
parents:
diff changeset
34
1545
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 1082
diff changeset
35 CodecInfo ci;
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 1082
diff changeset
36 ci.dll=dllname;
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 1082
diff changeset
37 ci.guid=*guid;
189
45778577e6aa added DS_AudioDec
arpi_esp
parents:
diff changeset
38
1545
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 1082
diff changeset
39 DS_AudioDecoder* dec=new DS_AudioDecoder(ci, wf);
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 1082
diff changeset
40 _handle=(void*)dec;
189
45778577e6aa added DS_AudioDec
arpi_esp
parents:
diff changeset
41
45778577e6aa added DS_AudioDec
arpi_esp
parents:
diff changeset
42 return 0;
45778577e6aa added DS_AudioDec
arpi_esp
parents:
diff changeset
43 }
45778577e6aa added DS_AudioDec
arpi_esp
parents:
diff changeset
44
45778577e6aa added DS_AudioDec
arpi_esp
parents:
diff changeset
45 extern "C" void DS_AudioDecoder_Close(){
45778577e6aa added DS_AudioDec
arpi_esp
parents:
diff changeset
46 }
45778577e6aa added DS_AudioDec
arpi_esp
parents:
diff changeset
47
1545
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 1082
diff changeset
48 extern "C" int DS_AudioDecoder_GetSrcSize(int dest_size){
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 1082
diff changeset
49 DS_AudioDecoder* dec=(DS_AudioDecoder*)_handle;
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 1082
diff changeset
50 return dec->GetSrcSize(dest_size);
189
45778577e6aa added DS_AudioDec
arpi_esp
parents:
diff changeset
51 }
45778577e6aa added DS_AudioDec
arpi_esp
parents:
diff changeset
52
45778577e6aa added DS_AudioDec
arpi_esp
parents:
diff changeset
53 extern "C" int DS_AudioDecoder_Convert(unsigned char* in_data, unsigned in_size,
45778577e6aa added DS_AudioDec
arpi_esp
parents:
diff changeset
54 unsigned char* out_data, unsigned out_size,
1545
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 1082
diff changeset
55 unsigned* size_read, unsigned* size_written){
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 1082
diff changeset
56 DS_AudioDecoder* dec=(DS_AudioDecoder*)_handle;
2067
a5a4143d5599 setup_FS.c -> ldt_keeper.c (avifile sync)
arpi
parents: 1545
diff changeset
57 Setup_FS_Segment();
1545
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 1082
diff changeset
58 return dec->Convert( (void*)in_data,(size_t)in_size,
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 1082
diff changeset
59 (void*)out_data,(size_t)out_size,
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 1082
diff changeset
60 (size_t*)size_read, (size_t*)size_written );
189
45778577e6aa added DS_AudioDec
arpi_esp
parents:
diff changeset
61 }
45778577e6aa added DS_AudioDec
arpi_esp
parents:
diff changeset
62