remove libvoipcodecs
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@15092 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
309d419e5e
commit
8928d5f717
|
@ -184,6 +184,9 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_event_socket", "src\mod
|
|||
EndProjectSection
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "_Libraries", "_Libraries", "{EB910B0D-F27D-4B62-B67B-DE834C99AC5B}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
libs\spandsp\src\msvc\make_modem_filter.2005.vcproj = libs\spandsp\src\msvc\make_modem_filter.2005.vcproj
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libdingaling", "libs\libdingaling\libdingaling.vcproj", "{1906D736-08BD-4EE1-924F-B536249B9A54}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
|
@ -762,12 +765,11 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_tone_stream", "src\mod\
|
|||
{89385C74-5860-4174-9CAF-A39E7C48909C} = {89385C74-5860-4174-9CAF-A39E7C48909C}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libvoipcodecs", "libs\voipcodecs\libvoipcodecs.vcproj", "{CF70F278-3364-4395-A2E1-23501C9B8AD2}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_voipcodecs", "src\mod\codecs\mod_voipcodecs\mod_voipcodecs.vcproj", "{9EED03C8-8315-4214-8D13-8FF5FA46D93C}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{401A40CD-5DB4-4E34-AC68-FA99E9FAC014} = {401A40CD-5DB4-4E34-AC68-FA99E9FAC014}
|
||||
{1CBB0077-18C5-455F-801C-0A0CE7B0BBF5} = {1CBB0077-18C5-455F-801C-0A0CE7B0BBF5}
|
||||
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
|
||||
{CF70F278-3364-4395-A2E1-23501C9B8AD2} = {CF70F278-3364-4395-A2E1-23501C9B8AD2}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_spidermonkey_curl", "src\mod\languages\mod_spidermonkey_curl\mod_spidermonkey_curl.vcproj", "{2CCED6DC-26FF-40F2-9585-E9E1049A4599}"
|
||||
|
@ -812,544 +814,854 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_say_ru", "src\mod\say\m
|
|||
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libtiff", "libs\spandsp\src\libtiff.2005.vcproj", "{401A40CD-5DB4-4E34-AC68-FA99E9FAC014}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libspandsp", "libs\spandsp\src\libspandsp.2005.vcproj", "{1CBB0077-18C5-455F-801C-0A0CE7B0BBF5}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{329A6FA0-0FCC-4435-A950-E670AEFA9838} = {329A6FA0-0FCC-4435-A950-E670AEFA9838}
|
||||
{DEE932AB-5911-4700-9EEB-8C7090A0A330} = {DEE932AB-5911-4700-9EEB-8C7090A0A330}
|
||||
{401A40CD-5DB4-4E34-AC68-FA99E9FAC014} = {401A40CD-5DB4-4E34-AC68-FA99E9FAC014}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "make_at_dictionary", "libs\spandsp\src\msvc\make_at_dictionary.2005.vcproj", "{DEE932AB-5911-4700-9EEB-8C7090A0A330}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "make_modem_filter", "libs\spandsp\src\msvc\make_modem_filter.2005.vcproj", "{329A6FA0-0FCC-4435-A950-E670AEFA9838}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
All|Win32 = All|Win32
|
||||
All|x64 = All|x64
|
||||
Debug|Win32 = Debug|Win32
|
||||
Debug|x64 = Debug|x64
|
||||
Release|Win32 = Release|Win32
|
||||
Release|x64 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{1AF3A893-F7BE-43DD-B697-8AB2397C0D67}.All|Win32.ActiveCfg = Release|Win32
|
||||
{1AF3A893-F7BE-43DD-B697-8AB2397C0D67}.All|Win32.Build.0 = Release|Win32
|
||||
{1AF3A893-F7BE-43DD-B697-8AB2397C0D67}.All|x64.ActiveCfg = Release|Win32
|
||||
{1AF3A893-F7BE-43DD-B697-8AB2397C0D67}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{1AF3A893-F7BE-43DD-B697-8AB2397C0D67}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{1AF3A893-F7BE-43DD-B697-8AB2397C0D67}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{1AF3A893-F7BE-43DD-B697-8AB2397C0D67}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{1AF3A893-F7BE-43DD-B697-8AB2397C0D67}.Release|Win32.Build.0 = Release|Win32
|
||||
{1AF3A893-F7BE-43DD-B697-8AB2397C0D67}.Release|x64.ActiveCfg = Release|Win32
|
||||
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF}.All|Win32.ActiveCfg = Release|Win32
|
||||
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF}.All|Win32.Build.0 = Release|Win32
|
||||
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF}.All|x64.ActiveCfg = Release|Win32
|
||||
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF}.Release|Win32.Build.0 = Release|Win32
|
||||
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF}.Release|x64.ActiveCfg = Release|Win32
|
||||
{1D95CD95-0DE2-48C3-AC23-D5C7D1C9C0F0}.All|Win32.ActiveCfg = Release Passthrough|Win32
|
||||
{1D95CD95-0DE2-48C3-AC23-D5C7D1C9C0F0}.All|Win32.Build.0 = Release Passthrough|Win32
|
||||
{1D95CD95-0DE2-48C3-AC23-D5C7D1C9C0F0}.All|x64.ActiveCfg = Release Passthrough|Win32
|
||||
{1D95CD95-0DE2-48C3-AC23-D5C7D1C9C0F0}.Debug|Win32.ActiveCfg = Debug Passthrough|Win32
|
||||
{1D95CD95-0DE2-48C3-AC23-D5C7D1C9C0F0}.Debug|Win32.Build.0 = Debug Passthrough|Win32
|
||||
{1D95CD95-0DE2-48C3-AC23-D5C7D1C9C0F0}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{1D95CD95-0DE2-48C3-AC23-D5C7D1C9C0F0}.Release|Win32.ActiveCfg = Release Passthrough|Win32
|
||||
{1D95CD95-0DE2-48C3-AC23-D5C7D1C9C0F0}.Release|Win32.Build.0 = Release Passthrough|Win32
|
||||
{1D95CD95-0DE2-48C3-AC23-D5C7D1C9C0F0}.Release|x64.ActiveCfg = Release|Win32
|
||||
{AFAC0568-7548-42D5-9F6A-8D3400A1E4F6}.All|Win32.ActiveCfg = Release|Win32
|
||||
{AFAC0568-7548-42D5-9F6A-8D3400A1E4F6}.All|Win32.Build.0 = Release|Win32
|
||||
{AFAC0568-7548-42D5-9F6A-8D3400A1E4F6}.All|x64.ActiveCfg = Release|Win32
|
||||
{AFAC0568-7548-42D5-9F6A-8D3400A1E4F6}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{AFAC0568-7548-42D5-9F6A-8D3400A1E4F6}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{AFAC0568-7548-42D5-9F6A-8D3400A1E4F6}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{AFAC0568-7548-42D5-9F6A-8D3400A1E4F6}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{AFAC0568-7548-42D5-9F6A-8D3400A1E4F6}.Release|Win32.Build.0 = Release|Win32
|
||||
{AFAC0568-7548-42D5-9F6A-8D3400A1E4F6}.Release|x64.ActiveCfg = Release|Win32
|
||||
{3A5B9131-F20C-4A85-9447-6C1610941CEE}.All|Win32.ActiveCfg = Release|Win32
|
||||
{3A5B9131-F20C-4A85-9447-6C1610941CEE}.All|Win32.Build.0 = Release|Win32
|
||||
{3A5B9131-F20C-4A85-9447-6C1610941CEE}.All|x64.ActiveCfg = Release|Win32
|
||||
{3A5B9131-F20C-4A85-9447-6C1610941CEE}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{3A5B9131-F20C-4A85-9447-6C1610941CEE}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{3A5B9131-F20C-4A85-9447-6C1610941CEE}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{3A5B9131-F20C-4A85-9447-6C1610941CEE}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{3A5B9131-F20C-4A85-9447-6C1610941CEE}.Release|Win32.Build.0 = Release|Win32
|
||||
{3A5B9131-F20C-4A85-9447-6C1610941CEE}.Release|x64.ActiveCfg = Release|Win32
|
||||
{5FD31A25-5D83-4794-8BEE-904DAD84CE71}.All|Win32.ActiveCfg = Release|Win32
|
||||
{5FD31A25-5D83-4794-8BEE-904DAD84CE71}.All|Win32.Build.0 = Release|Win32
|
||||
{5FD31A25-5D83-4794-8BEE-904DAD84CE71}.All|x64.ActiveCfg = Release|Win32
|
||||
{5FD31A25-5D83-4794-8BEE-904DAD84CE71}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{5FD31A25-5D83-4794-8BEE-904DAD84CE71}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{5FD31A25-5D83-4794-8BEE-904DAD84CE71}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{5FD31A25-5D83-4794-8BEE-904DAD84CE71}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{5FD31A25-5D83-4794-8BEE-904DAD84CE71}.Release|Win32.Build.0 = Release|Win32
|
||||
{5FD31A25-5D83-4794-8BEE-904DAD84CE71}.Release|x64.ActiveCfg = Release|Win32
|
||||
{5580D60E-0F77-4716-9CD4-B8E5986FA375}.All|Win32.ActiveCfg = Release|Win32
|
||||
{5580D60E-0F77-4716-9CD4-B8E5986FA375}.All|Win32.Build.0 = Release|Win32
|
||||
{5580D60E-0F77-4716-9CD4-B8E5986FA375}.All|x64.ActiveCfg = Release|Win32
|
||||
{5580D60E-0F77-4716-9CD4-B8E5986FA375}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{5580D60E-0F77-4716-9CD4-B8E5986FA375}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{5580D60E-0F77-4716-9CD4-B8E5986FA375}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{5580D60E-0F77-4716-9CD4-B8E5986FA375}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{5580D60E-0F77-4716-9CD4-B8E5986FA375}.Release|Win32.Build.0 = Release|Win32
|
||||
{5580D60E-0F77-4716-9CD4-B8E5986FA375}.Release|x64.ActiveCfg = Release|Win32
|
||||
{1A1FF289-4FD6-4285-A422-D31DD67A4723}.All|Win32.ActiveCfg = Release|Win32
|
||||
{1A1FF289-4FD6-4285-A422-D31DD67A4723}.All|Win32.Build.0 = Release|Win32
|
||||
{1A1FF289-4FD6-4285-A422-D31DD67A4723}.All|x64.ActiveCfg = Release|Win32
|
||||
{1A1FF289-4FD6-4285-A422-D31DD67A4723}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{1A1FF289-4FD6-4285-A422-D31DD67A4723}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{1A1FF289-4FD6-4285-A422-D31DD67A4723}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{1A1FF289-4FD6-4285-A422-D31DD67A4723}.Release|x64.ActiveCfg = Release|Win32
|
||||
{07113B25-D3AF-4E04-BA77-4CD1171F022C}.All|Win32.ActiveCfg = Release|Win32
|
||||
{07113B25-D3AF-4E04-BA77-4CD1171F022C}.All|Win32.Build.0 = Release|Win32
|
||||
{07113B25-D3AF-4E04-BA77-4CD1171F022C}.All|x64.ActiveCfg = Release|Win32
|
||||
{07113B25-D3AF-4E04-BA77-4CD1171F022C}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{07113B25-D3AF-4E04-BA77-4CD1171F022C}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{07113B25-D3AF-4E04-BA77-4CD1171F022C}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{07113B25-D3AF-4E04-BA77-4CD1171F022C}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{07113B25-D3AF-4E04-BA77-4CD1171F022C}.Release|Win32.Build.0 = Release|Win32
|
||||
{07113B25-D3AF-4E04-BA77-4CD1171F022C}.Release|x64.ActiveCfg = Release|Win32
|
||||
{B17FFBE6-A942-4056-8346-B624FB5D995B}.All|Win32.ActiveCfg = Release with MySql
|
||||
{B17FFBE6-A942-4056-8346-B624FB5D995B}.All|Win32.Build.0 = Release with MySql
|
||||
{B17FFBE6-A942-4056-8346-B624FB5D995B}.All|x64.ActiveCfg = Release with MySql
|
||||
{B17FFBE6-A942-4056-8346-B624FB5D995B}.All|x64.Build.0 = Release with MySql
|
||||
{B17FFBE6-A942-4056-8346-B624FB5D995B}.Debug|Win32.ActiveCfg = Debug
|
||||
{B17FFBE6-A942-4056-8346-B624FB5D995B}.Debug|x64.ActiveCfg = Debug with MySql
|
||||
{B17FFBE6-A942-4056-8346-B624FB5D995B}.Debug|x64.Build.0 = Debug with MySql
|
||||
{B17FFBE6-A942-4056-8346-B624FB5D995B}.Release|Win32.ActiveCfg = Release
|
||||
{B17FFBE6-A942-4056-8346-B624FB5D995B}.Release|x64.ActiveCfg = Release with MySql
|
||||
{B17FFBE6-A942-4056-8346-B624FB5D995B}.Release|x64.Build.0 = Release with MySql
|
||||
{EC3E5C7F-EE09-47E2-80FE-546363D14A98}.All|Win32.ActiveCfg = Release MS-LDAP|Win32
|
||||
{EC3E5C7F-EE09-47E2-80FE-546363D14A98}.All|Win32.Build.0 = Release MS-LDAP|Win32
|
||||
{EC3E5C7F-EE09-47E2-80FE-546363D14A98}.All|x64.ActiveCfg = Release MS-LDAP|Win32
|
||||
{EC3E5C7F-EE09-47E2-80FE-546363D14A98}.Debug|Win32.ActiveCfg = Debug MS-LDAP|Win32
|
||||
{EC3E5C7F-EE09-47E2-80FE-546363D14A98}.Debug|Win32.Build.0 = Debug MS-LDAP|Win32
|
||||
{EC3E5C7F-EE09-47E2-80FE-546363D14A98}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{EC3E5C7F-EE09-47E2-80FE-546363D14A98}.Release|Win32.ActiveCfg = Release MS-LDAP|Win32
|
||||
{EC3E5C7F-EE09-47E2-80FE-546363D14A98}.Release|Win32.Build.0 = Release MS-LDAP|Win32
|
||||
{EC3E5C7F-EE09-47E2-80FE-546363D14A98}.Release|x64.ActiveCfg = Release|Win32
|
||||
{A27CCA23-1541-4337-81A4-F0A6413078A0}.All|Win32.ActiveCfg = Release|Win32
|
||||
{A27CCA23-1541-4337-81A4-F0A6413078A0}.All|Win32.Build.0 = Release|Win32
|
||||
{A27CCA23-1541-4337-81A4-F0A6413078A0}.All|x64.ActiveCfg = Release|Win32
|
||||
{A27CCA23-1541-4337-81A4-F0A6413078A0}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{A27CCA23-1541-4337-81A4-F0A6413078A0}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{A27CCA23-1541-4337-81A4-F0A6413078A0}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{A27CCA23-1541-4337-81A4-F0A6413078A0}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{A27CCA23-1541-4337-81A4-F0A6413078A0}.Release|Win32.Build.0 = Release|Win32
|
||||
{A27CCA23-1541-4337-81A4-F0A6413078A0}.Release|x64.ActiveCfg = Release|Win32
|
||||
{C7705DC4-2088-493E-AF8D-65BC6D65C125}.All|Win32.ActiveCfg = Release|Win32
|
||||
{C7705DC4-2088-493E-AF8D-65BC6D65C125}.All|Win32.Build.0 = Release|Win32
|
||||
{C7705DC4-2088-493E-AF8D-65BC6D65C125}.All|x64.ActiveCfg = Release|Win32
|
||||
{C7705DC4-2088-493E-AF8D-65BC6D65C125}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{C7705DC4-2088-493E-AF8D-65BC6D65C125}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{C7705DC4-2088-493E-AF8D-65BC6D65C125}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{C7705DC4-2088-493E-AF8D-65BC6D65C125}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{C7705DC4-2088-493E-AF8D-65BC6D65C125}.Release|Win32.Build.0 = Release|Win32
|
||||
{C7705DC4-2088-493E-AF8D-65BC6D65C125}.Release|x64.ActiveCfg = Release|Win32
|
||||
{784113EF-44D9-4949-835D-7065D3C7AD08}.All|Win32.ActiveCfg = Release|Win32
|
||||
{784113EF-44D9-4949-835D-7065D3C7AD08}.All|Win32.Build.0 = Release|Win32
|
||||
{784113EF-44D9-4949-835D-7065D3C7AD08}.All|x64.ActiveCfg = Release|Win32
|
||||
{784113EF-44D9-4949-835D-7065D3C7AD08}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{784113EF-44D9-4949-835D-7065D3C7AD08}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{784113EF-44D9-4949-835D-7065D3C7AD08}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{784113EF-44D9-4949-835D-7065D3C7AD08}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{784113EF-44D9-4949-835D-7065D3C7AD08}.Release|Win32.Build.0 = Release|Win32
|
||||
{784113EF-44D9-4949-835D-7065D3C7AD08}.Release|x64.ActiveCfg = Release|Win32
|
||||
{89385C74-5860-4174-9CAF-A39E7C48909C}.All|Win32.ActiveCfg = Release|Win32
|
||||
{89385C74-5860-4174-9CAF-A39E7C48909C}.All|Win32.Build.0 = Release|Win32
|
||||
{89385C74-5860-4174-9CAF-A39E7C48909C}.All|x64.ActiveCfg = Release|Win32
|
||||
{89385C74-5860-4174-9CAF-A39E7C48909C}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{89385C74-5860-4174-9CAF-A39E7C48909C}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{89385C74-5860-4174-9CAF-A39E7C48909C}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{89385C74-5860-4174-9CAF-A39E7C48909C}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{89385C74-5860-4174-9CAF-A39E7C48909C}.Release|Win32.Build.0 = Release|Win32
|
||||
{89385C74-5860-4174-9CAF-A39E7C48909C}.Release|x64.ActiveCfg = Release|Win32
|
||||
{1AD3F51E-BBB6-4090-BA39-9DFAB1EF1F5F}.All|Win32.ActiveCfg = Release|Win32
|
||||
{1AD3F51E-BBB6-4090-BA39-9DFAB1EF1F5F}.All|Win32.Build.0 = Release|Win32
|
||||
{1AD3F51E-BBB6-4090-BA39-9DFAB1EF1F5F}.All|x64.ActiveCfg = Release|Win32
|
||||
{1AD3F51E-BBB6-4090-BA39-9DFAB1EF1F5F}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{1AD3F51E-BBB6-4090-BA39-9DFAB1EF1F5F}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{1AD3F51E-BBB6-4090-BA39-9DFAB1EF1F5F}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{1AD3F51E-BBB6-4090-BA39-9DFAB1EF1F5F}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{1AD3F51E-BBB6-4090-BA39-9DFAB1EF1F5F}.Release|Win32.Build.0 = Release|Win32
|
||||
{1AD3F51E-BBB6-4090-BA39-9DFAB1EF1F5F}.Release|x64.ActiveCfg = Release|Win32
|
||||
{692F6330-4D87-4C82-81DF-40DB5892636E}.All|Win32.ActiveCfg = Release|Win32
|
||||
{692F6330-4D87-4C82-81DF-40DB5892636E}.All|Win32.Build.0 = Release|Win32
|
||||
{692F6330-4D87-4C82-81DF-40DB5892636E}.All|x64.ActiveCfg = Release|Win32
|
||||
{692F6330-4D87-4C82-81DF-40DB5892636E}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{692F6330-4D87-4C82-81DF-40DB5892636E}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{692F6330-4D87-4C82-81DF-40DB5892636E}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{692F6330-4D87-4C82-81DF-40DB5892636E}.Release|x64.ActiveCfg = Release|Win32
|
||||
{D3EC0AFF-76FC-4210-A825-9A17410660A3}.All|Win32.ActiveCfg = Release|Win32
|
||||
{D3EC0AFF-76FC-4210-A825-9A17410660A3}.All|Win32.Build.0 = Release|Win32
|
||||
{D3EC0AFF-76FC-4210-A825-9A17410660A3}.All|x64.ActiveCfg = Release|Win32
|
||||
{D3EC0AFF-76FC-4210-A825-9A17410660A3}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{D3EC0AFF-76FC-4210-A825-9A17410660A3}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{D3EC0AFF-76FC-4210-A825-9A17410660A3}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{D3EC0AFF-76FC-4210-A825-9A17410660A3}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{D3EC0AFF-76FC-4210-A825-9A17410660A3}.Release|Win32.Build.0 = Release|Win32
|
||||
{D3EC0AFF-76FC-4210-A825-9A17410660A3}.Release|x64.ActiveCfg = Release|Win32
|
||||
{FFAA4C52-3A53-4F99-90C1-D59D1F0427F3}.All|Win32.ActiveCfg = Release|Win32
|
||||
{FFAA4C52-3A53-4F99-90C1-D59D1F0427F3}.All|Win32.Build.0 = Release|Win32
|
||||
{FFAA4C52-3A53-4F99-90C1-D59D1F0427F3}.All|x64.ActiveCfg = Release|Win32
|
||||
{FFAA4C52-3A53-4F99-90C1-D59D1F0427F3}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{FFAA4C52-3A53-4F99-90C1-D59D1F0427F3}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{FFAA4C52-3A53-4F99-90C1-D59D1F0427F3}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{FFAA4C52-3A53-4F99-90C1-D59D1F0427F3}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{FFAA4C52-3A53-4F99-90C1-D59D1F0427F3}.Release|Win32.Build.0 = Release|Win32
|
||||
{FFAA4C52-3A53-4F99-90C1-D59D1F0427F3}.Release|x64.ActiveCfg = Release|Win32
|
||||
{30A5B29C-983E-4580-9FD0-D647CCDCC7EB}.All|Win32.ActiveCfg = Release|Win32
|
||||
{30A5B29C-983E-4580-9FD0-D647CCDCC7EB}.All|Win32.Build.0 = Release|Win32
|
||||
{30A5B29C-983E-4580-9FD0-D647CCDCC7EB}.All|x64.ActiveCfg = Release|Win32
|
||||
{30A5B29C-983E-4580-9FD0-D647CCDCC7EB}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{30A5B29C-983E-4580-9FD0-D647CCDCC7EB}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{30A5B29C-983E-4580-9FD0-D647CCDCC7EB}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{30A5B29C-983E-4580-9FD0-D647CCDCC7EB}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{30A5B29C-983E-4580-9FD0-D647CCDCC7EB}.Release|Win32.Build.0 = Release|Win32
|
||||
{30A5B29C-983E-4580-9FD0-D647CCDCC7EB}.Release|x64.ActiveCfg = Release|Win32
|
||||
{1C453396-D912-4213-89FD-9B489162B7B5}.All|Win32.ActiveCfg = Release|Win32
|
||||
{1C453396-D912-4213-89FD-9B489162B7B5}.All|Win32.Build.0 = Release|Win32
|
||||
{1C453396-D912-4213-89FD-9B489162B7B5}.All|x64.ActiveCfg = Release|Win32
|
||||
{1C453396-D912-4213-89FD-9B489162B7B5}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{1C453396-D912-4213-89FD-9B489162B7B5}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{1C453396-D912-4213-89FD-9B489162B7B5}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{1C453396-D912-4213-89FD-9B489162B7B5}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{1C453396-D912-4213-89FD-9B489162B7B5}.Release|Win32.Build.0 = Release|Win32
|
||||
{1C453396-D912-4213-89FD-9B489162B7B5}.Release|x64.ActiveCfg = Release|Win32
|
||||
{CBEC7225-0C21-4DA8-978E-1F158F8AD950}.All|Win32.ActiveCfg = Release|Win32
|
||||
{CBEC7225-0C21-4DA8-978E-1F158F8AD950}.All|Win32.Build.0 = Release|Win32
|
||||
{CBEC7225-0C21-4DA8-978E-1F158F8AD950}.All|x64.ActiveCfg = Release|Win32
|
||||
{CBEC7225-0C21-4DA8-978E-1F158F8AD950}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{CBEC7225-0C21-4DA8-978E-1F158F8AD950}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{CBEC7225-0C21-4DA8-978E-1F158F8AD950}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{CBEC7225-0C21-4DA8-978E-1F158F8AD950}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{CBEC7225-0C21-4DA8-978E-1F158F8AD950}.Release|Win32.Build.0 = Release|Win32
|
||||
{CBEC7225-0C21-4DA8-978E-1F158F8AD950}.Release|x64.ActiveCfg = Release|Win32
|
||||
{B69247FA-ECD6-40ED-8E44-5CA6C3BAF9A4}.All|Win32.ActiveCfg = Release|Win32
|
||||
{B69247FA-ECD6-40ED-8E44-5CA6C3BAF9A4}.All|Win32.Build.0 = Release|Win32
|
||||
{B69247FA-ECD6-40ED-8E44-5CA6C3BAF9A4}.All|x64.ActiveCfg = Release|Win32
|
||||
{B69247FA-ECD6-40ED-8E44-5CA6C3BAF9A4}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{B69247FA-ECD6-40ED-8E44-5CA6C3BAF9A4}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{B69247FA-ECD6-40ED-8E44-5CA6C3BAF9A4}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{B69247FA-ECD6-40ED-8E44-5CA6C3BAF9A4}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{B69247FA-ECD6-40ED-8E44-5CA6C3BAF9A4}.Release|Win32.Build.0 = Release|Win32
|
||||
{B69247FA-ECD6-40ED-8E44-5CA6C3BAF9A4}.Release|x64.ActiveCfg = Release|Win32
|
||||
{C24FB505-05D7-4319-8485-7540B44C8603}.All|Win32.ActiveCfg = Release|Win32
|
||||
{C24FB505-05D7-4319-8485-7540B44C8603}.All|Win32.Build.0 = Release|Win32
|
||||
{C24FB505-05D7-4319-8485-7540B44C8603}.All|x64.ActiveCfg = Release|Win32
|
||||
{C24FB505-05D7-4319-8485-7540B44C8603}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{C24FB505-05D7-4319-8485-7540B44C8603}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{C24FB505-05D7-4319-8485-7540B44C8603}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{C24FB505-05D7-4319-8485-7540B44C8603}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{C24FB505-05D7-4319-8485-7540B44C8603}.Release|Win32.Build.0 = Release|Win32
|
||||
{C24FB505-05D7-4319-8485-7540B44C8603}.Release|x64.ActiveCfg = Release|Win32
|
||||
{B5881A85-FE70-4F64-8607-2CAAE52669C6}.All|Win32.ActiveCfg = Release|Win32
|
||||
{B5881A85-FE70-4F64-8607-2CAAE52669C6}.All|Win32.Build.0 = Release|Win32
|
||||
{B5881A85-FE70-4F64-8607-2CAAE52669C6}.All|x64.ActiveCfg = Release|Win32
|
||||
{B5881A85-FE70-4F64-8607-2CAAE52669C6}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{B5881A85-FE70-4F64-8607-2CAAE52669C6}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{B5881A85-FE70-4F64-8607-2CAAE52669C6}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{B5881A85-FE70-4F64-8607-2CAAE52669C6}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{B5881A85-FE70-4F64-8607-2CAAE52669C6}.Release|Win32.Build.0 = Release|Win32
|
||||
{B5881A85-FE70-4F64-8607-2CAAE52669C6}.Release|x64.ActiveCfg = Release|Win32
|
||||
{05515420-16DE-4E63-BE73-85BE85BA5142}.All|Win32.ActiveCfg = Release|Win32
|
||||
{05515420-16DE-4E63-BE73-85BE85BA5142}.All|Win32.Build.0 = Release|Win32
|
||||
{05515420-16DE-4E63-BE73-85BE85BA5142}.All|x64.ActiveCfg = Release|Win32
|
||||
{05515420-16DE-4E63-BE73-85BE85BA5142}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{05515420-16DE-4E63-BE73-85BE85BA5142}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{05515420-16DE-4E63-BE73-85BE85BA5142}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{05515420-16DE-4E63-BE73-85BE85BA5142}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{05515420-16DE-4E63-BE73-85BE85BA5142}.Release|Win32.Build.0 = Release|Win32
|
||||
{05515420-16DE-4E63-BE73-85BE85BA5142}.Release|x64.ActiveCfg = Release|Win32
|
||||
{1906D736-08BD-4EE1-924F-B536249B9A54}.All|Win32.ActiveCfg = Release DLL|Win32
|
||||
{1906D736-08BD-4EE1-924F-B536249B9A54}.All|Win32.Build.0 = Release DLL|Win32
|
||||
{1906D736-08BD-4EE1-924F-B536249B9A54}.All|x64.ActiveCfg = Release DLL|Win32
|
||||
{1906D736-08BD-4EE1-924F-B536249B9A54}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{1906D736-08BD-4EE1-924F-B536249B9A54}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{1906D736-08BD-4EE1-924F-B536249B9A54}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{1906D736-08BD-4EE1-924F-B536249B9A54}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{1906D736-08BD-4EE1-924F-B536249B9A54}.Release|Win32.Build.0 = Release|Win32
|
||||
{1906D736-08BD-4EE1-924F-B536249B9A54}.Release|x64.ActiveCfg = Release|Win32
|
||||
{EEF031CB-FED8-451E-A471-91EC8D4F6750}.All|Win32.ActiveCfg = Release Dll|Win32
|
||||
{EEF031CB-FED8-451E-A471-91EC8D4F6750}.All|Win32.Build.0 = Release Dll|Win32
|
||||
{EEF031CB-FED8-451E-A471-91EC8D4F6750}.All|x64.ActiveCfg = Release Dll|Win32
|
||||
{EEF031CB-FED8-451E-A471-91EC8D4F6750}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{EEF031CB-FED8-451E-A471-91EC8D4F6750}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{EEF031CB-FED8-451E-A471-91EC8D4F6750}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{EEF031CB-FED8-451E-A471-91EC8D4F6750}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{EEF031CB-FED8-451E-A471-91EC8D4F6750}.Release|Win32.Build.0 = Release|Win32
|
||||
{EEF031CB-FED8-451E-A471-91EC8D4F6750}.Release|x64.ActiveCfg = Release|Win32
|
||||
{6EDFEFD5-3596-4FA9-8EBA-B331547B35A3}.All|Win32.ActiveCfg = Release DLL|Win32
|
||||
{6EDFEFD5-3596-4FA9-8EBA-B331547B35A3}.All|Win32.Build.0 = Release DLL|Win32
|
||||
{6EDFEFD5-3596-4FA9-8EBA-B331547B35A3}.All|x64.ActiveCfg = Release DLL|Win32
|
||||
{6EDFEFD5-3596-4FA9-8EBA-B331547B35A3}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{6EDFEFD5-3596-4FA9-8EBA-B331547B35A3}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{6EDFEFD5-3596-4FA9-8EBA-B331547B35A3}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{6EDFEFD5-3596-4FA9-8EBA-B331547B35A3}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{6EDFEFD5-3596-4FA9-8EBA-B331547B35A3}.Release|Win32.Build.0 = Release|Win32
|
||||
{6EDFEFD5-3596-4FA9-8EBA-B331547B35A3}.Release|x64.ActiveCfg = Release|Win32
|
||||
{8D04B550-D240-4A44-8A18-35DA3F7038D9}.All|Win32.ActiveCfg = Release DLL|Win32
|
||||
{8D04B550-D240-4A44-8A18-35DA3F7038D9}.All|Win32.Build.0 = Release DLL|Win32
|
||||
{8D04B550-D240-4A44-8A18-35DA3F7038D9}.All|x64.ActiveCfg = Release DLL|Win32
|
||||
{8D04B550-D240-4A44-8A18-35DA3F7038D9}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{8D04B550-D240-4A44-8A18-35DA3F7038D9}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{8D04B550-D240-4A44-8A18-35DA3F7038D9}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{8D04B550-D240-4A44-8A18-35DA3F7038D9}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{8D04B550-D240-4A44-8A18-35DA3F7038D9}.Release|Win32.Build.0 = Release|Win32
|
||||
{8D04B550-D240-4A44-8A18-35DA3F7038D9}.Release|x64.ActiveCfg = Release|Win32
|
||||
{1CED5987-A529-46DC-B30F-870D85FF9C94}.All|Win32.ActiveCfg = Release|Win32
|
||||
{1CED5987-A529-46DC-B30F-870D85FF9C94}.All|Win32.Build.0 = Release|Win32
|
||||
{1CED5987-A529-46DC-B30F-870D85FF9C94}.All|x64.ActiveCfg = Release|Win32
|
||||
{1CED5987-A529-46DC-B30F-870D85FF9C94}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{1CED5987-A529-46DC-B30F-870D85FF9C94}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{1CED5987-A529-46DC-B30F-870D85FF9C94}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{1CED5987-A529-46DC-B30F-870D85FF9C94}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{1CED5987-A529-46DC-B30F-870D85FF9C94}.Release|Win32.Build.0 = Release|Win32
|
||||
{1CED5987-A529-46DC-B30F-870D85FF9C94}.Release|x64.ActiveCfg = Release|Win32
|
||||
{F6C55D93-B927-4483-BB69-15AEF3DD2DFF}.All|Win32.ActiveCfg = Release|Win32
|
||||
{F6C55D93-B927-4483-BB69-15AEF3DD2DFF}.All|Win32.Build.0 = Release|Win32
|
||||
{F6C55D93-B927-4483-BB69-15AEF3DD2DFF}.All|x64.ActiveCfg = Release|Win32
|
||||
{F6C55D93-B927-4483-BB69-15AEF3DD2DFF}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{F6C55D93-B927-4483-BB69-15AEF3DD2DFF}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{F6C55D93-B927-4483-BB69-15AEF3DD2DFF}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{F6C55D93-B927-4483-BB69-15AEF3DD2DFF}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{F6C55D93-B927-4483-BB69-15AEF3DD2DFF}.Release|Win32.Build.0 = Release|Win32
|
||||
{F6C55D93-B927-4483-BB69-15AEF3DD2DFF}.Release|x64.ActiveCfg = Release|Win32
|
||||
{F057DA7F-79E5-4B00-845C-EF446EF055E3}.All|Win32.ActiveCfg = Release|Win32
|
||||
{F057DA7F-79E5-4B00-845C-EF446EF055E3}.All|Win32.Build.0 = Release|Win32
|
||||
{F057DA7F-79E5-4B00-845C-EF446EF055E3}.All|x64.ActiveCfg = Release|Win32
|
||||
{F057DA7F-79E5-4B00-845C-EF446EF055E3}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{F057DA7F-79E5-4B00-845C-EF446EF055E3}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{F057DA7F-79E5-4B00-845C-EF446EF055E3}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{F057DA7F-79E5-4B00-845C-EF446EF055E3}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{F057DA7F-79E5-4B00-845C-EF446EF055E3}.Release|Win32.Build.0 = Release|Win32
|
||||
{F057DA7F-79E5-4B00-845C-EF446EF055E3}.Release|x64.ActiveCfg = Release|Win32
|
||||
{E727E8F6-935D-46FE-8B0E-37834748A0E3}.All|Win32.ActiveCfg = Release|Win32
|
||||
{E727E8F6-935D-46FE-8B0E-37834748A0E3}.All|Win32.Build.0 = Release|Win32
|
||||
{E727E8F6-935D-46FE-8B0E-37834748A0E3}.All|x64.ActiveCfg = Release|Win32
|
||||
{E727E8F6-935D-46FE-8B0E-37834748A0E3}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{E727E8F6-935D-46FE-8B0E-37834748A0E3}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{E727E8F6-935D-46FE-8B0E-37834748A0E3}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{E727E8F6-935D-46FE-8B0E-37834748A0E3}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{E727E8F6-935D-46FE-8B0E-37834748A0E3}.Release|Win32.Build.0 = Release|Win32
|
||||
{E727E8F6-935D-46FE-8B0E-37834748A0E3}.Release|x64.ActiveCfg = Release|Win32
|
||||
{5927104D-C14C-4AC8-925C-4AB681762E75}.All|Win32.ActiveCfg = Release|Win32
|
||||
{5927104D-C14C-4AC8-925C-4AB681762E75}.All|Win32.Build.0 = Release|Win32
|
||||
{5927104D-C14C-4AC8-925C-4AB681762E75}.All|x64.ActiveCfg = Release|Win32
|
||||
{5927104D-C14C-4AC8-925C-4AB681762E75}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{5927104D-C14C-4AC8-925C-4AB681762E75}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{5927104D-C14C-4AC8-925C-4AB681762E75}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{5927104D-C14C-4AC8-925C-4AB681762E75}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{5927104D-C14C-4AC8-925C-4AB681762E75}.Release|Win32.Build.0 = Release|Win32
|
||||
{5927104D-C14C-4AC8-925C-4AB681762E75}.Release|x64.ActiveCfg = Release|Win32
|
||||
{0D826AF5-0506-4C50-BB8B-7DB019AC21AE}.All|Win32.ActiveCfg = Release|Win32
|
||||
{0D826AF5-0506-4C50-BB8B-7DB019AC21AE}.All|Win32.Build.0 = Release|Win32
|
||||
{0D826AF5-0506-4C50-BB8B-7DB019AC21AE}.All|x64.ActiveCfg = Release|Win32
|
||||
{0D826AF5-0506-4C50-BB8B-7DB019AC21AE}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{0D826AF5-0506-4C50-BB8B-7DB019AC21AE}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{0D826AF5-0506-4C50-BB8B-7DB019AC21AE}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{0D826AF5-0506-4C50-BB8B-7DB019AC21AE}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{0D826AF5-0506-4C50-BB8B-7DB019AC21AE}.Release|Win32.Build.0 = Release|Win32
|
||||
{0D826AF5-0506-4C50-BB8B-7DB019AC21AE}.Release|x64.ActiveCfg = Release|Win32
|
||||
{49C34584-B6DA-448F-83CF-27584DC9FC90}.All|Win32.ActiveCfg = Release|Win32
|
||||
{49C34584-B6DA-448F-83CF-27584DC9FC90}.All|Win32.Build.0 = Release|Win32
|
||||
{49C34584-B6DA-448F-83CF-27584DC9FC90}.All|x64.ActiveCfg = Release|Win32
|
||||
{49C34584-B6DA-448F-83CF-27584DC9FC90}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{49C34584-B6DA-448F-83CF-27584DC9FC90}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{49C34584-B6DA-448F-83CF-27584DC9FC90}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{49C34584-B6DA-448F-83CF-27584DC9FC90}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{49C34584-B6DA-448F-83CF-27584DC9FC90}.Release|Win32.Build.0 = Release|Win32
|
||||
{49C34584-B6DA-448F-83CF-27584DC9FC90}.Release|x64.ActiveCfg = Release|Win32
|
||||
{3D0370CA-BED2-4657-A475-32375CBCB6E4}.All|Win32.ActiveCfg = Release|Win32
|
||||
{3D0370CA-BED2-4657-A475-32375CBCB6E4}.All|Win32.Build.0 = Release|Win32
|
||||
{3D0370CA-BED2-4657-A475-32375CBCB6E4}.All|x64.ActiveCfg = Release|Win32
|
||||
{3D0370CA-BED2-4657-A475-32375CBCB6E4}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{3D0370CA-BED2-4657-A475-32375CBCB6E4}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{3D0370CA-BED2-4657-A475-32375CBCB6E4}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{3D0370CA-BED2-4657-A475-32375CBCB6E4}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{3D0370CA-BED2-4657-A475-32375CBCB6E4}.Release|Win32.Build.0 = Release|Win32
|
||||
{3D0370CA-BED2-4657-A475-32375CBCB6E4}.Release|x64.ActiveCfg = Release|Win32
|
||||
{87EE9DA4-DE1E-4448-8324-183C98DCA588}.All|Win32.ActiveCfg = Debug|Win32
|
||||
{87EE9DA4-DE1E-4448-8324-183C98DCA588}.All|Win32.Build.0 = Debug|Win32
|
||||
{87EE9DA4-DE1E-4448-8324-183C98DCA588}.All|x64.ActiveCfg = Debug|Win32
|
||||
{87EE9DA4-DE1E-4448-8324-183C98DCA588}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{87EE9DA4-DE1E-4448-8324-183C98DCA588}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{87EE9DA4-DE1E-4448-8324-183C98DCA588}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{87EE9DA4-DE1E-4448-8324-183C98DCA588}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{87EE9DA4-DE1E-4448-8324-183C98DCA588}.Release|Win32.Build.0 = Release|Win32
|
||||
{87EE9DA4-DE1E-4448-8324-183C98DCA588}.Release|x64.ActiveCfg = Release|Win32
|
||||
{155844C3-EC5F-407F-97A4-A2DDADED9B2F}.All|Win32.ActiveCfg = Debug|Win32
|
||||
{155844C3-EC5F-407F-97A4-A2DDADED9B2F}.All|Win32.Build.0 = Debug|Win32
|
||||
{155844C3-EC5F-407F-97A4-A2DDADED9B2F}.All|x64.ActiveCfg = Debug|Win32
|
||||
{155844C3-EC5F-407F-97A4-A2DDADED9B2F}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{155844C3-EC5F-407F-97A4-A2DDADED9B2F}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{155844C3-EC5F-407F-97A4-A2DDADED9B2F}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{155844C3-EC5F-407F-97A4-A2DDADED9B2F}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{155844C3-EC5F-407F-97A4-A2DDADED9B2F}.Release|Win32.Build.0 = Release|Win32
|
||||
{155844C3-EC5F-407F-97A4-A2DDADED9B2F}.Release|x64.ActiveCfg = Release|Win32
|
||||
{204FA0DE-305D-4414-AE2E-F195A23F390D}.All|Win32.ActiveCfg = Debug|Win32
|
||||
{204FA0DE-305D-4414-AE2E-F195A23F390D}.All|Win32.Build.0 = Debug|Win32
|
||||
{204FA0DE-305D-4414-AE2E-F195A23F390D}.All|x64.ActiveCfg = Debug|Win32
|
||||
{204FA0DE-305D-4414-AE2E-F195A23F390D}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{204FA0DE-305D-4414-AE2E-F195A23F390D}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{204FA0DE-305D-4414-AE2E-F195A23F390D}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{204FA0DE-305D-4414-AE2E-F195A23F390D}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{204FA0DE-305D-4414-AE2E-F195A23F390D}.Release|Win32.Build.0 = Release|Win32
|
||||
{204FA0DE-305D-4414-AE2E-F195A23F390D}.Release|x64.ActiveCfg = Release|Win32
|
||||
{0DF3ABD0-DDC0-4265-B778-07C66780979B}.All|Win32.ActiveCfg = Release|Win32
|
||||
{0DF3ABD0-DDC0-4265-B778-07C66780979B}.All|Win32.Build.0 = Release|Win32
|
||||
{0DF3ABD0-DDC0-4265-B778-07C66780979B}.All|x64.ActiveCfg = Release|Win32
|
||||
{0DF3ABD0-DDC0-4265-B778-07C66780979B}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{0DF3ABD0-DDC0-4265-B778-07C66780979B}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{0DF3ABD0-DDC0-4265-B778-07C66780979B}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{0DF3ABD0-DDC0-4265-B778-07C66780979B}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{0DF3ABD0-DDC0-4265-B778-07C66780979B}.Release|Win32.Build.0 = Release|Win32
|
||||
{0DF3ABD0-DDC0-4265-B778-07C66780979B}.Release|x64.ActiveCfg = Release|Win32
|
||||
{70A49BC2-7500-41D0-B75D-EDCC5BE987A0}.All|Win32.ActiveCfg = Release|Win32
|
||||
{70A49BC2-7500-41D0-B75D-EDCC5BE987A0}.All|Win32.Build.0 = Release|Win32
|
||||
{70A49BC2-7500-41D0-B75D-EDCC5BE987A0}.All|x64.ActiveCfg = Release|Win32
|
||||
{70A49BC2-7500-41D0-B75D-EDCC5BE987A0}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{70A49BC2-7500-41D0-B75D-EDCC5BE987A0}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{70A49BC2-7500-41D0-B75D-EDCC5BE987A0}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{70A49BC2-7500-41D0-B75D-EDCC5BE987A0}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{70A49BC2-7500-41D0-B75D-EDCC5BE987A0}.Release|Win32.Build.0 = Release|Win32
|
||||
{70A49BC2-7500-41D0-B75D-EDCC5BE987A0}.Release|x64.ActiveCfg = Release|Win32
|
||||
{8B3B4C4C-13C2-446C-BEB0-F412CC2CFB9A}.All|Win32.ActiveCfg = Release|Win32
|
||||
{8B3B4C4C-13C2-446C-BEB0-F412CC2CFB9A}.All|Win32.Build.0 = Release|Win32
|
||||
{8B3B4C4C-13C2-446C-BEB0-F412CC2CFB9A}.All|x64.ActiveCfg = Release|Win32
|
||||
{8B3B4C4C-13C2-446C-BEB0-F412CC2CFB9A}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{8B3B4C4C-13C2-446C-BEB0-F412CC2CFB9A}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{8B3B4C4C-13C2-446C-BEB0-F412CC2CFB9A}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{8B3B4C4C-13C2-446C-BEB0-F412CC2CFB9A}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{8B3B4C4C-13C2-446C-BEB0-F412CC2CFB9A}.Release|Win32.Build.0 = Release|Win32
|
||||
{8B3B4C4C-13C2-446C-BEB0-F412CC2CFB9A}.Release|x64.ActiveCfg = Release|Win32
|
||||
{DF018947-0FFF-4EB3-BDEE-441DC81DA7A4}.All|Win32.ActiveCfg = Release DLL|Win32
|
||||
{DF018947-0FFF-4EB3-BDEE-441DC81DA7A4}.All|Win32.Build.0 = Release DLL|Win32
|
||||
{DF018947-0FFF-4EB3-BDEE-441DC81DA7A4}.All|x64.ActiveCfg = Release DLL|Win32
|
||||
{DF018947-0FFF-4EB3-BDEE-441DC81DA7A4}.Debug|Win32.ActiveCfg = Debug DLL|Win32
|
||||
{DF018947-0FFF-4EB3-BDEE-441DC81DA7A4}.Debug|Win32.Build.0 = Debug DLL|Win32
|
||||
{DF018947-0FFF-4EB3-BDEE-441DC81DA7A4}.Debug|x64.ActiveCfg = Debug DLL|Win32
|
||||
{DF018947-0FFF-4EB3-BDEE-441DC81DA7A4}.Release|Win32.ActiveCfg = Release DLL|Win32
|
||||
{DF018947-0FFF-4EB3-BDEE-441DC81DA7A4}.Release|Win32.Build.0 = Release DLL|Win32
|
||||
{DF018947-0FFF-4EB3-BDEE-441DC81DA7A4}.Release|x64.ActiveCfg = Release|Win32
|
||||
{FEA1EEF7-876F-48DE-88BF-C0E3E606D758}.All|Win32.ActiveCfg = Release Passthrough|Win32
|
||||
{FEA1EEF7-876F-48DE-88BF-C0E3E606D758}.All|Win32.Build.0 = Release Passthrough|Win32
|
||||
{FEA1EEF7-876F-48DE-88BF-C0E3E606D758}.All|x64.ActiveCfg = Release Passthrough|Win32
|
||||
{FEA1EEF7-876F-48DE-88BF-C0E3E606D758}.Debug|Win32.ActiveCfg = Debug Passthrough|Win32
|
||||
{FEA1EEF7-876F-48DE-88BF-C0E3E606D758}.Debug|Win32.Build.0 = Debug Passthrough|Win32
|
||||
{FEA1EEF7-876F-48DE-88BF-C0E3E606D758}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{FEA1EEF7-876F-48DE-88BF-C0E3E606D758}.Release|Win32.ActiveCfg = Release Passthrough|Win32
|
||||
{FEA1EEF7-876F-48DE-88BF-C0E3E606D758}.Release|Win32.Build.0 = Release Passthrough|Win32
|
||||
{FEA1EEF7-876F-48DE-88BF-C0E3E606D758}.Release|x64.ActiveCfg = Release|Win32
|
||||
{9254C4B0-6F60-42B6-BB3A-36D63FC001C7}.All|Win32.ActiveCfg = Release|Win32
|
||||
{9254C4B0-6F60-42B6-BB3A-36D63FC001C7}.All|Win32.Build.0 = Release|Win32
|
||||
{9254C4B0-6F60-42B6-BB3A-36D63FC001C7}.All|x64.ActiveCfg = Release|Win32
|
||||
{9254C4B0-6F60-42B6-BB3A-36D63FC001C7}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{9254C4B0-6F60-42B6-BB3A-36D63FC001C7}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{9254C4B0-6F60-42B6-BB3A-36D63FC001C7}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{9254C4B0-6F60-42B6-BB3A-36D63FC001C7}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{9254C4B0-6F60-42B6-BB3A-36D63FC001C7}.Release|Win32.Build.0 = Release|Win32
|
||||
{9254C4B0-6F60-42B6-BB3A-36D63FC001C7}.Release|x64.ActiveCfg = Release|Win32
|
||||
{ACFFF684-4D19-4D48-AF12-88EA1D778BDF}.All|Win32.ActiveCfg = Release|Win32
|
||||
{ACFFF684-4D19-4D48-AF12-88EA1D778BDF}.All|Win32.Build.0 = Release|Win32
|
||||
{ACFFF684-4D19-4D48-AF12-88EA1D778BDF}.All|x64.ActiveCfg = Release|Win32
|
||||
{ACFFF684-4D19-4D48-AF12-88EA1D778BDF}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{ACFFF684-4D19-4D48-AF12-88EA1D778BDF}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{ACFFF684-4D19-4D48-AF12-88EA1D778BDF}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{ACFFF684-4D19-4D48-AF12-88EA1D778BDF}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{ACFFF684-4D19-4D48-AF12-88EA1D778BDF}.Release|Win32.Build.0 = Release|Win32
|
||||
{ACFFF684-4D19-4D48-AF12-88EA1D778BDF}.Release|x64.ActiveCfg = Release|Win32
|
||||
{8F992C49-6C51-412F-B2A3-34EAB708EB65}.All|Win32.ActiveCfg = Release|Win32
|
||||
{8F992C49-6C51-412F-B2A3-34EAB708EB65}.All|Win32.Build.0 = Release|Win32
|
||||
{8F992C49-6C51-412F-B2A3-34EAB708EB65}.All|x64.ActiveCfg = Release|Win32
|
||||
{8F992C49-6C51-412F-B2A3-34EAB708EB65}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{8F992C49-6C51-412F-B2A3-34EAB708EB65}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{8F992C49-6C51-412F-B2A3-34EAB708EB65}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{8F992C49-6C51-412F-B2A3-34EAB708EB65}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{8F992C49-6C51-412F-B2A3-34EAB708EB65}.Release|Win32.Build.0 = Release|Win32
|
||||
{8F992C49-6C51-412F-B2A3-34EAB708EB65}.Release|x64.ActiveCfg = Release|Win32
|
||||
{4043FC6A-9A30-4577-8AD5-9B233C9575D8}.All|Win32.ActiveCfg = Release|Win32
|
||||
{4043FC6A-9A30-4577-8AD5-9B233C9575D8}.All|Win32.Build.0 = Release|Win32
|
||||
{4043FC6A-9A30-4577-8AD5-9B233C9575D8}.All|x64.ActiveCfg = Release|Win32
|
||||
{4043FC6A-9A30-4577-8AD5-9B233C9575D8}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{4043FC6A-9A30-4577-8AD5-9B233C9575D8}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{4043FC6A-9A30-4577-8AD5-9B233C9575D8}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{4043FC6A-9A30-4577-8AD5-9B233C9575D8}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{4043FC6A-9A30-4577-8AD5-9B233C9575D8}.Release|Win32.Build.0 = Release|Win32
|
||||
{4043FC6A-9A30-4577-8AD5-9B233C9575D8}.Release|x64.ActiveCfg = Release|Win32
|
||||
{71A967D5-0E99-4CEF-A587-98836EE6F2EF}.All|Win32.ActiveCfg = Release|Win32
|
||||
{71A967D5-0E99-4CEF-A587-98836EE6F2EF}.All|Win32.Build.0 = Release|Win32
|
||||
{71A967D5-0E99-4CEF-A587-98836EE6F2EF}.All|x64.ActiveCfg = Release|Win32
|
||||
{71A967D5-0E99-4CEF-A587-98836EE6F2EF}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{71A967D5-0E99-4CEF-A587-98836EE6F2EF}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{71A967D5-0E99-4CEF-A587-98836EE6F2EF}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{71A967D5-0E99-4CEF-A587-98836EE6F2EF}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{71A967D5-0E99-4CEF-A587-98836EE6F2EF}.Release|Win32.Build.0 = Release|Win32
|
||||
{71A967D5-0E99-4CEF-A587-98836EE6F2EF}.Release|x64.ActiveCfg = Release|Win32
|
||||
{0A6B5EA5-6E9B-4A51-931F-ED25AA87B4DF}.All|Win32.ActiveCfg = Release|Win32
|
||||
{0A6B5EA5-6E9B-4A51-931F-ED25AA87B4DF}.All|Win32.Build.0 = Release|Win32
|
||||
{0A6B5EA5-6E9B-4A51-931F-ED25AA87B4DF}.All|x64.ActiveCfg = Release|Win32
|
||||
{0A6B5EA5-6E9B-4A51-931F-ED25AA87B4DF}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{0A6B5EA5-6E9B-4A51-931F-ED25AA87B4DF}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{0A6B5EA5-6E9B-4A51-931F-ED25AA87B4DF}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{0A6B5EA5-6E9B-4A51-931F-ED25AA87B4DF}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{0A6B5EA5-6E9B-4A51-931F-ED25AA87B4DF}.Release|Win32.Build.0 = Release|Win32
|
||||
{0A6B5EA5-6E9B-4A51-931F-ED25AA87B4DF}.Release|x64.ActiveCfg = Release|Win32
|
||||
{AB91A099-7690-4ECF-8994-E458F4EA1ED4}.All|Win32.ActiveCfg = Release|Win32
|
||||
{AB91A099-7690-4ECF-8994-E458F4EA1ED4}.All|Win32.Build.0 = Release|Win32
|
||||
{AB91A099-7690-4ECF-8994-E458F4EA1ED4}.All|x64.ActiveCfg = Release|Win32
|
||||
{AB91A099-7690-4ECF-8994-E458F4EA1ED4}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{AB91A099-7690-4ECF-8994-E458F4EA1ED4}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{AB91A099-7690-4ECF-8994-E458F4EA1ED4}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{AB91A099-7690-4ECF-8994-E458F4EA1ED4}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{AB91A099-7690-4ECF-8994-E458F4EA1ED4}.Release|Win32.Build.0 = Release|Win32
|
||||
{AB91A099-7690-4ECF-8994-E458F4EA1ED4}.Release|x64.ActiveCfg = Release|Win32
|
||||
{988CACF7-3FCB-4992-BE69-77872AE67DC8}.All|Win32.ActiveCfg = Release|Win32
|
||||
{988CACF7-3FCB-4992-BE69-77872AE67DC8}.All|Win32.Build.0 = Release|Win32
|
||||
{988CACF7-3FCB-4992-BE69-77872AE67DC8}.All|x64.ActiveCfg = Release|Win32
|
||||
{988CACF7-3FCB-4992-BE69-77872AE67DC8}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{988CACF7-3FCB-4992-BE69-77872AE67DC8}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{988CACF7-3FCB-4992-BE69-77872AE67DC8}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{988CACF7-3FCB-4992-BE69-77872AE67DC8}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{988CACF7-3FCB-4992-BE69-77872AE67DC8}.Release|Win32.Build.0 = Release|Win32
|
||||
{988CACF7-3FCB-4992-BE69-77872AE67DC8}.Release|x64.ActiveCfg = Release|Win32
|
||||
{0A18A071-125E-442F-AFF7-A3F68ABECF99}.All|Win32.ActiveCfg = Release DirectSound|Win32
|
||||
{0A18A071-125E-442F-AFF7-A3F68ABECF99}.All|Win32.Build.0 = Release DirectSound|Win32
|
||||
{0A18A071-125E-442F-AFF7-A3F68ABECF99}.All|x64.ActiveCfg = Release DirectSound|Win32
|
||||
{0A18A071-125E-442F-AFF7-A3F68ABECF99}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{0A18A071-125E-442F-AFF7-A3F68ABECF99}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{0A18A071-125E-442F-AFF7-A3F68ABECF99}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{0A18A071-125E-442F-AFF7-A3F68ABECF99}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{0A18A071-125E-442F-AFF7-A3F68ABECF99}.Release|Win32.Build.0 = Release|Win32
|
||||
{0A18A071-125E-442F-AFF7-A3F68ABECF99}.Release|x64.ActiveCfg = Release|Win32
|
||||
{08DAD348-9E0A-4A2E-97F1-F1E7E24A7836}.All|Win32.ActiveCfg = Release|Win32
|
||||
{08DAD348-9E0A-4A2E-97F1-F1E7E24A7836}.All|Win32.Build.0 = Release|Win32
|
||||
{08DAD348-9E0A-4A2E-97F1-F1E7E24A7836}.All|x64.ActiveCfg = Release|Win32
|
||||
{08DAD348-9E0A-4A2E-97F1-F1E7E24A7836}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{08DAD348-9E0A-4A2E-97F1-F1E7E24A7836}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{08DAD348-9E0A-4A2E-97F1-F1E7E24A7836}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{08DAD348-9E0A-4A2E-97F1-F1E7E24A7836}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{08DAD348-9E0A-4A2E-97F1-F1E7E24A7836}.Release|Win32.Build.0 = Release|Win32
|
||||
{08DAD348-9E0A-4A2E-97F1-F1E7E24A7836}.Release|x64.ActiveCfg = Release|Win32
|
||||
{8DEB383C-4091-4F42-A56F-C9E46D552D79}.All|Win32.ActiveCfg = Release Passthrough|Win32
|
||||
{8DEB383C-4091-4F42-A56F-C9E46D552D79}.All|Win32.Build.0 = Release Passthrough|Win32
|
||||
{8DEB383C-4091-4F42-A56F-C9E46D552D79}.All|x64.ActiveCfg = Release Passthrough|Win32
|
||||
{8DEB383C-4091-4F42-A56F-C9E46D552D79}.Debug|Win32.ActiveCfg = Debug Passthrough|Win32
|
||||
{8DEB383C-4091-4F42-A56F-C9E46D552D79}.Debug|Win32.Build.0 = Debug Passthrough|Win32
|
||||
{8DEB383C-4091-4F42-A56F-C9E46D552D79}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{8DEB383C-4091-4F42-A56F-C9E46D552D79}.Release|Win32.ActiveCfg = Release Passthrough|Win32
|
||||
{8DEB383C-4091-4F42-A56F-C9E46D552D79}.Release|Win32.Build.0 = Release Passthrough|Win32
|
||||
{8DEB383C-4091-4F42-A56F-C9E46D552D79}.Release|x64.ActiveCfg = Release|Win32
|
||||
{2C3C2423-234B-4772-8899-D3B137E5CA35}.All|Win32.ActiveCfg = Release|Win32
|
||||
{2C3C2423-234B-4772-8899-D3B137E5CA35}.All|Win32.Build.0 = Release|Win32
|
||||
{2C3C2423-234B-4772-8899-D3B137E5CA35}.All|x64.ActiveCfg = Release|Win32
|
||||
{2C3C2423-234B-4772-8899-D3B137E5CA35}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{2C3C2423-234B-4772-8899-D3B137E5CA35}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{2C3C2423-234B-4772-8899-D3B137E5CA35}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{2C3C2423-234B-4772-8899-D3B137E5CA35}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{2C3C2423-234B-4772-8899-D3B137E5CA35}.Release|Win32.Build.0 = Release|Win32
|
||||
{2C3C2423-234B-4772-8899-D3B137E5CA35}.Release|x64.ActiveCfg = Release|Win32
|
||||
{3850D93A-5F24-4922-BC1C-74D08C37C256}.All|Win32.ActiveCfg = Release|Win32
|
||||
{3850D93A-5F24-4922-BC1C-74D08C37C256}.All|Win32.Build.0 = Release|Win32
|
||||
{3850D93A-5F24-4922-BC1C-74D08C37C256}.All|x64.ActiveCfg = Release|Win32
|
||||
{3850D93A-5F24-4922-BC1C-74D08C37C256}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{3850D93A-5F24-4922-BC1C-74D08C37C256}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{3850D93A-5F24-4922-BC1C-74D08C37C256}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{3850D93A-5F24-4922-BC1C-74D08C37C256}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{3850D93A-5F24-4922-BC1C-74D08C37C256}.Release|Win32.Build.0 = Release|Win32
|
||||
{3850D93A-5F24-4922-BC1C-74D08C37C256}.Release|x64.ActiveCfg = Release|Win32
|
||||
{2CA40887-1622-46A1-A7F9-17FD7E7E545B}.All|Win32.ActiveCfg = Release|Win32
|
||||
{2CA40887-1622-46A1-A7F9-17FD7E7E545B}.All|Win32.Build.0 = Release|Win32
|
||||
{2CA40887-1622-46A1-A7F9-17FD7E7E545B}.All|x64.ActiveCfg = Release|Win32
|
||||
{2CA40887-1622-46A1-A7F9-17FD7E7E545B}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{2CA40887-1622-46A1-A7F9-17FD7E7E545B}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{2CA40887-1622-46A1-A7F9-17FD7E7E545B}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{2CA40887-1622-46A1-A7F9-17FD7E7E545B}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{2CA40887-1622-46A1-A7F9-17FD7E7E545B}.Release|Win32.Build.0 = Release|Win32
|
||||
{2CA40887-1622-46A1-A7F9-17FD7E7E545B}.Release|x64.ActiveCfg = Release|Win32
|
||||
{028C7278-05D7-4E18-82FE-BE231B844F41}.All|Win32.ActiveCfg = Release|Win32
|
||||
{028C7278-05D7-4E18-82FE-BE231B844F41}.All|Win32.Build.0 = Release|Win32
|
||||
{028C7278-05D7-4E18-82FE-BE231B844F41}.All|x64.ActiveCfg = Release|Win32
|
||||
{028C7278-05D7-4E18-82FE-BE231B844F41}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{028C7278-05D7-4E18-82FE-BE231B844F41}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{028C7278-05D7-4E18-82FE-BE231B844F41}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{028C7278-05D7-4E18-82FE-BE231B844F41}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{028C7278-05D7-4E18-82FE-BE231B844F41}.Release|Win32.Build.0 = Release|Win32
|
||||
{028C7278-05D7-4E18-82FE-BE231B844F41}.Release|x64.ActiveCfg = Release|Win32
|
||||
{D7F1E3F2-A3F4-474C-8555-15122571AF52}.All|Win32.ActiveCfg = Release|Win32
|
||||
{D7F1E3F2-A3F4-474C-8555-15122571AF52}.All|Win32.Build.0 = Release|Win32
|
||||
{D7F1E3F2-A3F4-474C-8555-15122571AF52}.All|x64.ActiveCfg = Release|Win32
|
||||
{D7F1E3F2-A3F4-474C-8555-15122571AF52}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{D7F1E3F2-A3F4-474C-8555-15122571AF52}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{D7F1E3F2-A3F4-474C-8555-15122571AF52}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{D7F1E3F2-A3F4-474C-8555-15122571AF52}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{D7F1E3F2-A3F4-474C-8555-15122571AF52}.Release|Win32.Build.0 = Release|Win32
|
||||
{D7F1E3F2-A3F4-474C-8555-15122571AF52}.Release|x64.ActiveCfg = Release|Win32
|
||||
{5BC072DB-3826-48EA-AF34-FE32AA01E83B}.All|Win32.ActiveCfg = Release|Win32
|
||||
{5BC072DB-3826-48EA-AF34-FE32AA01E83B}.All|Win32.Build.0 = Release|Win32
|
||||
{5BC072DB-3826-48EA-AF34-FE32AA01E83B}.All|x64.ActiveCfg = Release|Win32
|
||||
{5BC072DB-3826-48EA-AF34-FE32AA01E83B}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{5BC072DB-3826-48EA-AF34-FE32AA01E83B}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{5BC072DB-3826-48EA-AF34-FE32AA01E83B}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{5BC072DB-3826-48EA-AF34-FE32AA01E83B}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{5BC072DB-3826-48EA-AF34-FE32AA01E83B}.Release|Win32.Build.0 = Release|Win32
|
||||
{5BC072DB-3826-48EA-AF34-FE32AA01E83B}.Release|x64.ActiveCfg = Release|Win32
|
||||
{FA429E98-8B03-45E6-A096-A4BC5E821DE4}.All|Win32.ActiveCfg = Release|Win32
|
||||
{FA429E98-8B03-45E6-A096-A4BC5E821DE4}.All|Win32.Build.0 = Release|Win32
|
||||
{FA429E98-8B03-45E6-A096-A4BC5E821DE4}.All|x64.ActiveCfg = Release|Win32
|
||||
{FA429E98-8B03-45E6-A096-A4BC5E821DE4}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{FA429E98-8B03-45E6-A096-A4BC5E821DE4}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{FA429E98-8B03-45E6-A096-A4BC5E821DE4}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{FA429E98-8B03-45E6-A096-A4BC5E821DE4}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{FA429E98-8B03-45E6-A096-A4BC5E821DE4}.Release|Win32.Build.0 = Release|Win32
|
||||
{FA429E98-8B03-45E6-A096-A4BC5E821DE4}.Release|x64.ActiveCfg = Release|Win32
|
||||
{06E3A538-AB32-44F2-B477-755FF9CB5D37}.All|Win32.ActiveCfg = Release|Win32
|
||||
{06E3A538-AB32-44F2-B477-755FF9CB5D37}.All|Win32.Build.0 = Release|Win32
|
||||
{06E3A538-AB32-44F2-B477-755FF9CB5D37}.All|x64.ActiveCfg = Release|Win32
|
||||
{06E3A538-AB32-44F2-B477-755FF9CB5D37}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{06E3A538-AB32-44F2-B477-755FF9CB5D37}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{06E3A538-AB32-44F2-B477-755FF9CB5D37}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{06E3A538-AB32-44F2-B477-755FF9CB5D37}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{06E3A538-AB32-44F2-B477-755FF9CB5D37}.Release|Win32.Build.0 = Release|Win32
|
||||
{06E3A538-AB32-44F2-B477-755FF9CB5D37}.Release|x64.ActiveCfg = Release|Win32
|
||||
{6D1BEC70-4DCD-4FE9-ADBD-4A43A67E4D05}.All|Win32.ActiveCfg = Release|Win32
|
||||
{6D1BEC70-4DCD-4FE9-ADBD-4A43A67E4D05}.All|Win32.Build.0 = Release|Win32
|
||||
{6D1BEC70-4DCD-4FE9-ADBD-4A43A67E4D05}.All|x64.ActiveCfg = Release|Win32
|
||||
{6D1BEC70-4DCD-4FE9-ADBD-4A43A67E4D05}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{6D1BEC70-4DCD-4FE9-ADBD-4A43A67E4D05}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{6D1BEC70-4DCD-4FE9-ADBD-4A43A67E4D05}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{6D1BEC70-4DCD-4FE9-ADBD-4A43A67E4D05}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{6D1BEC70-4DCD-4FE9-ADBD-4A43A67E4D05}.Release|Win32.Build.0 = Release|Win32
|
||||
{6D1BEC70-4DCD-4FE9-ADBD-4A43A67E4D05}.Release|x64.ActiveCfg = Release|Win32
|
||||
{A4B122CF-5196-476B-8C0E-D8BD59AC3C14}.All|Win32.ActiveCfg = Release|Win32
|
||||
{A4B122CF-5196-476B-8C0E-D8BD59AC3C14}.All|Win32.Build.0 = Release|Win32
|
||||
{A4B122CF-5196-476B-8C0E-D8BD59AC3C14}.All|x64.ActiveCfg = Release|Win32
|
||||
{A4B122CF-5196-476B-8C0E-D8BD59AC3C14}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{A4B122CF-5196-476B-8C0E-D8BD59AC3C14}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{A4B122CF-5196-476B-8C0E-D8BD59AC3C14}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{A4B122CF-5196-476B-8C0E-D8BD59AC3C14}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{A4B122CF-5196-476B-8C0E-D8BD59AC3C14}.Release|Win32.Build.0 = Release|Win32
|
||||
{A4B122CF-5196-476B-8C0E-D8BD59AC3C14}.Release|x64.ActiveCfg = Release|Win32
|
||||
{75DF7F29-2FBF-47F7-B5AF-5B4952DC1ABD}.All|Win32.ActiveCfg = Release|Win32
|
||||
{75DF7F29-2FBF-47F7-B5AF-5B4952DC1ABD}.All|Win32.Build.0 = Release|Win32
|
||||
{75DF7F29-2FBF-47F7-B5AF-5B4952DC1ABD}.All|x64.ActiveCfg = Release|Win32
|
||||
{75DF7F29-2FBF-47F7-B5AF-5B4952DC1ABD}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{75DF7F29-2FBF-47F7-B5AF-5B4952DC1ABD}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{75DF7F29-2FBF-47F7-B5AF-5B4952DC1ABD}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{75DF7F29-2FBF-47F7-B5AF-5B4952DC1ABD}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{75DF7F29-2FBF-47F7-B5AF-5B4952DC1ABD}.Release|Win32.Build.0 = Release|Win32
|
||||
{75DF7F29-2FBF-47F7-B5AF-5B4952DC1ABD}.Release|x64.ActiveCfg = Release|Win32
|
||||
{F6A33240-8F29-48BD-98F0-826995911799}.All|Win32.ActiveCfg = Release|Win32
|
||||
{F6A33240-8F29-48BD-98F0-826995911799}.All|Win32.Build.0 = Release|Win32
|
||||
{F6A33240-8F29-48BD-98F0-826995911799}.All|x64.ActiveCfg = Release|Win32
|
||||
{F6A33240-8F29-48BD-98F0-826995911799}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{F6A33240-8F29-48BD-98F0-826995911799}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{F6A33240-8F29-48BD-98F0-826995911799}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{F6A33240-8F29-48BD-98F0-826995911799}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{F6A33240-8F29-48BD-98F0-826995911799}.Release|Win32.Build.0 = Release|Win32
|
||||
{F6A33240-8F29-48BD-98F0-826995911799}.Release|x64.ActiveCfg = Release|Win32
|
||||
{65A6273D-FCAB-4C55-B09E-65100141A5D4}.All|Win32.ActiveCfg = Release|Win32
|
||||
{65A6273D-FCAB-4C55-B09E-65100141A5D4}.All|Win32.Build.0 = Release|Win32
|
||||
{65A6273D-FCAB-4C55-B09E-65100141A5D4}.All|x64.ActiveCfg = Release|Win32
|
||||
{65A6273D-FCAB-4C55-B09E-65100141A5D4}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{65A6273D-FCAB-4C55-B09E-65100141A5D4}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{65A6273D-FCAB-4C55-B09E-65100141A5D4}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{65A6273D-FCAB-4C55-B09E-65100141A5D4}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{65A6273D-FCAB-4C55-B09E-65100141A5D4}.Release|Win32.Build.0 = Release|Win32
|
||||
{65A6273D-FCAB-4C55-B09E-65100141A5D4}.Release|x64.ActiveCfg = Release|Win32
|
||||
{E7BC026C-7CC5-45A3-BC7C-3B88EEF01F24}.All|Win32.ActiveCfg = Release|Win32
|
||||
{E7BC026C-7CC5-45A3-BC7C-3B88EEF01F24}.All|Win32.Build.0 = Release|Win32
|
||||
{E7BC026C-7CC5-45A3-BC7C-3B88EEF01F24}.All|x64.ActiveCfg = Release|Win32
|
||||
{E7BC026C-7CC5-45A3-BC7C-3B88EEF01F24}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{E7BC026C-7CC5-45A3-BC7C-3B88EEF01F24}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{E7BC026C-7CC5-45A3-BC7C-3B88EEF01F24}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{E7BC026C-7CC5-45A3-BC7C-3B88EEF01F24}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{E7BC026C-7CC5-45A3-BC7C-3B88EEF01F24}.Release|Win32.Build.0 = Release|Win32
|
||||
{E7BC026C-7CC5-45A3-BC7C-3B88EEF01F24}.Release|x64.ActiveCfg = Release|Win32
|
||||
{D0BCAC02-D94B-46B8-9B49-CDDCC2BD7909}.All|Win32.ActiveCfg = Release|Win32
|
||||
{D0BCAC02-D94B-46B8-9B49-CDDCC2BD7909}.All|Win32.Build.0 = Release|Win32
|
||||
{D0BCAC02-D94B-46B8-9B49-CDDCC2BD7909}.All|x64.ActiveCfg = Release|Win32
|
||||
{D0BCAC02-D94B-46B8-9B49-CDDCC2BD7909}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{D0BCAC02-D94B-46B8-9B49-CDDCC2BD7909}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{D0BCAC02-D94B-46B8-9B49-CDDCC2BD7909}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{D0BCAC02-D94B-46B8-9B49-CDDCC2BD7909}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{D0BCAC02-D94B-46B8-9B49-CDDCC2BD7909}.Release|Win32.Build.0 = Release|Win32
|
||||
{D0BCAC02-D94B-46B8-9B49-CDDCC2BD7909}.Release|x64.ActiveCfg = Release|Win32
|
||||
{44D7DEAF-FDA5-495E-8B9D-1439E4F4C21E}.All|Win32.ActiveCfg = Release|Win32
|
||||
{44D7DEAF-FDA5-495E-8B9D-1439E4F4C21E}.All|Win32.Build.0 = Release|Win32
|
||||
{44D7DEAF-FDA5-495E-8B9D-1439E4F4C21E}.All|x64.ActiveCfg = Release|Win32
|
||||
{44D7DEAF-FDA5-495E-8B9D-1439E4F4C21E}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{44D7DEAF-FDA5-495E-8B9D-1439E4F4C21E}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{44D7DEAF-FDA5-495E-8B9D-1439E4F4C21E}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{44D7DEAF-FDA5-495E-8B9D-1439E4F4C21E}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{44D7DEAF-FDA5-495E-8B9D-1439E4F4C21E}.Release|Win32.Build.0 = Release|Win32
|
||||
{44D7DEAF-FDA5-495E-8B9D-1439E4F4C21E}.Release|x64.ActiveCfg = Release|Win32
|
||||
{1A789A98-71EF-4EBD-8007-FC9ED585D32E}.All|Win32.ActiveCfg = Release|Win32
|
||||
{1A789A98-71EF-4EBD-8007-FC9ED585D32E}.All|Win32.Build.0 = Release|Win32
|
||||
{1A789A98-71EF-4EBD-8007-FC9ED585D32E}.All|x64.ActiveCfg = Release|Win32
|
||||
{1A789A98-71EF-4EBD-8007-FC9ED585D32E}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{1A789A98-71EF-4EBD-8007-FC9ED585D32E}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{1A789A98-71EF-4EBD-8007-FC9ED585D32E}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{1A789A98-71EF-4EBD-8007-FC9ED585D32E}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{1A789A98-71EF-4EBD-8007-FC9ED585D32E}.Release|Win32.Build.0 = Release|Win32
|
||||
{1A789A98-71EF-4EBD-8007-FC9ED585D32E}.Release|x64.ActiveCfg = Release|Win32
|
||||
{CF70F278-3364-4395-A2E1-23501C9B8AD2}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{CF70F278-3364-4395-A2E1-23501C9B8AD2}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{CF70F278-3364-4395-A2E1-23501C9B8AD2}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{CF70F278-3364-4395-A2E1-23501C9B8AD2}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{CF70F278-3364-4395-A2E1-23501C9B8AD2}.Release|Win32.Build.0 = Release|Win32
|
||||
{CF70F278-3364-4395-A2E1-23501C9B8AD2}.Release|x64.ActiveCfg = Release|Win32
|
||||
{9EED03C8-8315-4214-8D13-8FF5FA46D93C}.All|Win32.ActiveCfg = Release|Win32
|
||||
{9EED03C8-8315-4214-8D13-8FF5FA46D93C}.All|Win32.Build.0 = Release|Win32
|
||||
{9EED03C8-8315-4214-8D13-8FF5FA46D93C}.All|x64.ActiveCfg = Release|Win32
|
||||
{9EED03C8-8315-4214-8D13-8FF5FA46D93C}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{9EED03C8-8315-4214-8D13-8FF5FA46D93C}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{9EED03C8-8315-4214-8D13-8FF5FA46D93C}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{9EED03C8-8315-4214-8D13-8FF5FA46D93C}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{9EED03C8-8315-4214-8D13-8FF5FA46D93C}.Release|Win32.Build.0 = Release|Win32
|
||||
{9EED03C8-8315-4214-8D13-8FF5FA46D93C}.Release|x64.ActiveCfg = Release|Win32
|
||||
{2CCED6DC-26FF-40F2-9585-E9E1049A4599}.All|Win32.ActiveCfg = Release|Win32
|
||||
{2CCED6DC-26FF-40F2-9585-E9E1049A4599}.All|Win32.Build.0 = Release|Win32
|
||||
{2CCED6DC-26FF-40F2-9585-E9E1049A4599}.All|x64.ActiveCfg = Release|Win32
|
||||
{2CCED6DC-26FF-40F2-9585-E9E1049A4599}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{2CCED6DC-26FF-40F2-9585-E9E1049A4599}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{2CCED6DC-26FF-40F2-9585-E9E1049A4599}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{2CCED6DC-26FF-40F2-9585-E9E1049A4599}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{2CCED6DC-26FF-40F2-9585-E9E1049A4599}.Release|Win32.Build.0 = Release|Win32
|
||||
{2CCED6DC-26FF-40F2-9585-E9E1049A4599}.Release|x64.ActiveCfg = Release|Win32
|
||||
{4AE157CF-F2DD-4B5D-A1EE-4AC173B4F9AC}.All|Win32.ActiveCfg = Release|Win32
|
||||
{4AE157CF-F2DD-4B5D-A1EE-4AC173B4F9AC}.All|Win32.Build.0 = Release|Win32
|
||||
{4AE157CF-F2DD-4B5D-A1EE-4AC173B4F9AC}.All|x64.ActiveCfg = Release|Win32
|
||||
{4AE157CF-F2DD-4B5D-A1EE-4AC173B4F9AC}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{4AE157CF-F2DD-4B5D-A1EE-4AC173B4F9AC}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{4AE157CF-F2DD-4B5D-A1EE-4AC173B4F9AC}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{4AE157CF-F2DD-4B5D-A1EE-4AC173B4F9AC}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{4AE157CF-F2DD-4B5D-A1EE-4AC173B4F9AC}.Release|Win32.Build.0 = Release|Win32
|
||||
{4AE157CF-F2DD-4B5D-A1EE-4AC173B4F9AC}.Release|x64.ActiveCfg = Release|Win32
|
||||
{7B077E7F-1BE7-4291-AB86-55E527B25CAC}.All|Win32.ActiveCfg = Release|Win32
|
||||
{7B077E7F-1BE7-4291-AB86-55E527B25CAC}.All|Win32.Build.0 = Release|Win32
|
||||
{7B077E7F-1BE7-4291-AB86-55E527B25CAC}.All|x64.ActiveCfg = Release|Win32
|
||||
{7B077E7F-1BE7-4291-AB86-55E527B25CAC}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{7B077E7F-1BE7-4291-AB86-55E527B25CAC}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{7B077E7F-1BE7-4291-AB86-55E527B25CAC}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{7B077E7F-1BE7-4291-AB86-55E527B25CAC}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{7B077E7F-1BE7-4291-AB86-55E527B25CAC}.Release|Win32.Build.0 = Release|Win32
|
||||
{7B077E7F-1BE7-4291-AB86-55E527B25CAC}.Release|x64.ActiveCfg = Release|Win32
|
||||
{D2396DD7-7D38-473A-ABB7-6F96D65AE1B9}.All|Win32.ActiveCfg = Release|Win32
|
||||
{D2396DD7-7D38-473A-ABB7-6F96D65AE1B9}.All|Win32.Build.0 = Release|Win32
|
||||
{D2396DD7-7D38-473A-ABB7-6F96D65AE1B9}.All|x64.ActiveCfg = Release|Win32
|
||||
{D2396DD7-7D38-473A-ABB7-6F96D65AE1B9}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{D2396DD7-7D38-473A-ABB7-6F96D65AE1B9}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{D2396DD7-7D38-473A-ABB7-6F96D65AE1B9}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{D2396DD7-7D38-473A-ABB7-6F96D65AE1B9}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{D2396DD7-7D38-473A-ABB7-6F96D65AE1B9}.Release|Win32.Build.0 = Release|Win32
|
||||
{D2396DD7-7D38-473A-ABB7-6F96D65AE1B9}.Release|x64.ActiveCfg = Release|Win32
|
||||
{B535402E-38D2-4D54-8360-423ACBD17192}.All|Win32.ActiveCfg = Release|Win32
|
||||
{B535402E-38D2-4D54-8360-423ACBD17192}.All|Win32.Build.0 = Release|Win32
|
||||
{B535402E-38D2-4D54-8360-423ACBD17192}.All|x64.ActiveCfg = Release|Win32
|
||||
{B535402E-38D2-4D54-8360-423ACBD17192}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{B535402E-38D2-4D54-8360-423ACBD17192}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{B535402E-38D2-4D54-8360-423ACBD17192}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{B535402E-38D2-4D54-8360-423ACBD17192}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{B535402E-38D2-4D54-8360-423ACBD17192}.Release|Win32.Build.0 = Release|Win32
|
||||
{B535402E-38D2-4D54-8360-423ACBD17192}.Release|x64.ActiveCfg = Release|Win32
|
||||
{CEE544A9-0303-44C2-8ECE-EFA7D7BCBBBA}.All|Win32.ActiveCfg = Release|Win32
|
||||
{CEE544A9-0303-44C2-8ECE-EFA7D7BCBBBA}.All|Win32.Build.0 = Release|Win32
|
||||
{CEE544A9-0303-44C2-8ECE-EFA7D7BCBBBA}.All|x64.ActiveCfg = Release|Win32
|
||||
{CEE544A9-0303-44C2-8ECE-EFA7D7BCBBBA}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{CEE544A9-0303-44C2-8ECE-EFA7D7BCBBBA}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{CEE544A9-0303-44C2-8ECE-EFA7D7BCBBBA}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{CEE544A9-0303-44C2-8ECE-EFA7D7BCBBBA}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{CEE544A9-0303-44C2-8ECE-EFA7D7BCBBBA}.Release|Win32.Build.0 = Release|Win32
|
||||
{CEE544A9-0303-44C2-8ECE-EFA7D7BCBBBA}.Release|x64.ActiveCfg = Release|Win32
|
||||
{0D108721-EAE8-4BAF-8102-D8960EC93647}.All|Win32.ActiveCfg = Debug|Win32
|
||||
{0D108721-EAE8-4BAF-8102-D8960EC93647}.All|Win32.Build.0 = Debug|Win32
|
||||
{0D108721-EAE8-4BAF-8102-D8960EC93647}.All|x64.ActiveCfg = Debug|Win32
|
||||
{0D108721-EAE8-4BAF-8102-D8960EC93647}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{0D108721-EAE8-4BAF-8102-D8960EC93647}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{0D108721-EAE8-4BAF-8102-D8960EC93647}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{0D108721-EAE8-4BAF-8102-D8960EC93647}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{0D108721-EAE8-4BAF-8102-D8960EC93647}.Release|Win32.Build.0 = Release|Win32
|
||||
{0D108721-EAE8-4BAF-8102-D8960EC93647}.Release|x64.ActiveCfg = Release|Win32
|
||||
{426B1369-FDB7-4B18-A7EF-9C6A9097A130}.All|Win32.ActiveCfg = Release|Win32
|
||||
{426B1369-FDB7-4B18-A7EF-9C6A9097A130}.All|Win32.Build.0 = Release|Win32
|
||||
{426B1369-FDB7-4B18-A7EF-9C6A9097A130}.All|x64.ActiveCfg = Release|Win32
|
||||
{426B1369-FDB7-4B18-A7EF-9C6A9097A130}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{426B1369-FDB7-4B18-A7EF-9C6A9097A130}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{426B1369-FDB7-4B18-A7EF-9C6A9097A130}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{426B1369-FDB7-4B18-A7EF-9C6A9097A130}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{426B1369-FDB7-4B18-A7EF-9C6A9097A130}.Release|Win32.Build.0 = Release|Win32
|
||||
{426B1369-FDB7-4B18-A7EF-9C6A9097A130}.Release|x64.ActiveCfg = Release|Win32
|
||||
{E972C52F-9E85-4D65-B19C-031E511E9DB4}.All|Win32.ActiveCfg = Release_Dynamic_SSE|Win32
|
||||
{E972C52F-9E85-4D65-B19C-031E511E9DB4}.All|Win32.Build.0 = Release_Dynamic_SSE|Win32
|
||||
{E972C52F-9E85-4D65-B19C-031E511E9DB4}.All|x64.ActiveCfg = Release_Dynamic_SSE|Win32
|
||||
{E972C52F-9E85-4D65-B19C-031E511E9DB4}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{E972C52F-9E85-4D65-B19C-031E511E9DB4}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{E972C52F-9E85-4D65-B19C-031E511E9DB4}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{E972C52F-9E85-4D65-B19C-031E511E9DB4}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{E972C52F-9E85-4D65-B19C-031E511E9DB4}.Release|Win32.Build.0 = Release|Win32
|
||||
{E972C52F-9E85-4D65-B19C-031E511E9DB4}.Release|x64.ActiveCfg = Release|Win32
|
||||
{E42FDC95-7243-4219-9EA4-ACCE4AB97197}.All|Win32.ActiveCfg = Release_Dynamic_SSE|Win32
|
||||
{E42FDC95-7243-4219-9EA4-ACCE4AB97197}.All|Win32.Build.0 = Release_Dynamic_SSE|Win32
|
||||
{E42FDC95-7243-4219-9EA4-ACCE4AB97197}.All|x64.ActiveCfg = Release_Dynamic_SSE|Win32
|
||||
{E42FDC95-7243-4219-9EA4-ACCE4AB97197}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{E42FDC95-7243-4219-9EA4-ACCE4AB97197}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{E42FDC95-7243-4219-9EA4-ACCE4AB97197}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{E42FDC95-7243-4219-9EA4-ACCE4AB97197}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{E42FDC95-7243-4219-9EA4-ACCE4AB97197}.Release|Win32.Build.0 = Release|Win32
|
||||
{E42FDC95-7243-4219-9EA4-ACCE4AB97197}.Release|x64.ActiveCfg = Release|Win32
|
||||
{7C43DBD8-6893-4CD2-B7C0-D2E51F8B1FD3}.All|Win32.ActiveCfg = Release|Win32
|
||||
{7C43DBD8-6893-4CD2-B7C0-D2E51F8B1FD3}.All|Win32.Build.0 = Release|Win32
|
||||
{7C43DBD8-6893-4CD2-B7C0-D2E51F8B1FD3}.All|x64.ActiveCfg = Release|Win32
|
||||
{7C43DBD8-6893-4CD2-B7C0-D2E51F8B1FD3}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{7C43DBD8-6893-4CD2-B7C0-D2E51F8B1FD3}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{7C43DBD8-6893-4CD2-B7C0-D2E51F8B1FD3}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{7C43DBD8-6893-4CD2-B7C0-D2E51F8B1FD3}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{7C43DBD8-6893-4CD2-B7C0-D2E51F8B1FD3}.Release|Win32.Build.0 = Release|Win32
|
||||
{7C43DBD8-6893-4CD2-B7C0-D2E51F8B1FD3}.Release|x64.ActiveCfg = Release|Win32
|
||||
{D0B36172-CD76-454A-9B89-990025266C2A}.All|Win32.ActiveCfg = Release|Win32
|
||||
{D0B36172-CD76-454A-9B89-990025266C2A}.All|Win32.Build.0 = Release|Win32
|
||||
{D0B36172-CD76-454A-9B89-990025266C2A}.All|x64.ActiveCfg = Release|Win32
|
||||
{D0B36172-CD76-454A-9B89-990025266C2A}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{D0B36172-CD76-454A-9B89-990025266C2A}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{D0B36172-CD76-454A-9B89-990025266C2A}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{D0B36172-CD76-454A-9B89-990025266C2A}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{D0B36172-CD76-454A-9B89-990025266C2A}.Release|Win32.Build.0 = Release|Win32
|
||||
{D0B36172-CD76-454A-9B89-990025266C2A}.Release|x64.ActiveCfg = Release|Win32
|
||||
{AEE5D1F8-3386-4CB2-A336-0125C4C7EAEE}.All|Win32.ActiveCfg = Release|Win32
|
||||
{AEE5D1F8-3386-4CB2-A336-0125C4C7EAEE}.All|Win32.Build.0 = Release|Win32
|
||||
{AEE5D1F8-3386-4CB2-A336-0125C4C7EAEE}.All|x64.ActiveCfg = Release|Win32
|
||||
{AEE5D1F8-3386-4CB2-A336-0125C4C7EAEE}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{AEE5D1F8-3386-4CB2-A336-0125C4C7EAEE}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{AEE5D1F8-3386-4CB2-A336-0125C4C7EAEE}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{AEE5D1F8-3386-4CB2-A336-0125C4C7EAEE}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{AEE5D1F8-3386-4CB2-A336-0125C4C7EAEE}.Release|Win32.Build.0 = Release|Win32
|
||||
{AEE5D1F8-3386-4CB2-A336-0125C4C7EAEE}.Release|x64.ActiveCfg = Release|Win32
|
||||
{401A40CD-5DB4-4E34-AC68-FA99E9FAC014}.All|Win32.ActiveCfg = Release|Win32
|
||||
{401A40CD-5DB4-4E34-AC68-FA99E9FAC014}.All|Win32.Build.0 = Release|Win32
|
||||
{401A40CD-5DB4-4E34-AC68-FA99E9FAC014}.All|x64.ActiveCfg = Release|Win32
|
||||
{401A40CD-5DB4-4E34-AC68-FA99E9FAC014}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{401A40CD-5DB4-4E34-AC68-FA99E9FAC014}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{401A40CD-5DB4-4E34-AC68-FA99E9FAC014}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{401A40CD-5DB4-4E34-AC68-FA99E9FAC014}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{401A40CD-5DB4-4E34-AC68-FA99E9FAC014}.Release|Win32.Build.0 = Release|Win32
|
||||
{401A40CD-5DB4-4E34-AC68-FA99E9FAC014}.Release|x64.ActiveCfg = Release|Win32
|
||||
{1CBB0077-18C5-455F-801C-0A0CE7B0BBF5}.All|Win32.ActiveCfg = Release|Win32
|
||||
{1CBB0077-18C5-455F-801C-0A0CE7B0BBF5}.All|Win32.Build.0 = Release|Win32
|
||||
{1CBB0077-18C5-455F-801C-0A0CE7B0BBF5}.All|x64.ActiveCfg = Release|Win32
|
||||
{1CBB0077-18C5-455F-801C-0A0CE7B0BBF5}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{1CBB0077-18C5-455F-801C-0A0CE7B0BBF5}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{1CBB0077-18C5-455F-801C-0A0CE7B0BBF5}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{1CBB0077-18C5-455F-801C-0A0CE7B0BBF5}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{1CBB0077-18C5-455F-801C-0A0CE7B0BBF5}.Release|Win32.Build.0 = Release|Win32
|
||||
{1CBB0077-18C5-455F-801C-0A0CE7B0BBF5}.Release|x64.ActiveCfg = Release|Win32
|
||||
{DEE932AB-5911-4700-9EEB-8C7090A0A330}.All|Win32.ActiveCfg = All|Win32
|
||||
{DEE932AB-5911-4700-9EEB-8C7090A0A330}.All|Win32.Build.0 = All|Win32
|
||||
{DEE932AB-5911-4700-9EEB-8C7090A0A330}.All|x64.ActiveCfg = All|Win32
|
||||
{DEE932AB-5911-4700-9EEB-8C7090A0A330}.Debug|Win32.ActiveCfg = All|Win32
|
||||
{DEE932AB-5911-4700-9EEB-8C7090A0A330}.Debug|Win32.Build.0 = All|Win32
|
||||
{DEE932AB-5911-4700-9EEB-8C7090A0A330}.Debug|x64.ActiveCfg = All|Win32
|
||||
{DEE932AB-5911-4700-9EEB-8C7090A0A330}.Release|Win32.ActiveCfg = All|Win32
|
||||
{DEE932AB-5911-4700-9EEB-8C7090A0A330}.Release|Win32.Build.0 = All|Win32
|
||||
{DEE932AB-5911-4700-9EEB-8C7090A0A330}.Release|x64.ActiveCfg = All|Win32
|
||||
{329A6FA0-0FCC-4435-A950-E670AEFA9838}.All|Win32.ActiveCfg = All|Win32
|
||||
{329A6FA0-0FCC-4435-A950-E670AEFA9838}.All|Win32.Build.0 = All|Win32
|
||||
{329A6FA0-0FCC-4435-A950-E670AEFA9838}.All|x64.ActiveCfg = All|Win32
|
||||
{329A6FA0-0FCC-4435-A950-E670AEFA9838}.Debug|Win32.ActiveCfg = All|Win32
|
||||
{329A6FA0-0FCC-4435-A950-E670AEFA9838}.Debug|Win32.Build.0 = All|Win32
|
||||
{329A6FA0-0FCC-4435-A950-E670AEFA9838}.Debug|x64.ActiveCfg = All|Win32
|
||||
{329A6FA0-0FCC-4435-A950-E670AEFA9838}.Release|Win32.ActiveCfg = All|Win32
|
||||
{329A6FA0-0FCC-4435-A950-E670AEFA9838}.Release|Win32.Build.0 = All|Win32
|
||||
{329A6FA0-0FCC-4435-A950-E670AEFA9838}.Release|x64.ActiveCfg = All|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
@ -1410,7 +1722,6 @@ Global
|
|||
{DF018947-0FFF-4EB3-BDEE-441DC81DA7A4} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}
|
||||
{4043FC6A-9A30-4577-8AD5-9B233C9575D8} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}
|
||||
{0A18A071-125E-442F-AFF7-A3F68ABECF99} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}
|
||||
{CF70F278-3364-4395-A2E1-23501C9B8AD2} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}
|
||||
{D2396DD7-7D38-473A-ABB7-6F96D65AE1B9} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}
|
||||
{B535402E-38D2-4D54-8360-423ACBD17192} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}
|
||||
{CEE544A9-0303-44C2-8ECE-EFA7D7BCBBBA} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}
|
||||
|
@ -1419,6 +1730,10 @@ Global
|
|||
{E42FDC95-7243-4219-9EA4-ACCE4AB97197} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}
|
||||
{7C43DBD8-6893-4CD2-B7C0-D2E51F8B1FD3} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}
|
||||
{D0B36172-CD76-454A-9B89-990025266C2A} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}
|
||||
{401A40CD-5DB4-4E34-AC68-FA99E9FAC014} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}
|
||||
{1CBB0077-18C5-455F-801C-0A0CE7B0BBF5} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}
|
||||
{DEE932AB-5911-4700-9EEB-8C7090A0A330} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}
|
||||
{329A6FA0-0FCC-4435-A950-E670AEFA9838} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}
|
||||
{1AD3F51E-BBB6-4090-BA39-9DFAB1EF1F5F} = {0C808854-54D1-4230-BFF5-77B5FD905000}
|
||||
{ACFFF684-4D19-4D48-AF12-88EA1D778BDF} = {0C808854-54D1-4230-BFF5-77B5FD905000}
|
||||
{8F992C49-6C51-412F-B2A3-34EAB708EB65} = {0C808854-54D1-4230-BFF5-77B5FD905000}
|
||||
|
|
|
@ -388,6 +388,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_voipcodecs", "src\mod\c
|
|||
ProjectSection(ProjectDependencies) = postProject
|
||||
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
|
||||
{1CBB0077-18C5-455F-801C-0A0CE7B0BBF5} = {1CBB0077-18C5-455F-801C-0A0CE7B0BBF5}
|
||||
{401A40CD-5DB4-4E34-AC68-FA99E9FAC014} = {401A40CD-5DB4-4E34-AC68-FA99E9FAC014}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_fsv", "src\mod\applications\mod_fsv\mod_fsv.2008.vcproj", "{E3246D17-E29B-4AB5-962A-C69B0C5837BB}"
|
||||
|
|
|
@ -761,6 +761,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_voipcodecs", "src\mod\c
|
|||
ProjectSection(ProjectDependencies) = postProject
|
||||
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
|
||||
{1CBB0077-18C5-455F-801C-0A0CE7B0BBF5} = {1CBB0077-18C5-455F-801C-0A0CE7B0BBF5}
|
||||
{401A40CD-5DB4-4E34-AC68-FA99E9FAC014} = {401A40CD-5DB4-4E34-AC68-FA99E9FAC014}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_fsv", "src\mod\applications\mod_fsv\mod_fsv.2008.vcproj", "{E3246D17-E29B-4AB5-962A-C69B0C5837BB}"
|
||||
|
|
|
@ -3,7 +3,7 @@ echo "bootstrap: checking installation..."
|
|||
|
||||
BASEDIR=`pwd`;
|
||||
LIBDIR=${BASEDIR}/libs;
|
||||
SUBDIRS="ilbc curl iksemel voipcodecs \
|
||||
SUBDIRS="ilbc curl iksemel \
|
||||
js js/nsprpub libdingaling libedit libsndfile pcre sofia-sip \
|
||||
speex sqlite srtp openzap spandsp libg722_1 portaudio unimrcp tiff-3.8.2";
|
||||
|
||||
|
|
|
@ -826,7 +826,6 @@ fi
|
|||
AC_CONFIG_SUBDIRS(libs/pcre)
|
||||
AC_CONFIG_SUBDIRS(libs/apr)
|
||||
AC_CONFIG_SUBDIRS(libs/apr-util)
|
||||
AC_CONFIG_SUBDIRS(libs/voipcodecs)
|
||||
AC_CONFIG_SUBDIRS(libs/ilbc)
|
||||
AC_CONFIG_SUBDIRS(libs/curl)
|
||||
AC_CONFIG_SUBDIRS(libs/iksemel)
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
Thu Feb 7 18:52:01 CST 2008
|
|
@ -1 +0,0 @@
|
|||
Steve Underwood <steveu@coppice.org>
|
|
@ -1,340 +0,0 @@
|
|||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Library General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Library General
|
||||
Public License instead of this License.
|
|
@ -1,3 +0,0 @@
|
|||
08.02.08 - 0.0.1 - Steve Underwood <steveu@coppice.org>
|
||||
- The first version.
|
||||
|
|
@ -1,236 +0,0 @@
|
|||
Installation Instructions
|
||||
*************************
|
||||
|
||||
Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free
|
||||
Software Foundation, Inc.
|
||||
|
||||
This file is free documentation; the Free Software Foundation gives
|
||||
unlimited permission to copy, distribute and modify it.
|
||||
|
||||
Basic Installation
|
||||
==================
|
||||
|
||||
These are generic installation instructions.
|
||||
|
||||
The `configure' shell script attempts to guess correct values for
|
||||
various system-dependent variables used during compilation. It uses
|
||||
those values to create a `Makefile' in each directory of the package.
|
||||
It may also create one or more `.h' files containing system-dependent
|
||||
definitions. Finally, it creates a shell script `config.status' that
|
||||
you can run in the future to recreate the current configuration, and a
|
||||
file `config.log' containing compiler output (useful mainly for
|
||||
debugging `configure').
|
||||
|
||||
It can also use an optional file (typically called `config.cache'
|
||||
and enabled with `--cache-file=config.cache' or simply `-C') that saves
|
||||
the results of its tests to speed up reconfiguring. (Caching is
|
||||
disabled by default to prevent problems with accidental use of stale
|
||||
cache files.)
|
||||
|
||||
If you need to do unusual things to compile the package, please try
|
||||
to figure out how `configure' could check whether to do them, and mail
|
||||
diffs or instructions to the address given in the `README' so they can
|
||||
be considered for the next release. If you are using the cache, and at
|
||||
some point `config.cache' contains results you don't want to keep, you
|
||||
may remove or edit it.
|
||||
|
||||
The file `configure.ac' (or `configure.in') is used to create
|
||||
`configure' by a program called `autoconf'. You only need
|
||||
`configure.ac' if you want to change it or regenerate `configure' using
|
||||
a newer version of `autoconf'.
|
||||
|
||||
The simplest way to compile this package is:
|
||||
|
||||
1. `cd' to the directory containing the package's source code and type
|
||||
`./configure' to configure the package for your system. If you're
|
||||
using `csh' on an old version of System V, you might need to type
|
||||
`sh ./configure' instead to prevent `csh' from trying to execute
|
||||
`configure' itself.
|
||||
|
||||
Running `configure' takes awhile. While running, it prints some
|
||||
messages telling which features it is checking for.
|
||||
|
||||
2. Type `make' to compile the package.
|
||||
|
||||
3. Optionally, type `make check' to run any self-tests that come with
|
||||
the package.
|
||||
|
||||
4. Type `make install' to install the programs and any data files and
|
||||
documentation.
|
||||
|
||||
5. You can remove the program binaries and object files from the
|
||||
source code directory by typing `make clean'. To also remove the
|
||||
files that `configure' created (so you can compile the package for
|
||||
a different kind of computer), type `make distclean'. There is
|
||||
also a `make maintainer-clean' target, but that is intended mainly
|
||||
for the package's developers. If you use it, you may have to get
|
||||
all sorts of other programs in order to regenerate files that came
|
||||
with the distribution.
|
||||
|
||||
Compilers and Options
|
||||
=====================
|
||||
|
||||
Some systems require unusual options for compilation or linking that the
|
||||
`configure' script does not know about. Run `./configure --help' for
|
||||
details on some of the pertinent environment variables.
|
||||
|
||||
You can give `configure' initial values for configuration parameters
|
||||
by setting variables in the command line or in the environment. Here
|
||||
is an example:
|
||||
|
||||
./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
|
||||
|
||||
*Note Defining Variables::, for more details.
|
||||
|
||||
Compiling For Multiple Architectures
|
||||
====================================
|
||||
|
||||
You can compile the package for more than one kind of computer at the
|
||||
same time, by placing the object files for each architecture in their
|
||||
own directory. To do this, you must use a version of `make' that
|
||||
supports the `VPATH' variable, such as GNU `make'. `cd' to the
|
||||
directory where you want the object files and executables to go and run
|
||||
the `configure' script. `configure' automatically checks for the
|
||||
source code in the directory that `configure' is in and in `..'.
|
||||
|
||||
If you have to use a `make' that does not support the `VPATH'
|
||||
variable, you have to compile the package for one architecture at a
|
||||
time in the source code directory. After you have installed the
|
||||
package for one architecture, use `make distclean' before reconfiguring
|
||||
for another architecture.
|
||||
|
||||
Installation Names
|
||||
==================
|
||||
|
||||
By default, `make install' installs the package's commands under
|
||||
`/usr/local/bin', include files under `/usr/local/include', etc. You
|
||||
can specify an installation prefix other than `/usr/local' by giving
|
||||
`configure' the option `--prefix=PREFIX'.
|
||||
|
||||
You can specify separate installation prefixes for
|
||||
architecture-specific files and architecture-independent files. If you
|
||||
pass the option `--exec-prefix=PREFIX' to `configure', the package uses
|
||||
PREFIX as the prefix for installing programs and libraries.
|
||||
Documentation and other data files still use the regular prefix.
|
||||
|
||||
In addition, if you use an unusual directory layout you can give
|
||||
options like `--bindir=DIR' to specify different values for particular
|
||||
kinds of files. Run `configure --help' for a list of the directories
|
||||
you can set and what kinds of files go in them.
|
||||
|
||||
If the package supports it, you can cause programs to be installed
|
||||
with an extra prefix or suffix on their names by giving `configure' the
|
||||
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
|
||||
|
||||
Optional Features
|
||||
=================
|
||||
|
||||
Some packages pay attention to `--enable-FEATURE' options to
|
||||
`configure', where FEATURE indicates an optional part of the package.
|
||||
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
|
||||
is something like `gnu-as' or `x' (for the X Window System). The
|
||||
`README' should mention any `--enable-' and `--with-' options that the
|
||||
package recognizes.
|
||||
|
||||
For packages that use the X Window System, `configure' can usually
|
||||
find the X include and library files automatically, but if it doesn't,
|
||||
you can use the `configure' options `--x-includes=DIR' and
|
||||
`--x-libraries=DIR' to specify their locations.
|
||||
|
||||
Specifying the System Type
|
||||
==========================
|
||||
|
||||
There may be some features `configure' cannot figure out automatically,
|
||||
but needs to determine by the type of machine the package will run on.
|
||||
Usually, assuming the package is built to be run on the _same_
|
||||
architectures, `configure' can figure that out, but if it prints a
|
||||
message saying it cannot guess the machine type, give it the
|
||||
`--build=TYPE' option. TYPE can either be a short name for the system
|
||||
type, such as `sun4', or a canonical name which has the form:
|
||||
|
||||
CPU-COMPANY-SYSTEM
|
||||
|
||||
where SYSTEM can have one of these forms:
|
||||
|
||||
OS KERNEL-OS
|
||||
|
||||
See the file `config.sub' for the possible values of each field. If
|
||||
`config.sub' isn't included in this package, then this package doesn't
|
||||
need to know the machine type.
|
||||
|
||||
If you are _building_ compiler tools for cross-compiling, you should
|
||||
use the option `--target=TYPE' to select the type of system they will
|
||||
produce code for.
|
||||
|
||||
If you want to _use_ a cross compiler, that generates code for a
|
||||
platform different from the build platform, you should specify the
|
||||
"host" platform (i.e., that on which the generated programs will
|
||||
eventually be run) with `--host=TYPE'.
|
||||
|
||||
Sharing Defaults
|
||||
================
|
||||
|
||||
If you want to set default values for `configure' scripts to share, you
|
||||
can create a site shell script called `config.site' that gives default
|
||||
values for variables like `CC', `cache_file', and `prefix'.
|
||||
`configure' looks for `PREFIX/share/config.site' if it exists, then
|
||||
`PREFIX/etc/config.site' if it exists. Or, you can set the
|
||||
`CONFIG_SITE' environment variable to the location of the site script.
|
||||
A warning: not all `configure' scripts look for a site script.
|
||||
|
||||
Defining Variables
|
||||
==================
|
||||
|
||||
Variables not defined in a site shell script can be set in the
|
||||
environment passed to `configure'. However, some packages may run
|
||||
configure again during the build, and the customized values of these
|
||||
variables may be lost. In order to avoid this problem, you should set
|
||||
them in the `configure' command line, using `VAR=value'. For example:
|
||||
|
||||
./configure CC=/usr/local2/bin/gcc
|
||||
|
||||
causes the specified `gcc' to be used as the C compiler (unless it is
|
||||
overridden in the site shell script). Here is a another example:
|
||||
|
||||
/bin/bash ./configure CONFIG_SHELL=/bin/bash
|
||||
|
||||
Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent
|
||||
configuration-related scripts to be executed by `/bin/bash'.
|
||||
|
||||
`configure' Invocation
|
||||
======================
|
||||
|
||||
`configure' recognizes the following options to control how it operates.
|
||||
|
||||
`--help'
|
||||
`-h'
|
||||
Print a summary of the options to `configure', and exit.
|
||||
|
||||
`--version'
|
||||
`-V'
|
||||
Print the version of Autoconf used to generate the `configure'
|
||||
script, and exit.
|
||||
|
||||
`--cache-file=FILE'
|
||||
Enable the cache: use and save the results of the tests in FILE,
|
||||
traditionally `config.cache'. FILE defaults to `/dev/null' to
|
||||
disable caching.
|
||||
|
||||
`--config-cache'
|
||||
`-C'
|
||||
Alias for `--cache-file=config.cache'.
|
||||
|
||||
`--quiet'
|
||||
`--silent'
|
||||
`-q'
|
||||
Do not print messages saying which checks are being made. To
|
||||
suppress all normal output, redirect it to `/dev/null' (any error
|
||||
messages will still be shown).
|
||||
|
||||
`--srcdir=DIR'
|
||||
Look for the package's source code in directory DIR. Usually
|
||||
`configure' can determine that directory automatically.
|
||||
|
||||
`configure' also accepts some other, not widely useful, options. Run
|
||||
`configure --help' for more details.
|
||||
|
|
@ -1,93 +0,0 @@
|
|||
##
|
||||
## VoIPcodecs - a series of DSP components for telephony
|
||||
##
|
||||
## Makefile.am -- Process this file with automake to produce Makefile.in
|
||||
##
|
||||
## This program is free software; you can redistribute it and/or modify
|
||||
## it under the terms of the GNU General Public License version 2, as
|
||||
## published by the Free Software Foundation.
|
||||
##
|
||||
## This program is distributed in the hope that it will be useful,
|
||||
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
## GNU General Public License for more details.
|
||||
##
|
||||
## You should have received a copy of the GNU General Public License
|
||||
## along with this program; if not, write to the Free Software
|
||||
## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
##
|
||||
## $Id: Makefile.am,v 1.29 2007/09/23 12:45:15 steveu Exp $
|
||||
|
||||
AM_CFLAGS = $(COMP_VENDOR_CFLAGS)
|
||||
|
||||
noinst_SCRIPTS = voipcodecs.spec
|
||||
|
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
|
||||
EXTRA_DIST = voipcodecs.spec \
|
||||
wrapper.xsl \
|
||||
libvoipcodecs.vcproj \
|
||||
doc/libvoipcodecs-doxygen \
|
||||
src/float_fudge.h \
|
||||
src/voipcodecs/version.h.in \
|
||||
src/libvoipcodecs.dsp \
|
||||
src/libvoipcodecs.sln \
|
||||
src/msvc/gettimeofday.c \
|
||||
src/msvc/inttypes.h \
|
||||
src/msvc/tgmath.h \
|
||||
src/msvc/unistd.h \
|
||||
src/msvc/sys/time.h \
|
||||
src/msvc/voipcodecs.def \
|
||||
src/msvc/msvcproj.head \
|
||||
src/msvc/msvcproj.foot \
|
||||
src/msvc/vc8proj.head \
|
||||
src/msvc/vc8proj.foot \
|
||||
debian/changelog \
|
||||
debian/compat \
|
||||
debian/control \
|
||||
debian/copyright \
|
||||
debian/libvoipcodecs.install \
|
||||
debian/libvoipcodecs-dev.install \
|
||||
debian/libvoipcodecs-doc.install \
|
||||
debian/rules \
|
||||
debian/watch
|
||||
|
||||
if COND_DOC
|
||||
MAYBE_DOC=doc
|
||||
endif
|
||||
if COND_TESTS
|
||||
MAYBE_TESTS=tests
|
||||
endif
|
||||
if COND_ITUTESTS
|
||||
MAYBE_ITUTESTS=itutests
|
||||
endif
|
||||
SUBDIRS = src $(MAYBE_DOC) $(MAYBE_TESTS) $(MAYBE_ITUTESTS)
|
||||
|
||||
DIST_SUBDIRS = src doc tests localtests etsitests itutests
|
||||
|
||||
faq: faq.xml
|
||||
cd faq ; xsltproc ../wrapper.xsl ../faq.xml
|
||||
|
||||
rpm: rpm-build
|
||||
|
||||
rpm-build:
|
||||
$(MAKE) -$(MAKEFLAGS) bump.rpm.release
|
||||
$(MAKE) -$(MAKEFLAGS) dist
|
||||
rm -rf rpm/BUILD/*
|
||||
rm -f rpm/RPMS/*/*
|
||||
rm -f rpm/SOURCES/*
|
||||
rm -f rpm/SPECS/*
|
||||
rm -f rpm/SRPMS/*
|
||||
rpm -ta --sign @PACKAGE@-@VERSION@.tar.gz
|
||||
|
||||
bump.rpm.release: voipcodecs.spec
|
||||
VERSION="x"; \
|
||||
test -f $(srcdir)/rpm.release && . $(srcdir)/rpm.release; \
|
||||
NEXT_RELEASE=0; \
|
||||
test "$$VERSION" = "@VERSION@" && NEXT_RELEASE="$$RELEASE"; \
|
||||
RELEASE=`expr $$NEXT_RELEASE + 1`; \
|
||||
echo "VERSION=@VERSION@" >$(srcdir)/rpm.release; \
|
||||
echo "RELEASE=$$RELEASE" >>$(srcdir)/rpm.release; \
|
||||
sed 's/^Release: .*/Release: '$$RELEASE'/' \
|
||||
<voipcodecs.spec >voipcodecs.spec.new; \
|
||||
mv voipcodecs.spec.new voipcodecs.spec
|
|
@ -1 +0,0 @@
|
|||
No news is good news!
|
|
@ -1,4 +0,0 @@
|
|||
VoIPcodecs 0.0.1 - A set of commonly used, unencumbered, codecs for VoIP
|
||||
------------------------------------------------------------------------
|
||||
|
||||
Steve Underwood <steveu@coppice.org>
|
|
@ -1,348 +0,0 @@
|
|||
#
|
||||
# VoIPcodecs - a series of DSP components for telephony
|
||||
#
|
||||
# configure.ac -- Process this file with autoconf to produce configure
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License version 2, as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
#
|
||||
# $Id: configure.ac,v 1.38 2007/11/10 11:14:56 steveu Exp $
|
||||
|
||||
# @start 1
|
||||
|
||||
AC_INIT
|
||||
|
||||
AC_DEFUN([AX_COMPILER_VENDOR],
|
||||
[
|
||||
AC_CACHE_CHECK([for _AC_LANG compiler vendor], ax_cv_[]_AC_LANG_ABBREV[]_compiler_vendor,
|
||||
[ax_cv_[]_AC_LANG_ABBREV[]_compiler_vendor=unknown
|
||||
# note: don't check for GCC first, since some other compilers define __GNUC__
|
||||
for ventest in intel:__ICC,__ECC,__INTEL_COMPILER ibm:__xlc__,__xlC__,__IBMC__,__IBMCPP__ gnu:__GNUC__ sun:__SUNPRO_C,__SUNPRO_CC hp:__HP_cc,__HP_aCC dec:__DECC,__DECCXX,__DECC_VER,__DECCXX_VER borland:__BORLANDC__,__TURBOC__ comeau:__COMO__ cray:_CRAYC kai:__KCC lcc:__LCC__ metrowerks:__MWERKS__ sgi:__sgi,sgi microsoft:_MSC_VER watcom:__WATCOMC__ portland:__PGI; do
|
||||
vencpp="defined("`echo $ventest | cut -d: -f2 | sed 's/,/) || defined(/g'`")"
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[
|
||||
#if !($vencpp)
|
||||
thisisanerror;
|
||||
#endif
|
||||
])], [ax_cv_]_AC_LANG_ABBREV[_compiler_vendor=`echo $ventest | cut -d: -f1`; break])
|
||||
done
|
||||
])
|
||||
])
|
||||
|
||||
VOIPCODECS_MAJOR_VERSION=0
|
||||
VOIPCODECS_MINOR_VERSION=0
|
||||
VOIPCODECS_MICRO_VERSION=1
|
||||
|
||||
VOIPCODECS_LT_CURRENT=0
|
||||
VOIPCODECS_LT_REVISION=2
|
||||
VOIPCODECS_LT_AGE=0
|
||||
|
||||
VERSION=$VOIPCODECS_MAJOR_VERSION.$VOIPCODECS_MINOR_VERSION.$VOIPCODECS_MICRO_VERSION
|
||||
PACKAGE=voipcodecs
|
||||
|
||||
AC_SUBST(VOIPCODECS_LT_CURRENT)
|
||||
AC_SUBST(VOIPCODECS_LT_REVISION)
|
||||
AC_SUBST(VOIPCODECS_LT_AGE)
|
||||
|
||||
AC_CONFIG_SRCDIR([src/g711.c])
|
||||
AC_CONFIG_AUX_DIR(config)
|
||||
AC_CONFIG_HEADERS([src/config.h:config-h.in])
|
||||
AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
|
||||
|
||||
AC_CANONICAL_HOST
|
||||
AC_CANONICAL_BUILD
|
||||
AC_PROG_CC
|
||||
AC_PROG_CXX
|
||||
AC_PROG_GCC_TRADITIONAL
|
||||
AC_PROG_LIBTOOL
|
||||
AC_LANG([C])
|
||||
|
||||
AX_COMPILER_VENDOR
|
||||
|
||||
if test "${build}" != "${host}"
|
||||
then
|
||||
# If we are doing a Canadian Cross, in which the host and build systems
|
||||
# are not the same, we set reasonable default values for the tools.
|
||||
|
||||
CC=${CC-${host_alias}-gcc}
|
||||
CFLAGS=${CFLAGS-"-g -O2"}
|
||||
CXX=${CXX-${host_alias}-c++}
|
||||
CXXFLAGS=${CXXFLAGS-"-g -O2"}
|
||||
CC_FOR_BUILD=${CC_FOR_BUILD-gcc}
|
||||
else
|
||||
# Set reasonable default values for some tools even if not Canadian.
|
||||
# Of course, these are different reasonable default values, originally
|
||||
# specified directly in the Makefile.
|
||||
# We don't export, so that autoconf can do its job.
|
||||
# Note that all these settings are above the fragment inclusion point
|
||||
# in Makefile.in, so can still be overridden by fragments.
|
||||
# This is all going to change when we autoconfiscate...
|
||||
CC_FOR_BUILD="\$(CC)"
|
||||
AC_PROG_CC
|
||||
|
||||
# We must set the default linker to the linker used by gcc for the correct
|
||||
# operation of libtool. If LD is not defined and we are using gcc, try to
|
||||
# set the LD default to the ld used by gcc.
|
||||
if test -z "$LD"
|
||||
then
|
||||
if test "$GCC" = yes
|
||||
then
|
||||
case $build in
|
||||
*-*-mingw*)
|
||||
gcc_prog_ld=`$CC -print-prog-name=ld 2>&1 | tr -d '\015'` ;;
|
||||
*)
|
||||
gcc_prog_ld=`$CC -print-prog-name=ld 2>&1` ;;
|
||||
esac
|
||||
case $gcc_prog_ld in
|
||||
# Accept absolute paths.
|
||||
[[\\/]* | [A-Za-z]:[\\/]*)]
|
||||
LD="$gcc_prog_ld" ;;
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
|
||||
CXX=${CXX-"c++"}
|
||||
CFLAGS=${CFLAGS-"-g -O2"}
|
||||
CXXFLAGS=${CXXFLAGS-"-g -O2"}
|
||||
fi
|
||||
|
||||
AC_C_CONST
|
||||
AC_C_INLINE
|
||||
AC_C_VOLATILE
|
||||
|
||||
AC_CHECK_TYPES(long long)
|
||||
AC_CHECK_TYPES(long double)
|
||||
|
||||
AC_TYPE_SIGNAL
|
||||
|
||||
AC_ARG_ENABLE(doc, [ --enable-doc Build the documentation])
|
||||
AC_ARG_ENABLE(tests, [ --enable-tests Build the test programs])
|
||||
AC_ARG_ENABLE(itutests, [ --enable-itutests Build TIFF test files for some ITU test images])
|
||||
AC_ARG_ENABLE(mmx, [ --enable-mmx Enable MMX support])
|
||||
AC_ARG_ENABLE(sse, [ --enable-sse Enable SSE support])
|
||||
AC_ARG_ENABLE(fixed_point, [ --enable-fixed-point Enable fixed point support])
|
||||
|
||||
AC_FUNC_ERROR_AT_LINE
|
||||
AC_FUNC_VPRINTF
|
||||
AC_FUNC_MALLOC
|
||||
AC_FUNC_MEMCMP
|
||||
AC_FUNC_REALLOC
|
||||
AC_FUNC_SELECT_ARGTYPES
|
||||
|
||||
AC_CHECK_FUNCS([memmove])
|
||||
AC_CHECK_FUNCS([memset])
|
||||
AC_CHECK_FUNCS([select])
|
||||
AC_CHECK_FUNCS([strcasecmp])
|
||||
AC_CHECK_FUNCS([strchr])
|
||||
AC_CHECK_FUNCS([strdup])
|
||||
AC_CHECK_FUNCS([strerror])
|
||||
AC_CHECK_FUNCS([strstr])
|
||||
AC_CHECK_FUNCS([strtol])
|
||||
AC_CHECK_FUNCS([gettimeofday])
|
||||
|
||||
AC_HEADER_STDC
|
||||
AC_HEADER_SYS_WAIT
|
||||
AC_HEADER_TIME
|
||||
|
||||
# Check for header files.
|
||||
AC_CHECK_HEADERS([socket.h])
|
||||
AC_CHECK_HEADERS([inttypes.h], [INSERT_INTTYPES_HEADER="#include <inttypes.h>"])
|
||||
AC_CHECK_HEADERS([stdint.h], [INSERT_STDINT_HEADER="#include <stdint.h>"])
|
||||
AC_CHECK_HEADERS([unistd.h])
|
||||
AC_CHECK_HEADERS([stdlib.h])
|
||||
AC_CHECK_HEADERS([string.h])
|
||||
AC_CHECK_HEADERS([strings.h])
|
||||
AC_CHECK_HEADERS([malloc.h])
|
||||
AC_CHECK_HEADERS([tgmath.h], [INSERT_TGMATH_HEADER="#include <tgmath.h>"])
|
||||
AC_CHECK_HEADERS([math.h], [INSERT_MATH_HEADER="#include <math.h>"])
|
||||
AC_CHECK_HEADERS([float.h])
|
||||
AC_CHECK_HEADERS([fcntl.h])
|
||||
AC_CHECK_HEADERS([sys/time.h])
|
||||
AC_CHECK_HEADERS([sys/select.h])
|
||||
AC_CHECK_HEADERS([sys/ioctl.h])
|
||||
AC_CHECK_HEADERS([sys/fcntl.h])
|
||||
AC_CHECK_HEADERS([audiofile.h])
|
||||
AC_CHECK_HEADERS([fftw.h])
|
||||
AC_CHECK_HEADERS([fftw3.h])
|
||||
AC_CHECK_HEADERS([tiffio.h])
|
||||
AC_CHECK_HEADERS([pthread.h])
|
||||
AC_CHECK_HEADERS([unicall.h])
|
||||
if test "${build}" == "${host}"
|
||||
then
|
||||
AC_CHECK_HEADERS([X11/X.h])
|
||||
fi
|
||||
|
||||
# Determine XML2 include path
|
||||
AC_MSG_CHECKING(for libxml/xmlmemory.h)
|
||||
|
||||
# Can we include headers using system include dirs?
|
||||
AC_TRY_COMPILE([#include <libxml/xmlmemory.h>], [int a = 1;],
|
||||
XML2_INCLUDE=" ",
|
||||
XML2_INCLUDE=
|
||||
)
|
||||
|
||||
# Hunt through several possible directories to find the includes for libxml2
|
||||
if test "x$XML2_INCLUDE" = "x"; then
|
||||
old_CPPFLAGS="$CPPFLAGS"
|
||||
for i in $xml2_include_dir /usr/include /usr/local/include /usr/include/libxml2 /usr/local/include/libxml2 ; do
|
||||
CPPFLAGS="$old_CPPFLAGS -I$i"
|
||||
AC_TRY_COMPILE([#include <libxml/xmlmemory.h>], [int a = 1;],
|
||||
XML2_INCLUDE="-I$i",
|
||||
XML2_INCLUDE=
|
||||
)
|
||||
if test "x$XML2_INCLUDE" != "x"; then
|
||||
break;
|
||||
fi
|
||||
done
|
||||
CPPFLAGS="$old_CPPFLAGS $XML2_INCLUDE"
|
||||
fi
|
||||
|
||||
AC_CHECK_HEADERS([libxml/xmlmemory.h])
|
||||
AC_CHECK_HEADERS([libxml/parser.h])
|
||||
AC_CHECK_HEADERS([libxml/xinclude.h])
|
||||
|
||||
AC_LANG([C++])
|
||||
AC_CHECK_HEADERS([FL/Fl.H])
|
||||
AC_CHECK_HEADERS([FL/Fl_Overlay_Window.H])
|
||||
AC_CHECK_HEADERS([FL/Fl_Light_Button.H])
|
||||
AC_CHECK_HEADERS([FL/fl_draw.H])
|
||||
AC_CHECK_HEADERS([FL/Fl_Cartesian.H], [], [], [],[[#include <FL/Fl.H>
|
||||
]])
|
||||
AC_CHECK_HEADERS([FL/Fl_Audio_Meter.H], [], [], [],[[#include <FL/Fl.H>
|
||||
]])
|
||||
|
||||
if test "${build}" == "${host}"
|
||||
then
|
||||
case "${host}" in
|
||||
x86_64-*)
|
||||
AC_CHECK_FILE([${prefix}/lib64], libdir='$(exec_prefix)/lib64')
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
AC_LANG([C])
|
||||
|
||||
if test "${build}" == "${host}"
|
||||
then
|
||||
case "${host}" in
|
||||
x86_64-*)
|
||||
# X86_64 Linux machines may have both 64 bit and 32 bit libraries. We need to choose the right set
|
||||
AC_CHECK_FILE([/usr/X11R6/lib64], [TESTLIBS="$TESTLIBS -L/usr/X11R6/lib64"], AC_CHECK_FILE([/usr/X11R6/lib], [TESTLIBS="$TESTLIBS -L/usr/X11R6/lib"]))
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# Checks for libraries.
|
||||
AC_CHECK_LIB([m], [cos])
|
||||
AC_CHECK_LIB([m], [pow])
|
||||
AC_CHECK_LIB([m], [sqrt])
|
||||
if test -n "$enable_tests" ; then
|
||||
AC_LANG([C++])
|
||||
AC_CHECK_LIB([fltk], [main], TESTLIBS="$TESTLIBS -lfltk -lsupc++")
|
||||
AC_CHECK_LIB([fltk_cartesian], [main], TESTLIBS="-lfltk_cartesian $TESTLIBS")
|
||||
AC_CHECK_LIB([fltk_audio_meter], [main], TESTLIBS="-lfltk_audio_meter $TESTLIBS")
|
||||
AC_LANG([C])
|
||||
AC_CHECK_LIB([audiofile], [afOpenFile], TESTLIBS="$TESTLIBS -laudiofile", AC_MSG_ERROR("Can't make tests without libaudiofile (does your system require a libaudiofile-devel package?)"))
|
||||
AC_CHECK_LIB([fftw3], [fftw_plan_dft_1d], TESTLIBS="$TESTLIBS -lfftw3")
|
||||
AC_CHECK_LIB([fftw], [fftw_create_plan], TESTLIBS="$TESTLIBS -lfftw")
|
||||
AC_CHECK_LIB([pthread], [pthread_attr_init], TESTLIBS="$TESTLIBS -lpthread")
|
||||
AC_CHECK_LIB([dl], [dlopen], TESTLIBS="$TESTLIBS -ldl")
|
||||
AC_CHECK_LIB([unicall], [uc_start], TESTLIBS="$TESTLIBS -lunicall",, -ltiff -ldl)
|
||||
AC_CHECK_LIB([Xft], [XftFontOpen], TESTLIBS="$TESTLIBS -lXft",, $TESTLIBS)
|
||||
AC_CHECK_LIB([Xext], [XextCreateExtension], TESTLIBS="$TESTLIBS -lXext",, $TESTLIBS)
|
||||
AC_CHECK_LIB([X11], [XOpenDisplay], TESTLIBS="$TESTLIBS -lX11",, $TESTLIBS)
|
||||
AC_CHECK_LIB([xml2], [xmlParseFile], [AC_DEFINE([HAVE_LIBXML2], [1], [Define to 1 if you have the 'libxml2' library (-lxml2).]) TESTLIBS="$TESTLIBS -lxml2"])
|
||||
fi
|
||||
|
||||
case "${ax_cv_c_compiler_vendor}" in
|
||||
gnu)
|
||||
COMP_VENDOR_CFLAGS="-std=gnu99 -ffast-math -Wall -Wunused-variable -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes"
|
||||
if test "$enable_sse" = "yes" ; then
|
||||
COMP_VENDOR_CFLAGS="-msse $COMP_VENDOR_CFLAGS"
|
||||
fi
|
||||
if test "$enable_mmx" = "yes" ; then
|
||||
COMP_VENDOR_CFLAGS="-mmmx $COMP_VENDOR_CFLAGS"
|
||||
fi
|
||||
;;
|
||||
sun)
|
||||
COMP_VENDOR_CFLAGS="-xc99=all -mt -xCC -errwarn=%all -xvpara"
|
||||
if test "$enable_sse" = "yes" ; then
|
||||
COMP_VENDOR_CFLAGS="-native -fast $COMP_VENDOR_CFLAGS"
|
||||
fi
|
||||
if test "$enable_mmx" = "yes" ; then
|
||||
COMP_VENDOR_CFLAGS="-native -fast $COMP_VENDOR_CFLAGS"
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
COMP_VENDOR_CFLAGS="-std=c99 -Wall -Wunused-variable -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes"
|
||||
;;
|
||||
esac
|
||||
|
||||
COMP_VENDOR_CFLAGS="-DNDEBUG $COMP_VENDOR_CFLAGS"
|
||||
|
||||
AM_CONDITIONAL([COND_DOC], [test "$enable_doc" = yes])
|
||||
AM_CONDITIONAL([COND_TESTS], [test "$enable_tests" = yes])
|
||||
AM_CONDITIONAL([COND_ITUTESTS], [test "$enable_itutests" = yes])
|
||||
AM_CONDITIONAL([COND_MMX], [test "$enable_mmx" = yes])
|
||||
AM_CONDITIONAL([COND_SSE], [test "$enable_sse" = yes])
|
||||
if test "$enable_fixed_point" = "yes" ; then
|
||||
AC_DEFINE([VOIPCODECS_USE_FIXED_POINT], [1], [Enable fixed point processing, where possible, instead of floating point])
|
||||
VOIPCODECS_USE_FIXED_POINT="#define VOIPCODECS_USE_FIXED_POINT 1"
|
||||
else
|
||||
#
|
||||
# So far we deal with the embedded ARM, Blackfin, MIPS, TI DSP and XScale processors as
|
||||
# things which lack fast hardware floating point.
|
||||
#
|
||||
# Other candidates would be the small embedded Power PCs.
|
||||
#
|
||||
case $basic_machine in
|
||||
arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] \
|
||||
| bfin \
|
||||
| mips | mipsbe | mipseb | mipsel | mipsle \
|
||||
| tic54x | c54x* | tic55x | c55x* | tic6x | c6x* \
|
||||
| xscale | xscalee[bl] \
|
||||
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
|
||||
| bfin-* \
|
||||
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
|
||||
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
|
||||
| xscale-* | xscalee[bl]-* )
|
||||
AC_DEFINE([VOIPCODECS_USE_FIXED_POINT], [1], [Enable fixed point processing, where possible, instead of floating point])
|
||||
VOIPCODECS_USE_FIXED_POINT="#define VOIPCODECS_USE_FIXED_POINT 1"
|
||||
;;
|
||||
*)
|
||||
VOIPCODECS_USE_FIXED_POINT="#undef VOIPCODECS_USE_FIXED_POINT"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
AC_SUBST(CC_FOR_BUILD)
|
||||
AC_SUBST(COMP_VENDOR_CFLAGS)
|
||||
AC_SUBST(TESTLIBS)
|
||||
AC_SUBST(VOIPCODECS_USE_FIXED_POINT)
|
||||
AC_SUBST(INSERT_INTTYPES_HEADER)
|
||||
AC_SUBST(INSERT_STDINT_HEADER)
|
||||
AC_SUBST(INSERT_TGMATH_HEADER)
|
||||
AC_SUBST(INSERT_MATH_HEADER)
|
||||
|
||||
AC_CONFIG_FILES([Makefile
|
||||
doc/Makefile
|
||||
etsitests/Makefile
|
||||
itutests/Makefile
|
||||
localtests/Makefile
|
||||
src/Makefile
|
||||
src/voipcodecs.h
|
||||
tests/Makefile
|
||||
voipcodecs.spec])
|
||||
|
||||
AC_OUTPUT
|
||||
|
||||
# @end 1
|
|
@ -1,2 +0,0 @@
|
|||
#! /bin/sh
|
||||
./configure "$@" --disable-shared --with-pic
|
|
@ -1,6 +0,0 @@
|
|||
voipcodecs (0.0.1) unstable; urgency=low
|
||||
|
||||
[ Steve Underwood ]
|
||||
* Begun
|
||||
|
||||
-- Steve Underwood <steveu@coppice.org> Thu, 7 Feb 2008 09:53:06 +0300
|
|
@ -1 +0,0 @@
|
|||
4
|
|
@ -1,42 +0,0 @@
|
|||
Source: voipcodecs
|
||||
Section: libs
|
||||
Priority: optional
|
||||
Maintainer: Debian VoIP Team <pkg-voip-maintainers@lists.alioth.debian.org>
|
||||
Uploaders: Jose Carlos Garcia Sogo <jsogo@debian.org>, Kilian Krause <kilian@debian.org>, Santiago Garcia Mantinan <manty@debian.org>, Mark Purcell <msp@debian.org>, Tzafrir Cohen <tzafrir.cohen@xorcom.com>, Santiago Ruano Rincón <santiago@debian.org>
|
||||
Build-Depends: debhelper (>= 4.0.0), libtiff4-dev, libjpeg62-dev, dpatch, doxygen, autotools-dev
|
||||
Standards-Version: 3.7.2
|
||||
XS-Vcs-Svn: svn://svn.debian.org/pkg-voip/
|
||||
XS-Vcs-Browser: http://svn.debian.org/wsvn/pkg-voip/
|
||||
|
||||
Package: libvoipcodecs3
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}
|
||||
Conflicts: libvoipcodecs0, libvoipcodecs1, libvoipcodecs2
|
||||
Description: Telephony signal processing library
|
||||
This is a low-level signal processing library that modulate and demodulate
|
||||
signals commonly used in telephony, such as the "noise" generated by a
|
||||
fax modem or DTMF touchpad.
|
||||
.
|
||||
This package contains the shared library.
|
||||
|
||||
Package: libvoipcodecs-dev
|
||||
Section: libdevel
|
||||
Architecture: any
|
||||
Depends: libvoipcodecs3 (= ${Source-Version}), libtiff4-dev, libjpeg62-dev
|
||||
Description: Telephony signal processing library
|
||||
This is a low-level signal processing library that modulate and demodulate
|
||||
signals commonly used in telephony, such as the "noise" generated by a
|
||||
fax modem or DTMF touchpad.
|
||||
.
|
||||
This package contains the static library and development headers.
|
||||
.
|
||||
Homepage: http://www.soft-switch.org/
|
||||
|
||||
Package: libvoipcodecs-doc
|
||||
Section: doc
|
||||
Architecture: all
|
||||
Description: Documentation for the voipcodecs signal processing library
|
||||
This package contains the online API in HTML for the libvoipcodecs, a low
|
||||
level signal processing library that modulate and demodulate siignals
|
||||
commonly used in telephony, such as the "noise" generated by a fax
|
||||
modem or DTMF touchpad.
|
|
@ -1,25 +0,0 @@
|
|||
This package was debianized by Steve Underwood <steveu@coppice.org> on
|
||||
Thu, 7 Feb 2008 15:22:58 +0100.
|
||||
|
||||
It was downloaded from http://soft-switch.org/downloads/voipcodecs/
|
||||
|
||||
Copyright: Steve Underwood <steveu@coppice.org>
|
||||
|
||||
License:
|
||||
|
||||
This package is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 dated June, 1991.
|
||||
|
||||
This package is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along with
|
||||
this package; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
|
||||
On Debian systems, the complete text of the GNU General
|
||||
Public License can be found in `/usr/share/common-licenses/GPL'.
|
|
@ -1,4 +0,0 @@
|
|||
debian/tmp/usr/include
|
||||
debian/tmp/usr/lib/libvoipcodecs.so
|
||||
debian/tmp/usr/lib/libvoipcodecs.la
|
||||
debian/tmp/usr/lib/libvoipcodecs.a
|
|
@ -1 +0,0 @@
|
|||
doc/api/html usr/share/doc/libvoipcodecs-doc/api/
|
|
@ -1,2 +0,0 @@
|
|||
debian/tmp/usr/lib/libvoipcodecs.so.0.*
|
||||
debian/tmp/usr/lib/libvoipcodecs.so.0
|
|
@ -1,106 +0,0 @@
|
|||
#!/usr/bin/make -f
|
||||
|
||||
# Uncomment this to turn on verbose mode.
|
||||
#export DH_VERBOSE=1
|
||||
|
||||
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
|
||||
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
|
||||
|
||||
DEBVERSION:=$(shell head -n 1 debian/changelog \
|
||||
| sed -e 's/^[^(]*(\([^)]*\)).*/\1/')
|
||||
ORIGTARVER:=$(shell echo $(DEBVERSION) | sed -e 's/^.*://' -e 's/-[0-9.]*$$//')# -e 's/.dfsg$$//' -e 's/~//')
|
||||
|
||||
UPVERSION:=$(shell echo $(ORIGTARVER) | tr -d '~')
|
||||
|
||||
FILENAME := voipcodecs_$(ORIGTARVER).orig.tar.gz
|
||||
FULLNAME := voipcodecs-$(UPVERSION)
|
||||
URL := http://soft-switch.org/downloads/voipcodecs/voipcodecs-$(UPVERSION).tgz
|
||||
|
||||
CFLAGS = -Wall -g
|
||||
|
||||
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
|
||||
CFLAGS += -O0
|
||||
else
|
||||
CFLAGS += -O2
|
||||
endif
|
||||
|
||||
include /usr/share/dpatch/dpatch.make
|
||||
|
||||
|
||||
autotools: patch-stamp
|
||||
ln -s /usr/share/misc/config.sub config.sub
|
||||
ln -s /usr/share/misc/config.guess config.guess
|
||||
touch autotools
|
||||
|
||||
config.status: autotools configure
|
||||
dh_testdir
|
||||
CFLAGS="$(CFLAGS)" ./configure \
|
||||
--host=$(DEB_HOST_GNU_TYPE) \
|
||||
--build=$(DEB_BUILD_GNU_TYPE) \
|
||||
--prefix=/usr \
|
||||
--mandir=\$${prefix}/share/man \
|
||||
--infodir=\$${prefix}/share/info \
|
||||
--enable-doc
|
||||
|
||||
build: build-stamp
|
||||
|
||||
build-stamp: config.status
|
||||
dh_testdir
|
||||
$(MAKE)
|
||||
touch build-stamp
|
||||
|
||||
clean: clean-patched unpatch
|
||||
clean-patched:
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
rm -f build-stamp autotools
|
||||
-$(MAKE) distclean
|
||||
|
||||
-$(RM) -f config.sub
|
||||
-$(RM) -f config.guess
|
||||
|
||||
dh_clean
|
||||
|
||||
install: build-stamp
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
dh_clean -k
|
||||
$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
|
||||
|
||||
binary-indep: build-stamp install
|
||||
dh_testdir -i
|
||||
dh_testroot -i
|
||||
dh_installchangelogs -i ChangeLog
|
||||
dh_installdocs -i DueDiligence
|
||||
dh_install -i
|
||||
dh_compress -i
|
||||
dh_fixperms -i
|
||||
dh_installdeb -i
|
||||
dh_gencontrol -i
|
||||
dh_md5sums -i
|
||||
dh_builddeb -i
|
||||
|
||||
binary-arch: build-stamp install
|
||||
dh_testdir -a
|
||||
dh_testroot -a
|
||||
dh_installchangelogs -a ChangeLog
|
||||
dh_installdocs -a DueDiligence
|
||||
dh_install -a
|
||||
dh_strip -a
|
||||
dh_compress -a
|
||||
dh_fixperms -a
|
||||
dh_makeshlibs -a
|
||||
dh_installdeb -a
|
||||
dh_shlibdeps -a
|
||||
dh_gencontrol -a
|
||||
dh_md5sums -a
|
||||
dh_builddeb -a
|
||||
|
||||
get-orig-source:
|
||||
-@@dh_testdir
|
||||
@@[ -d ../tarballs/. ]||mkdir -p ../tarballs
|
||||
@@echo Downloading $(FILENAME) from $(URL) ...
|
||||
@@wget -N -nv -T10 -t3 -O ../tarballs/$(FILENAME) $(URL)
|
||||
|
||||
binary: binary-indep binary-arch
|
||||
.PHONY: build clean binary-indep binary-arch binary install patch unpatch
|
|
@ -1,7 +0,0 @@
|
|||
# See uscan(1) for format
|
||||
|
||||
# Compulsory line, this is a version 3 file
|
||||
version=3
|
||||
|
||||
# <Webpage URL> <string match>
|
||||
http://soft-switch.org/downloads/voipcodecs/ voipcodecs-(.*)\.tgz debian svn-upgrade
|
|
@ -1,29 +0,0 @@
|
|||
##
|
||||
## VoIPcodecs - a series of DSP components for telephony
|
||||
##
|
||||
## Makefile.am -- Process this file with automake to produce Makefile.in
|
||||
##
|
||||
## This program is free software; you can redistribute it and/or modify
|
||||
## it under the terms of the GNU General Public License version 2, as
|
||||
## published by the Free Software Foundation.
|
||||
##
|
||||
## This program is distributed in the hope that it will be useful,
|
||||
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
## GNU General Public License for more details.
|
||||
##
|
||||
## You should have received a copy of the GNU General Public License
|
||||
## along with this program; if not, write to the Free Software
|
||||
## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
##
|
||||
## $Id: Makefile.am,v 1.7 2007/12/20 15:06:22 steveu Exp $
|
||||
|
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
|
||||
EXTRA_DIST = css.css \
|
||||
wrapper.xsl
|
||||
|
||||
all: doxydocs
|
||||
|
||||
doxydocs:
|
||||
doxygen libvoipcodecs-doxygen
|
|
@ -1,564 +0,0 @@
|
|||
body {
|
||||
background-image: url("../images/weave.jpg");
|
||||
font-family: Verdana, Arial, Helvetica, Sans-serif;
|
||||
color: black;
|
||||
margin-right: 20px;
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
h1 {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-family: Verdana, Arial, Helvetica, Sans-serif;
|
||||
border-color: #c00000;
|
||||
color : black;
|
||||
margin-top: 0.8em;
|
||||
border-style: solid;
|
||||
border-width: 0px 0px 3px 0.5em;
|
||||
line-height : 130%;
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-family: Verdana, Arial, Helvetica, Sans-serif;
|
||||
border-color: #f02020;
|
||||
color : black;
|
||||
border-width: 0px 0px 2px 0.5em;
|
||||
border-style: solid;
|
||||
margin-right: 20%;
|
||||
line-height : 130%;
|
||||
}
|
||||
caption {
|
||||
font-weight: bold
|
||||
}
|
||||
a.qindex {}
|
||||
a.qindexRef {}
|
||||
a.el {
|
||||
text-decoration: none;
|
||||
font-weight: bold
|
||||
}
|
||||
a.elRef {
|
||||
font-weight: bold
|
||||
}
|
||||
a.code {
|
||||
text-decoration: none;
|
||||
font-weight: normal;
|
||||
color: #4444ee
|
||||
}
|
||||
a.codeRef {
|
||||
font-weight: normal;
|
||||
color: #4444ee
|
||||
}
|
||||
a:hover {
|
||||
text-decoration: none;
|
||||
background-color: #f2f2ff
|
||||
}
|
||||
dl.el {
|
||||
margin-left: -1cm
|
||||
}
|
||||
div.fragment {
|
||||
width: 100%;
|
||||
border: none;
|
||||
background-color: #eeeeee
|
||||
}
|
||||
div.ah {
|
||||
background-color: black;
|
||||
font-weight: bold;
|
||||
color: #ffffff;
|
||||
margin-bottom: 3px;
|
||||
margin-top: 3px
|
||||
}
|
||||
|
||||
td {
|
||||
font-family: Verdana, Arial, Helvetica, Sans-serif;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.navheader {
|
||||
font-family: Verdana, Arial, Helvetica, Sans-serif;
|
||||
background-color: #B2B2ff;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.navfooter {
|
||||
font-family: Verdana, Arial, Helvetica, Sans-serif;
|
||||
background-color: #B2B2ff;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
table.menu {
|
||||
background-color: #000066;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
tr.menu {
|
||||
background-color: #ccffff;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
}
|
||||
td.menu {
|
||||
background-color: #f2e0d0;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
td.md {
|
||||
background-color: #f2f2ff;
|
||||
font-weight: bold;
|
||||
}
|
||||
td.mdname1 {
|
||||
background-color: #f2f2ff;
|
||||
font-weight: bold;
|
||||
color: #602020;
|
||||
}
|
||||
td.mdname {
|
||||
background-color: #f2f2ff;
|
||||
font-weight: bold;
|
||||
color: #602020;
|
||||
width: 600px;
|
||||
}
|
||||
div.groupHeader {
|
||||
margin-left: 16px;
|
||||
margin-top: 12px;
|
||||
margin-bottom: 6px;
|
||||
font-weight: bold
|
||||
}
|
||||
div.groupText {
|
||||
margin-left: 16px;
|
||||
font-style: italic;
|
||||
font-size: smaller
|
||||
}
|
||||
td.indexkey {
|
||||
font-family: Verdana, Arial, Helvetica, Sans-serif;
|
||||
background-color: #eeeeff;
|
||||
font-weight: bold;
|
||||
padding-right : 10px;
|
||||
padding-top : 2px;
|
||||
padding-left : 10px;
|
||||
padding-bottom : 2px;
|
||||
margin-left : 0px;
|
||||
margin-right : 0px;
|
||||
margin-top : 2px;
|
||||
margin-bottom : 2px
|
||||
}
|
||||
td.indexvalue {
|
||||
font-family: Verdana, Arial, Helvetica, Sans-serif;
|
||||
background-color: #eeeeff;
|
||||
font-style: italic;
|
||||
padding-right : 10px;
|
||||
padding-top : 2px;
|
||||
padding-left : 10px;
|
||||
padding-bottom : 2px;
|
||||
margin-left : 0px;
|
||||
margin-right : 0px;
|
||||
margin-top : 2px;
|
||||
margin-bottom : 2px
|
||||
}
|
||||
span.keyword {
|
||||
color: #008000
|
||||
}
|
||||
span.keywordtype {
|
||||
color: #604020
|
||||
}
|
||||
span.keywordflow {
|
||||
color: #e08000
|
||||
}
|
||||
span.comment {
|
||||
color: #800000
|
||||
}
|
||||
span.preprocessor {
|
||||
color: #806020
|
||||
}
|
||||
span.stringliteral {
|
||||
color: #002080
|
||||
}
|
||||
span.charliteral {
|
||||
color: #008080
|
||||
}
|
||||
em {
|
||||
color: #990000;
|
||||
background-color: transparent;
|
||||
}
|
||||
h1,h2,h3,h4,h5,h6,p,center,td,th,ul,dl,div {
|
||||
font-family: Geneva, Arial, Helvetica, sans-serif;
|
||||
}
|
||||
body,td {
|
||||
font-size: 90%;
|
||||
}
|
||||
h1 {
|
||||
text-align: center;
|
||||
font-size: 160%;
|
||||
}
|
||||
h2 {
|
||||
font-size: 120%;
|
||||
}
|
||||
h3 {
|
||||
font-size: 100%;
|
||||
}
|
||||
caption {
|
||||
font-weight: bold
|
||||
}
|
||||
div.qindex {
|
||||
width: 100%;
|
||||
background-color: #eeeeff;
|
||||
border: 1px solid #b0b0b0;
|
||||
text-align: center;
|
||||
margin: 2px;
|
||||
padding: 2px;
|
||||
line-height: 140%;
|
||||
}
|
||||
div.nav {
|
||||
width: 100%;
|
||||
background-color: #eeeeff;
|
||||
border: 1px solid #b0b0b0;
|
||||
text-align: center;
|
||||
margin: 2px;
|
||||
padding: 2px;
|
||||
line-height: 140%;
|
||||
}
|
||||
div.navtab {
|
||||
background-color: #eeeeff;
|
||||
border: 1px solid #b0b0b0;
|
||||
text-align: center;
|
||||
margin: 2px;
|
||||
margin-right: 15px;
|
||||
padding: 2px;
|
||||
}
|
||||
td.navtab {
|
||||
font-size: 70%;
|
||||
}
|
||||
a.qindex {
|
||||
text-decoration: none;
|
||||
font-weight: bold;
|
||||
color: #1a419d;
|
||||
}
|
||||
a.qindex:visited {
|
||||
text-decoration: none;
|
||||
font-weight: bold;
|
||||
color: #1a419d
|
||||
}
|
||||
a.qindex:hover {
|
||||
text-decoration: none;
|
||||
background-color: #ddddff;
|
||||
}
|
||||
a.qindexHL {
|
||||
text-decoration: none;
|
||||
font-weight: bold;
|
||||
background-color: #6666cc;
|
||||
color: #ffffff;
|
||||
border: 1px double #9295C2;
|
||||
}
|
||||
a.qindexHL:hover {
|
||||
text-decoration: none;
|
||||
background-color: #6666cc;
|
||||
color: #ffffff;
|
||||
}
|
||||
a.qindexHL:visited {
|
||||
text-decoration: none;
|
||||
background-color: #6666cc;
|
||||
color: #ffffff
|
||||
}
|
||||
a.el {
|
||||
text-decoration: none;
|
||||
font-weight: bold
|
||||
}
|
||||
a.elRef {
|
||||
font-weight: bold
|
||||
}
|
||||
a.code:link {
|
||||
text-decoration: none;
|
||||
font-weight: normal;
|
||||
color: #0000FF
|
||||
}
|
||||
a.code:visited {
|
||||
text-decoration: none;
|
||||
font-weight: normal;
|
||||
color: #0000FF
|
||||
}
|
||||
a.codeRef:link {
|
||||
font-weight: normal;
|
||||
color: #0000FF
|
||||
}
|
||||
a.codeRef:visited {
|
||||
font-weight: normal;
|
||||
color: #0000FF
|
||||
}
|
||||
a:hover {
|
||||
text-decoration: none;
|
||||
background-color: #f2f2ff
|
||||
}
|
||||
dl.el {
|
||||
margin-left: -1cm
|
||||
}
|
||||
.fragment {
|
||||
font-family: Fixed, monospace;
|
||||
font-size: 95%;
|
||||
}
|
||||
pre.fragment {
|
||||
border: 1px solid #CCCCCC;
|
||||
background-color: #f5f5f5;
|
||||
margin-top: 4px;
|
||||
margin-bottom: 4px;
|
||||
margin-left: 2px;
|
||||
margin-right: 8px;
|
||||
padding-left: 6px;
|
||||
padding-right: 6px;
|
||||
padding-top: 4px;
|
||||
padding-bottom: 4px;
|
||||
}
|
||||
div.ah {
|
||||
background-color: black;
|
||||
font-weight: bold;
|
||||
color: #ffffff;
|
||||
margin-bottom: 3px;
|
||||
margin-top: 3px
|
||||
}
|
||||
td.md {
|
||||
background-color: #F4F4FB;
|
||||
font-weight: bold;
|
||||
}
|
||||
td.mdPrefix {
|
||||
background-color: #F4F4FB;
|
||||
color: #606060;
|
||||
font-size: 80%;
|
||||
}
|
||||
td.mdname1 {
|
||||
background-color: #F4F4FB;
|
||||
font-weight: bold;
|
||||
color: #602020;
|
||||
}
|
||||
td.mdname {
|
||||
background-color: #F4F4FB;
|
||||
font-weight: bold;
|
||||
color: #602020;
|
||||
width: 600px;
|
||||
}
|
||||
div.groupHeader {
|
||||
margin-left: 16px;
|
||||
margin-top: 12px;
|
||||
margin-bottom: 6px;
|
||||
font-weight: bold;
|
||||
}
|
||||
div.groupText {
|
||||
margin-left: 16px;
|
||||
font-style: italic;
|
||||
font-size: 90%
|
||||
}
|
||||
td.indexkey {
|
||||
background-color: #eeeeff;
|
||||
font-weight: bold;
|
||||
padding-right : 10px;
|
||||
padding-top : 2px;
|
||||
padding-left : 10px;
|
||||
padding-bottom : 2px;
|
||||
margin-left : 0px;
|
||||
margin-right : 0px;
|
||||
margin-top : 2px;
|
||||
margin-bottom : 2px;
|
||||
border: 1px solid #CCCCCC;
|
||||
}
|
||||
td.indexvalue {
|
||||
background-color: #eeeeff;
|
||||
font-style: italic;
|
||||
padding-right : 10px;
|
||||
padding-top : 2px;
|
||||
padding-left : 10px;
|
||||
padding-bottom : 2px;
|
||||
margin-left : 0px;
|
||||
margin-right : 0px;
|
||||
margin-top : 2px;
|
||||
margin-bottom : 2px;
|
||||
border: 1px solid #CCCCCC;
|
||||
}
|
||||
tr.memlist {
|
||||
background-color: #f0f0f0;
|
||||
}
|
||||
p.formulaDsp {
|
||||
text-align: center;
|
||||
}
|
||||
img.formulaDsp {
|
||||
}
|
||||
img.formulaInl {
|
||||
vertical-align: middle;
|
||||
}
|
||||
span.keyword {
|
||||
color: #008000
|
||||
}
|
||||
span.keywordtype {
|
||||
color: #604020
|
||||
}
|
||||
span.keywordflow {
|
||||
color: #e08000
|
||||
}
|
||||
span.comment {
|
||||
color: #800000
|
||||
}
|
||||
span.preprocessor {
|
||||
color: #806020
|
||||
}
|
||||
span.stringliteral {
|
||||
color: #002080
|
||||
}
|
||||
span.charliteral {
|
||||
color: #008080
|
||||
}
|
||||
.mdTable {
|
||||
border: 1px solid #868686;
|
||||
background-color: #F4F4FB;
|
||||
}
|
||||
.mdRow {
|
||||
padding: 8px 10px;
|
||||
}
|
||||
.mdescLeft {
|
||||
padding: 0px 8px 4px 8px;
|
||||
font-size: 80%;
|
||||
font-style: italic;
|
||||
background-color: #FAFAFA;
|
||||
border-top: 1px none #E0E0E0;
|
||||
border-right: 1px none #E0E0E0;
|
||||
border-bottom: 1px none #E0E0E0;
|
||||
border-left: 1px none #E0E0E0;
|
||||
margin: 0px;
|
||||
}
|
||||
.mdescRight {
|
||||
padding: 0px 8px 4px 8px;
|
||||
font-size: 80%;
|
||||
font-style: italic;
|
||||
background-color: #FAFAFA;
|
||||
border-top: 1px none #E0E0E0;
|
||||
border-right: 1px none #E0E0E0;
|
||||
border-bottom: 1px none #E0E0E0;
|
||||
border-left: 1px none #E0E0E0;
|
||||
margin: 0px;
|
||||
}
|
||||
.memItemLeft {
|
||||
padding: 1px 0px 0px 8px;
|
||||
margin: 4px;
|
||||
border-top-width: 1px;
|
||||
border-right-width: 1px;
|
||||
border-bottom-width: 1px;
|
||||
border-left-width: 1px;
|
||||
border-top-color: #E0E0E0;
|
||||
border-right-color: #E0E0E0;
|
||||
border-bottom-color: #E0E0E0;
|
||||
border-left-color: #E0E0E0;
|
||||
border-top-style: solid;
|
||||
border-right-style: none;
|
||||
border-bottom-style: none;
|
||||
border-left-style: none;
|
||||
background-color: #FAFAFA;
|
||||
font-size: 80%;
|
||||
}
|
||||
.memItemRight {
|
||||
padding: 1px 8px 0px 8px;
|
||||
margin: 4px;
|
||||
border-top-width: 1px;
|
||||
border-right-width: 1px;
|
||||
border-bottom-width: 1px;
|
||||
border-left-width: 1px;
|
||||
border-top-color: #E0E0E0;
|
||||
border-right-color: #E0E0E0;
|
||||
border-bottom-color: #E0E0E0;
|
||||
border-left-color: #E0E0E0;
|
||||
border-top-style: solid;
|
||||
border-right-style: none;
|
||||
border-bottom-style: none;
|
||||
border-left-style: none;
|
||||
background-color: #FAFAFA;
|
||||
font-size: 80%;
|
||||
}
|
||||
.memTemplItemLeft {
|
||||
padding: 1px 0px 0px 8px;
|
||||
margin: 4px;
|
||||
border-top-width: 1px;
|
||||
border-right-width: 1px;
|
||||
border-bottom-width: 1px;
|
||||
border-left-width: 1px;
|
||||
border-top-color: #E0E0E0;
|
||||
border-right-color: #E0E0E0;
|
||||
border-bottom-color: #E0E0E0;
|
||||
border-left-color: #E0E0E0;
|
||||
border-top-style: none;
|
||||
border-right-style: none;
|
||||
border-bottom-style: none;
|
||||
border-left-style: none;
|
||||
background-color: #FAFAFA;
|
||||
font-size: 80%;
|
||||
}
|
||||
.memTemplItemRight {
|
||||
padding: 1px 8px 0px 8px;
|
||||
margin: 4px;
|
||||
border-top-width: 1px;
|
||||
border-right-width: 1px;
|
||||
border-bottom-width: 1px;
|
||||
border-left-width: 1px;
|
||||
border-top-color: #E0E0E0;
|
||||
border-right-color: #E0E0E0;
|
||||
border-bottom-color: #E0E0E0;
|
||||
border-left-color: #E0E0E0;
|
||||
border-top-style: none;
|
||||
border-right-style: none;
|
||||
border-bottom-style: none;
|
||||
border-left-style: none;
|
||||
background-color: #FAFAFA;
|
||||
font-size: 80%;
|
||||
}
|
||||
.memTemplParams {
|
||||
padding: 1px 0px 0px 8px;
|
||||
margin: 4px;
|
||||
border-top-width: 1px;
|
||||
border-right-width: 1px;
|
||||
border-bottom-width: 1px;
|
||||
border-left-width: 1px;
|
||||
border-top-color: #E0E0E0;
|
||||
border-right-color: #E0E0E0;
|
||||
border-bottom-color: #E0E0E0;
|
||||
border-left-color: #E0E0E0;
|
||||
border-top-style: solid;
|
||||
border-right-style: none;
|
||||
border-bottom-style: none;
|
||||
border-left-style: none;
|
||||
color: #606060;
|
||||
background-color: #FAFAFA;
|
||||
font-size: 80%;
|
||||
}
|
||||
.search {
|
||||
color: #003399;
|
||||
font-weight: bold;
|
||||
}
|
||||
form.search {
|
||||
margin-bottom: 0px;
|
||||
margin-top: 0px;
|
||||
}
|
||||
input.search {
|
||||
font-size: 75%;
|
||||
color: #000080;
|
||||
font-weight: normal;
|
||||
background-color: #eeeeff;
|
||||
}
|
||||
td.tiny {
|
||||
font-size: 75%;
|
||||
}
|
||||
a {
|
||||
color: #252e78;
|
||||
}
|
||||
a:visited {
|
||||
color: #3d2185;
|
||||
}
|
||||
.dirtab {
|
||||
padding: 4px;
|
||||
border-collapse: collapse;
|
||||
border: 1px solid #b0b0b0;
|
||||
}
|
||||
th.dirtab {
|
||||
background: #eeeeff;
|
||||
font-weight: bold;
|
||||
}
|
||||
hr {
|
||||
height: 1px;
|
||||
border: none;
|
||||
border-top: 1px solid black;
|
||||
}
|
File diff suppressed because it is too large
Load Diff
|
@ -1,5 +0,0 @@
|
|||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
version='1.0'>
|
||||
<xsl:import href="http://docbook.sourceforge.net/release/xsl/current/xhtml/chunk.xsl"/>
|
||||
<xsl:param name="html.stylesheet">css.css</xsl:param>
|
||||
</xsl:stylesheet>
|
|
@ -1,27 +0,0 @@
|
|||
##
|
||||
## VoIPcodecs - a series of DSP components for telephony
|
||||
##
|
||||
## Makefile.am -- Process this file with automake to produce Makefile.in
|
||||
##
|
||||
## This program is free software; you can redistribute it and/or modify
|
||||
## it under the terms of the GNU General Public License version 2, as
|
||||
## published by the Free Software Foundation.
|
||||
##
|
||||
## This program is distributed in the hope that it will be useful,
|
||||
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
## GNU General Public License for more details.
|
||||
##
|
||||
## You should have received a copy of the GNU General Public License
|
||||
## along with this program; if not, write to the Free Software
|
||||
## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
##
|
||||
## $Id: Makefile.am,v 1.1 2008/02/07 10:49:02 steveu Exp $
|
||||
|
||||
SUBDIRS =
|
||||
|
||||
DIST_SUBDIRS =
|
||||
|
||||
all:
|
||||
|
||||
clean:
|
|
@ -1,28 +0,0 @@
|
|||
##
|
||||
## SpanDSP - a series of DSP components for telephony
|
||||
##
|
||||
## Makefile.am -- Process this file with automake to produce Makefile.in
|
||||
##
|
||||
## This program is free software; you can redistribute it and/or modify
|
||||
## it under the terms of the GNU General Public License version 2, as
|
||||
## published by the Free Software Foundation.
|
||||
##
|
||||
## This program is distributed in the hope that it will be useful,
|
||||
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
## GNU General Public License for more details.
|
||||
##
|
||||
## You should have received a copy of the GNU General Public License
|
||||
## along with this program; if not, write to the Free Software
|
||||
## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
##
|
||||
## $Id: Makefile.am,v 1.5 2007/02/10 11:54:57 steveu Exp $
|
||||
|
||||
SUBDIRS =
|
||||
|
||||
DIST_SUBDIRS =
|
||||
|
||||
all:
|
||||
|
||||
clean:
|
||||
|
|
@ -1,435 +0,0 @@
|
|||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="9.00"
|
||||
Name="libvoipcodecs"
|
||||
ProjectGUID="{CF70F278-3364-4395-A2E1-23501C9B8AD2}"
|
||||
RootNamespace="libvoipcodecs"
|
||||
Keyword="Win32Proj"
|
||||
TargetFrameworkVersion="131072"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
<Platform
|
||||
Name="x64"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="4"
|
||||
CharacterSet="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="src; src\voipcodecs; src\msvc"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBvoipcodecs_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;HAVE_MATH_H"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="4"
|
||||
DebugInformationFormat="3"
|
||||
EnablePREfast="true"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Debug|x64"
|
||||
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
|
||||
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
|
||||
ConfigurationType="4"
|
||||
CharacterSet="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
TargetEnvironment="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="src; src\voipcodecs; src\msvc"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBvoipcodecs_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;HAVE_MATH_H"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="4"
|
||||
DebugInformationFormat="3"
|
||||
EnablePREfast="true"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="4"
|
||||
CharacterSet="1"
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="src; src\voipcodecs; src\msvc"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBvoipcodecs_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;HAVE_MATH_H"
|
||||
RuntimeLibrary="2"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="4"
|
||||
DebugInformationFormat="3"
|
||||
EnablePREfast="true"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|x64"
|
||||
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
|
||||
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
|
||||
ConfigurationType="4"
|
||||
CharacterSet="1"
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
TargetEnvironment="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="src; src\voipcodecs; src\msvc"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBvoipcodecs_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;HAVE_MATH_H"
|
||||
RuntimeLibrary="2"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="4"
|
||||
DebugInformationFormat="3"
|
||||
EnablePREfast="true"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\src\bitstream.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\g711.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\g722_decode.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\g722_encode.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\g726.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\gsm0610_decode.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\gsm0610_encode.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\gsm0610_long_term.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\gsm0610_lpc.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\gsm0610_preprocess.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\gsm0610_rpe.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\gsm0610_short_term.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\ima_adpcm.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\lpc10_analyse.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\lpc10_decode.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\lpc10_encode.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\lpc10_placev.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\lpc10_voicing.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\oki_adpcm.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\vector_int.c"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\src\voipcodecs\bit_operations.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\voipcodecs\bitstream.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\voipcodecs\dc_restore.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\float_fudge.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\voipcodecs\g711.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\voipcodecs\g722.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\voipcodecs\g726.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\voipcodecs\gsm0610.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\gsm0610_local.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\voipcodecs\ima_adpcm.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\voipcodecs\lpc10.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\lpc10_encdecs.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\voipcodecs\oki_adpcm.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\voipcodecs\telephony.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\voipcodecs\vector_int.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\voipcodecs\version.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
|
@ -1,220 +0,0 @@
|
|||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
Name="libvoipcodecs"
|
||||
ProjectGUID="{CF70F278-3364-4395-A2E1-23501C9B8AD2}"
|
||||
RootNamespace="libvoipcodecs"
|
||||
Keyword="Win32Proj"
|
||||
TargetFrameworkVersion="131072"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="4"
|
||||
CharacterSet="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="src; src\voipcodecs; src\msvc"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBvoipcodecs_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;HAVE_MATH_H"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="4"
|
||||
DebugInformationFormat="4"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="4"
|
||||
CharacterSet="1"
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="src; src\voipcodecs; src\msvc"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBvoipcodecs_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;HAVE_MATH_H"
|
||||
RuntimeLibrary="2"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="4"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\src\bitstream.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\g711.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\g722_decode.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\g722_encode.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\g726.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\gsm0610_decode.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\gsm0610_encode.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\gsm0610_long_term.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\gsm0610_lpc.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\gsm0610_preprocess.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\gsm0610_rpe.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\gsm0610_short_term.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\ima_adpcm.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\lpc10_analyse.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\lpc10_decode.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\lpc10_encode.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\lpc10_placev.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\lpc10_voicing.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\oki_adpcm.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\vector_int.c"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\src\voipcodecs\bit_operations.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\voipcodecs\bitstream.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\voipcodecs\dc_restore.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\float_fudge.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\voipcodecs\g711.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\voipcodecs\g722.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\voipcodecs\g726.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\voipcodecs\gsm0610.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\gsm0610_local.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\voipcodecs\ima_adpcm.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\voipcodecs\lpc10.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\lpc10_encdecs.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\voipcodecs\oki_adpcm.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\voipcodecs\telephony.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\voipcodecs\vector_int.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\voipcodecs\version.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
|
@ -1,32 +0,0 @@
|
|||
##
|
||||
## VoIPcodecs - a series of DSP components for telephony
|
||||
##
|
||||
## Makefile.am -- Process this file with automake to produce Makefile.in
|
||||
##
|
||||
## This program is free software; you can redistribute it and/or modify
|
||||
## it under the terms of the GNU General Public License version 2, as
|
||||
## published by the Free Software Foundation.
|
||||
##
|
||||
## This program is distributed in the hope that it will be useful,
|
||||
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
## GNU General Public License for more details.
|
||||
##
|
||||
## You should have received a copy of the GNU General Public License
|
||||
## along with this program; if not, write to the Free Software
|
||||
## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
##
|
||||
## $Id: Makefile.am,v 1.1 2008/02/07 10:49:02 steveu Exp $
|
||||
|
||||
SUBDIRS =
|
||||
|
||||
DIST_SUBDIRS =
|
||||
|
||||
EXTRA_DIST = dam9_lpc55.wav \
|
||||
dam9.wav \
|
||||
short_nb_voice.wav \
|
||||
short_wb_voice.wav
|
||||
|
||||
all:
|
||||
|
||||
clean:
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -1,127 +0,0 @@
|
|||
##
|
||||
## VoIPcodecs - a series of DSP components for telephony
|
||||
##
|
||||
## Makefile.am -- Process this file with automake to produce Makefile.in
|
||||
##
|
||||
## This program is free software; you can redistribute it and/or modify
|
||||
## it under the terms of the GNU General Public License version 2, as
|
||||
## published by the Free Software Foundation.
|
||||
##
|
||||
## This program is distributed in the hope that it will be useful,
|
||||
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
## GNU General Public License for more details.
|
||||
##
|
||||
## You should have received a copy of the GNU General Public License
|
||||
## along with this program; if not, write to the Free Software
|
||||
## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
##
|
||||
## $Id: Makefile.am,v 1.85 2008/02/06 09:23:26 steveu Exp $
|
||||
|
||||
AM_CFLAGS = $(COMP_VENDOR_CFLAGS)
|
||||
|
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
|
||||
INCLUDES = -I$(top_builddir)
|
||||
|
||||
lib_LTLIBRARIES = libvoipcodecs.la
|
||||
|
||||
libvoipcodecs_la_SOURCES = bitstream.c \
|
||||
bit_operations.c \
|
||||
g711.c \
|
||||
g722_encode.c \
|
||||
g722_decode.c \
|
||||
g726.c \
|
||||
gsm0610_decode.c \
|
||||
gsm0610_encode.c \
|
||||
gsm0610_long_term.c \
|
||||
gsm0610_lpc.c \
|
||||
gsm0610_preprocess.c \
|
||||
gsm0610_rpe.c \
|
||||
gsm0610_short_term.c \
|
||||
ima_adpcm.c \
|
||||
lpc10_analyse.c \
|
||||
lpc10_decode.c \
|
||||
lpc10_encode.c \
|
||||
lpc10_placev.c \
|
||||
lpc10_voicing.c \
|
||||
oki_adpcm.c \
|
||||
vector_int.c
|
||||
|
||||
libvoipcodecs_la_LDFLAGS = -version-info @VOIPCODECS_LT_CURRENT@:@VOIPCODECS_LT_REVISION@:@VOIPCODECS_LT_AGE@
|
||||
|
||||
nobase_include_HEADERS = voipcodecs/bit_operations.h \
|
||||
voipcodecs/bitstream.h \
|
||||
voipcodecs/dc_restore.h \
|
||||
voipcodecs/g711.h \
|
||||
voipcodecs/g722.h \
|
||||
voipcodecs/g726.h \
|
||||
voipcodecs/gsm0610.h \
|
||||
voipcodecs/ima_adpcm.h \
|
||||
voipcodecs/lpc10.h \
|
||||
voipcodecs/oki_adpcm.h \
|
||||
voipcodecs/telephony.h \
|
||||
voipcodecs/vector_int.h \
|
||||
voipcodecs/version.h
|
||||
|
||||
nodist_include_HEADERS = voipcodecs.h
|
||||
|
||||
noinst_HEADERS = gsm0610_local.h \
|
||||
lpc10_encdecs.h
|
||||
|
||||
# We need to run at_dictionary_gen, so it generates the
|
||||
# at_interpreter_dictionary.h file
|
||||
|
||||
DSP = libvoipcodecs.dsp
|
||||
VCPROJ = libvoipcodecs.vcproj
|
||||
|
||||
WIN32SOURCES = $(libvoipcodecs_la_SOURCES) msvc/gettimeofday.c
|
||||
WIN32HEADERS = $(nobase_include_HEADERS) voipcodecs.h
|
||||
|
||||
DSPOUT = | awk '{printf("%s\r\n", $$0)}' >> $(DSP)
|
||||
VCPROJOUT = | awk '{printf("%s\r\n", $$0)}' >> $(VCPROJ)
|
||||
|
||||
$(DSP): msvc/msvcproj.head msvc/msvcproj.foot Makefile.am
|
||||
echo "creating $(DSP)"
|
||||
@(cp $(srcdir)/msvc/msvcproj.head $(DSP); \
|
||||
echo "# Begin Group \"Source Files\"" $(DSPOUT); \
|
||||
for file in $(WIN32SOURCES); do \
|
||||
echo "# Begin Source File" $(DSPOUT); \
|
||||
echo "" $(DSPOUT); \
|
||||
echo "SOURCE=.\\"$$file $(DSPOUT); \
|
||||
echo "# End Source File" $(DSPOUT); \
|
||||
done; \
|
||||
echo "# End Group" $(DSPOUT); \
|
||||
echo "# Begin Group \"Header Files\"" $(DSPOUT); \
|
||||
for file in $(WIN32HEADERS); do \
|
||||
echo "# Begin Source File" $(DSPOUT); \
|
||||
echo "" $(DSPOUT); \
|
||||
echo "SOURCE=.\\"$$file $(DSPOUT); \
|
||||
echo "# End Source File" $(DSPOUT); \
|
||||
done; \
|
||||
echo "# End Group" $(DSPOUT); \
|
||||
cat $(srcdir)/msvc/msvcproj.foot $(DSPOUT) )
|
||||
|
||||
$(VCPROJ): msvc/vc8proj.head msvc/vc8proj.foot Makefile.am
|
||||
echo "creating $(VCPROJ)"
|
||||
@(cp $(srcdir)/msvc/vc8proj.head $(VCPROJ); \
|
||||
for file in $(WIN32SOURCES); do \
|
||||
echo "<File RelativePath=\""$$file"\"></File>" $(VCPROJOUT); \
|
||||
done; \
|
||||
echo "</Filter><Filter Name=\"Header Files\">" $(VCPROJOUT); \
|
||||
for file in $(WIN32HEADERS); do \
|
||||
echo "<File RelativePath=\""$$file"\"></File>" $(VCPROJOUT); \
|
||||
done; \
|
||||
cat $(srcdir)/msvc/vc8proj.foot $(VCPROJOUT) )
|
||||
|
||||
voipcodecs/version.h:
|
||||
NOWDATE=`date --utc +"%Y%m%d"` ; \
|
||||
NOWTIME=`date --utc +"%H%M%S"` ; \
|
||||
sed 's/$$VOIPCODECS_RELEASE_DATE/'$$NOWDATE'/;s/$$VOIPCODECS_RELEASE_TIME/'$$NOWTIME'/' \
|
||||
<voipcodecs/version.h.in >voipcodecs/version.h
|
||||
|
||||
dist-hook:
|
||||
NOWDATE=`date --utc +"%Y%m%d"` ; \
|
||||
NOWTIME=`date --utc +"%H%M%S"` ; \
|
||||
sed 's/$$VOIPCODECS_RELEASE_DATE/'$$NOWDATE'/;s/$$VOIPCODECS_RELEASE_TIME/'$$NOWTIME'/' \
|
||||
<voipcodecs/version.h.in >voipcodecs/version.h
|
|
@ -1,180 +0,0 @@
|
|||
/*
|
||||
* SpanDSP - a series of DSP components for telephony
|
||||
*
|
||||
* bit_operations.c - Various bit level operations, such as bit reversal
|
||||
*
|
||||
* Written by Steve Underwood <steveu@coppice.org>
|
||||
*
|
||||
* Copyright (C) 2006 Steve Underwood
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License version 2.1,
|
||||
* as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: bit_operations.c,v 1.13 2008/04/17 14:26:56 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <stdlib.h>
|
||||
#include <fcntl.h>
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
#include <memory.h>
|
||||
|
||||
#include "voipcodecs/telephony.h"
|
||||
#include "voipcodecs/bit_operations.h"
|
||||
|
||||
uint16_t bit_reverse16(uint16_t x)
|
||||
{
|
||||
x = (x >> 8) | (x << 8);
|
||||
x = ((x & 0xF0F0) >> 4) | ((x & 0x0F0F) << 4);
|
||||
x = ((x & 0xCCCC) >> 2) | ((x & 0x3333) << 2);
|
||||
return ((x & 0xAAAA) >> 1) | ((x & 0x5555) << 1);
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
uint32_t bit_reverse32(uint32_t x)
|
||||
{
|
||||
x = (x >> 16) | (x << 16);
|
||||
x = ((x & 0xFF00FF00) >> 8) | ((x & 0x00FF00FF) << 8);
|
||||
x = ((x & 0xF0F0F0F0) >> 4) | ((x & 0x0F0F0F0F) << 4);
|
||||
x = ((x & 0xCCCCCCCC) >> 2) | ((x & 0x33333333) << 2);
|
||||
return ((x & 0xAAAAAAAA) >> 1) | ((x & 0x55555555) << 1);
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
uint32_t bit_reverse_4bytes(uint32_t x)
|
||||
{
|
||||
x = ((x & 0xF0F0F0F0) >> 4) | ((x & 0x0F0F0F0F) << 4);
|
||||
x = ((x & 0xCCCCCCCC) >> 2) | ((x & 0x33333333) << 2);
|
||||
return ((x & 0xAAAAAAAA) >> 1) | ((x & 0x55555555) << 1);
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
#if defined(__x86_64__)
|
||||
uint64_t bit_reverse_8bytes(uint64_t x)
|
||||
{
|
||||
x = ((x & 0xF0F0F0F0F0F0F0F0LLU) >> 4) | ((x & 0x0F0F0F0F0F0F0F0FLLU) << 4);
|
||||
x = ((x & 0xCCCCCCCCCCCCCCCCLLU) >> 2) | ((x & 0x3333333333333333LLU) << 2);
|
||||
return ((x & 0xAAAAAAAAAAAAAAAALLU) >> 1) | ((x & 0x5555555555555555LLU) << 1);
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
#endif
|
||||
|
||||
void bit_reverse(uint8_t to[], const uint8_t from[], int len)
|
||||
{
|
||||
#if defined(__sparc__) || defined(__sparc)
|
||||
int i;
|
||||
#else
|
||||
const uint8_t *y1;
|
||||
uint8_t *z1;
|
||||
const uint32_t *y4;
|
||||
uint32_t *z4;
|
||||
uint32_t x4;
|
||||
#if defined(__x86_64__)
|
||||
const uint64_t *y8;
|
||||
uint64_t *z8;
|
||||
uint64_t x8;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(__sparc__) || defined(__sparc)
|
||||
/* This code work 8 bits at a time, so it works on machines where misalignment
|
||||
is either desperately slow or fails */
|
||||
for (i = 0; i < len; i++)
|
||||
to[i] = bit_reverse8(from[i]);
|
||||
#else
|
||||
/* This code is this is based on the woolly assumption that the start of the buffers
|
||||
is memory aligned. If it isn't, the routine will be less efficient on some machines,
|
||||
but might not work at all on others. */
|
||||
#if defined(__x86_64__)
|
||||
y8 = (const uint64_t *) from;
|
||||
z8 = (uint64_t *) to;
|
||||
while (len >= sizeof(uint64_t))
|
||||
{
|
||||
x8 = *y8++;
|
||||
x8 = ((x8 & 0xF0F0F0F0F0F0F0F0LLU) >> 4) | ((x8 & 0x0F0F0F0F0F0F0F0FLLU) << 4);
|
||||
x8 = ((x8 & 0xCCCCCCCCCCCCCCCCLLU) >> 2) | ((x8 & 0x3333333333333333LLU) << 2);
|
||||
*z8++ = ((x8 & 0xAAAAAAAAAAAAAAAALLU) >> 1) | ((x8 & 0x5555555555555555LLU) << 1);
|
||||
len -= sizeof(uint64_t);
|
||||
}
|
||||
y4 = (const uint32_t *) y8;
|
||||
z4 = (uint32_t *) z8;
|
||||
#else
|
||||
y4 = (const uint32_t *) from;
|
||||
z4 = (uint32_t *) to;
|
||||
#endif
|
||||
while (len >= sizeof(uint32_t))
|
||||
{
|
||||
x4 = *y4++;
|
||||
x4 = ((x4 & 0xF0F0F0F0) >> 4) | ((x4 & 0x0F0F0F0F) << 4);
|
||||
x4 = ((x4 & 0xCCCCCCCC) >> 2) | ((x4 & 0x33333333) << 2);
|
||||
*z4++ = ((x4 & 0xAAAAAAAA) >> 1) | ((x4 & 0x55555555) << 1);
|
||||
len -= sizeof(uint32_t);
|
||||
}
|
||||
y1 = (const uint8_t *) y4;
|
||||
z1 = (uint8_t *) z4;
|
||||
while (len-- > 0)
|
||||
*z1++ = bit_reverse8(*y1++);
|
||||
#endif
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
int one_bits32(uint32_t x)
|
||||
{
|
||||
x = x - ((x >> 1) & 0x55555555);
|
||||
/* We now have 16 2-bit counts */
|
||||
x = (x & 0x33333333) + ((x >> 2) & 0x33333333);
|
||||
/* We now have 8 4-bit counts */
|
||||
x = (x + (x >> 4)) & 0x0F0F0F0F;
|
||||
/* We now have 4 8-bit counts */
|
||||
#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__powerpc__)
|
||||
/* If multiply is fast */
|
||||
return (x*0x01010101) >> 24;
|
||||
#else
|
||||
/* If multiply is slow */
|
||||
x += (x >> 8);
|
||||
x += (x >> 16);
|
||||
return (x & 0x0000003F);
|
||||
#endif
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
uint32_t make_mask32(uint32_t x)
|
||||
{
|
||||
x |= (x >> 1);
|
||||
x |= (x >> 2);
|
||||
x |= (x >> 4);
|
||||
x |= (x >> 8);
|
||||
x |= (x >> 16);
|
||||
return x;
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
uint16_t make_mask16(uint16_t x)
|
||||
{
|
||||
x |= (x >> 1);
|
||||
x |= (x >> 2);
|
||||
x |= (x >> 4);
|
||||
x |= (x >> 8);
|
||||
return x;
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
/*- End of file ------------------------------------------------------------*/
|
|
@ -1,137 +0,0 @@
|
|||
/*
|
||||
* VoIPcodecs - a series of DSP components for telephony
|
||||
*
|
||||
* bitstream.c - Bitstream composition and decomposition routines.
|
||||
*
|
||||
* Written by Steve Underwood <steveu@coppice.org>
|
||||
*
|
||||
* Copyright (C) 2006 Steve Underwood
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the Lesser Lesser GNU General Public License version 2.1.1, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: bitstream.c,v 1.8 2007/08/20 15:22:21 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include "voipcodecs/telephony.h"
|
||||
#include "voipcodecs/bitstream.h"
|
||||
|
||||
void bitstream_put(bitstream_state_t *s, uint8_t **c, unsigned int value, int bits)
|
||||
{
|
||||
value &= ((1 << bits) - 1);
|
||||
if (s->residue + bits <= 32)
|
||||
{
|
||||
s->bitstream |= (value << s->residue);
|
||||
s->residue += bits;
|
||||
}
|
||||
while (s->residue >= 8)
|
||||
{
|
||||
s->residue -= 8;
|
||||
*(*c)++ = (uint8_t) (s->bitstream & 0xFF);
|
||||
s->bitstream >>= 8;
|
||||
}
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
void bitstream_put2(bitstream_state_t *s, uint8_t **c, unsigned int value, int bits)
|
||||
{
|
||||
value &= ((1 << bits) - 1);
|
||||
if (s->residue + bits <= 32)
|
||||
{
|
||||
s->bitstream = (s->bitstream << bits) | value;
|
||||
s->residue += bits;
|
||||
}
|
||||
while (s->residue >= 8)
|
||||
{
|
||||
s->residue -= 8;
|
||||
*(*c)++ = (uint8_t) ((s->bitstream >> s->residue) & 0xFF);
|
||||
}
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
unsigned int bitstream_get(bitstream_state_t *s, const uint8_t **c, int bits)
|
||||
{
|
||||
unsigned int x;
|
||||
|
||||
while (s->residue < (unsigned int) bits)
|
||||
{
|
||||
x = (unsigned int) *(*c)++;
|
||||
s->bitstream |= (x << s->residue);
|
||||
s->residue += 8;
|
||||
}
|
||||
s->residue -= bits;
|
||||
x = s->bitstream & ((1 << bits) - 1);
|
||||
s->bitstream >>= bits;
|
||||
return x;
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
unsigned int bitstream_get2(bitstream_state_t *s, const uint8_t **c, int bits)
|
||||
{
|
||||
unsigned int x;
|
||||
|
||||
while (s->residue < (unsigned int) bits)
|
||||
{
|
||||
x = (unsigned int) *(*c)++;
|
||||
s->bitstream = (s->bitstream << 8) | x;
|
||||
s->residue += 8;
|
||||
}
|
||||
s->residue -= bits;
|
||||
x = (s->bitstream >> s->residue) & ((1 << bits) - 1);
|
||||
return x;
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
void bitstream_flush(bitstream_state_t *s, uint8_t **c)
|
||||
{
|
||||
if (s->residue > 0)
|
||||
{
|
||||
*(*c)++ = (uint8_t) ((s->bitstream << (8 - s->residue)) & 0xFF);
|
||||
s->residue = 0;
|
||||
}
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
void bitstream_flush2(bitstream_state_t *s, uint8_t **c)
|
||||
{
|
||||
if (s->residue > 0)
|
||||
{
|
||||
*(*c)++ = (uint8_t) ((s->bitstream << (8 - s->residue)) & 0xFF);
|
||||
s->residue = 0;
|
||||
}
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
bitstream_state_t *bitstream_init(bitstream_state_t *s)
|
||||
{
|
||||
if (s == NULL)
|
||||
return NULL;
|
||||
s->bitstream = 0;
|
||||
s->residue = 0;
|
||||
return s;
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
/*- End of file ------------------------------------------------------------*/
|
|
@ -1,123 +0,0 @@
|
|||
/*
|
||||
* SpanDSP - a series of DSP components for telephony
|
||||
*
|
||||
* float_fudge.h - A bunch of shims, to use double maths
|
||||
* functions on platforms which lack the
|
||||
* float versions with an 'f' at the end.
|
||||
*
|
||||
* Written by Steve Underwood <steveu@coppice.org>
|
||||
*
|
||||
* Copyright (C) 2004 Steve Underwood
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: float_fudge.h,v 1.2 2007/08/13 11:35:32 steveu Exp $
|
||||
*/
|
||||
|
||||
#if !defined(_FLOAT_FUDGE_H_)
|
||||
#define _FLOAT_FUDGE_H_
|
||||
|
||||
#if defined(__USE_DOUBLE_MATH__)
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
static __inline__ float sinf(float x)
|
||||
{
|
||||
return (float) sin((double) x);
|
||||
}
|
||||
|
||||
static __inline__ float cosf(float x)
|
||||
{
|
||||
return (float) cos((double) x);
|
||||
}
|
||||
|
||||
static __inline__ float tanf(float x)
|
||||
{
|
||||
return (float) tan((double) x);
|
||||
}
|
||||
|
||||
static __inline__ float asinf(float x)
|
||||
{
|
||||
return (float) asin((double) x);
|
||||
}
|
||||
|
||||
static __inline__ float acosf(float x)
|
||||
{
|
||||
return (float) acos((double) x);
|
||||
}
|
||||
|
||||
static __inline__ float atanf(float x)
|
||||
{
|
||||
return (float) atan((double) x);
|
||||
}
|
||||
|
||||
static __inline__ float atan2f(float y, float x)
|
||||
{
|
||||
return (float) atan2((double) y, (double) x);
|
||||
}
|
||||
|
||||
static __inline__ float ceilf(float x)
|
||||
{
|
||||
return (float) ceil((double) x);
|
||||
}
|
||||
|
||||
static __inline__ float floorf(float x)
|
||||
{
|
||||
return (float) floor((double) x);
|
||||
}
|
||||
|
||||
static __inline__ float expf(float x)
|
||||
{
|
||||
return (float) expf((double) x);
|
||||
}
|
||||
|
||||
static __inline__ float logf(float x)
|
||||
{
|
||||
return (float) logf((double) x);
|
||||
}
|
||||
|
||||
static __inline__ float log10f(float x)
|
||||
{
|
||||
return (float) log10((double) x);
|
||||
}
|
||||
|
||||
static __inline__ float powf(float x, float y)
|
||||
{
|
||||
return (float) pow((double) x, (double) y);
|
||||
}
|
||||
|
||||
static __inline__ int rintf(float x)
|
||||
{
|
||||
return (int) rint((double) x);
|
||||
}
|
||||
|
||||
static __inline__ long int lrintf(float x)
|
||||
{
|
||||
return (long int) lrint((double) x);
|
||||
}
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
/*- End of file ------------------------------------------------------------*/
|
|
@ -1,105 +0,0 @@
|
|||
/*
|
||||
* VoIPcodecs - a series of DSP components for telephony
|
||||
*
|
||||
* g711.c - A-law and u-law transcoding routines
|
||||
*
|
||||
* Written by Steve Underwood <steveu@coppice.org>
|
||||
*
|
||||
* Copyright (C) 2006 Steve Underwood
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2, or
|
||||
* the Lesser GNU General Public License version 2.1, as published by
|
||||
* the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: g711.c,v 1.6 2008/02/09 15:32:56 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#if defined(HAVE_TGMATH_H)
|
||||
#include <tgmath.h>
|
||||
#endif
|
||||
#if defined(HAVE_MATH_H)
|
||||
#include <math.h>
|
||||
#endif
|
||||
#include <assert.h>
|
||||
|
||||
#include "voipcodecs/telephony.h"
|
||||
#include "voipcodecs/bit_operations.h"
|
||||
#include "voipcodecs/g711.h"
|
||||
|
||||
/* Copied from the CCITT G.711 specification */
|
||||
static const uint8_t ulaw_to_alaw_table[256] =
|
||||
{
|
||||
42, 43, 40, 41, 46, 47, 44, 45, 34, 35, 32, 33, 38, 39, 36, 37,
|
||||
58, 59, 56, 57, 62, 63, 60, 61, 50, 51, 48, 49, 54, 55, 52, 53,
|
||||
10, 11, 8, 9, 14, 15, 12, 13, 2, 3, 0, 1, 6, 7, 4, 26,
|
||||
27, 24, 25, 30, 31, 28, 29, 18, 19, 16, 17, 22, 23, 20, 21, 106,
|
||||
104, 105, 110, 111, 108, 109, 98, 99, 96, 97, 102, 103, 100, 101, 122, 120,
|
||||
126, 127, 124, 125, 114, 115, 112, 113, 118, 119, 116, 117, 75, 73, 79, 77,
|
||||
66, 67, 64, 65, 70, 71, 68, 69, 90, 91, 88, 89, 94, 95, 92, 93,
|
||||
82, 82, 83, 83, 80, 80, 81, 81, 86, 86, 87, 87, 84, 84, 85, 85,
|
||||
170, 171, 168, 169, 174, 175, 172, 173, 162, 163, 160, 161, 166, 167, 164, 165,
|
||||
186, 187, 184, 185, 190, 191, 188, 189, 178, 179, 176, 177, 182, 183, 180, 181,
|
||||
138, 139, 136, 137, 142, 143, 140, 141, 130, 131, 128, 129, 134, 135, 132, 154,
|
||||
155, 152, 153, 158, 159, 156, 157, 146, 147, 144, 145, 150, 151, 148, 149, 234,
|
||||
232, 233, 238, 239, 236, 237, 226, 227, 224, 225, 230, 231, 228, 229, 250, 248,
|
||||
254, 255, 252, 253, 242, 243, 240, 241, 246, 247, 244, 245, 203, 201, 207, 205,
|
||||
194, 195, 192, 193, 198, 199, 196, 197, 218, 219, 216, 217, 222, 223, 220, 221,
|
||||
210, 210, 211, 211, 208, 208, 209, 209, 214, 214, 215, 215, 212, 212, 213, 213
|
||||
};
|
||||
|
||||
/* These transcoding tables are copied from the CCITT G.711 specification. To achieve
|
||||
optimal results, do not change them. */
|
||||
|
||||
static const uint8_t alaw_to_ulaw_table[256] =
|
||||
{
|
||||
42, 43, 40, 41, 46, 47, 44, 45, 34, 35, 32, 33, 38, 39, 36, 37,
|
||||
57, 58, 55, 56, 61, 62, 59, 60, 49, 50, 47, 48, 53, 54, 51, 52,
|
||||
10, 11, 8, 9, 14, 15, 12, 13, 2, 3, 0, 1, 6, 7, 4, 5,
|
||||
26, 27, 24, 25, 30, 31, 28, 29, 18, 19, 16, 17, 22, 23, 20, 21,
|
||||
98, 99, 96, 97, 102, 103, 100, 101, 93, 93, 92, 92, 95, 95, 94, 94,
|
||||
116, 118, 112, 114, 124, 126, 120, 122, 106, 107, 104, 105, 110, 111, 108, 109,
|
||||
72, 73, 70, 71, 76, 77, 74, 75, 64, 65, 63, 63, 68, 69, 66, 67,
|
||||
86, 87, 84, 85, 90, 91, 88, 89, 79, 79, 78, 78, 82, 83, 80, 81,
|
||||
170, 171, 168, 169, 174, 175, 172, 173, 162, 163, 160, 161, 166, 167, 164, 165,
|
||||
185, 186, 183, 184, 189, 190, 187, 188, 177, 178, 175, 176, 181, 182, 179, 180,
|
||||
138, 139, 136, 137, 142, 143, 140, 141, 130, 131, 128, 129, 134, 135, 132, 133,
|
||||
154, 155, 152, 153, 158, 159, 156, 157, 146, 147, 144, 145, 150, 151, 148, 149,
|
||||
226, 227, 224, 225, 230, 231, 228, 229, 221, 221, 220, 220, 223, 223, 222, 222,
|
||||
244, 246, 240, 242, 252, 254, 248, 250, 234, 235, 232, 233, 238, 239, 236, 237,
|
||||
200, 201, 198, 199, 204, 205, 202, 203, 192, 193, 191, 191, 196, 197, 194, 195,
|
||||
214, 215, 212, 213, 218, 219, 216, 217, 207, 207, 206, 206, 210, 211, 208, 209
|
||||
};
|
||||
|
||||
uint8_t alaw_to_ulaw(uint8_t alaw)
|
||||
{
|
||||
return alaw_to_ulaw_table[alaw];
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
uint8_t ulaw_to_alaw(uint8_t ulaw)
|
||||
{
|
||||
return ulaw_to_alaw_table[ulaw];
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
/*- End of file ------------------------------------------------------------*/
|
|
@ -1,405 +0,0 @@
|
|||
/*
|
||||
* VoIPcodecs - a series of DSP components for telephony
|
||||
*
|
||||
* g722_decode.c - The ITU G.722 codec, decode part.
|
||||
*
|
||||
* Written by Steve Underwood <steveu@coppice.org>
|
||||
*
|
||||
* Copyright (C) 2005 Steve Underwood
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2, or
|
||||
* the Lesser GNU General Public License version 2.1, as published by
|
||||
* the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* Based in part on a single channel G.722 codec which is:
|
||||
*
|
||||
* Copyright (c) CMU 1993
|
||||
* Computer Science, Speech Group
|
||||
* Chengxiang Lu and Alex Hauptmann
|
||||
*
|
||||
* $Id: g722_decode.c,v 1.20 2008/02/09 15:32:56 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <memory.h>
|
||||
#include <stdlib.h>
|
||||
#if defined(HAVE_TGMATH_H)
|
||||
#include <tgmath.h>
|
||||
#endif
|
||||
#if defined(HAVE_MATH_H)
|
||||
#include <math.h>
|
||||
#endif
|
||||
|
||||
#include "voipcodecs/telephony.h"
|
||||
#include "voipcodecs/dc_restore.h"
|
||||
#include "voipcodecs/g722.h"
|
||||
|
||||
static void block4(g722_decode_state_t *s, int band, int d);
|
||||
|
||||
static void block4(g722_decode_state_t *s, int band, int d)
|
||||
{
|
||||
int wd1;
|
||||
int wd2;
|
||||
int wd3;
|
||||
int i;
|
||||
|
||||
/* Block 4, RECONS */
|
||||
s->band[band].d[0] = d;
|
||||
s->band[band].r[0] = saturate(s->band[band].s + d);
|
||||
|
||||
/* Block 4, PARREC */
|
||||
s->band[band].p[0] = saturate(s->band[band].sz + d);
|
||||
|
||||
/* Block 4, UPPOL2 */
|
||||
for (i = 0; i < 3; i++)
|
||||
s->band[band].sg[i] = s->band[band].p[i] >> 15;
|
||||
wd1 = saturate(s->band[band].a[1] << 2);
|
||||
|
||||
wd2 = (s->band[band].sg[0] == s->band[band].sg[1]) ? -wd1 : wd1;
|
||||
if (wd2 > 32767)
|
||||
wd2 = 32767;
|
||||
wd3 = (s->band[band].sg[0] == s->band[band].sg[2]) ? 128 : -128;
|
||||
wd3 += (wd2 >> 7);
|
||||
wd3 += (s->band[band].a[2]*32512) >> 15;
|
||||
if (wd3 > 12288)
|
||||
wd3 = 12288;
|
||||
else if (wd3 < -12288)
|
||||
wd3 = -12288;
|
||||
s->band[band].ap[2] = wd3;
|
||||
|
||||
/* Block 4, UPPOL1 */
|
||||
s->band[band].sg[0] = s->band[band].p[0] >> 15;
|
||||
s->band[band].sg[1] = s->band[band].p[1] >> 15;
|
||||
wd1 = (s->band[band].sg[0] == s->band[band].sg[1]) ? 192 : -192;
|
||||
wd2 = (s->band[band].a[1]*32640) >> 15;
|
||||
|
||||
s->band[band].ap[1] = saturate(wd1 + wd2);
|
||||
wd3 = saturate(15360 - s->band[band].ap[2]);
|
||||
if (s->band[band].ap[1] > wd3)
|
||||
s->band[band].ap[1] = wd3;
|
||||
else if (s->band[band].ap[1] < -wd3)
|
||||
s->band[band].ap[1] = -wd3;
|
||||
|
||||
/* Block 4, UPZERO */
|
||||
wd1 = (d == 0) ? 0 : 128;
|
||||
s->band[band].sg[0] = d >> 15;
|
||||
for (i = 1; i < 7; i++)
|
||||
{
|
||||
s->band[band].sg[i] = s->band[band].d[i] >> 15;
|
||||
wd2 = (s->band[band].sg[i] == s->band[band].sg[0]) ? wd1 : -wd1;
|
||||
wd3 = (s->band[band].b[i]*32640) >> 15;
|
||||
s->band[band].bp[i] = saturate(wd2 + wd3);
|
||||
}
|
||||
|
||||
/* Block 4, DELAYA */
|
||||
for (i = 6; i > 0; i--)
|
||||
{
|
||||
s->band[band].d[i] = s->band[band].d[i - 1];
|
||||
s->band[band].b[i] = s->band[band].bp[i];
|
||||
}
|
||||
|
||||
for (i = 2; i > 0; i--)
|
||||
{
|
||||
s->band[band].r[i] = s->band[band].r[i - 1];
|
||||
s->band[band].p[i] = s->band[band].p[i - 1];
|
||||
s->band[band].a[i] = s->band[band].ap[i];
|
||||
}
|
||||
|
||||
/* Block 4, FILTEP */
|
||||
wd1 = saturate(s->band[band].r[1] + s->band[band].r[1]);
|
||||
wd1 = (s->band[band].a[1]*wd1) >> 15;
|
||||
wd2 = saturate(s->band[band].r[2] + s->band[band].r[2]);
|
||||
wd2 = (s->band[band].a[2]*wd2) >> 15;
|
||||
s->band[band].sp = saturate(wd1 + wd2);
|
||||
|
||||
/* Block 4, FILTEZ */
|
||||
s->band[band].sz = 0;
|
||||
for (i = 6; i > 0; i--)
|
||||
{
|
||||
wd1 = saturate(s->band[band].d[i] + s->band[band].d[i]);
|
||||
s->band[band].sz += (s->band[band].b[i]*wd1) >> 15;
|
||||
}
|
||||
s->band[band].sz = saturate(s->band[band].sz);
|
||||
|
||||
/* Block 4, PREDIC */
|
||||
s->band[band].s = saturate(s->band[band].sp + s->band[band].sz);
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
g722_decode_state_t *g722_decode_init(g722_decode_state_t *s, int rate, int options)
|
||||
{
|
||||
if (s == NULL)
|
||||
{
|
||||
if ((s = (g722_decode_state_t *) malloc(sizeof(*s))) == NULL)
|
||||
return NULL;
|
||||
}
|
||||
memset(s, 0, sizeof(*s));
|
||||
if (rate == 48000)
|
||||
s->bits_per_sample = 6;
|
||||
else if (rate == 56000)
|
||||
s->bits_per_sample = 7;
|
||||
else
|
||||
s->bits_per_sample = 8;
|
||||
if ((options & G722_SAMPLE_RATE_8000))
|
||||
s->eight_k = TRUE;
|
||||
if ((options & G722_PACKED) && s->bits_per_sample != 8)
|
||||
s->packed = TRUE;
|
||||
else
|
||||
s->packed = FALSE;
|
||||
s->band[0].det = 32;
|
||||
s->band[1].det = 8;
|
||||
return s;
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
int g722_decode_release(g722_decode_state_t *s)
|
||||
{
|
||||
free(s);
|
||||
return 0;
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
int g722_decode(g722_decode_state_t *s, int16_t amp[], const uint8_t g722_data[], int len)
|
||||
{
|
||||
static const int wl[8] =
|
||||
{
|
||||
-60, -30, 58, 172, 334, 538, 1198, 3042
|
||||
};
|
||||
static const int rl42[16] =
|
||||
{
|
||||
0, 7, 6, 5, 4, 3, 2, 1, 7, 6, 5, 4, 3, 2, 1, 0
|
||||
};
|
||||
static const int ilb[32] =
|
||||
{
|
||||
2048, 2093, 2139, 2186, 2233, 2282, 2332,
|
||||
2383, 2435, 2489, 2543, 2599, 2656, 2714,
|
||||
2774, 2834, 2896, 2960, 3025, 3091, 3158,
|
||||
3228, 3298, 3371, 3444, 3520, 3597, 3676,
|
||||
3756, 3838, 3922, 4008
|
||||
};
|
||||
static const int wh[3] =
|
||||
{
|
||||
0, -214, 798
|
||||
};
|
||||
static const int rh2[4] =
|
||||
{
|
||||
2, 1, 2, 1
|
||||
};
|
||||
static const int qm2[4] =
|
||||
{
|
||||
-7408, -1616, 7408, 1616
|
||||
};
|
||||
static const int qm4[16] =
|
||||
{
|
||||
0, -20456, -12896, -8968,
|
||||
-6288, -4240, -2584, -1200,
|
||||
20456, 12896, 8968, 6288,
|
||||
4240, 2584, 1200, 0
|
||||
};
|
||||
static const int qm5[32] =
|
||||
{
|
||||
-280, -280, -23352, -17560,
|
||||
-14120, -11664, -9752, -8184,
|
||||
-6864, -5712, -4696, -3784,
|
||||
-2960, -2208, -1520, -880,
|
||||
23352, 17560, 14120, 11664,
|
||||
9752, 8184, 6864, 5712,
|
||||
4696, 3784, 2960, 2208,
|
||||
1520, 880, 280, -280
|
||||
};
|
||||
static const int qm6[64] =
|
||||
{
|
||||
-136, -136, -136, -136,
|
||||
-24808, -21904, -19008, -16704,
|
||||
-14984, -13512, -12280, -11192,
|
||||
-10232, -9360, -8576, -7856,
|
||||
-7192, -6576, -6000, -5456,
|
||||
-4944, -4464, -4008, -3576,
|
||||
-3168, -2776, -2400, -2032,
|
||||
-1688, -1360, -1040, -728,
|
||||
24808, 21904, 19008, 16704,
|
||||
14984, 13512, 12280, 11192,
|
||||
10232, 9360, 8576, 7856,
|
||||
7192, 6576, 6000, 5456,
|
||||
4944, 4464, 4008, 3576,
|
||||
3168, 2776, 2400, 2032,
|
||||
1688, 1360, 1040, 728,
|
||||
432, 136, -432, -136
|
||||
};
|
||||
static const int qmf_coeffs[12] =
|
||||
{
|
||||
3, -11, 12, 32, -210, 951, 3876, -805, 362, -156, 53, -11,
|
||||
};
|
||||
int dlowt;
|
||||
int rlow;
|
||||
int ihigh;
|
||||
int dhigh;
|
||||
int rhigh;
|
||||
int xout1;
|
||||
int xout2;
|
||||
int wd1;
|
||||
int wd2;
|
||||
int wd3;
|
||||
int code;
|
||||
int outlen;
|
||||
int i;
|
||||
int j;
|
||||
|
||||
outlen = 0;
|
||||
rhigh = 0;
|
||||
for (j = 0; j < len; )
|
||||
{
|
||||
if (s->packed)
|
||||
{
|
||||
/* Unpack the code bits */
|
||||
if (s->in_bits < s->bits_per_sample)
|
||||
{
|
||||
s->in_buffer |= (g722_data[j++] << s->in_bits);
|
||||
s->in_bits += 8;
|
||||
}
|
||||
code = s->in_buffer & ((1 << s->bits_per_sample) - 1);
|
||||
s->in_buffer >>= s->bits_per_sample;
|
||||
s->in_bits -= s->bits_per_sample;
|
||||
}
|
||||
else
|
||||
{
|
||||
code = g722_data[j++];
|
||||
}
|
||||
|
||||
switch (s->bits_per_sample)
|
||||
{
|
||||
default:
|
||||
case 8:
|
||||
wd1 = code & 0x3F;
|
||||
ihigh = (code >> 6) & 0x03;
|
||||
wd2 = qm6[wd1];
|
||||
wd1 >>= 2;
|
||||
break;
|
||||
case 7:
|
||||
wd1 = code & 0x1F;
|
||||
ihigh = (code >> 5) & 0x03;
|
||||
wd2 = qm5[wd1];
|
||||
wd1 >>= 1;
|
||||
break;
|
||||
case 6:
|
||||
wd1 = code & 0x0F;
|
||||
ihigh = (code >> 4) & 0x03;
|
||||
wd2 = qm4[wd1];
|
||||
break;
|
||||
}
|
||||
/* Block 5L, LOW BAND INVQBL */
|
||||
wd2 = (s->band[0].det*wd2) >> 15;
|
||||
/* Block 5L, RECONS */
|
||||
rlow = s->band[0].s + wd2;
|
||||
/* Block 6L, LIMIT */
|
||||
if (rlow > 16383)
|
||||
rlow = 16383;
|
||||
else if (rlow < -16384)
|
||||
rlow = -16384;
|
||||
|
||||
/* Block 2L, INVQAL */
|
||||
wd2 = qm4[wd1];
|
||||
dlowt = (s->band[0].det*wd2) >> 15;
|
||||
|
||||
/* Block 3L, LOGSCL */
|
||||
wd2 = rl42[wd1];
|
||||
wd1 = (s->band[0].nb*127) >> 7;
|
||||
wd1 += wl[wd2];
|
||||
if (wd1 < 0)
|
||||
wd1 = 0;
|
||||
else if (wd1 > 18432)
|
||||
wd1 = 18432;
|
||||
s->band[0].nb = wd1;
|
||||
|
||||
/* Block 3L, SCALEL */
|
||||
wd1 = (s->band[0].nb >> 6) & 31;
|
||||
wd2 = 8 - (s->band[0].nb >> 11);
|
||||
wd3 = (wd2 < 0) ? (ilb[wd1] << -wd2) : (ilb[wd1] >> wd2);
|
||||
s->band[0].det = wd3 << 2;
|
||||
|
||||
block4(s, 0, dlowt);
|
||||
|
||||
if (!s->eight_k)
|
||||
{
|
||||
/* Block 2H, INVQAH */
|
||||
wd2 = qm2[ihigh];
|
||||
dhigh = (s->band[1].det*wd2) >> 15;
|
||||
/* Block 5H, RECONS */
|
||||
rhigh = dhigh + s->band[1].s;
|
||||
/* Block 6H, LIMIT */
|
||||
if (rhigh > 16383)
|
||||
rhigh = 16383;
|
||||
else if (rhigh < -16384)
|
||||
rhigh = -16384;
|
||||
|
||||
/* Block 2H, INVQAH */
|
||||
wd2 = rh2[ihigh];
|
||||
wd1 = (s->band[1].nb*127) >> 7;
|
||||
wd1 += wh[wd2];
|
||||
if (wd1 < 0)
|
||||
wd1 = 0;
|
||||
else if (wd1 > 22528)
|
||||
wd1 = 22528;
|
||||
s->band[1].nb = wd1;
|
||||
|
||||
/* Block 3H, SCALEH */
|
||||
wd1 = (s->band[1].nb >> 6) & 31;
|
||||
wd2 = 10 - (s->band[1].nb >> 11);
|
||||
wd3 = (wd2 < 0) ? (ilb[wd1] << -wd2) : (ilb[wd1] >> wd2);
|
||||
s->band[1].det = wd3 << 2;
|
||||
|
||||
block4(s, 1, dhigh);
|
||||
}
|
||||
|
||||
if (s->itu_test_mode)
|
||||
{
|
||||
amp[outlen++] = (int16_t) (rlow << 1);
|
||||
amp[outlen++] = (int16_t) (rhigh << 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (s->eight_k)
|
||||
{
|
||||
amp[outlen++] = (int16_t) rlow;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Apply the receive QMF */
|
||||
memcpy(s->x, &s->x[2], 22*sizeof(s->x[0]));
|
||||
s->x[22] = rlow + rhigh;
|
||||
s->x[23] = rlow - rhigh;
|
||||
|
||||
xout1 = 0;
|
||||
xout2 = 0;
|
||||
for (i = 0; i < 12; i++)
|
||||
{
|
||||
xout2 += s->x[2*i]*qmf_coeffs[i];
|
||||
xout1 += s->x[2*i + 1]*qmf_coeffs[11 - i];
|
||||
}
|
||||
amp[outlen++] = (int16_t) (xout1 >> 12);
|
||||
amp[outlen++] = (int16_t) (xout2 >> 12);
|
||||
}
|
||||
}
|
||||
}
|
||||
return outlen;
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
/*- End of file ------------------------------------------------------------*/
|
|
@ -1,391 +0,0 @@
|
|||
/*
|
||||
* VoIPcodecs - a series of DSP components for telephony
|
||||
*
|
||||
* g722_encode.c - The ITU G.722 codec, encode part.
|
||||
*
|
||||
* Written by Steve Underwood <steveu@coppice.org>
|
||||
*
|
||||
* Copyright (C) 2005 Steve Underwood
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2, or
|
||||
* the Lesser GNU General Public License version 2.1, as published by
|
||||
* the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* Based on a single channel 64kbps only G.722 codec which is:
|
||||
*
|
||||
***** Copyright (c) CMU 1993 *****
|
||||
* Computer Science, Speech Group
|
||||
* Chengxiang Lu and Alex Hauptmann
|
||||
*
|
||||
* $Id: g722_encode.c,v 1.18 2008/02/09 15:32:56 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <memory.h>
|
||||
#include <stdlib.h>
|
||||
#if defined(HAVE_TGMATH_H)
|
||||
#include <tgmath.h>
|
||||
#endif
|
||||
#if defined(HAVE_MATH_H)
|
||||
#include <math.h>
|
||||
#endif
|
||||
|
||||
#include "voipcodecs/telephony.h"
|
||||
#include "voipcodecs/dc_restore.h"
|
||||
#include "voipcodecs/g722.h"
|
||||
|
||||
static void block4(g722_encode_state_t *s, int band, int d)
|
||||
{
|
||||
int wd1;
|
||||
int wd2;
|
||||
int wd3;
|
||||
int i;
|
||||
|
||||
/* Block 4, RECONS */
|
||||
s->band[band].d[0] = d;
|
||||
s->band[band].r[0] = saturate(s->band[band].s + d);
|
||||
|
||||
/* Block 4, PARREC */
|
||||
s->band[band].p[0] = saturate(s->band[band].sz + d);
|
||||
|
||||
/* Block 4, UPPOL2 */
|
||||
for (i = 0; i < 3; i++)
|
||||
s->band[band].sg[i] = s->band[band].p[i] >> 15;
|
||||
wd1 = saturate(s->band[band].a[1] << 2);
|
||||
|
||||
wd2 = (s->band[band].sg[0] == s->band[band].sg[1]) ? -wd1 : wd1;
|
||||
if (wd2 > 32767)
|
||||
wd2 = 32767;
|
||||
wd3 = (wd2 >> 7) + ((s->band[band].sg[0] == s->band[band].sg[2]) ? 128 : -128);
|
||||
wd3 += (s->band[band].a[2]*32512) >> 15;
|
||||
if (wd3 > 12288)
|
||||
wd3 = 12288;
|
||||
else if (wd3 < -12288)
|
||||
wd3 = -12288;
|
||||
s->band[band].ap[2] = wd3;
|
||||
|
||||
/* Block 4, UPPOL1 */
|
||||
s->band[band].sg[0] = s->band[band].p[0] >> 15;
|
||||
s->band[band].sg[1] = s->band[band].p[1] >> 15;
|
||||
wd1 = (s->band[band].sg[0] == s->band[band].sg[1]) ? 192 : -192;
|
||||
wd2 = (s->band[band].a[1]*32640) >> 15;
|
||||
|
||||
s->band[band].ap[1] = saturate(wd1 + wd2);
|
||||
wd3 = saturate(15360 - s->band[band].ap[2]);
|
||||
if (s->band[band].ap[1] > wd3)
|
||||
s->band[band].ap[1] = wd3;
|
||||
else if (s->band[band].ap[1] < -wd3)
|
||||
s->band[band].ap[1] = -wd3;
|
||||
|
||||
/* Block 4, UPZERO */
|
||||
wd1 = (d == 0) ? 0 : 128;
|
||||
s->band[band].sg[0] = d >> 15;
|
||||
for (i = 1; i < 7; i++)
|
||||
{
|
||||
s->band[band].sg[i] = s->band[band].d[i] >> 15;
|
||||
wd2 = (s->band[band].sg[i] == s->band[band].sg[0]) ? wd1 : -wd1;
|
||||
wd3 = (s->band[band].b[i]*32640) >> 15;
|
||||
s->band[band].bp[i] = saturate(wd2 + wd3);
|
||||
}
|
||||
|
||||
/* Block 4, DELAYA */
|
||||
for (i = 6; i > 0; i--)
|
||||
{
|
||||
s->band[band].d[i] = s->band[band].d[i - 1];
|
||||
s->band[band].b[i] = s->band[band].bp[i];
|
||||
}
|
||||
|
||||
for (i = 2; i > 0; i--)
|
||||
{
|
||||
s->band[band].r[i] = s->band[band].r[i - 1];
|
||||
s->band[band].p[i] = s->band[band].p[i - 1];
|
||||
s->band[band].a[i] = s->band[band].ap[i];
|
||||
}
|
||||
|
||||
/* Block 4, FILTEP */
|
||||
wd1 = saturate(s->band[band].r[1] + s->band[band].r[1]);
|
||||
wd1 = (s->band[band].a[1]*wd1) >> 15;
|
||||
wd2 = saturate(s->band[band].r[2] + s->band[band].r[2]);
|
||||
wd2 = (s->band[band].a[2]*wd2) >> 15;
|
||||
s->band[band].sp = saturate(wd1 + wd2);
|
||||
|
||||
/* Block 4, FILTEZ */
|
||||
s->band[band].sz = 0;
|
||||
for (i = 6; i > 0; i--)
|
||||
{
|
||||
wd1 = saturate(s->band[band].d[i] + s->band[band].d[i]);
|
||||
s->band[band].sz += (s->band[band].b[i]*wd1) >> 15;
|
||||
}
|
||||
s->band[band].sz = saturate(s->band[band].sz);
|
||||
|
||||
/* Block 4, PREDIC */
|
||||
s->band[band].s = saturate(s->band[band].sp + s->band[band].sz);
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
g722_encode_state_t *g722_encode_init(g722_encode_state_t *s, int rate, int options)
|
||||
{
|
||||
if (s == NULL)
|
||||
{
|
||||
if ((s = (g722_encode_state_t *) malloc(sizeof(*s))) == NULL)
|
||||
return NULL;
|
||||
}
|
||||
memset(s, 0, sizeof(*s));
|
||||
if (rate == 48000)
|
||||
s->bits_per_sample = 6;
|
||||
else if (rate == 56000)
|
||||
s->bits_per_sample = 7;
|
||||
else
|
||||
s->bits_per_sample = 8;
|
||||
if ((options & G722_SAMPLE_RATE_8000))
|
||||
s->eight_k = TRUE;
|
||||
if ((options & G722_PACKED) && s->bits_per_sample != 8)
|
||||
s->packed = TRUE;
|
||||
else
|
||||
s->packed = FALSE;
|
||||
s->band[0].det = 32;
|
||||
s->band[1].det = 8;
|
||||
return s;
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
int g722_encode_release(g722_encode_state_t *s)
|
||||
{
|
||||
free(s);
|
||||
return 0;
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
int g722_encode(g722_encode_state_t *s, uint8_t g722_data[], const int16_t amp[], int len)
|
||||
{
|
||||
static const int q6[32] =
|
||||
{
|
||||
0, 35, 72, 110, 150, 190, 233, 276,
|
||||
323, 370, 422, 473, 530, 587, 650, 714,
|
||||
786, 858, 940, 1023, 1121, 1219, 1339, 1458,
|
||||
1612, 1765, 1980, 2195, 2557, 2919, 0, 0
|
||||
};
|
||||
static const int iln[32] =
|
||||
{
|
||||
0, 63, 62, 31, 30, 29, 28, 27,
|
||||
26, 25, 24, 23, 22, 21, 20, 19,
|
||||
18, 17, 16, 15, 14, 13, 12, 11,
|
||||
10, 9, 8, 7, 6, 5, 4, 0
|
||||
};
|
||||
static const int ilp[32] =
|
||||
{
|
||||
0, 61, 60, 59, 58, 57, 56, 55,
|
||||
54, 53, 52, 51, 50, 49, 48, 47,
|
||||
46, 45, 44, 43, 42, 41, 40, 39,
|
||||
38, 37, 36, 35, 34, 33, 32, 0
|
||||
};
|
||||
static const int wl[8] =
|
||||
{
|
||||
-60, -30, 58, 172, 334, 538, 1198, 3042
|
||||
};
|
||||
static const int rl42[16] =
|
||||
{
|
||||
0, 7, 6, 5, 4, 3, 2, 1, 7, 6, 5, 4, 3, 2, 1, 0
|
||||
};
|
||||
static const int ilb[32] =
|
||||
{
|
||||
2048, 2093, 2139, 2186, 2233, 2282, 2332,
|
||||
2383, 2435, 2489, 2543, 2599, 2656, 2714,
|
||||
2774, 2834, 2896, 2960, 3025, 3091, 3158,
|
||||
3228, 3298, 3371, 3444, 3520, 3597, 3676,
|
||||
3756, 3838, 3922, 4008
|
||||
};
|
||||
static const int qm4[16] =
|
||||
{
|
||||
0, -20456, -12896, -8968,
|
||||
-6288, -4240, -2584, -1200,
|
||||
20456, 12896, 8968, 6288,
|
||||
4240, 2584, 1200, 0
|
||||
};
|
||||
static const int qm2[4] =
|
||||
{
|
||||
-7408, -1616, 7408, 1616
|
||||
};
|
||||
static const int qmf_coeffs[12] =
|
||||
{
|
||||
3, -11, 12, 32, -210, 951, 3876, -805, 362, -156, 53, -11,
|
||||
};
|
||||
static const int ihn[3] = {0, 1, 0};
|
||||
static const int ihp[3] = {0, 3, 2};
|
||||
static const int wh[3] = {0, -214, 798};
|
||||
static const int rh2[4] = {2, 1, 2, 1};
|
||||
|
||||
int dlow;
|
||||
int dhigh;
|
||||
int el;
|
||||
int wd;
|
||||
int wd1;
|
||||
int ril;
|
||||
int wd2;
|
||||
int il4;
|
||||
int ih2;
|
||||
int wd3;
|
||||
int eh;
|
||||
int mih;
|
||||
int i;
|
||||
int j;
|
||||
/* Low and high band PCM from the QMF */
|
||||
int xlow;
|
||||
int xhigh;
|
||||
int g722_bytes;
|
||||
/* Even and odd tap accumulators */
|
||||
int sumeven;
|
||||
int sumodd;
|
||||
int ihigh;
|
||||
int ilow;
|
||||
int code;
|
||||
|
||||
g722_bytes = 0;
|
||||
xhigh = 0;
|
||||
for (j = 0; j < len; )
|
||||
{
|
||||
if (s->itu_test_mode)
|
||||
{
|
||||
xlow =
|
||||
xhigh = amp[j++] >> 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (s->eight_k)
|
||||
{
|
||||
xlow = amp[j++];
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Apply the transmit QMF */
|
||||
/* Shuffle the buffer down */
|
||||
memcpy(s->x, &s->x[2], 22*sizeof(s->x[0]));
|
||||
s->x[22] = amp[j++];
|
||||
s->x[23] = amp[j++];
|
||||
|
||||
/* Discard every other QMF output */
|
||||
sumeven = 0;
|
||||
sumodd = 0;
|
||||
for (i = 0; i < 12; i++)
|
||||
{
|
||||
sumodd += s->x[2*i]*qmf_coeffs[i];
|
||||
sumeven += s->x[2*i + 1]*qmf_coeffs[11 - i];
|
||||
}
|
||||
xlow = (sumeven + sumodd) >> 13;
|
||||
xhigh = (sumeven - sumodd) >> 13;
|
||||
}
|
||||
}
|
||||
/* Block 1L, SUBTRA */
|
||||
el = saturate(xlow - s->band[0].s);
|
||||
|
||||
/* Block 1L, QUANTL */
|
||||
wd = (el >= 0) ? el : -(el + 1);
|
||||
|
||||
for (i = 1; i < 30; i++)
|
||||
{
|
||||
wd1 = (q6[i]*s->band[0].det) >> 12;
|
||||
if (wd < wd1)
|
||||
break;
|
||||
}
|
||||
ilow = (el < 0) ? iln[i] : ilp[i];
|
||||
|
||||
/* Block 2L, INVQAL */
|
||||
ril = ilow >> 2;
|
||||
wd2 = qm4[ril];
|
||||
dlow = (s->band[0].det*wd2) >> 15;
|
||||
|
||||
/* Block 3L, LOGSCL */
|
||||
il4 = rl42[ril];
|
||||
wd = (s->band[0].nb*127) >> 7;
|
||||
s->band[0].nb = wd + wl[il4];
|
||||
if (s->band[0].nb < 0)
|
||||
s->band[0].nb = 0;
|
||||
else if (s->band[0].nb > 18432)
|
||||
s->band[0].nb = 18432;
|
||||
|
||||
/* Block 3L, SCALEL */
|
||||
wd1 = (s->band[0].nb >> 6) & 31;
|
||||
wd2 = 8 - (s->band[0].nb >> 11);
|
||||
wd3 = (wd2 < 0) ? (ilb[wd1] << -wd2) : (ilb[wd1] >> wd2);
|
||||
s->band[0].det = wd3 << 2;
|
||||
|
||||
block4(s, 0, dlow);
|
||||
|
||||
if (s->eight_k)
|
||||
{
|
||||
/* Just leave the high bits as zero */
|
||||
code = (0xC0 | ilow) >> (8 - s->bits_per_sample);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Block 1H, SUBTRA */
|
||||
eh = saturate(xhigh - s->band[1].s);
|
||||
|
||||
/* Block 1H, QUANTH */
|
||||
wd = (eh >= 0) ? eh : -(eh + 1);
|
||||
wd1 = (564*s->band[1].det) >> 12;
|
||||
mih = (wd >= wd1) ? 2 : 1;
|
||||
ihigh = (eh < 0) ? ihn[mih] : ihp[mih];
|
||||
|
||||
/* Block 2H, INVQAH */
|
||||
wd2 = qm2[ihigh];
|
||||
dhigh = (s->band[1].det*wd2) >> 15;
|
||||
|
||||
/* Block 3H, LOGSCH */
|
||||
ih2 = rh2[ihigh];
|
||||
wd = (s->band[1].nb*127) >> 7;
|
||||
s->band[1].nb = wd + wh[ih2];
|
||||
if (s->band[1].nb < 0)
|
||||
s->band[1].nb = 0;
|
||||
else if (s->band[1].nb > 22528)
|
||||
s->band[1].nb = 22528;
|
||||
|
||||
/* Block 3H, SCALEH */
|
||||
wd1 = (s->band[1].nb >> 6) & 31;
|
||||
wd2 = 10 - (s->band[1].nb >> 11);
|
||||
wd3 = (wd2 < 0) ? (ilb[wd1] << -wd2) : (ilb[wd1] >> wd2);
|
||||
s->band[1].det = wd3 << 2;
|
||||
|
||||
block4(s, 1, dhigh);
|
||||
code = ((ihigh << 6) | ilow) >> (8 - s->bits_per_sample);
|
||||
}
|
||||
|
||||
if (s->packed)
|
||||
{
|
||||
/* Pack the code bits */
|
||||
s->out_buffer |= (code << s->out_bits);
|
||||
s->out_bits += s->bits_per_sample;
|
||||
if (s->out_bits >= 8)
|
||||
{
|
||||
g722_data[g722_bytes++] = (uint8_t) (s->out_buffer & 0xFF);
|
||||
s->out_bits -= 8;
|
||||
s->out_buffer >>= 8;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
g722_data[g722_bytes++] = (uint8_t) code;
|
||||
}
|
||||
}
|
||||
return g722_bytes;
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
/*- End of file ------------------------------------------------------------*/
|
File diff suppressed because it is too large
Load Diff
|
@ -1,358 +0,0 @@
|
|||
/*
|
||||
* VoIPcodecs - a series of DSP components for telephony
|
||||
*
|
||||
* gsm0610_decode.c - GSM 06.10 full rate speech codec.
|
||||
*
|
||||
* Written by Steve Underwood <steveu@coppice.org>
|
||||
*
|
||||
* Copyright (C) 2006 Steve Underwood
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2, or
|
||||
* the Lesser GNU General Public License version 2.1, as published by
|
||||
* the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* This code is based on the widely used GSM 06.10 code available from
|
||||
* http://kbs.cs.tu-berlin.de/~jutta/toast.html
|
||||
*
|
||||
* $Id: gsm0610_decode.c,v 1.16 2008/02/12 12:27:48 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <assert.h>
|
||||
#include <inttypes.h>
|
||||
#if defined(HAVE_TGMATH_H)
|
||||
#include <tgmath.h>
|
||||
#endif
|
||||
#if defined(HAVE_MATH_H)
|
||||
#include <math.h>
|
||||
#endif
|
||||
#include <stdlib.h>
|
||||
#include <memory.h>
|
||||
|
||||
#include "voipcodecs/telephony.h"
|
||||
#include "voipcodecs/bitstream.h"
|
||||
#include "voipcodecs/dc_restore.h"
|
||||
#include "voipcodecs/gsm0610.h"
|
||||
|
||||
#include "gsm0610_local.h"
|
||||
|
||||
/* 4.3 FIXED POINT IMPLEMENTATION OF THE RPE-LTP DECODER */
|
||||
|
||||
static void postprocessing(gsm0610_state_t *s, int16_t amp[])
|
||||
{
|
||||
int k;
|
||||
int16_t msr;
|
||||
int16_t tmp;
|
||||
|
||||
msr = s->msr;
|
||||
for (k = 0; k < GSM0610_FRAME_LEN; k++)
|
||||
{
|
||||
tmp = gsm_mult_r(msr, 28180);
|
||||
/* De-emphasis */
|
||||
msr = gsm_add(amp[k], tmp);
|
||||
/* Truncation & upscaling */
|
||||
amp[k] = (int16_t) (gsm_add(msr, msr) & 0xFFF8);
|
||||
}
|
||||
/*endfor*/
|
||||
s->msr = msr;
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
static void decode_a_frame(gsm0610_state_t *s,
|
||||
int16_t amp[GSM0610_FRAME_LEN],
|
||||
gsm0610_frame_t *f)
|
||||
{
|
||||
int j;
|
||||
int k;
|
||||
int16_t erp[40];
|
||||
int16_t wt[GSM0610_FRAME_LEN];
|
||||
int16_t *drp;
|
||||
|
||||
drp = s->dp0 + 120;
|
||||
for (j = 0; j < 4; j++)
|
||||
{
|
||||
gsm0610_rpe_decoding(s, f->xmaxc[j], f->Mc[j], f->xMc[j], erp);
|
||||
gsm0610_long_term_synthesis_filtering(s, f->Nc[j], f->bc[j], erp, drp);
|
||||
for (k = 0; k < 40; k++)
|
||||
wt[j*40 + k] = drp[k];
|
||||
/*endfor*/
|
||||
}
|
||||
/*endfor*/
|
||||
|
||||
gsm0610_short_term_synthesis_filter(s, f->LARc, wt, amp);
|
||||
postprocessing(s, amp);
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
int gsm0610_unpack_none(gsm0610_frame_t *s, const uint8_t c[])
|
||||
{
|
||||
int i;
|
||||
int j;
|
||||
int k;
|
||||
|
||||
i = 0;
|
||||
for (j = 0; j < 8; j++)
|
||||
s->LARc[j] = c[i++];
|
||||
for (j = 0; j < 4; j++)
|
||||
{
|
||||
s->Nc[j] = c[i++];
|
||||
s->bc[j] = c[i++];
|
||||
s->Mc[j] = c[i++];
|
||||
s->xmaxc[j] = c[i++];
|
||||
for (k = 0; k < 13; k++)
|
||||
s->xMc[j][k] = c[i++];
|
||||
}
|
||||
return 76;
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
int gsm0610_unpack_wav49(gsm0610_frame_t *s, const uint8_t c[])
|
||||
{
|
||||
uint16_t sr;
|
||||
int i;
|
||||
|
||||
sr = *c++;
|
||||
s->LARc[0] = sr & 0x3F;
|
||||
sr >>= 6;
|
||||
sr |= (uint16_t) *c++ << 2;
|
||||
s->LARc[1] = sr & 0x3F;
|
||||
sr >>= 6;
|
||||
sr |= (uint16_t) *c++ << 4;
|
||||
s->LARc[2] = sr & 0x1F;
|
||||
sr >>= 5;
|
||||
s->LARc[3] = sr & 0x1F;
|
||||
sr >>= 5;
|
||||
sr |= (uint16_t) *c++ << 2;
|
||||
s->LARc[4] = sr & 0xF;
|
||||
sr >>= 4;
|
||||
s->LARc[5] = sr & 0xF;
|
||||
sr >>= 4;
|
||||
sr |= (uint16_t) *c++ << 2;
|
||||
s->LARc[6] = sr & 0x7;
|
||||
sr >>= 3;
|
||||
s->LARc[7] = sr & 0x7;
|
||||
sr >>= 3;
|
||||
|
||||
for (i = 0; i < 4; i++)
|
||||
{
|
||||
sr |= (uint16_t) *c++ << 4;
|
||||
s->Nc[i] = sr & 0x7F;
|
||||
sr >>= 7;
|
||||
s->bc[i] = sr & 0x3;
|
||||
sr >>= 2;
|
||||
s->Mc[i] = sr & 0x3;
|
||||
sr >>= 2;
|
||||
sr |= (uint16_t) *c++ << 1;
|
||||
s->xmaxc[i] = sr & 0x3F;
|
||||
sr >>= 6;
|
||||
s->xMc[i][0] = sr & 0x7;
|
||||
sr >>= 3;
|
||||
sr = *c++;
|
||||
s->xMc[i][1] = sr & 0x7;
|
||||
sr >>= 3;
|
||||
s->xMc[i][2] = sr & 0x7;
|
||||
sr >>= 3;
|
||||
sr |= (uint16_t) *c++ << 2;
|
||||
s->xMc[i][3] = sr & 0x7;
|
||||
sr >>= 3;
|
||||
s->xMc[i][4] = sr & 0x7;
|
||||
sr >>= 3;
|
||||
s->xMc[i][5] = sr & 0x7;
|
||||
sr >>= 3;
|
||||
sr |= (uint16_t) *c++ << 1;
|
||||
s->xMc[i][6] = sr & 0x7;
|
||||
sr >>= 3;
|
||||
s->xMc[i][7] = sr & 0x7;
|
||||
sr >>= 3;
|
||||
s->xMc[i][8] = sr & 0x7;
|
||||
sr >>= 3;
|
||||
sr = *c++;
|
||||
s->xMc[i][9] = sr & 0x7;
|
||||
sr >>= 3;
|
||||
s->xMc[i][10] = sr & 0x7;
|
||||
sr >>= 3;
|
||||
sr |= (uint16_t) *c++ << 2;
|
||||
s->xMc[i][11] = sr & 0x7;
|
||||
sr >>= 3;
|
||||
s->xMc[i][12] = sr & 0x7;
|
||||
sr >>= 3;
|
||||
}
|
||||
|
||||
s++;
|
||||
sr |= (uint16_t) *c++ << 4;
|
||||
s->LARc[0] = sr & 0x3F;
|
||||
sr >>= 6;
|
||||
s->LARc[1] = sr & 0x3F;
|
||||
sr >>= 6;
|
||||
sr = *c++;
|
||||
s->LARc[2] = sr & 0x1F;
|
||||
sr >>= 5;
|
||||
sr |= (uint16_t) *c++ << 3;
|
||||
s->LARc[3] = sr & 0x1F;
|
||||
sr >>= 5;
|
||||
s->LARc[4] = sr & 0xF;
|
||||
sr >>= 4;
|
||||
sr |= (uint16_t) *c++ << 2;
|
||||
s->LARc[5] = sr & 0xF;
|
||||
sr >>= 4;
|
||||
s->LARc[6] = sr & 0x7;
|
||||
sr >>= 3;
|
||||
s->LARc[7] = sr & 0x7;
|
||||
sr >>= 3;
|
||||
|
||||
for (i = 0; i < 4; i++)
|
||||
{
|
||||
sr = *c++;
|
||||
s->Nc[i] = sr & 0x7F;
|
||||
sr >>= 7;
|
||||
sr |= (uint16_t) *c++ << 1;
|
||||
s->bc[i] = sr & 0x3;
|
||||
sr >>= 2;
|
||||
s->Mc[i] = sr & 0x3;
|
||||
sr >>= 2;
|
||||
sr |= (uint16_t) *c++ << 5;
|
||||
s->xmaxc[i] = sr & 0x3F;
|
||||
sr >>= 6;
|
||||
s->xMc[i][0] = sr & 0x7;
|
||||
sr >>= 3;
|
||||
s->xMc[i][1] = sr & 0x7;
|
||||
sr >>= 3;
|
||||
sr |= (uint16_t) *c++ << 1;
|
||||
s->xMc[i][2] = sr & 0x7;
|
||||
sr >>= 3;
|
||||
s->xMc[i][3] = sr & 0x7;
|
||||
sr >>= 3;
|
||||
s->xMc[i][4] = sr & 0x7;
|
||||
sr >>= 3;
|
||||
sr = *c++;
|
||||
s->xMc[i][5] = sr & 0x7;
|
||||
sr >>= 3;
|
||||
s->xMc[i][6] = sr & 0x7;
|
||||
sr >>= 3;
|
||||
sr |= (uint16_t) *c++ << 2;
|
||||
s->xMc[i][7] = sr & 0x7;
|
||||
sr >>= 3;
|
||||
s->xMc[i][8] = sr & 0x7;
|
||||
sr >>= 3;
|
||||
s->xMc[i][9] = sr & 0x7;
|
||||
sr >>= 3;
|
||||
sr |= (uint16_t) *c++ << 1;
|
||||
s->xMc[i][10] = sr & 0x7;
|
||||
sr >>= 3;
|
||||
s->xMc[i][11] = sr & 0x7;
|
||||
sr >>= 3;
|
||||
s->xMc[i][12] = sr & 0x7;
|
||||
sr >>= 3;
|
||||
}
|
||||
return 65;
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
int gsm0610_unpack_voip(gsm0610_frame_t *s, const uint8_t c[33])
|
||||
{
|
||||
int i;
|
||||
|
||||
s->LARc[0] = (*c++ & 0xF) << 2;
|
||||
s->LARc[0] |= (*c >> 6) & 0x3;
|
||||
s->LARc[1] = *c++ & 0x3F;
|
||||
s->LARc[2] = (*c >> 3) & 0x1F;
|
||||
s->LARc[3] = (*c++ & 0x7) << 2;
|
||||
s->LARc[3] |= (*c >> 6) & 0x3;
|
||||
s->LARc[4] = (*c >> 2) & 0xF;
|
||||
s->LARc[5] = (*c++ & 0x3) << 2;
|
||||
s->LARc[5] |= (*c >> 6) & 0x3;
|
||||
s->LARc[6] = (*c >> 3) & 0x7;
|
||||
s->LARc[7] = *c++ & 0x7;
|
||||
|
||||
for (i = 0; i < 4; i++)
|
||||
{
|
||||
s->Nc[i] = (*c >> 1) & 0x7F;
|
||||
s->bc[i] = (*c++ & 0x1) << 1;
|
||||
s->bc[i] |= (*c >> 7) & 0x1;
|
||||
s->Mc[i] = (*c >> 5) & 0x3;
|
||||
s->xmaxc[i] = (*c++ & 0x1F) << 1;
|
||||
s->xmaxc[i] |= (*c >> 7) & 0x1;
|
||||
s->xMc[i][0] = (*c >> 4) & 0x7;
|
||||
s->xMc[i][1] = (*c >> 1) & 0x7;
|
||||
s->xMc[i][2] = (*c++ & 0x1) << 2;
|
||||
s->xMc[i][2] |= (*c >> 6) & 0x3;
|
||||
s->xMc[i][3] = (*c >> 3) & 0x7;
|
||||
s->xMc[i][4] = *c++ & 0x7;
|
||||
s->xMc[i][5] = (*c >> 5) & 0x7;
|
||||
s->xMc[i][6] = (*c >> 2) & 0x7;
|
||||
s->xMc[i][7] = (*c++ & 0x3) << 1;
|
||||
s->xMc[i][7] |= (*c >> 7) & 0x1;
|
||||
s->xMc[i][8] = (*c >> 4) & 0x7;
|
||||
s->xMc[i][9] = (*c >> 1) & 0x7;
|
||||
s->xMc[i][10] = (*c++ & 0x1) << 2;
|
||||
s->xMc[i][10] |= (*c >> 6) & 0x3;
|
||||
s->xMc[i][11] = (*c >> 3) & 0x7;
|
||||
s->xMc[i][12] = *c++ & 0x7;
|
||||
}
|
||||
return 33;
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
int gsm0610_decode(gsm0610_state_t *s, int16_t amp[], const uint8_t code[], int len)
|
||||
{
|
||||
gsm0610_frame_t frame[2];
|
||||
int bytes;
|
||||
int samples;
|
||||
int i;
|
||||
|
||||
samples = 0;
|
||||
for (i = 0; i < len; i += bytes)
|
||||
{
|
||||
switch (s->packing)
|
||||
{
|
||||
default:
|
||||
case GSM0610_PACKING_NONE:
|
||||
if ((bytes = gsm0610_unpack_none(frame, &code[i])) >= 0)
|
||||
{
|
||||
decode_a_frame(s, &[samples], frame);
|
||||
samples += GSM0610_FRAME_LEN;
|
||||
}
|
||||
break;
|
||||
case GSM0610_PACKING_WAV49:
|
||||
if ((bytes = gsm0610_unpack_wav49(frame, &code[i])) >= 0)
|
||||
{
|
||||
decode_a_frame(s, &[samples], frame);
|
||||
samples += GSM0610_FRAME_LEN;
|
||||
decode_a_frame(s, &[samples], frame + 1);
|
||||
samples += GSM0610_FRAME_LEN;
|
||||
}
|
||||
break;
|
||||
case GSM0610_PACKING_VOIP:
|
||||
if ((bytes = gsm0610_unpack_voip(frame, &code[i])) >= 0)
|
||||
{
|
||||
decode_a_frame(s, &[samples], frame);
|
||||
samples += GSM0610_FRAME_LEN;
|
||||
}
|
||||
break;
|
||||
}
|
||||
/*endswitch*/
|
||||
if (bytes < 0)
|
||||
return 0;
|
||||
}
|
||||
/*endfor*/
|
||||
return samples;
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
/*- End of file ------------------------------------------------------------*/
|
|
@ -1,336 +0,0 @@
|
|||
/*
|
||||
* VoIPcodecs - a series of DSP components for telephony
|
||||
*
|
||||
* gsm0610_encode.c - GSM 06.10 full rate speech codec.
|
||||
*
|
||||
* Written by Steve Underwood <steveu@coppice.org>
|
||||
*
|
||||
* Copyright (C) 2006 Steve Underwood
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2, or
|
||||
* the Lesser GNU General Public License version 2.1, as published by
|
||||
* the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* This code is based on the widely used GSM 06.10 code available from
|
||||
* http://kbs.cs.tu-berlin.de/~jutta/toast.html
|
||||
*
|
||||
* $Id: gsm0610_encode.c,v 1.19 2008/02/12 12:27:48 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <assert.h>
|
||||
#include <inttypes.h>
|
||||
#if defined(HAVE_TGMATH_H)
|
||||
#include <tgmath.h>
|
||||
#endif
|
||||
#if defined(HAVE_MATH_H)
|
||||
#include <math.h>
|
||||
#endif
|
||||
#include <stdlib.h>
|
||||
#include <memory.h>
|
||||
|
||||
#include "voipcodecs/telephony.h"
|
||||
#include "voipcodecs/bitstream.h"
|
||||
#include "voipcodecs/dc_restore.h"
|
||||
#include "voipcodecs/gsm0610.h"
|
||||
|
||||
#include "gsm0610_local.h"
|
||||
|
||||
/* 4.2 FIXED POINT IMPLEMENTATION OF THE RPE-LTP CODER */
|
||||
|
||||
/* The RPE-LTD coder works on a frame by frame basis. The length of
|
||||
the frame is equal to 160 samples. Some computations are done
|
||||
once per frame to produce at the output of the coder the
|
||||
LARc[1..8] parameters which are the coded LAR coefficients and
|
||||
also to realize the inverse filtering operation for the entire
|
||||
frame (160 samples of signal d[0..159]). These parts produce at
|
||||
the output of the coder:
|
||||
|
||||
Procedure 4.2.11 to 4.2.18 are to be executed four times per
|
||||
frame. That means once for each sub-segment RPE-LTP analysis of
|
||||
40 samples. These parts produce at the output of the coder.
|
||||
*/
|
||||
static void encode_a_frame(gsm0610_state_t *s, gsm0610_frame_t *f, const int16_t amp[])
|
||||
{
|
||||
int k;
|
||||
int16_t *dp;
|
||||
int16_t *dpp;
|
||||
int16_t so[GSM0610_FRAME_LEN];
|
||||
int i;
|
||||
|
||||
dp = s->dp0 + 120;
|
||||
dpp = dp;
|
||||
gsm0610_preprocess(s, amp, so);
|
||||
gsm0610_lpc_analysis(s, so, f->LARc);
|
||||
gsm0610_short_term_analysis_filter(s, f->LARc, so);
|
||||
|
||||
for (k = 0; k < 4; k++)
|
||||
{
|
||||
gsm0610_long_term_predictor(s,
|
||||
so + k*40,
|
||||
dp,
|
||||
s->e + 5,
|
||||
dpp,
|
||||
&f->Nc[k],
|
||||
&f->bc[k]);
|
||||
gsm0610_rpe_encoding(s, s->e + 5, &f->xmaxc[k], &f->Mc[k], f->xMc[k]);
|
||||
|
||||
for (i = 0; i < 40; i++)
|
||||
dp[i] = gsm_add(s->e[5 + i], dpp[i]);
|
||||
/*endfor*/
|
||||
dp += 40;
|
||||
dpp += 40;
|
||||
}
|
||||
/*endfor*/
|
||||
memcpy((char *) s->dp0,
|
||||
(char *) (s->dp0 + GSM0610_FRAME_LEN),
|
||||
120*sizeof(*s->dp0));
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
gsm0610_state_t *gsm0610_init(gsm0610_state_t *s, int packing)
|
||||
{
|
||||
if (s == NULL)
|
||||
{
|
||||
s = (gsm0610_state_t *) malloc(sizeof (*s));
|
||||
if (s == NULL)
|
||||
return NULL;
|
||||
/*endif*/
|
||||
}
|
||||
/*endif*/
|
||||
memset((char *) s, '\0', sizeof (gsm0610_state_t));
|
||||
s->nrp = 40;
|
||||
s->packing = packing;
|
||||
return s;
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
int gsm0610_set_packing(gsm0610_state_t *s, int packing)
|
||||
{
|
||||
s->packing = packing;
|
||||
return 0;
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
int gsm0610_release(gsm0610_state_t *s)
|
||||
{
|
||||
if (s)
|
||||
free(s);
|
||||
/*endif*/
|
||||
return 0;
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
int gsm0610_pack_none(uint8_t c[], const gsm0610_frame_t *s)
|
||||
{
|
||||
int i;
|
||||
int j;
|
||||
int k;
|
||||
|
||||
i = 0;
|
||||
for (j = 0; j < 8; j++)
|
||||
c[i++] = (uint8_t) s->LARc[j];
|
||||
for (j = 0; j < 4; j++)
|
||||
{
|
||||
c[i++] = (uint8_t) s->Nc[j];
|
||||
c[i++] = (uint8_t) s->bc[j];
|
||||
c[i++] = (uint8_t) s->Mc[j];
|
||||
c[i++] = (uint8_t) s->xmaxc[j];
|
||||
for (k = 0; k < 13; k++)
|
||||
c[i++] = (uint8_t) s->xMc[j][k];
|
||||
}
|
||||
/*endfor*/
|
||||
return 76;
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
int gsm0610_pack_wav49(uint8_t c[], const gsm0610_frame_t *s)
|
||||
{
|
||||
uint16_t sr;
|
||||
int i;
|
||||
|
||||
sr = 0;
|
||||
sr = (sr >> 6) | (s->LARc[0] << 10);
|
||||
sr = (sr >> 6) | (s->LARc[1] << 10);
|
||||
*c++ = (uint8_t)(sr >> 4);
|
||||
sr = (sr >> 5) | (s->LARc[2] << 11);
|
||||
*c++ = (uint8_t)(sr >> 7);
|
||||
sr = (sr >> 5) | (s->LARc[3] << 11);
|
||||
sr = (sr >> 4) | (s->LARc[4] << 12);
|
||||
*c++ = (uint8_t)(sr >> 6);
|
||||
sr = (sr >> 4) | (s->LARc[5] << 12);
|
||||
sr = (sr >> 3) | (s->LARc[6] << 13);
|
||||
*c++ = (uint8_t)(sr >> 7);
|
||||
sr = (sr >> 3) | (s->LARc[7] << 13);
|
||||
|
||||
for (i = 0; i < 4; i++)
|
||||
{
|
||||
sr = (sr >> 7) | (s->Nc[i] << 9);
|
||||
*c++ = (uint8_t)(sr >> 5);
|
||||
sr = (sr >> 2) | (s->bc[i] << 14);
|
||||
sr = (sr >> 2) | (s->Mc[i] << 14);
|
||||
sr = (sr >> 6) | (s->xmaxc[i] << 10);
|
||||
*c++ = (uint8_t)(sr >> 3);
|
||||
sr = (sr >> 3) | (s->xMc[i][0] << 13);
|
||||
*c++ = (uint8_t)(sr >> 8);
|
||||
sr = (sr >> 3) | (s->xMc[i][1] << 13);
|
||||
sr = (sr >> 3) | (s->xMc[i][2] << 13);
|
||||
sr = (sr >> 3) | (s->xMc[i][3] << 13);
|
||||
*c++ = (uint8_t)(sr >> 7);
|
||||
sr = (sr >> 3) | (s->xMc[i][4] << 13);
|
||||
sr = (sr >> 3) | (s->xMc[i][5] << 13);
|
||||
sr = (sr >> 3) | (s->xMc[i][6] << 13);
|
||||
*c++ = (uint8_t)(sr >> 6);
|
||||
sr = (sr >> 3) | (s->xMc[i][7] << 13);
|
||||
sr = (sr >> 3) | (s->xMc[i][8] << 13);
|
||||
*c++ = (uint8_t)(sr >> 8);
|
||||
sr = (sr >> 3) | (s->xMc[i][9] << 13);
|
||||
sr = (sr >> 3) | (s->xMc[i][10] << 13);
|
||||
sr = (sr >> 3) | (s->xMc[i][11] << 13);
|
||||
*c++ = (uint8_t)(sr >> 7);
|
||||
sr = (sr >> 3) | (s->xMc[i][12] << 13);
|
||||
}
|
||||
/*endfor*/
|
||||
|
||||
s++;
|
||||
sr = (sr >> 6) | (s->LARc[0] << 10);
|
||||
*c++ = (uint8_t)(sr >> 6);
|
||||
sr = (sr >> 6) | (s->LARc[1] << 10);
|
||||
*c++ = (uint8_t)(sr >> 8);
|
||||
sr = (sr >> 5) | (s->LARc[2] << 11);
|
||||
sr = (sr >> 5) | (s->LARc[3] << 11);
|
||||
*c++ = (uint8_t)(sr >> 6);
|
||||
sr = (sr >> 4) | (s->LARc[4] << 12);
|
||||
sr = (sr >> 4) | (s->LARc[5] << 12);
|
||||
*c++ = (uint8_t)(sr >> 6);
|
||||
sr = (sr >> 3) | (s->LARc[6] << 13);
|
||||
sr = (sr >> 3) | (s->LARc[7] << 13);
|
||||
*c++ = (uint8_t)(sr >> 8);
|
||||
|
||||
for (i = 0; i < 4; i++)
|
||||
{
|
||||
sr = (sr >> 7) | (s->Nc[i] << 9);
|
||||
sr = (sr >> 2) | (s->bc[i] << 14);
|
||||
*c++ = (uint8_t)(sr >> 7);
|
||||
sr = (sr >> 2) | (s->Mc[i] << 14);
|
||||
sr = (sr >> 6) | (s->xmaxc[i] << 10);
|
||||
*c++ = (uint8_t)(sr >> 7);
|
||||
sr = (sr >> 3) | (s->xMc[i][0] << 13);
|
||||
sr = (sr >> 3) | (s->xMc[i][1] << 13);
|
||||
sr = (sr >> 3) | (s->xMc[i][2] << 13);
|
||||
*c++ = (uint8_t)(sr >> 6);
|
||||
sr = (sr >> 3) | (s->xMc[i][3] << 13);
|
||||
sr = (sr >> 3) | (s->xMc[i][4] << 13);
|
||||
*c++ = (uint8_t)(sr >> 8);
|
||||
sr = (sr >> 3) | (s->xMc[i][5] << 13);
|
||||
sr = (sr >> 3) | (s->xMc[i][6] << 13);
|
||||
sr = (sr >> 3) | (s->xMc[i][7] << 13);
|
||||
*c++ = (uint8_t)(sr >> 7);
|
||||
sr = (sr >> 3) | (s->xMc[i][8] << 13);
|
||||
sr = (sr >> 3) | (s->xMc[i][9] << 13);
|
||||
sr = (sr >> 3) | (s->xMc[i][10] << 13);
|
||||
*c++ = (uint8_t)(sr >> 6);
|
||||
sr = (sr >> 3) | (s->xMc[i][11] << 13);
|
||||
sr = (sr >> 3) | (s->xMc[i][12] << 13);
|
||||
*c++ = (uint8_t)(sr >> 8);
|
||||
}
|
||||
/*endfor*/
|
||||
return 65;
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
int gsm0610_pack_voip(uint8_t c[33], const gsm0610_frame_t *s)
|
||||
{
|
||||
int i;
|
||||
|
||||
*c++ = (uint8_t)(((GSM0610_MAGIC & 0xF) << 4)
|
||||
| ((s->LARc[0] >> 2) & 0xF));
|
||||
*c++ = (uint8_t)(((s->LARc[0] & 0x3) << 6)
|
||||
| (s->LARc[1] & 0x3F));
|
||||
*c++ = (uint8_t)(((s->LARc[2] & 0x1F) << 3)
|
||||
| ((s->LARc[3] >> 2) & 0x7));
|
||||
*c++ = (uint8_t)(((s->LARc[3] & 0x3) << 6)
|
||||
| ((s->LARc[4] & 0xF) << 2)
|
||||
| ((s->LARc[5] >> 2) & 0x3));
|
||||
*c++ = (uint8_t)(((s->LARc[5] & 0x3) << 6)
|
||||
| ((s->LARc[6] & 0x7) << 3)
|
||||
| (s->LARc[7] & 0x7));
|
||||
|
||||
for (i = 0; i < 4; i++)
|
||||
{
|
||||
*c++ = (uint8_t)(((s->Nc[i] & 0x7F) << 1)
|
||||
| ((s->bc[i] >> 1) & 0x1));
|
||||
*c++ = (uint8_t)(((s->bc[i] & 0x1) << 7)
|
||||
| ((s->Mc[i] & 0x3) << 5)
|
||||
| ((s->xmaxc[i] >> 1) & 0x1F));
|
||||
*c++ = (uint8_t)(((s->xmaxc[i] & 0x1) << 7)
|
||||
| ((s->xMc[i][0] & 0x7) << 4)
|
||||
| ((s->xMc[i][1] & 0x7) << 1)
|
||||
| ((s->xMc[i][2] >> 2) & 0x1));
|
||||
*c++ = (uint8_t)(((s->xMc[i][2] & 0x3) << 6)
|
||||
| ((s->xMc[i][3] & 0x7) << 3)
|
||||
| (s->xMc[i][4] & 0x7));
|
||||
*c++ = (uint8_t)(((s->xMc[i][5] & 0x7) << 5)
|
||||
| ((s->xMc[i][6] & 0x7) << 2)
|
||||
| ((s->xMc[i][7] >> 1) & 0x3));
|
||||
*c++ = (uint8_t)(((s->xMc[i][7] & 0x1) << 7)
|
||||
| ((s->xMc[i][8] & 0x7) << 4)
|
||||
| ((s->xMc[i][9] & 0x7) << 1)
|
||||
| ((s->xMc[i][10] >> 2) & 0x1));
|
||||
*c++ = (uint8_t)(((s->xMc[i][10] & 0x3) << 6)
|
||||
| ((s->xMc[i][11] & 0x7) << 3)
|
||||
| (s->xMc[i][12] & 0x7));
|
||||
}
|
||||
/*endfor*/
|
||||
return 33;
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
int gsm0610_encode(gsm0610_state_t *s, uint8_t code[], const int16_t amp[], int len)
|
||||
{
|
||||
gsm0610_frame_t frame[2];
|
||||
int bytes;
|
||||
int i;
|
||||
|
||||
bytes = 0;
|
||||
for (i = 0; i < len; i += GSM0610_FRAME_LEN)
|
||||
{
|
||||
encode_a_frame(s, frame, &[i]);
|
||||
switch (s->packing)
|
||||
{
|
||||
case GSM0610_PACKING_WAV49:
|
||||
i += GSM0610_FRAME_LEN;
|
||||
encode_a_frame(s, frame + 1, &[i]);
|
||||
bytes += gsm0610_pack_wav49(&code[bytes], frame);
|
||||
break;
|
||||
case GSM0610_PACKING_VOIP:
|
||||
bytes += gsm0610_pack_voip(&code[bytes], frame);
|
||||
break;
|
||||
default:
|
||||
bytes += gsm0610_pack_none(&code[bytes], frame);
|
||||
break;
|
||||
}
|
||||
/*endswitch*/
|
||||
}
|
||||
/*endfor*/
|
||||
return bytes;
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
/*- End of file ------------------------------------------------------------*/
|
|
@ -1,229 +0,0 @@
|
|||
/*
|
||||
* VoIPcodecs - a series of DSP components for telephony
|
||||
*
|
||||
* gsm0610_local.h - GSM 06.10 full rate speech codec.
|
||||
*
|
||||
* Written by Steve Underwood <steveu@coppice.org>
|
||||
*
|
||||
* Copyright (C) 2006 Steve Underwood
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* This code is based on the widely used GSM 06.10 code available from
|
||||
* http://kbs.cs.tu-berlin.de/~jutta/toast.html
|
||||
*
|
||||
* $Id: gsm0610_local.h,v 1.7 2007/01/03 14:15:35 steveu Exp $
|
||||
*/
|
||||
|
||||
#if !defined(_GSM0610_LOCAL_H_)
|
||||
#define _GSM0610_LOCAL_H_
|
||||
|
||||
#define GSM0610_FRAME_LEN 160
|
||||
|
||||
#define GSM0610_MAGIC 0xD
|
||||
|
||||
static __inline__ int16_t gsm_add(int16_t a, int16_t b)
|
||||
{
|
||||
#if defined(__GNUC__) && defined(__i386__)
|
||||
__asm__ __volatile__(
|
||||
" addw %2,%0;\n"
|
||||
" jno 0f;\n"
|
||||
" movw $0x7fff,%0;\n"
|
||||
" adcw $0,%0;\n"
|
||||
"0:"
|
||||
: "=r" (a)
|
||||
: "0" (a), "ir" (b)
|
||||
: "cc"
|
||||
);
|
||||
return a;
|
||||
#else
|
||||
int32_t sum;
|
||||
|
||||
sum = (int32_t) a + (int32_t) b;
|
||||
return saturate(sum);
|
||||
#endif
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
static __inline__ int32_t gsm_l_add(int32_t a, int32_t b)
|
||||
{
|
||||
#if defined(__i386__)
|
||||
__asm__ __volatile__(
|
||||
" addl %2,%0;\n"
|
||||
" jno 0f;\n"
|
||||
" movl $0x7fffffff,%0;\n"
|
||||
" adcl $0,%0;\n"
|
||||
"0:"
|
||||
: "=r" (a)
|
||||
: "0" (a), "ir" (b)
|
||||
: "cc"
|
||||
);
|
||||
return a;
|
||||
#else
|
||||
uint32_t A;
|
||||
|
||||
if (a < 0)
|
||||
{
|
||||
if (b >= 0)
|
||||
return a + b;
|
||||
/*endif*/
|
||||
A = (uint32_t) -(a + 1) + (uint32_t) -(b + 1);
|
||||
return (A >= INT32_MAX) ? INT32_MIN : -(int32_t) A - 2;
|
||||
}
|
||||
/*endif*/
|
||||
if (b <= 0)
|
||||
return a + b;
|
||||
/*endif*/
|
||||
A = (uint32_t) a + (uint32_t) b;
|
||||
return (A > INT32_MAX) ? INT32_MAX : A;
|
||||
#endif
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
static __inline__ int16_t gsm_sub(int16_t a, int16_t b)
|
||||
{
|
||||
int32_t diff;
|
||||
|
||||
diff = (int32_t) a - (int32_t) b;
|
||||
return saturate(diff);
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
static __inline__ int16_t gsm_mult(int16_t a, int16_t b)
|
||||
{
|
||||
if (a == INT16_MIN && b == INT16_MIN)
|
||||
return INT16_MAX;
|
||||
/*endif*/
|
||||
return (int16_t) (((int32_t) a * (int32_t) b) >> 15);
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
static __inline__ int32_t gsm_l_mult(int16_t a, int16_t b)
|
||||
{
|
||||
assert (a != INT16_MIN || b != INT16_MIN);
|
||||
return ((int32_t) a * (int32_t) b) << 1;
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
static __inline__ int16_t gsm_mult_r(int16_t a, int16_t b)
|
||||
{
|
||||
int32_t prod;
|
||||
|
||||
if (b == INT16_MIN && a == INT16_MIN)
|
||||
return INT16_MAX;
|
||||
/*endif*/
|
||||
prod = (int32_t) a * (int32_t) b + 16384;
|
||||
prod >>= 15;
|
||||
return (int16_t) (prod & 0xFFFF);
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
static __inline__ int16_t gsm_abs(int16_t a)
|
||||
{
|
||||
return (a == INT16_MIN) ? INT16_MAX : (int16_t) abs(a);
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
static __inline__ int16_t gsm_asr(int16_t a, int n)
|
||||
{
|
||||
if (n >= 16)
|
||||
return (int16_t)(-(a < 0));
|
||||
/*endif*/
|
||||
if (n <= -16)
|
||||
return 0;
|
||||
/*endif*/
|
||||
if (n < 0)
|
||||
return (int16_t)(a << -n);
|
||||
/*endif*/
|
||||
return (int16_t)(a >> n);
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
static __inline__ int16_t gsm_asl(int16_t a, int n)
|
||||
{
|
||||
if (n >= 16)
|
||||
return 0;
|
||||
/*endif*/
|
||||
if (n <= -16)
|
||||
return (int16_t)(-(a < 0));
|
||||
/*endif*/
|
||||
if (n < 0)
|
||||
return gsm_asr(a, -n);
|
||||
/*endif*/
|
||||
return (int16_t)(a << n);
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
extern void gsm0610_long_term_predictor(gsm0610_state_t *s,
|
||||
int16_t d[40],
|
||||
int16_t *dp, /* [-120..-1] d' IN */
|
||||
int16_t e[40],
|
||||
int16_t dpp[40],
|
||||
int16_t *Nc,
|
||||
int16_t *bc);
|
||||
|
||||
extern void gsm0610_lpc_analysis(gsm0610_state_t *s,
|
||||
int16_t amp[160],
|
||||
int16_t LARc[8]);
|
||||
|
||||
extern void gsm0610_preprocess(gsm0610_state_t *s,
|
||||
const int16_t amp[],
|
||||
int16_t so[]);
|
||||
|
||||
extern void gsm0610_short_term_analysis_filter(gsm0610_state_t *s,
|
||||
int16_t LARc[8],
|
||||
int16_t amp[160]);
|
||||
|
||||
extern void gsm0610_long_term_synthesis_filtering(gsm0610_state_t *s,
|
||||
int16_t Ncr,
|
||||
int16_t bcr,
|
||||
int16_t erp[40],
|
||||
int16_t *drp); /* [-120..-1] IN, [0..40] OUT */
|
||||
|
||||
extern void gsm0610_rpe_decoding(gsm0610_state_t *s,
|
||||
int16_t xmaxcr,
|
||||
int16_t Mcr,
|
||||
int16_t *xMcr, /* [0..12], 3 bits IN */
|
||||
int16_t erp[40]);
|
||||
|
||||
extern void gsm0610_rpe_encoding(gsm0610_state_t *s,
|
||||
int16_t *e, /* [-5..-1][0..39][40..44] IN/OUT */
|
||||
int16_t *xmaxc,
|
||||
int16_t *Mc,
|
||||
int16_t xMc[13]);
|
||||
|
||||
extern void gsm0610_short_term_synthesis_filter(gsm0610_state_t *s,
|
||||
int16_t LARcr[8],
|
||||
int16_t drp[40],
|
||||
int16_t amp[160]);
|
||||
|
||||
extern int16_t gsm0610_norm(int32_t a);
|
||||
|
||||
#if defined(__GNUC__) && defined(__i386__)
|
||||
|
||||
void gsm0610_vec_vsraw(const int16_t *p, int n, int bits);
|
||||
|
||||
int32_t gsm0610_vec_iprod(const int16_t *p, const int16_t *q, int n);
|
||||
|
||||
int32_t gsm0610_vec_maxmin(const int16_t *p, int n, int16_t *out);
|
||||
|
||||
int32_t gsm0610_max_cross_corr(const int16_t *wt, const int16_t *dp, int16_t *Nc_out);
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
/*- End of include ---------------------------------------------------------*/
|
|
@ -1,409 +0,0 @@
|
|||
/*
|
||||
* VoIPcodecs - a series of DSP components for telephony
|
||||
*
|
||||
* gsm0610_long_term.c - GSM 06.10 full rate speech codec.
|
||||
*
|
||||
* Written by Steve Underwood <steveu@coppice.org>
|
||||
*
|
||||
* Copyright (C) 2006 Steve Underwood
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2, or
|
||||
* the Lesser GNU General Public License version 2.1, as published by
|
||||
* the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* This code is based on the widely used GSM 06.10 code available from
|
||||
* http://kbs.cs.tu-berlin.de/~jutta/toast.html
|
||||
*
|
||||
* $Id: gsm0610_long_term.c,v 1.11 2008/02/09 15:31:36 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <assert.h>
|
||||
#include <inttypes.h>
|
||||
#if defined(HAVE_TGMATH_H)
|
||||
#include <tgmath.h>
|
||||
#endif
|
||||
#if defined(HAVE_MATH_H)
|
||||
#include <math.h>
|
||||
#endif
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "voipcodecs/telephony.h"
|
||||
#include "voipcodecs/bitstream.h"
|
||||
#include "voipcodecs/dc_restore.h"
|
||||
#include "voipcodecs/gsm0610.h"
|
||||
|
||||
#include "gsm0610_local.h"
|
||||
|
||||
/* Table 4.3a Decision level of the LTP gain quantizer */
|
||||
static const int16_t gsm_DLB[4] =
|
||||
{
|
||||
6554, 16384, 26214, 32767
|
||||
};
|
||||
|
||||
/* Table 4.3b Quantization levels of the LTP gain quantizer */
|
||||
static const int16_t gsm_QLB[4] =
|
||||
{
|
||||
3277, 11469, 21299, 32767
|
||||
};
|
||||
|
||||
/* 4.2.11 .. 4.2.12 LONG TERM PREDICTOR (LTP) SECTION */
|
||||
|
||||
#if defined(__GNUC__) && defined(__i386__)
|
||||
int32_t gsm0610_max_cross_corr(const int16_t *wt, const int16_t *dp, int16_t *Nc_out)
|
||||
{
|
||||
int32_t lmax;
|
||||
int32_t out;
|
||||
|
||||
__asm__ __volatile__(
|
||||
" emms;\n"
|
||||
" pushl %%ebx;\n"
|
||||
" movl $0,%%edx;\n" /* Will be maximum inner-product */
|
||||
" movl $40,%%ebx;\n"
|
||||
" movl %%ebx,%%ecx;\n" /* Will be index of max inner-product */
|
||||
" subl $80,%%esi;\n"
|
||||
" .p2align 2;\n"
|
||||
"1:\n"
|
||||
" movq (%%edi),%%mm0;\n"
|
||||
" movq (%%esi),%%mm2;\n"
|
||||
" pmaddwd %%mm2,%%mm0;\n"
|
||||
" movq 8(%%edi),%%mm1;\n"
|
||||
" movq 8(%%esi),%%mm2;\n"
|
||||
" pmaddwd %%mm2,%%mm1;\n"
|
||||
" paddd %%mm1,%%mm0;\n"
|
||||
" movq 16(%%edi),%%mm1;\n"
|
||||
" movq 16(%%esi),%%mm2;\n"
|
||||
" pmaddwd %%mm2,%%mm1;\n"
|
||||
" paddd %%mm1,%%mm0;\n"
|
||||
" movq 24(%%edi),%%mm1;\n"
|
||||
" movq 24(%%esi),%%mm2;\n"
|
||||
" pmaddwd %%mm2,%%mm1;\n"
|
||||
" paddd %%mm1,%%mm0;\n"
|
||||
" movq 32(%%edi),%%mm1;\n"
|
||||
" movq 32(%%esi),%%mm2;\n"
|
||||
" pmaddwd %%mm2,%%mm1;\n"
|
||||
" paddd %%mm1,%%mm0;\n"
|
||||
" movq 40(%%edi),%%mm1;\n"
|
||||
" movq 40(%%esi),%%mm2;\n"
|
||||
" pmaddwd %%mm2,%%mm1;\n"
|
||||
" paddd %%mm1,%%mm0;\n"
|
||||
" movq 48(%%edi),%%mm1;\n"
|
||||
" movq 48(%%esi),%%mm2;\n"
|
||||
" pmaddwd %%mm2,%%mm1;\n"
|
||||
" paddd %%mm1,%%mm0;\n"
|
||||
" movq 56(%%edi),%%mm1;\n"
|
||||
" movq 56(%%esi),%%mm2;\n"
|
||||
" pmaddwd %%mm2,%%mm1;\n"
|
||||
" paddd %%mm1,%%mm0;\n"
|
||||
" movq 64(%%edi),%%mm1;\n"
|
||||
" movq 64(%%esi),%%mm2;\n"
|
||||
" pmaddwd %%mm2,%%mm1;\n"
|
||||
" paddd %%mm1,%%mm0;\n"
|
||||
" movq 72(%%edi),%%mm1;\n"
|
||||
" movq 72(%%esi),%%mm2;\n"
|
||||
" pmaddwd %%mm2,%%mm1;\n"
|
||||
" paddd %%mm1,%%mm0;\n"
|
||||
" movq %%mm0,%%mm1;\n"
|
||||
" punpckhdq %%mm0,%%mm1;\n" /* mm1 has high int32 of mm0 dup'd */
|
||||
" paddd %%mm1,%%mm0;\n"
|
||||
" movd %%mm0,%%eax;\n" /* eax has result */
|
||||
" cmpl %%edx,%%eax;\n"
|
||||
" jle 2f;\n"
|
||||
" movl %%eax,%%edx;\n"
|
||||
" movl %%ebx,%%ecx;\n"
|
||||
" .p2align 2;\n"
|
||||
"2:\n"
|
||||
" subl $2,%%esi;\n"
|
||||
" incl %%ebx;\n"
|
||||
" cmpl $120,%%ebx;\n"
|
||||
" jle 1b;\n"
|
||||
" popl %%ebx;\n"
|
||||
" emms;\n"
|
||||
: "=d" (lmax), "=c" (out)
|
||||
: "D" (wt), "S" (dp)
|
||||
: "eax"
|
||||
);
|
||||
*Nc_out = out;
|
||||
return lmax;
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
#endif
|
||||
|
||||
/* This procedure computes the LTP gain (bc) and the LTP lag (Nc)
|
||||
for the long term analysis filter. This is done by calculating a
|
||||
maximum of the cross-correlation function between the current
|
||||
sub-segment short term residual signal d[0..39] (output of
|
||||
the short term analysis filter; for simplification the index
|
||||
of this array begins at 0 and ends at 39 for each sub-segment of the
|
||||
RPE-LTP analysis) and the previous reconstructed short term
|
||||
residual signal dp[ -120 .. -1 ]. A dynamic scaling must be
|
||||
performed to avoid overflow. */
|
||||
|
||||
/* This procedure exists in three versions. First, the integer
|
||||
version; then, the two floating point versions (as another
|
||||
function), with or without scaling. */
|
||||
|
||||
static int16_t evaluate_ltp_parameters(int16_t d[40],
|
||||
int16_t *dp, // [-120..-1] IN
|
||||
int16_t *Nc_out)
|
||||
{
|
||||
int k;
|
||||
int16_t Nc;
|
||||
int16_t bc;
|
||||
int16_t wt[40];
|
||||
int32_t L_max;
|
||||
int32_t L_power;
|
||||
int16_t R;
|
||||
int16_t S;
|
||||
int16_t dmax;
|
||||
int16_t scale;
|
||||
int16_t temp;
|
||||
int32_t L_temp;
|
||||
#if !(defined(__GNUC__) && defined(__i386__))
|
||||
int16_t lambda;
|
||||
#endif
|
||||
|
||||
/* Search of the optimum scaling of d[0..39]. */
|
||||
dmax = 0;
|
||||
for (k = 0; k < 40; k++)
|
||||
{
|
||||
temp = d[k];
|
||||
temp = gsm_abs(temp);
|
||||
if (temp > dmax)
|
||||
dmax = temp;
|
||||
/*endif*/
|
||||
}
|
||||
/*endfor*/
|
||||
|
||||
if (dmax == 0)
|
||||
{
|
||||
temp = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
assert(dmax > 0);
|
||||
temp = gsm0610_norm((int32_t) dmax << 16);
|
||||
}
|
||||
/*endif*/
|
||||
|
||||
if (temp > 6)
|
||||
scale = 0;
|
||||
else
|
||||
scale = (int16_t) (6 - temp);
|
||||
/*endif*/
|
||||
assert(scale >= 0);
|
||||
|
||||
/* Initialization of a working array wt */
|
||||
for (k = 0; k < 40; k++)
|
||||
wt[k] = d[k] >> scale;
|
||||
/*endfor*/
|
||||
|
||||
/* Search for the maximum cross-correlation and coding of the LTP lag */
|
||||
#if defined(__GNUC__) && defined(__i386__)
|
||||
L_max = gsm0610_max_cross_corr(wt, dp, &Nc);
|
||||
#else
|
||||
L_max = 0;
|
||||
Nc = 40; /* index for the maximum cross-correlation */
|
||||
|
||||
for (lambda = 40; lambda <= 120; lambda++)
|
||||
{
|
||||
int32_t L_result;
|
||||
|
||||
L_result = (wt[0]*dp[0 - lambda])
|
||||
+ (wt[1]*dp[1 - lambda])
|
||||
+ (wt[2]*dp[2 - lambda])
|
||||
+ (wt[3]*dp[3 - lambda])
|
||||
+ (wt[4]*dp[4 - lambda])
|
||||
+ (wt[5]*dp[5 - lambda])
|
||||
+ (wt[6]*dp[6 - lambda])
|
||||
+ (wt[7]*dp[7 - lambda])
|
||||
+ (wt[8]*dp[8 - lambda])
|
||||
+ (wt[9]*dp[9 - lambda])
|
||||
+ (wt[10]*dp[10 - lambda])
|
||||
+ (wt[11]*dp[11 - lambda])
|
||||
+ (wt[12]*dp[12 - lambda])
|
||||
+ (wt[13]*dp[13 - lambda])
|
||||
+ (wt[14]*dp[14 - lambda])
|
||||
+ (wt[15]*dp[15 - lambda])
|
||||
+ (wt[16]*dp[16 - lambda])
|
||||
+ (wt[17]*dp[17 - lambda])
|
||||
+ (wt[18]*dp[18 - lambda])
|
||||
+ (wt[19]*dp[19 - lambda])
|
||||
+ (wt[20]*dp[20 - lambda])
|
||||
+ (wt[21]*dp[21 - lambda])
|
||||
+ (wt[22]*dp[22 - lambda])
|
||||
+ (wt[23]*dp[23 - lambda])
|
||||
+ (wt[24]*dp[24 - lambda])
|
||||
+ (wt[25]*dp[25 - lambda])
|
||||
+ (wt[26]*dp[26 - lambda])
|
||||
+ (wt[27]*dp[27 - lambda])
|
||||
+ (wt[28]*dp[28 - lambda])
|
||||
+ (wt[29]*dp[29 - lambda])
|
||||
+ (wt[30]*dp[30 - lambda])
|
||||
+ (wt[31]*dp[31 - lambda])
|
||||
+ (wt[32]*dp[32 - lambda])
|
||||
+ (wt[33]*dp[33 - lambda])
|
||||
+ (wt[34]*dp[34 - lambda])
|
||||
+ (wt[35]*dp[35 - lambda])
|
||||
+ (wt[36]*dp[36 - lambda])
|
||||
+ (wt[37]*dp[37 - lambda])
|
||||
+ (wt[38]*dp[38 - lambda])
|
||||
+ (wt[39]*dp[39 - lambda]);
|
||||
|
||||
if (L_result > L_max)
|
||||
{
|
||||
Nc = lambda;
|
||||
L_max = L_result;
|
||||
}
|
||||
/*endif*/
|
||||
}
|
||||
/*endfor*/
|
||||
#endif
|
||||
*Nc_out = Nc;
|
||||
|
||||
L_max <<= 1;
|
||||
|
||||
/* Rescaling of L_max */
|
||||
assert(scale <= 100 && scale >= -100);
|
||||
L_max = L_max >> (6 - scale);
|
||||
|
||||
assert(Nc <= 120 && Nc >= 40);
|
||||
|
||||
/* Compute the power of the reconstructed short term residual signal dp[..] */
|
||||
L_power = 0;
|
||||
for (k = 0; k < 40; k++)
|
||||
{
|
||||
L_temp = dp[k - Nc] >> 3;
|
||||
L_power += L_temp*L_temp;
|
||||
}
|
||||
/*endfor*/
|
||||
L_power <<= 1; /* from L_MULT */
|
||||
|
||||
/* Normalization of L_max and L_power */
|
||||
if (L_max <= 0)
|
||||
return 0;
|
||||
/*endif*/
|
||||
if (L_max >= L_power)
|
||||
return 3;
|
||||
/*endif*/
|
||||
temp = gsm0610_norm(L_power);
|
||||
|
||||
R = (int16_t) ((L_max << temp) >> 16);
|
||||
S = (int16_t) ((L_power << temp) >> 16);
|
||||
|
||||
/* Coding of the LTP gain */
|
||||
|
||||
/* Table 4.3a must be used to obtain the level DLB[i] for the
|
||||
quantization of the LTP gain b to get the coded version bc. */
|
||||
for (bc = 0; bc <= 2; bc++)
|
||||
{
|
||||
if (R <= gsm_mult(S, gsm_DLB[bc]))
|
||||
break;
|
||||
/*endif*/
|
||||
}
|
||||
/*endfor*/
|
||||
return bc;
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
/* 4.2.12 */
|
||||
static void long_term_analysis_filtering(int16_t bc,
|
||||
int16_t Nc,
|
||||
int16_t *dp, // previous d [-120..-1] IN
|
||||
int16_t d[40],
|
||||
int16_t dpp[40],
|
||||
int16_t e[40])
|
||||
{
|
||||
int k;
|
||||
|
||||
/* In this part, we have to decode the bc parameter to compute
|
||||
the samples of the estimate dpp[0..39]. The decoding of bc needs the
|
||||
use of table 4.3b. The long term residual signal e[0..39]
|
||||
is then calculated to be fed to the RPE encoding section. */
|
||||
for (k = 0; k < 40; k++)
|
||||
{
|
||||
dpp[k] = gsm_mult_r(gsm_QLB[bc], dp[k - Nc]);
|
||||
e[k] = gsm_sub(d[k], dpp[k]);
|
||||
}
|
||||
/*endfor*/
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
/* 4x for 160 samples */
|
||||
void gsm0610_long_term_predictor(gsm0610_state_t *s,
|
||||
int16_t d[40],
|
||||
int16_t *dp, // [-120..-1] d' IN
|
||||
int16_t e[40],
|
||||
int16_t dpp[40],
|
||||
int16_t *Nc,
|
||||
int16_t *bc)
|
||||
{
|
||||
vc_assert(d);
|
||||
vc_assert(dp);
|
||||
vc_assert(e);
|
||||
vc_assert(dpp);
|
||||
vc_assert(Nc);
|
||||
vc_assert(bc);
|
||||
|
||||
*bc = evaluate_ltp_parameters(d, dp, Nc);
|
||||
long_term_analysis_filtering(*bc, *Nc, dp, d, dpp, e);
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
/* 4.3.2 */
|
||||
void gsm0610_long_term_synthesis_filtering(gsm0610_state_t *s,
|
||||
int16_t Ncr,
|
||||
int16_t bcr,
|
||||
int16_t erp[40],
|
||||
int16_t *drp) // [-120..-1] IN, [0..40] OUT
|
||||
{
|
||||
int k;
|
||||
int16_t brp;
|
||||
int16_t drpp;
|
||||
int16_t Nr;
|
||||
|
||||
/* This procedure uses the bcr and Ncr parameter to realize the
|
||||
long term synthesis filter. The decoding of bcr needs
|
||||
table 4.3b. */
|
||||
|
||||
/* Check the limits of Nr. */
|
||||
Nr = (Ncr < 40 || Ncr > 120) ? s->nrp : Ncr;
|
||||
s->nrp = Nr;
|
||||
assert (Nr >= 40 && Nr <= 120);
|
||||
|
||||
/* Decode the LTP gain, bcr */
|
||||
brp = gsm_QLB[bcr];
|
||||
|
||||
/* Compute the reconstructed short term residual signal, drp[0..39] */
|
||||
assert(brp != INT16_MIN);
|
||||
for (k = 0; k < 40; k++)
|
||||
{
|
||||
drpp = gsm_mult_r(brp, drp[k - Nr]);
|
||||
drp[k] = gsm_add(erp[k], drpp);
|
||||
}
|
||||
/*endfor*/
|
||||
|
||||
/* Update the reconstructed short term residual signal, drp[-1..-120] */
|
||||
for (k = 0; k < 120; k++)
|
||||
drp[k - 120] = drp[k - 80];
|
||||
/*endfor*/
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
/*- End of file ------------------------------------------------------------*/
|
|
@ -1,534 +0,0 @@
|
|||
/*
|
||||
* VoIPcodecs - a series of DSP components for telephony
|
||||
*
|
||||
* gsm0610_lpc.c - GSM 06.10 full rate speech codec.
|
||||
*
|
||||
* Written by Steve Underwood <steveu@coppice.org>
|
||||
*
|
||||
* Copyright (C) 2006 Steve Underwood
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2, or
|
||||
* the Lesser GNU General Public License version 2.1, as published by
|
||||
* the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* This code is based on the widely used GSM 06.10 code available from
|
||||
* http://kbs.cs.tu-berlin.de/~jutta/toast.html
|
||||
*
|
||||
* $Id: gsm0610_lpc.c,v 1.16 2008/02/09 15:31:36 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <assert.h>
|
||||
#include <inttypes.h>
|
||||
#if defined(HAVE_TGMATH_H)
|
||||
#include <tgmath.h>
|
||||
#endif
|
||||
#if defined(HAVE_MATH_H)
|
||||
#include <math.h>
|
||||
#endif
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "voipcodecs/telephony.h"
|
||||
#include "voipcodecs/bitstream.h"
|
||||
#include "voipcodecs/bit_operations.h"
|
||||
#include "voipcodecs/dc_restore.h"
|
||||
#include "voipcodecs/vector_int.h"
|
||||
#include "voipcodecs/gsm0610.h"
|
||||
|
||||
#include "gsm0610_local.h"
|
||||
|
||||
/* 4.2.4 .. 4.2.7 LPC ANALYSIS SECTION */
|
||||
|
||||
/* The number of left shifts needed to normalize the 32 bit
|
||||
variable x for positive values on the interval
|
||||
with minimum of
|
||||
minimum of 1073741824 (01000000000000000000000000000000) and
|
||||
maximum of 2147483647 (01111111111111111111111111111111)
|
||||
and for negative values on the interval with
|
||||
minimum of -2147483648 (-10000000000000000000000000000000) and
|
||||
maximum of -1073741824 ( -1000000000000000000000000000000).
|
||||
|
||||
In order to normalize the result, the following
|
||||
operation must be done: norm_var1 = x << gsm0610_norm(x);
|
||||
|
||||
(That's 'ffs', only from the left, not the right..)
|
||||
*/
|
||||
|
||||
int16_t gsm0610_norm(int32_t x)
|
||||
{
|
||||
assert(x != 0);
|
||||
|
||||
if (x < 0)
|
||||
{
|
||||
if (x <= -1073741824)
|
||||
return 0;
|
||||
/*endif*/
|
||||
x = ~x;
|
||||
}
|
||||
/*endif*/
|
||||
return (int16_t) (30 - top_bit(x));
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
/*
|
||||
(From p. 46, end of section 4.2.5)
|
||||
|
||||
NOTE: The following lines gives [sic] one correct implementation
|
||||
of the div(num, denum) arithmetic operation. Compute div
|
||||
which is the integer division of num by denom: with
|
||||
denom >= num > 0
|
||||
*/
|
||||
static int16_t gsm_div(int16_t num, int16_t denom)
|
||||
{
|
||||
int32_t num32;
|
||||
int32_t denom32;
|
||||
int16_t div;
|
||||
int k;
|
||||
|
||||
/* The parameter num sometimes becomes zero.
|
||||
Although this is explicitly guarded against in 4.2.5,
|
||||
we assume that the result should then be zero as well. */
|
||||
|
||||
assert(num >= 0 && denom >= num);
|
||||
if (num == 0)
|
||||
return 0;
|
||||
/*endif*/
|
||||
num32 = num;
|
||||
denom32 = denom;
|
||||
div = 0;
|
||||
k = 15;
|
||||
while (k--)
|
||||
{
|
||||
div <<= 1;
|
||||
num32 <<= 1;
|
||||
|
||||
if (num32 >= denom32)
|
||||
{
|
||||
num32 -= denom32;
|
||||
div++;
|
||||
}
|
||||
/*endif*/
|
||||
}
|
||||
/*endwhile*/
|
||||
|
||||
return div;
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
#if defined(__GNUC__) && defined(__i386__)
|
||||
void gsm0610_vec_vsraw(const int16_t *p, int n, int bits)
|
||||
{
|
||||
static const int64_t ones = 0x0001000100010001LL;
|
||||
|
||||
if (n == 0)
|
||||
return;
|
||||
/*endif*/
|
||||
__asm__ __volatile__(
|
||||
" leal -16(%%esi,%%eax,2),%%edx;\n" /* edx = top - 16 */
|
||||
" emms;\n"
|
||||
" movd %%ecx,%%mm3;\n"
|
||||
" movq %[ones],%%mm2;\n"
|
||||
" psllw %%mm3,%%mm2;\n"
|
||||
" psrlw $1,%%mm2;\n"
|
||||
" cmpl %%edx,%%esi;"
|
||||
" ja 4f;\n"
|
||||
|
||||
" .p2align 2;\n"
|
||||
/* 8 words per iteration */
|
||||
"6:\n"
|
||||
" movq (%%esi),%%mm0;\n"
|
||||
" movq 8(%%esi),%%mm1;\n"
|
||||
" paddsw %%mm2,%%mm0;\n"
|
||||
" psraw %%mm3,%%mm0;\n"
|
||||
" paddsw %%mm2,%%mm1;\n"
|
||||
" psraw %%mm3,%%mm1;\n"
|
||||
" movq %%mm0,(%%esi);\n"
|
||||
" movq %%mm1,8(%%esi);\n"
|
||||
" addl $16,%%esi;\n"
|
||||
" cmpl %%edx,%%esi;\n"
|
||||
" jbe 6b;\n"
|
||||
|
||||
" .p2align 2;\n"
|
||||
"4:\n"
|
||||
" addl $12,%%edx;\n" /* now edx = top-4 */
|
||||
" cmpl %%edx,%%esi;\n"
|
||||
" ja 3f;\n"
|
||||
|
||||
" .p2align 2;\n"
|
||||
/* do up to 6 words, two per iteration */
|
||||
"5:\n"
|
||||
" movd (%%esi),%%mm0;\n"
|
||||
" paddsw %%mm2,%%mm0;\n"
|
||||
" psraw %%mm3,%%mm0;\n"
|
||||
" movd %%mm0,(%%esi);\n"
|
||||
" addl $4,%%esi;\n"
|
||||
" cmpl %%edx,%%esi;\n"
|
||||
" jbe 5b;\n"
|
||||
|
||||
" .p2align 2;\n"
|
||||
"3:\n"
|
||||
" addl $2,%%edx;\n" /* now edx = top-2 */
|
||||
" cmpl %%edx,%%esi;\n"
|
||||
" ja 2f;\n"
|
||||
|
||||
" movzwl (%%esi),%%eax;\n"
|
||||
" movd %%eax,%%mm0;\n"
|
||||
" paddsw %%mm2,%%mm0;\n"
|
||||
" psraw %%mm3,%%mm0;\n"
|
||||
" movd %%mm0,%%eax;\n"
|
||||
" movw %%ax,(%%esi);\n"
|
||||
|
||||
" .p2align 2;\n"
|
||||
"2:\n"
|
||||
" emms;\n"
|
||||
:
|
||||
: "S" (p), "a" (n), "c" (bits), [ones] "m" (ones)
|
||||
: "edx"
|
||||
);
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
#endif
|
||||
|
||||
/* 4.2.4 */
|
||||
static void autocorrelation(int16_t amp[GSM0610_FRAME_LEN], int32_t L_ACF[9])
|
||||
{
|
||||
int k;
|
||||
int16_t smax;
|
||||
int16_t scalauto;
|
||||
#if !(defined(__GNUC__) && defined(__i386__))
|
||||
int i;
|
||||
int temp;
|
||||
int16_t *sp;
|
||||
int16_t sl;
|
||||
#endif
|
||||
|
||||
/* The goal is to compute the array L_ACF[k]. The signal s[i] must
|
||||
be scaled in order to avoid an overflow situation. */
|
||||
|
||||
/* Dynamic scaling of the array s[0..159] */
|
||||
/* Search for the maximum. */
|
||||
#if defined(__GNUC__) && defined(__i386__)
|
||||
smax = saturate(vec_min_maxi16(amp, GSM0610_FRAME_LEN, NULL));
|
||||
#else
|
||||
for (smax = 0, k = 0; k < GSM0610_FRAME_LEN; k++)
|
||||
{
|
||||
temp = gsm_abs(amp[k]);
|
||||
if (temp > smax)
|
||||
smax = (int16_t) temp;
|
||||
/*endif*/
|
||||
}
|
||||
/*endfor*/
|
||||
#endif
|
||||
|
||||
/* Computation of the scaling factor. */
|
||||
if (smax == 0)
|
||||
{
|
||||
scalauto = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
assert(smax > 0);
|
||||
scalauto = (int16_t) (4 - gsm0610_norm((int32_t) smax << 16));
|
||||
}
|
||||
/*endif*/
|
||||
|
||||
/* Scaling of the array s[0...159] */
|
||||
#if defined(__GNUC__) && defined(__i386__)
|
||||
if (scalauto > 0)
|
||||
gsm0610_vec_vsraw(amp, GSM0610_FRAME_LEN, scalauto);
|
||||
/*endif*/
|
||||
#else
|
||||
if (scalauto > 0)
|
||||
{
|
||||
for (k = 0; k < GSM0610_FRAME_LEN; k++)
|
||||
amp[k] = gsm_mult_r(amp[k], 16384 >> (scalauto - 1));
|
||||
/*endfor*/
|
||||
}
|
||||
/*endif*/
|
||||
#endif
|
||||
|
||||
/* Compute the L_ACF[..]. */
|
||||
#if defined(__GNUC__) && defined(__i386__)
|
||||
for (k = 0; k < 9; k++)
|
||||
L_ACF[k] = vec_dot_prodi16(amp, amp + k, GSM0610_FRAME_LEN - k) << 1;
|
||||
/*endfor*/
|
||||
#else
|
||||
sp = amp;
|
||||
sl = *sp;
|
||||
L_ACF[0] = ((int32_t) sl*sp[0]);
|
||||
sl = *++sp;
|
||||
L_ACF[0] += ((int32_t) sl*sp[0]);
|
||||
L_ACF[1] = ((int32_t) sl*sp[-1]);
|
||||
sl = *++sp;
|
||||
L_ACF[0] += ((int32_t) sl*sp[0]);
|
||||
L_ACF[1] += ((int32_t) sl*sp[-1]);
|
||||
L_ACF[2] = ((int32_t) sl*sp[-2]);
|
||||
sl = *++sp;
|
||||
L_ACF[0] += ((int32_t) sl*sp[0]);
|
||||
L_ACF[1] += ((int32_t) sl*sp[-1]);
|
||||
L_ACF[2] += ((int32_t) sl*sp[-2]);
|
||||
L_ACF[3] = ((int32_t) sl*sp[-3]);
|
||||
sl = *++sp;
|
||||
L_ACF[0] += ((int32_t) sl*sp[0]);
|
||||
L_ACF[1] += ((int32_t) sl*sp[-1]);
|
||||
L_ACF[2] += ((int32_t) sl*sp[-2]);
|
||||
L_ACF[3] += ((int32_t) sl*sp[-3]);
|
||||
L_ACF[4] = ((int32_t) sl*sp[-4]);
|
||||
sl = *++sp;
|
||||
L_ACF[0] += ((int32_t) sl*sp[0]);
|
||||
L_ACF[1] += ((int32_t) sl*sp[-1]);
|
||||
L_ACF[2] += ((int32_t) sl*sp[-2]);
|
||||
L_ACF[3] += ((int32_t) sl*sp[-3]);
|
||||
L_ACF[4] += ((int32_t) sl*sp[-4]);
|
||||
L_ACF[5] = ((int32_t) sl*sp[-5]);
|
||||
sl = *++sp;
|
||||
L_ACF[0] += ((int32_t) sl*sp[0]);
|
||||
L_ACF[1] += ((int32_t) sl*sp[-1]);
|
||||
L_ACF[2] += ((int32_t) sl*sp[-2]);
|
||||
L_ACF[3] += ((int32_t) sl*sp[-3]);
|
||||
L_ACF[4] += ((int32_t) sl*sp[-4]);
|
||||
L_ACF[5] += ((int32_t) sl*sp[-5]);
|
||||
L_ACF[6] = ((int32_t) sl*sp[-6]);
|
||||
sl = *++sp;
|
||||
L_ACF[0] += ((int32_t) sl*sp[0]);
|
||||
L_ACF[1] += ((int32_t) sl*sp[-1]);
|
||||
L_ACF[2] += ((int32_t) sl*sp[-2]);
|
||||
L_ACF[3] += ((int32_t) sl*sp[-3]);
|
||||
L_ACF[4] += ((int32_t) sl*sp[-4]);
|
||||
L_ACF[5] += ((int32_t) sl*sp[-5]);
|
||||
L_ACF[6] += ((int32_t) sl*sp[-6]);
|
||||
L_ACF[7] = ((int32_t) sl*sp[-7]);
|
||||
sl = *++sp;
|
||||
L_ACF[0] += ((int32_t) sl*sp[0]);
|
||||
L_ACF[1] += ((int32_t) sl*sp[-1]);
|
||||
L_ACF[2] += ((int32_t) sl*sp[-2]);
|
||||
L_ACF[3] += ((int32_t) sl*sp[-3]);
|
||||
L_ACF[4] += ((int32_t) sl*sp[-4]);
|
||||
L_ACF[5] += ((int32_t) sl*sp[-5]);
|
||||
L_ACF[6] += ((int32_t) sl*sp[-6]);
|
||||
L_ACF[7] += ((int32_t) sl*sp[-7]);
|
||||
L_ACF[8] = ((int32_t) sl*sp[-8]);
|
||||
for (i = 9; i < GSM0610_FRAME_LEN; i++)
|
||||
{
|
||||
sl = *++sp;
|
||||
L_ACF[0] += ((int32_t) sl*sp[0]);
|
||||
L_ACF[1] += ((int32_t) sl*sp[-1]);
|
||||
L_ACF[2] += ((int32_t) sl*sp[-2]);
|
||||
L_ACF[3] += ((int32_t) sl*sp[-3]);
|
||||
L_ACF[4] += ((int32_t) sl*sp[-4]);
|
||||
L_ACF[5] += ((int32_t) sl*sp[-5]);
|
||||
L_ACF[6] += ((int32_t) sl*sp[-6]);
|
||||
L_ACF[7] += ((int32_t) sl*sp[-7]);
|
||||
L_ACF[8] += ((int32_t) sl*sp[-8]);
|
||||
}
|
||||
/*endfor*/
|
||||
for (k = 0; k < 9; k++)
|
||||
L_ACF[k] <<= 1;
|
||||
/*endfor*/
|
||||
#endif
|
||||
/* Rescaling of the array s[0..159] */
|
||||
if (scalauto > 0)
|
||||
{
|
||||
assert(scalauto <= 4);
|
||||
for (k = 0; k < GSM0610_FRAME_LEN; k++)
|
||||
amp[k] <<= scalauto;
|
||||
/*endfor*/
|
||||
}
|
||||
/*endif*/
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
/* 4.2.5 */
|
||||
static void reflection_coefficients(int32_t L_ACF[9], int16_t r[8])
|
||||
{
|
||||
int i;
|
||||
int m;
|
||||
int n;
|
||||
int16_t temp;
|
||||
int16_t ACF[9];
|
||||
int16_t P[9];
|
||||
int16_t K[9];
|
||||
|
||||
/* Schur recursion with 16 bits arithmetic. */
|
||||
if (L_ACF[0] == 0)
|
||||
{
|
||||
for (i = 8; i--; *r++ = 0)
|
||||
;
|
||||
/*endfor*/
|
||||
return;
|
||||
}
|
||||
/*endif*/
|
||||
|
||||
assert(L_ACF[0] != 0);
|
||||
temp = gsm0610_norm(L_ACF[0]);
|
||||
|
||||
assert(temp >= 0 && temp < 32);
|
||||
|
||||
/* ? overflow ? */
|
||||
for (i = 0; i <= 8; i++)
|
||||
ACF[i] = (int16_t) ((L_ACF[i] << temp) >> 16);
|
||||
/*endfor*/
|
||||
|
||||
/* Initialize array P[..] and K[..] for the recursion. */
|
||||
for (i = 1; i <= 7; i++)
|
||||
K[i] = ACF[i];
|
||||
/*endfor*/
|
||||
for (i = 0; i <= 8; i++)
|
||||
P[i] = ACF[i];
|
||||
/*endfor*/
|
||||
/* Compute reflection coefficients */
|
||||
for (n = 1; n <= 8; n++, r++)
|
||||
{
|
||||
temp = P[1];
|
||||
temp = gsm_abs (temp);
|
||||
if (P[0] < temp)
|
||||
{
|
||||
for (i = n; i <= 8; i++)
|
||||
*r++ = 0;
|
||||
/*endfor*/
|
||||
return;
|
||||
}
|
||||
/*endif*/
|
||||
|
||||
*r = gsm_div(temp, P[0]);
|
||||
|
||||
assert(*r >= 0);
|
||||
if (P[1] > 0)
|
||||
*r = -*r; /* r[n] = sub(0, r[n]) */
|
||||
/*endif*/
|
||||
assert(*r != INT16_MIN);
|
||||
if (n == 8)
|
||||
return;
|
||||
/*endif*/
|
||||
|
||||
/* Schur recursion */
|
||||
temp = gsm_mult_r(P[1], *r);
|
||||
P[0] = gsm_add(P[0], temp);
|
||||
|
||||
for (m = 1; m <= 8 - n; m++)
|
||||
{
|
||||
temp = gsm_mult_r(K[m], *r);
|
||||
P[m] = gsm_add(P[m + 1], temp);
|
||||
|
||||
temp = gsm_mult_r(P[m + 1], *r);
|
||||
K[m] = gsm_add(K[m], temp);
|
||||
}
|
||||
/*endfor*/
|
||||
}
|
||||
/*endfor*/
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
/* 4.2.6 */
|
||||
static void transform_to_log_area_ratios(int16_t r[8])
|
||||
{
|
||||
int16_t temp;
|
||||
int i;
|
||||
|
||||
/* The following scaling for r[..] and LAR[..] has been used:
|
||||
|
||||
r[..] = integer (real_r[..]*32768.); -1 <= real_r < 1.
|
||||
LAR[..] = integer (real_LAR[..] * 16384);
|
||||
with -1.625 <= real_LAR <= 1.625
|
||||
*/
|
||||
|
||||
/* Computation of the LAR[0..7] from the r[0..7] */
|
||||
for (i = 1; i <= 8; i++, r++)
|
||||
{
|
||||
temp = *r;
|
||||
temp = gsm_abs(temp);
|
||||
assert(temp >= 0);
|
||||
|
||||
if (temp < 22118)
|
||||
{
|
||||
temp >>= 1;
|
||||
}
|
||||
else if (temp < 31130)
|
||||
{
|
||||
assert(temp >= 11059);
|
||||
temp -= 11059;
|
||||
}
|
||||
else
|
||||
{
|
||||
assert(temp >= 26112);
|
||||
temp -= 26112;
|
||||
temp <<= 2;
|
||||
}
|
||||
/*endif*/
|
||||
|
||||
*r = (*r < 0) ? -temp : temp;
|
||||
assert(*r != INT16_MIN);
|
||||
}
|
||||
/*endfor*/
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
/* 4.2.7 */
|
||||
static void quantization_and_coding(int16_t LAR[8])
|
||||
{
|
||||
int16_t temp;
|
||||
|
||||
/* This procedure needs four tables; the following equations
|
||||
give the optimum scaling for the constants:
|
||||
|
||||
A[0..7] = integer(real_A[0..7] * 1024)
|
||||
B[0..7] = integer(real_B[0..7] * 512)
|
||||
MAC[0..7] = maximum of the LARc[0..7]
|
||||
MIC[0..7] = minimum of the LARc[0..7] */
|
||||
|
||||
#undef STEP
|
||||
#define STEP(A,B,MAC,MIC) \
|
||||
temp = gsm_mult(A, *LAR); \
|
||||
temp = gsm_add(temp, B); \
|
||||
temp = gsm_add(temp, 256); \
|
||||
temp >>= 9; \
|
||||
*LAR = (int16_t) ((temp > MAC) \
|
||||
? \
|
||||
MAC - MIC \
|
||||
: \
|
||||
((temp < MIC) ? 0 : temp - MIC)); \
|
||||
LAR++;
|
||||
|
||||
STEP(20480, 0, 31, -32);
|
||||
STEP(20480, 0, 31, -32);
|
||||
STEP(20480, 2048, 15, -16);
|
||||
STEP(20480, -2560, 15, -16);
|
||||
|
||||
STEP(13964, 94, 7, -8);
|
||||
STEP(15360, -1792, 7, -8);
|
||||
STEP( 8534, -341, 3, -4);
|
||||
STEP( 9036, -1144, 3, -4);
|
||||
#undef STEP
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
void gsm0610_lpc_analysis(gsm0610_state_t *s,
|
||||
int16_t amp[GSM0610_FRAME_LEN],
|
||||
int16_t LARc[8])
|
||||
{
|
||||
int32_t L_ACF[9];
|
||||
|
||||
autocorrelation(amp, L_ACF);
|
||||
reflection_coefficients(L_ACF, LARc);
|
||||
transform_to_log_area_ratios(LARc);
|
||||
quantization_and_coding(LARc);
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
/*- End of file ------------------------------------------------------------*/
|
|
@ -1,150 +0,0 @@
|
|||
/*
|
||||
* VoIPcodecs - a series of DSP components for telephony
|
||||
*
|
||||
* gsm0610_preprocess.c - GSM 06.10 full rate speech codec.
|
||||
*
|
||||
* Written by Steve Underwood <steveu@coppice.org>
|
||||
*
|
||||
* Copyright (C) 2006 Steve Underwood
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2, or
|
||||
* the Lesser GNU General Public License version 2.1, as published by
|
||||
* the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* This code is based on the widely used GSM 06.10 code available from
|
||||
* http://kbs.cs.tu-berlin.de/~jutta/toast.html
|
||||
*
|
||||
* $Id: gsm0610_preprocess.c,v 1.9 2008/02/09 15:31:36 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <assert.h>
|
||||
#include <inttypes.h>
|
||||
#if defined(HAVE_TGMATH_H)
|
||||
#include <tgmath.h>
|
||||
#endif
|
||||
#if defined(HAVE_MATH_H)
|
||||
#include <math.h>
|
||||
#endif
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "voipcodecs/telephony.h"
|
||||
#include "voipcodecs/bitstream.h"
|
||||
#include "voipcodecs/dc_restore.h"
|
||||
#include "voipcodecs/gsm0610.h"
|
||||
|
||||
#include "gsm0610_local.h"
|
||||
|
||||
/*
|
||||
4.2.0 .. 4.2.3 PREPROCESSING SECTION
|
||||
|
||||
After A-law to linear conversion (or directly from the
|
||||
A to D converter) the following scaling is assumed for
|
||||
input to the RPE-LTP algorithm:
|
||||
|
||||
in: 0.1.....................12
|
||||
S.v.v.v.v.v.v.v.v.v.v.v.v.*.*.*
|
||||
|
||||
Where S is the sign bit, v a valid bit, and * a "don't care" bit.
|
||||
The original signal is called sop[..]
|
||||
|
||||
out: 0.1................... 12
|
||||
S.S.v.v.v.v.v.v.v.v.v.v.v.v.0.0
|
||||
*/
|
||||
|
||||
void gsm0610_preprocess(gsm0610_state_t *s, const int16_t amp[GSM0610_FRAME_LEN], int16_t so[GSM0610_FRAME_LEN])
|
||||
{
|
||||
int16_t z1;
|
||||
int16_t mp;
|
||||
int16_t s1;
|
||||
int16_t msp;
|
||||
int16_t SO;
|
||||
int32_t L_z2;
|
||||
int32_t L_s2;
|
||||
int32_t L_temp;
|
||||
#if !defined(__GNUC__)
|
||||
int16_t lsp;
|
||||
#endif
|
||||
int k;
|
||||
|
||||
z1 = s->z1;
|
||||
L_z2 = s->L_z2;
|
||||
mp = s->mp;
|
||||
for (k = 0; k < GSM0610_FRAME_LEN; k++)
|
||||
{
|
||||
/* 4.2.1 Downscaling of the input signal */
|
||||
SO = (amp[k] >> 1) & ~3;
|
||||
|
||||
assert(SO >= -0x4000); // downscaled by
|
||||
assert(SO <= 0x3FFC); // previous routine.
|
||||
|
||||
/* 4.2.2 Offset compensation */
|
||||
|
||||
/* This part implements a high-pass filter and requires extended
|
||||
arithmetic precision for the recursive part of this filter.
|
||||
The input of this procedure is the array so[0...159] and the
|
||||
output the array sof[ 0...159 ].
|
||||
*/
|
||||
/* Compute the non-recursive part */
|
||||
s1 = SO - z1;
|
||||
z1 = SO;
|
||||
|
||||
assert(s1 != INT16_MIN);
|
||||
|
||||
/* Compute the recursive part */
|
||||
L_s2 = s1;
|
||||
L_s2 <<= 15;
|
||||
|
||||
/* Perform a 31 by 16 bits multiplication */
|
||||
#if defined(__GNUC__)
|
||||
L_z2 = ((int64_t) L_z2*32735 + 0x4000) >> 15;
|
||||
/* Alternate (ANSI) version of below line does slightly different rounding:
|
||||
* L_temp = L_z2 >> 9;
|
||||
* L_temp += L_temp >> 5;
|
||||
* L_temp = (++L_temp) >> 1;
|
||||
* L_z2 = L_z2 - L_temp;
|
||||
*/
|
||||
L_z2 = gsm_l_add(L_z2, L_s2);
|
||||
#else
|
||||
/* This does L_z2 = L_z2 * 0x7FD5/0x8000 + L_s2 */
|
||||
msp = (int16_t) (L_z2 >> 15);
|
||||
lsp = (int16_t) (L_z2 - ((int32_t) msp << 15));
|
||||
|
||||
L_s2 += gsm_mult_r(lsp, 32735);
|
||||
L_temp = (int32_t) msp*32735;
|
||||
L_z2 = gsm_l_add(L_temp, L_s2);
|
||||
#endif
|
||||
|
||||
/* Compute sof[k] with rounding */
|
||||
L_temp = gsm_l_add(L_z2, 16384);
|
||||
|
||||
/* 4.2.3 Preemphasis */
|
||||
msp = gsm_mult_r(mp, -28180);
|
||||
mp = (int16_t) (L_temp >> 15);
|
||||
so[k] = gsm_add(mp, msp);
|
||||
}
|
||||
/*endfor*/
|
||||
|
||||
s->z1 = z1;
|
||||
s->L_z2 = L_z2;
|
||||
s->mp = mp;
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
/*- End of file ------------------------------------------------------------*/
|
|
@ -1,532 +0,0 @@
|
|||
/*
|
||||
* VoIPcodecs - a series of DSP components for telephony
|
||||
*
|
||||
* gsm0610_rpe.c - GSM 06.10 full rate speech codec.
|
||||
*
|
||||
* Written by Steve Underwood <steveu@coppice.org>
|
||||
*
|
||||
* Copyright (C) 2006 Steve Underwood
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2, or
|
||||
* the Lesser GNU General Public License version 2.1, as published by
|
||||
* the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* This code is based on the widely used GSM 06.10 code available from
|
||||
* http://kbs.cs.tu-berlin.de/~jutta/toast.html
|
||||
*
|
||||
* $Id: gsm0610_rpe.c,v 1.15 2008/02/09 15:31:36 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <assert.h>
|
||||
#include <inttypes.h>
|
||||
#if defined(HAVE_TGMATH_H)
|
||||
#include <tgmath.h>
|
||||
#endif
|
||||
#if defined(HAVE_MATH_H)
|
||||
#include <math.h>
|
||||
#endif
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "voipcodecs/telephony.h"
|
||||
#include "voipcodecs/bitstream.h"
|
||||
#include "voipcodecs/dc_restore.h"
|
||||
#include "voipcodecs/gsm0610.h"
|
||||
|
||||
#include "gsm0610_local.h"
|
||||
|
||||
/* 4.2.13 .. 4.2.17 RPE ENCODING SECTION */
|
||||
|
||||
/* 4.2.13 */
|
||||
static void weighting_filter(const int16_t *e, // signal [-5..0.39.44] IN
|
||||
int16_t x[40])
|
||||
{
|
||||
#if defined(__GNUC__) && defined(__i386__)
|
||||
/* Table 4.4 Coefficients of the weighting filter */
|
||||
/* This must be padded to a multiple of 4 for MMX to work */
|
||||
static const int16_t gsm_H[12] =
|
||||
{
|
||||
-134, -374, 0, 2054, 5741, 8192, 5741, 2054, 0, -374, -134, 0
|
||||
};
|
||||
|
||||
__asm__ __volatile__(
|
||||
" emms;\n"
|
||||
" addl $-10,%%ecx;\n"
|
||||
" movl $0x1000,%%eax;\n"
|
||||
" movd %%eax,%%mm5;\n" /* for rounding */
|
||||
" movq %[gsm_H],%%mm1;\n"
|
||||
" movq %[gsm_H8],%%mm2;\n"
|
||||
" movq %[gsm_H16],%%mm3;\n"
|
||||
" xorl %%esi,%%esi;\n"
|
||||
" .p2align 2;\n"
|
||||
"1:;\n"
|
||||
" movq (%%ecx,%%esi,2),%%mm0;\n"
|
||||
" pmaddwd %%mm1,%%mm0;\n"
|
||||
|
||||
" movq 8(%%ecx,%%esi,2),%%mm4;\n"
|
||||
" pmaddwd %%mm2,%%mm4;\n"
|
||||
" paddd %%mm4,%%mm0;\n"
|
||||
|
||||
" movq 16(%%ecx,%%esi,2),%%mm4;\n"
|
||||
" pmaddwd %%mm3,%%mm4;\n"
|
||||
" paddd %%mm4,%%mm0;\n"
|
||||
|
||||
" movq %%mm0,%%mm4;\n"
|
||||
" punpckhdq %%mm0,%%mm4;\n" /* mm4 has high int32 of mm0 dup'd */
|
||||
" paddd %%mm4,%%mm0;\n"
|
||||
|
||||
" paddd %%mm5,%%mm0;\n" /* Add for roundoff */
|
||||
" psrad $13,%%mm0;\n"
|
||||
" packssdw %%mm0,%%mm0;\n"
|
||||
" movd %%mm0,%%eax;\n" /* eax has result */
|
||||
" movw %%ax,(%%edi,%%esi,2);\n"
|
||||
" incl %%esi;\n"
|
||||
" cmpl $39,%%esi;\n"
|
||||
" jle 1b;\n"
|
||||
" emms;\n"
|
||||
:
|
||||
: "c" (e), "D" (x), [gsm_H] "X" (*((int64_t *) gsm_H)), [gsm_H8] "X" (*((int64_t *) (gsm_H + 4))), [gsm_H16] "X" (*((int64_t *) (gsm_H + 8)))
|
||||
: "eax", "edx", "esi"
|
||||
);
|
||||
#else
|
||||
int32_t L_result;
|
||||
int k;
|
||||
|
||||
/* The coefficients of the weighting filter are stored in a table
|
||||
(see table 4.4). The following scaling is used:
|
||||
|
||||
H[0..10] = integer(real_H[0..10] * 8192);
|
||||
*/
|
||||
/* Initialization of a temporary working array wt[0...49] */
|
||||
|
||||
/* for (k = 0; k <= 4; k++) wt[k] = 0;
|
||||
* for (k = 5; k <= 44; k++) wt[k] = *e++;
|
||||
* for (k = 45; k <= 49; k++) wt[k] = 0;
|
||||
*
|
||||
* (e[-5..-1] and e[40..44] are allocated by the caller,
|
||||
* are initially zero and are not written anywhere.)
|
||||
*/
|
||||
e -= 5;
|
||||
|
||||
/* Compute the signal x[0..39] */
|
||||
for (k = 0; k < 40; k++)
|
||||
{
|
||||
L_result = 8192 >> 1;
|
||||
|
||||
/* for (i = 0; i <= 10; i++)
|
||||
* {
|
||||
* L_temp = gsm_l_mult(wt[k + i], gsm_H[i]);
|
||||
* L_result = gsm_l_add(L_result, L_temp);
|
||||
* }
|
||||
*/
|
||||
|
||||
#undef STEP
|
||||
#define STEP(i,H) (e[k + i] * (int32_t) H)
|
||||
|
||||
/* Every one of these multiplications is done twice,
|
||||
but I don't see an elegant way to optimize this.
|
||||
Do you?
|
||||
*/
|
||||
L_result += STEP( 0, -134);
|
||||
L_result += STEP( 1, -374);
|
||||
// += STEP( 2, 0 );
|
||||
L_result += STEP( 3, 2054);
|
||||
L_result += STEP( 4, 5741);
|
||||
L_result += STEP( 5, 8192);
|
||||
L_result += STEP( 6, 5741);
|
||||
L_result += STEP( 7, 2054);
|
||||
// += STEP( 8, 0 );
|
||||
L_result += STEP( 9, -374);
|
||||
L_result += STEP(10, -134);
|
||||
|
||||
/* 2 adds vs. >> 16 => 14, minus one shift to compensate for
|
||||
those we lost when replacing L_MULT by '*'. */
|
||||
L_result >>= 13;
|
||||
x[k] = saturate(L_result);
|
||||
}
|
||||
/*endfor*/
|
||||
#endif
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
/* 4.2.14 */
|
||||
static void rpe_grid_selection(int16_t x[40], int16_t xM[13], int16_t *Mc_out)
|
||||
{
|
||||
int i;
|
||||
int32_t L_result;
|
||||
int32_t L_temp;
|
||||
int32_t EM; /* xxx should be L_EM? */
|
||||
int16_t Mc;
|
||||
int32_t L_common_0_3;
|
||||
|
||||
/* The signal x[0..39] is used to select the RPE grid which is
|
||||
represented by Mc. */
|
||||
|
||||
EM = 0;
|
||||
Mc = 0;
|
||||
|
||||
#undef STEP
|
||||
#define STEP(m,i) \
|
||||
L_temp = x[m + 3*i] >> 2; \
|
||||
L_result += L_temp*L_temp;
|
||||
|
||||
/* Common part of 0 and 3 */
|
||||
L_result = 0;
|
||||
STEP(0, 1);
|
||||
STEP(0, 2);
|
||||
STEP(0, 3);
|
||||
STEP(0, 4);
|
||||
STEP(0, 5);
|
||||
STEP(0, 6);
|
||||
STEP(0, 7);
|
||||
STEP(0, 8);
|
||||
STEP(0, 9);
|
||||
STEP(0, 10);
|
||||
STEP(0, 11);
|
||||
STEP(0, 12);
|
||||
L_common_0_3 = L_result;
|
||||
|
||||
/* i = 0 */
|
||||
|
||||
STEP(0, 0);
|
||||
L_result <<= 1; /* implicit in L_MULT */
|
||||
EM = L_result;
|
||||
|
||||
/* i = 1 */
|
||||
|
||||
L_result = 0;
|
||||
STEP(1, 0);
|
||||
STEP(1, 1);
|
||||
STEP(1, 2);
|
||||
STEP(1, 3);
|
||||
STEP(1, 4);
|
||||
STEP(1, 5);
|
||||
STEP(1, 6);
|
||||
STEP(1, 7);
|
||||
STEP(1, 8);
|
||||
STEP(1, 9);
|
||||
STEP(1, 10);
|
||||
STEP(1, 11);
|
||||
STEP(1, 12);
|
||||
L_result <<= 1;
|
||||
if (L_result > EM)
|
||||
{
|
||||
Mc = 1;
|
||||
EM = L_result;
|
||||
}
|
||||
/*endif*/
|
||||
|
||||
/* i = 2 */
|
||||
|
||||
L_result = 0;
|
||||
STEP(2, 0);
|
||||
STEP(2, 1);
|
||||
STEP(2, 2);
|
||||
STEP(2, 3);
|
||||
STEP(2, 4);
|
||||
STEP(2, 5);
|
||||
STEP(2, 6);
|
||||
STEP(2, 7);
|
||||
STEP(2, 8);
|
||||
STEP(2, 9);
|
||||
STEP(2, 10);
|
||||
STEP(2, 11);
|
||||
STEP(2, 12);
|
||||
L_result <<= 1;
|
||||
if (L_result > EM)
|
||||
{
|
||||
Mc = 2;
|
||||
EM = L_result;
|
||||
}
|
||||
/*endif*/
|
||||
|
||||
/* i = 3 */
|
||||
|
||||
L_result = L_common_0_3;
|
||||
STEP(3, 12);
|
||||
L_result <<= 1;
|
||||
if (L_result > EM)
|
||||
{
|
||||
Mc = 3;
|
||||
EM = L_result;
|
||||
}
|
||||
/*endif*/
|
||||
|
||||
/* Down-sampling by a factor 3 to get the selected xM[0..12]
|
||||
RPE sequence. */
|
||||
for (i = 0; i < 13; i++)
|
||||
xM[i] = x[Mc + 3*i];
|
||||
/*endfor*/
|
||||
*Mc_out = Mc;
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
/* 4.12.15 */
|
||||
static void apcm_quantization_xmaxc_to_exp_mant(int16_t xmaxc,
|
||||
int16_t *exp_out,
|
||||
int16_t *mant_out)
|
||||
{
|
||||
int16_t exp;
|
||||
int16_t mant;
|
||||
|
||||
/* Compute exponent and mantissa of the decoded version of xmaxc */
|
||||
exp = 0;
|
||||
if (xmaxc > 15)
|
||||
exp = (int16_t) ((xmaxc >> 3) - 1);
|
||||
/*endif*/
|
||||
mant = xmaxc - (exp << 3);
|
||||
|
||||
if (mant == 0)
|
||||
{
|
||||
exp = -4;
|
||||
mant = 7;
|
||||
}
|
||||
else
|
||||
{
|
||||
while (mant <= 7)
|
||||
{
|
||||
mant = (int16_t) (mant << 1 | 1);
|
||||
exp--;
|
||||
}
|
||||
/*endwhile*/
|
||||
mant -= 8;
|
||||
}
|
||||
/*endif*/
|
||||
|
||||
assert(exp >= -4 && exp <= 6);
|
||||
assert(mant >= 0 && mant <= 7);
|
||||
|
||||
*exp_out = exp;
|
||||
*mant_out = mant;
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
static void apcm_quantization(int16_t xM[13],
|
||||
int16_t xMc[13],
|
||||
int16_t *mant_out,
|
||||
int16_t *exp_out,
|
||||
int16_t *xmaxc_out)
|
||||
{
|
||||
/* Table 4.5 Normalized inverse mantissa used to compute xM/xmax */
|
||||
static const int16_t gsm_NRFAC[8] =
|
||||
{
|
||||
29128, 26215, 23832, 21846, 20165, 18725, 17476, 16384
|
||||
};
|
||||
int i;
|
||||
int itest;
|
||||
int16_t xmax;
|
||||
int16_t xmaxc;
|
||||
int16_t temp;
|
||||
int16_t temp1;
|
||||
int16_t temp2;
|
||||
int16_t exp;
|
||||
int16_t mant;
|
||||
|
||||
/* Find the maximum absolute value xmax of xM[0..12]. */
|
||||
xmax = 0;
|
||||
for (i = 0; i < 13; i++)
|
||||
{
|
||||
temp = xM[i];
|
||||
temp = gsm_abs(temp);
|
||||
if (temp > xmax)
|
||||
xmax = temp;
|
||||
/*endif*/
|
||||
}
|
||||
/*endfor*/
|
||||
|
||||
/* Quantizing and coding of xmax to get xmaxc. */
|
||||
exp = 0;
|
||||
temp = xmax >> 9;
|
||||
itest = 0;
|
||||
|
||||
for (i = 0; i <= 5; i++)
|
||||
{
|
||||
itest |= (temp <= 0);
|
||||
temp >>= 1;
|
||||
|
||||
assert(exp <= 5);
|
||||
if (itest == 0)
|
||||
exp++;
|
||||
/*endif*/
|
||||
}
|
||||
/*endfor*/
|
||||
|
||||
assert(exp <= 6 && exp >= 0);
|
||||
temp = (int16_t) (exp + 5);
|
||||
|
||||
assert(temp <= 11 && temp >= 0);
|
||||
xmaxc = gsm_add((xmax >> temp), exp << 3);
|
||||
|
||||
/* Quantizing and coding of the xM[0..12] RPE sequence
|
||||
to get the xMc[0..12] */
|
||||
apcm_quantization_xmaxc_to_exp_mant(xmaxc, &exp, &mant);
|
||||
|
||||
/* This computation uses the fact that the decoded version of xmaxc
|
||||
can be calculated by using the exponent and the mantissa part of
|
||||
xmaxc (logarithmic table).
|
||||
So, this method avoids any division and uses only a scaling
|
||||
of the RPE samples by a function of the exponent. A direct
|
||||
multiplication by the inverse of the mantissa (NRFAC[0..7]
|
||||
found in table 4.5) gives the 3 bit coded version xMc[0..12]
|
||||
of the RPE samples.
|
||||
*/
|
||||
/* Direct computation of xMc[0..12] using table 4.5 */
|
||||
assert(exp <= 4096 && exp >= -4096);
|
||||
assert(mant >= 0 && mant <= 7);
|
||||
|
||||
temp1 = (int16_t) (6 - exp); /* Normalization by the exponent */
|
||||
temp2 = gsm_NRFAC[mant]; /* Inverse mantissa */
|
||||
|
||||
for (i = 0; i < 13; i++)
|
||||
{
|
||||
assert(temp1 >= 0 && temp1 < 16);
|
||||
|
||||
temp = xM[i] << temp1;
|
||||
temp = gsm_mult(temp, temp2);
|
||||
temp >>= 12;
|
||||
xMc[i] = (int16_t) (temp + 4); /* See note below */
|
||||
}
|
||||
/*endfor*/
|
||||
|
||||
/* NOTE: This equation is used to make all the xMc[i] positive. */
|
||||
*mant_out = mant;
|
||||
*exp_out = exp;
|
||||
*xmaxc_out = xmaxc;
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
/* 4.2.16 */
|
||||
static void apcm_inverse_quantization(int16_t xMc[13],
|
||||
int16_t mant,
|
||||
int16_t exp,
|
||||
int16_t xMp[13])
|
||||
{
|
||||
/* Table 4.6 Normalized direct mantissa used to compute xM/xmax */
|
||||
static const int16_t gsm_FAC[8] =
|
||||
{
|
||||
18431, 20479, 22527, 24575, 26623, 28671, 30719, 32767
|
||||
};
|
||||
int i;
|
||||
int16_t temp;
|
||||
int16_t temp1;
|
||||
int16_t temp2;
|
||||
int16_t temp3;
|
||||
|
||||
/* This part is for decoding the RPE sequence of coded xMc[0..12]
|
||||
samples to obtain the xMp[0..12] array. Table 4.6 is used to get
|
||||
the mantissa of xmaxc (FAC[0..7]).
|
||||
*/
|
||||
vc_assert(mant >= 0 && mant <= 7);
|
||||
|
||||
temp1 = gsm_FAC[mant]; /* See 4.2-15 for mant */
|
||||
temp2 = gsm_sub(6, exp); /* See 4.2-15 for exp */
|
||||
temp3 = gsm_asl(1, gsm_sub (temp2, 1));
|
||||
|
||||
for (i = 0; i < 13; i++)
|
||||
{
|
||||
assert(xMc[i] >= 0 && xMc[i] <= 7); /* 3 bit unsigned */
|
||||
|
||||
temp = (int16_t) ((xMc[i] << 1) - 7); /* Restore sign */
|
||||
assert(temp <= 7 && temp >= -7); /* 4 bit signed */
|
||||
|
||||
temp <<= 12; /* 16 bit signed */
|
||||
temp = gsm_mult_r(temp1, temp);
|
||||
temp = gsm_add(temp, temp3);
|
||||
xMp[i] = gsm_asr(temp, temp2);
|
||||
}
|
||||
/*endfor*/
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
/* 4.2.17 */
|
||||
static void rpe_grid_positioning(int16_t Mc,
|
||||
int16_t xMp[13],
|
||||
int16_t ep[40])
|
||||
{
|
||||
int i = 13;
|
||||
|
||||
/* This procedure computes the reconstructed long term residual signal
|
||||
ep[0..39] for the LTP analysis filter. The inputs are the Mc
|
||||
which is the grid position selection and the xMp[0..12] decoded
|
||||
RPE samples which are upsampled by a factor of 3 by inserting zero
|
||||
values.
|
||||
*/
|
||||
assert(0 <= Mc && Mc <= 3);
|
||||
|
||||
switch (Mc)
|
||||
{
|
||||
case 3:
|
||||
*ep++ = 0;
|
||||
case 2:
|
||||
do
|
||||
{
|
||||
*ep++ = 0;
|
||||
case 1:
|
||||
*ep++ = 0;
|
||||
case 0:
|
||||
*ep++ = *xMp++;
|
||||
}
|
||||
while (--i);
|
||||
}
|
||||
/*endswitch*/
|
||||
while (++Mc < 4)
|
||||
*ep++ = 0;
|
||||
/*endwhile*/
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
void gsm0610_rpe_encoding(gsm0610_state_t *s,
|
||||
int16_t *e, // [-5..-1][0..39][40..44]
|
||||
int16_t *xmaxc,
|
||||
int16_t *Mc,
|
||||
int16_t xMc[13])
|
||||
{
|
||||
int16_t x[40];
|
||||
int16_t xM[13];
|
||||
int16_t xMp[13];
|
||||
int16_t mant;
|
||||
int16_t exp;
|
||||
|
||||
weighting_filter(e, x);
|
||||
rpe_grid_selection(x, xM, Mc);
|
||||
|
||||
apcm_quantization(xM, xMc, &mant, &exp, xmaxc);
|
||||
apcm_inverse_quantization(xMc, mant, exp, xMp);
|
||||
|
||||
rpe_grid_positioning(*Mc, xMp, e);
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
void gsm0610_rpe_decoding(gsm0610_state_t *s,
|
||||
int16_t xmaxc,
|
||||
int16_t Mcr,
|
||||
int16_t xMcr[13],
|
||||
int16_t erp[40])
|
||||
{
|
||||
int16_t exp;
|
||||
int16_t mant;
|
||||
int16_t xMp[13];
|
||||
|
||||
apcm_quantization_xmaxc_to_exp_mant(xmaxc, &exp, &mant);
|
||||
apcm_inverse_quantization(xMcr, mant, exp, xMp);
|
||||
rpe_grid_positioning(Mcr, xMp, erp);
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
/*- End of file ------------------------------------------------------------*/
|
|
@ -1,362 +0,0 @@
|
|||
/*
|
||||
* VoIPcodecs - a series of DSP components for telephony
|
||||
*
|
||||
* gsm0610_short_term.c - GSM 06.10 full rate speech codec.
|
||||
*
|
||||
* Written by Steve Underwood <steveu@coppice.org>
|
||||
*
|
||||
* Copyright (C) 2006 Steve Underwood
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2, or
|
||||
* the Lesser GNU General Public License version 2.1, as published by
|
||||
* the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* This code is based on the widely used GSM 06.10 code available from
|
||||
* http://kbs.cs.tu-berlin.de/~jutta/toast.html
|
||||
*
|
||||
* $Id: gsm0610_short_term.c,v 1.11 2008/02/09 15:31:36 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <assert.h>
|
||||
#include <inttypes.h>
|
||||
#if defined(HAVE_TGMATH_H)
|
||||
#include <tgmath.h>
|
||||
#endif
|
||||
#if defined(HAVE_MATH_H)
|
||||
#include <math.h>
|
||||
#endif
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "voipcodecs/telephony.h"
|
||||
#include "voipcodecs/bitstream.h"
|
||||
#include "voipcodecs/dc_restore.h"
|
||||
#include "voipcodecs/gsm0610.h"
|
||||
|
||||
#include "gsm0610_local.h"
|
||||
|
||||
/* SHORT TERM ANALYSIS FILTERING SECTION */
|
||||
|
||||
/* 4.2.8 */
|
||||
static void decode_log_area_ratios(int16_t LARc[8], int16_t *LARpp)
|
||||
{
|
||||
int16_t temp1;
|
||||
|
||||
/* This procedure requires for efficient implementation
|
||||
two tables.
|
||||
INVA[1..8] = integer((32768*8)/real_A[1..8])
|
||||
MIC[1..8] = minimum value of the LARc[1..8]
|
||||
*/
|
||||
|
||||
/* Compute the LARpp[1..8] */
|
||||
|
||||
#undef STEP
|
||||
#define STEP(B,MIC,INVA) \
|
||||
temp1 = gsm_add(*LARc++, MIC) << 10; \
|
||||
temp1 = gsm_sub(temp1, B << 1); \
|
||||
temp1 = gsm_mult_r (INVA, temp1); \
|
||||
*LARpp++ = gsm_add(temp1, temp1);
|
||||
|
||||
STEP( 0, -32, 13107);
|
||||
STEP( 0, -32, 13107);
|
||||
STEP( 2048, -16, 13107);
|
||||
STEP(-2560, -16, 13107);
|
||||
|
||||
STEP( 94, -8, 19223);
|
||||
STEP(-1792, -8, 17476);
|
||||
STEP( -341, -4, 31454);
|
||||
STEP(-1144, -4, 29708);
|
||||
|
||||
/* NOTE: the addition of *MIC is used to restore the sign of *LARc. */
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
/* 4.2.9 */
|
||||
|
||||
/* Computation of the quantized reflection coefficients */
|
||||
|
||||
/* 4.2.9.1 Interpolation of the LARpp[1..8] to get the LARp[1..8] */
|
||||
|
||||
/* Within each frame of 160 analyzed speech samples the short term
|
||||
analysis and synthesis filters operate with four different sets of
|
||||
coefficients, derived from the previous set of decoded LARs(LARpp(j - 1))
|
||||
and the actual set of decoded LARs (LARpp(j))
|
||||
|
||||
(Initial value: LARpp(j - 1)[1..8] = 0.)
|
||||
*/
|
||||
|
||||
static void coefficients_0_12(int16_t *LARpp_j_1,
|
||||
int16_t *LARpp_j,
|
||||
int16_t *LARp)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 1; i <= 8; i++, LARp++, LARpp_j_1++, LARpp_j++)
|
||||
{
|
||||
*LARp = gsm_add(*LARpp_j_1 >> 2, *LARpp_j >> 2);
|
||||
*LARp = gsm_add(*LARp, *LARpp_j_1 >> 1);
|
||||
}
|
||||
/*endfor*/
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
static void coefficients_13_26(int16_t *LARpp_j_1,
|
||||
int16_t *LARpp_j,
|
||||
int16_t *LARp)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 1; i <= 8; i++, LARpp_j_1++, LARpp_j++, LARp++)
|
||||
*LARp = gsm_add(*LARpp_j_1 >> 1, *LARpp_j >> 1);
|
||||
/*endfor*/
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
static void coefficients_27_39(int16_t *LARpp_j_1,
|
||||
int16_t *LARpp_j,
|
||||
int16_t *LARp)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 1; i <= 8; i++, LARpp_j_1++, LARpp_j++, LARp++)
|
||||
{
|
||||
*LARp = gsm_add(*LARpp_j_1 >> 2, *LARpp_j >> 2);
|
||||
*LARp = gsm_add(*LARp, *LARpp_j >> 1);
|
||||
}
|
||||
/*endfor*/
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
static void coefficients_40_159(int16_t *LARpp_j, int16_t *LARp)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 1; i <= 8; i++)
|
||||
*LARp++ = *LARpp_j++;
|
||||
/*endfor*/
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
/* 4.2.9.2 */
|
||||
static void larp_to_rp(int16_t LARp[8])
|
||||
{
|
||||
int i;
|
||||
int16_t *LARpx;
|
||||
int16_t temp;
|
||||
|
||||
/* The input to this procedure is the interpolated LARp[0..7] array.
|
||||
The reflection coefficients, rp[i], are used in the analysis
|
||||
filter and in the synthesis filter.
|
||||
*/
|
||||
|
||||
LARpx = LARp;
|
||||
for (i = 1; i <= 8; i++, LARpx++)
|
||||
{
|
||||
temp = *LARpx;
|
||||
if (temp < 0)
|
||||
{
|
||||
if (temp == INT16_MIN)
|
||||
temp = INT16_MAX;
|
||||
else
|
||||
temp = -temp;
|
||||
/*endif*/
|
||||
if (temp < 11059)
|
||||
temp <<= 1;
|
||||
else if (temp < 20070)
|
||||
temp += 11059;
|
||||
else
|
||||
temp = gsm_add(temp >> 2, 26112);
|
||||
/*endif*/
|
||||
*LARpx = -temp;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (temp < 11059)
|
||||
temp <<= 1;
|
||||
else if (temp < 20070)
|
||||
temp += 11059;
|
||||
else
|
||||
temp = gsm_add(temp >> 2, 26112);
|
||||
/*endif*/
|
||||
*LARpx = temp;
|
||||
}
|
||||
/*endif*/
|
||||
}
|
||||
/*endfor*/
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
/* 4.2.10 */
|
||||
static void short_term_analysis_filtering(gsm0610_state_t *s,
|
||||
int16_t rp[8],
|
||||
int k_n, // k_end - k_start
|
||||
int16_t amp[]) // [0..n-1] IN/OUT
|
||||
{
|
||||
/* This procedure computes the short term residual signal d[..] to be fed
|
||||
to the RPE-LTP loop from the s[..] signal and from the local rp[..]
|
||||
array (quantized reflection coefficients). As the call of this
|
||||
procedure can be done in many ways (see the interpolation of the LAR
|
||||
coefficient), it is assumed that the computation begins with index
|
||||
k_start (for arrays d[..] and s[..]) and stops with index k_end
|
||||
(k_start and k_end are defined in 4.2.9.1). This procedure also
|
||||
needs to keep the array u[0..7] in memory for each call.
|
||||
*/
|
||||
int16_t *u0;
|
||||
int16_t *u_top;
|
||||
int i;
|
||||
int16_t *u;
|
||||
int16_t *rpx;
|
||||
int32_t di;
|
||||
int32_t u_out;
|
||||
|
||||
u0 = s->u;
|
||||
u_top = u0 + 8;
|
||||
|
||||
for (i = 0; i < k_n; i++)
|
||||
{
|
||||
di =
|
||||
u_out = amp[i];
|
||||
for (rpx = rp, u = u0; u < u_top; )
|
||||
{
|
||||
int32_t ui;
|
||||
int32_t rpi;
|
||||
|
||||
ui = *u;
|
||||
*u++ = (int16_t) u_out;
|
||||
rpi = *rpx++;
|
||||
u_out = ui + (((rpi*di) + 0x4000) >> 15);
|
||||
di = di + (((rpi*ui) + 0x4000) >> 15);
|
||||
u_out = saturate(u_out);
|
||||
di = saturate(di);
|
||||
}
|
||||
/*endfor*/
|
||||
amp[i] = (int16_t) di;
|
||||
}
|
||||
/*endfor*/
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
static void short_term_synthesis_filtering(gsm0610_state_t *s,
|
||||
int16_t rrp[8],
|
||||
int k, // k_end - k_start
|
||||
int16_t *wt, // [0..k - 1]
|
||||
int16_t *sr) // [0..k - 1]
|
||||
{
|
||||
int16_t *v;
|
||||
int i;
|
||||
int16_t sri;
|
||||
int16_t tmp1;
|
||||
int16_t tmp2;
|
||||
|
||||
v = s->v;
|
||||
while (k--)
|
||||
{
|
||||
sri = *wt++;
|
||||
for (i = 8; i--; )
|
||||
{
|
||||
tmp1 = rrp[i];
|
||||
tmp2 = v[i];
|
||||
tmp2 = ((tmp1 == INT16_MIN && tmp2 == INT16_MIN)
|
||||
?
|
||||
INT16_MAX
|
||||
:
|
||||
(int16_t) (((int32_t) tmp1*(int32_t) tmp2 + 16384) >> 15) & 0xFFFF);
|
||||
|
||||
sri = gsm_sub(sri, tmp2);
|
||||
|
||||
tmp1 = ((tmp1 == INT16_MIN && sri == INT16_MIN)
|
||||
?
|
||||
INT16_MAX
|
||||
:
|
||||
(int16_t) (((int32_t) tmp1*(int32_t) sri + 16384) >> 15) & 0xFFFF);
|
||||
|
||||
v[i + 1] = gsm_add(v[i], tmp1);
|
||||
}
|
||||
/*endfor*/
|
||||
*sr++ =
|
||||
v[0] = sri;
|
||||
}
|
||||
/*endwhile*/
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
void gsm0610_short_term_analysis_filter(gsm0610_state_t *s,
|
||||
int16_t LARc[8],
|
||||
int16_t amp[GSM0610_FRAME_LEN])
|
||||
{
|
||||
int16_t *LARpp_j;
|
||||
int16_t *LARpp_j_1;
|
||||
int16_t LARp[8];
|
||||
|
||||
LARpp_j = s->LARpp[s->j];
|
||||
LARpp_j_1 = s->LARpp[s->j ^= 1];
|
||||
|
||||
decode_log_area_ratios(LARc, LARpp_j);
|
||||
|
||||
coefficients_0_12(LARpp_j_1, LARpp_j, LARp);
|
||||
larp_to_rp(LARp);
|
||||
short_term_analysis_filtering(s, LARp, 13, amp);
|
||||
|
||||
coefficients_13_26(LARpp_j_1, LARpp_j, LARp);
|
||||
larp_to_rp(LARp);
|
||||
short_term_analysis_filtering(s, LARp, 14, amp + 13);
|
||||
|
||||
coefficients_27_39(LARpp_j_1, LARpp_j, LARp);
|
||||
larp_to_rp(LARp);
|
||||
short_term_analysis_filtering(s, LARp, 13, amp + 27);
|
||||
|
||||
coefficients_40_159(LARpp_j, LARp);
|
||||
larp_to_rp(LARp);
|
||||
short_term_analysis_filtering(s, LARp, 120, amp + 40);
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
void gsm0610_short_term_synthesis_filter(gsm0610_state_t *s,
|
||||
int16_t LARcr[8],
|
||||
int16_t wt[GSM0610_FRAME_LEN],
|
||||
int16_t amp[GSM0610_FRAME_LEN])
|
||||
{
|
||||
int16_t *LARpp_j;
|
||||
int16_t *LARpp_j_1;
|
||||
int16_t LARp[8];
|
||||
|
||||
LARpp_j = s->LARpp[s->j];
|
||||
LARpp_j_1 = s->LARpp[s->j ^= 1];
|
||||
|
||||
decode_log_area_ratios(LARcr, LARpp_j);
|
||||
|
||||
coefficients_0_12(LARpp_j_1, LARpp_j, LARp);
|
||||
larp_to_rp(LARp);
|
||||
short_term_synthesis_filtering(s, LARp, 13, wt, amp);
|
||||
|
||||
coefficients_13_26(LARpp_j_1, LARpp_j, LARp);
|
||||
larp_to_rp(LARp);
|
||||
short_term_synthesis_filtering(s, LARp, 14, wt + 13, amp + 13);
|
||||
|
||||
coefficients_27_39(LARpp_j_1, LARpp_j, LARp);
|
||||
larp_to_rp(LARp);
|
||||
short_term_synthesis_filtering(s, LARp, 13, wt + 27, amp + 27);
|
||||
|
||||
coefficients_40_159(LARpp_j, LARp);
|
||||
larp_to_rp(LARp);
|
||||
short_term_synthesis_filtering(s, LARp, 120, wt + 40, amp + 40);
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
/*- End of file ------------------------------------------------------------*/
|
|
@ -1,491 +0,0 @@
|
|||
/*
|
||||
* VoIPcodecs - a series of DSP components for telephony
|
||||
*
|
||||
* ima_adpcm.c - Conversion routines between linear 16 bit PCM data and
|
||||
* IMA/DVI/Intel ADPCM format.
|
||||
*
|
||||
* Written by Steve Underwood <steveu@coppice.org>
|
||||
*
|
||||
* Copyright (C) 2001, 2004 Steve Underwood
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2, or
|
||||
* the Lesser GNU General Public License version 2.1, as published by
|
||||
* the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: ima_adpcm.c,v 1.21 2008/02/09 15:33:40 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <inttypes.h>
|
||||
#include <string.h>
|
||||
#if defined(HAVE_TGMATH_H)
|
||||
#include <tgmath.h>
|
||||
#endif
|
||||
#if defined(HAVE_MATH_H)
|
||||
#include <math.h>
|
||||
#endif
|
||||
|
||||
#include "voipcodecs/telephony.h"
|
||||
#include "voipcodecs/dc_restore.h"
|
||||
#include "voipcodecs/ima_adpcm.h"
|
||||
|
||||
/*
|
||||
* Intel/DVI ADPCM coder/decoder.
|
||||
*
|
||||
* The algorithm for this coder was taken from the IMA Compatability Project
|
||||
* proceedings, Vol 2, Number 2; May 1992.
|
||||
*
|
||||
* The RTP payload specs. reference a variant of DVI, called VDVI. This attempts to
|
||||
* further compresses, in a variable bit rate manner, by expressing the 4 bit codes
|
||||
* from the DVI codec as:
|
||||
*
|
||||
* 0 00
|
||||
* 1 010
|
||||
* 2 1100
|
||||
* 3 11100
|
||||
* 4 111100
|
||||
* 5 1111100
|
||||
* 6 11111100
|
||||
* 7 11111110
|
||||
* 8 10
|
||||
* 9 011
|
||||
* 10 1101
|
||||
* 11 11101
|
||||
* 12 111101
|
||||
* 13 1111101
|
||||
* 14 11111101
|
||||
* 15 11111111
|
||||
*
|
||||
* Any left over bits in the last octet of an encoded burst are set to one.
|
||||
*/
|
||||
|
||||
/*
|
||||
DVI4 uses an adaptive delta pulse code modulation (ADPCM) encoding
|
||||
scheme that was specified by the Interactive Multimedia Association
|
||||
(IMA) as the "IMA ADPCM wave type". However, the encoding defined
|
||||
here as DVI4 differs in three respects from the IMA specification:
|
||||
|
||||
o The RTP DVI4 header contains the predicted value rather than the
|
||||
first sample value contained the IMA ADPCM block header.
|
||||
|
||||
o IMA ADPCM blocks contain an odd number of samples, since the first
|
||||
sample of a block is contained just in the header (uncompressed),
|
||||
followed by an even number of compressed samples. DVI4 has an
|
||||
even number of compressed samples only, using the `predict' word
|
||||
from the header to decode the first sample.
|
||||
|
||||
o For DVI4, the 4-bit samples are packed with the first sample in
|
||||
the four most significant bits and the second sample in the four
|
||||
least significant bits. In the IMA ADPCM codec, the samples are
|
||||
packed in the opposite order.
|
||||
|
||||
Each packet contains a single DVI block. This profile only defines
|
||||
the 4-bit-per-sample version, while IMA also specified a 3-bit-per-
|
||||
sample encoding.
|
||||
|
||||
The "header" word for each channel has the following structure:
|
||||
|
||||
int16 predict; // predicted value of first sample
|
||||
// from the previous block (L16 format)
|
||||
u_int8 index; // current index into stepsize table
|
||||
u_int8 reserved; // set to zero by sender, ignored by receiver
|
||||
|
||||
Each octet following the header contains two 4-bit samples, thus the
|
||||
number of samples per packet MUST be even because there is no means
|
||||
to indicate a partially filled last octet.
|
||||
*/
|
||||
|
||||
#define STEP_MAX 88
|
||||
|
||||
/* Intel ADPCM step variation table */
|
||||
static const int step_size[STEP_MAX + 1] =
|
||||
{
|
||||
7, 8, 9, 10, 11, 12, 13, 14, 16, 17,
|
||||
19, 21, 23, 25, 28, 31, 34, 37, 41, 45,
|
||||
50, 55, 60, 66, 73, 80, 88, 97, 107, 118,
|
||||
130, 143, 157, 173, 190, 209, 230, 253, 279, 307,
|
||||
337, 371, 408, 449, 494, 544, 598, 658, 724, 796,
|
||||
876, 963, 1060, 1166, 1282, 1411, 1552, 1707, 1878, 2066,
|
||||
2272, 2499, 2749, 3024, 3327, 3660, 4026, 4428, 4871, 5358,
|
||||
5894, 6484, 7132, 7845, 8630, 9493, 10442, 11487, 12635, 13899,
|
||||
15289, 16818, 18500, 20350, 22385, 24623, 27086, 29794, 32767
|
||||
};
|
||||
|
||||
static const int step_adjustment[8] =
|
||||
{
|
||||
-1, -1, -1, -1, 2, 4, 6, 8
|
||||
};
|
||||
|
||||
static const struct
|
||||
{
|
||||
uint8_t code;
|
||||
uint8_t bits;
|
||||
} vdvi_encode[] =
|
||||
{
|
||||
{0x00, 2},
|
||||
{0x02, 3},
|
||||
{0x0C, 4},
|
||||
{0x1C, 5},
|
||||
{0x3C, 6},
|
||||
{0x7C, 7},
|
||||
{0xFC, 8},
|
||||
{0xFE, 8},
|
||||
{0x02, 2},
|
||||
{0x03, 3},
|
||||
{0x0D, 4},
|
||||
{0x1D, 5},
|
||||
{0x3D, 6},
|
||||
{0x7D, 7},
|
||||
{0xFD, 8},
|
||||
{0xFF, 8}
|
||||
};
|
||||
|
||||
static const struct
|
||||
{
|
||||
uint16_t code;
|
||||
uint16_t mask;
|
||||
uint8_t bits;
|
||||
} vdvi_decode[] =
|
||||
{
|
||||
{0x0000, 0xC000, 2},
|
||||
{0x4000, 0xE000, 3},
|
||||
{0xC000, 0xF000, 4},
|
||||
{0xE000, 0xF800, 5},
|
||||
{0xF000, 0xFC00, 6},
|
||||
{0xF800, 0xFE00, 7},
|
||||
{0xFC00, 0xFF00, 8},
|
||||
{0xFE00, 0xFF00, 8},
|
||||
{0x8000, 0xC000, 2},
|
||||
{0x6000, 0xE000, 3},
|
||||
{0xD000, 0xF000, 4},
|
||||
{0xE800, 0xF800, 5},
|
||||
{0xF400, 0xFC00, 6},
|
||||
{0xFA00, 0xFE00, 7},
|
||||
{0xFD00, 0xFF00, 8},
|
||||
{0xFF00, 0xFF00, 8}
|
||||
};
|
||||
|
||||
static int16_t decode(ima_adpcm_state_t *s, uint8_t adpcm)
|
||||
{
|
||||
int e;
|
||||
int ss;
|
||||
int16_t linear;
|
||||
|
||||
/* e = (adpcm+0.5)*step/4 */
|
||||
ss = step_size[s->step_index];
|
||||
e = ss >> 3;
|
||||
if (adpcm & 0x01)
|
||||
e += (ss >> 2);
|
||||
/*endif*/
|
||||
if (adpcm & 0x02)
|
||||
e += (ss >> 1);
|
||||
/*endif*/
|
||||
if (adpcm & 0x04)
|
||||
e += ss;
|
||||
/*endif*/
|
||||
if (adpcm & 0x08)
|
||||
e = -e;
|
||||
/*endif*/
|
||||
linear = saturate(s->last + e);
|
||||
s->last = linear;
|
||||
s->step_index += step_adjustment[adpcm & 0x07];
|
||||
if (s->step_index < 0)
|
||||
s->step_index = 0;
|
||||
else if (s->step_index > STEP_MAX)
|
||||
s->step_index = STEP_MAX;
|
||||
/*endif*/
|
||||
return linear;
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
static uint8_t encode(ima_adpcm_state_t *s, int16_t linear)
|
||||
{
|
||||
int e;
|
||||
int ss;
|
||||
int adpcm;
|
||||
int diff;
|
||||
int initial_e;
|
||||
|
||||
ss = step_size[s->step_index];
|
||||
initial_e =
|
||||
e = linear - s->last;
|
||||
diff = ss >> 3;
|
||||
adpcm = (uint8_t) 0x00;
|
||||
if (e < 0)
|
||||
{
|
||||
adpcm = (uint8_t) 0x08;
|
||||
e = -e;
|
||||
}
|
||||
/*endif*/
|
||||
if (e >= ss)
|
||||
{
|
||||
adpcm |= (uint8_t) 0x04;
|
||||
e -= ss;
|
||||
}
|
||||
/*endif*/
|
||||
ss >>= 1;
|
||||
if (e >= ss)
|
||||
{
|
||||
adpcm |= (uint8_t) 0x02;
|
||||
e -= ss;
|
||||
}
|
||||
/*endif*/
|
||||
ss >>= 1;
|
||||
if (e >= ss)
|
||||
{
|
||||
adpcm |= (uint8_t) 0x01;
|
||||
e -= ss;
|
||||
}
|
||||
/*endif*/
|
||||
|
||||
if (initial_e < 0)
|
||||
diff = -(diff - initial_e - e);
|
||||
else
|
||||
diff = diff + initial_e - e;
|
||||
/*endif*/
|
||||
s->last = saturate(diff + s->last);
|
||||
s->step_index += step_adjustment[adpcm & 0x07];
|
||||
if (s->step_index < 0)
|
||||
s->step_index = 0;
|
||||
else if (s->step_index > STEP_MAX)
|
||||
s->step_index = STEP_MAX;
|
||||
/*endif*/
|
||||
return (uint8_t) adpcm;
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
ima_adpcm_state_t *ima_adpcm_init(ima_adpcm_state_t *s, int variant, int chunk_size)
|
||||
{
|
||||
if (s == NULL)
|
||||
{
|
||||
if ((s = (ima_adpcm_state_t *) malloc(sizeof(*s))) == NULL)
|
||||
return NULL;
|
||||
}
|
||||
/*endif*/
|
||||
memset(s, 0, sizeof(*s));
|
||||
s->variant = variant;
|
||||
s->chunk_size = chunk_size;
|
||||
return s;
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
int ima_adpcm_release(ima_adpcm_state_t *s)
|
||||
{
|
||||
free(s);
|
||||
return 0;
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
int ima_adpcm_decode(ima_adpcm_state_t *s,
|
||||
int16_t amp[],
|
||||
const uint8_t ima_data[],
|
||||
int ima_bytes)
|
||||
{
|
||||
int i;
|
||||
int j;
|
||||
int samples;
|
||||
uint16_t code;
|
||||
|
||||
samples = 0;
|
||||
switch (s->variant)
|
||||
{
|
||||
case IMA_ADPCM_IMA4:
|
||||
i = 0;
|
||||
if (s->chunk_size == 0)
|
||||
{
|
||||
amp[samples++] = (ima_data[1] << 8) | ima_data[0];
|
||||
s->step_index = ima_data[2];
|
||||
s->last = amp[0];
|
||||
i = 4;
|
||||
}
|
||||
for ( ; i < ima_bytes; i++)
|
||||
{
|
||||
amp[samples++] = decode(s, ima_data[i] & 0xF);
|
||||
amp[samples++] = decode(s, (ima_data[i] >> 4) & 0xF);
|
||||
}
|
||||
/*endfor*/
|
||||
break;
|
||||
case IMA_ADPCM_DVI4:
|
||||
i = 0;
|
||||
if (s->chunk_size == 0)
|
||||
{
|
||||
s->last = (int16_t) ((ima_data[0] << 8) | ima_data[1]);
|
||||
s->step_index = ima_data[2];
|
||||
i = 4;
|
||||
}
|
||||
for ( ; i < ima_bytes; i++)
|
||||
{
|
||||
amp[samples++] = decode(s, (ima_data[i] >> 4) & 0xF);
|
||||
amp[samples++] = decode(s, ima_data[i] & 0xF);
|
||||
}
|
||||
/*endfor*/
|
||||
break;
|
||||
case IMA_ADPCM_VDVI:
|
||||
i = 0;
|
||||
if (s->chunk_size == 0)
|
||||
{
|
||||
s->last = (int16_t) ((ima_data[0] << 8) | ima_data[1]);
|
||||
s->step_index = ima_data[2];
|
||||
i = 4;
|
||||
}
|
||||
code = 0;
|
||||
s->bits = 0;
|
||||
for (;;)
|
||||
{
|
||||
if (s->bits <= 8)
|
||||
{
|
||||
if (i >= ima_bytes)
|
||||
break;
|
||||
/*endif*/
|
||||
code |= ((uint16_t) ima_data[i++] << (8 - s->bits));
|
||||
s->bits += 8;
|
||||
}
|
||||
/*endif*/
|
||||
for (j = 0; j < 8; j++)
|
||||
{
|
||||
if ((vdvi_decode[j].mask & code) == vdvi_decode[j].code)
|
||||
break;
|
||||
if ((vdvi_decode[j + 8].mask & code) == vdvi_decode[j + 8].code)
|
||||
{
|
||||
j += 8;
|
||||
break;
|
||||
}
|
||||
/*endif*/
|
||||
}
|
||||
/*endfor*/
|
||||
amp[samples++] = decode(s, (uint8_t) j);
|
||||
code <<= vdvi_decode[j].bits;
|
||||
s->bits -= vdvi_decode[j].bits;
|
||||
}
|
||||
/*endfor*/
|
||||
/* Use up the remanents of the last octet */
|
||||
while (s->bits > 0)
|
||||
{
|
||||
for (j = 0; j < 8; j++)
|
||||
{
|
||||
if ((vdvi_decode[j].mask & code) == vdvi_decode[j].code)
|
||||
break;
|
||||
/*endif*/
|
||||
if ((vdvi_decode[j + 8].mask & code) == vdvi_decode[j + 8].code)
|
||||
{
|
||||
j += 8;
|
||||
break;
|
||||
}
|
||||
/*endif*/
|
||||
}
|
||||
/*endfor*/
|
||||
if (vdvi_decode[j].bits > s->bits)
|
||||
break;
|
||||
/*endif*/
|
||||
amp[samples++] = decode(s, (uint8_t) j);
|
||||
code <<= vdvi_decode[j].bits;
|
||||
s->bits -= vdvi_decode[j].bits;
|
||||
}
|
||||
/*endwhile*/
|
||||
break;
|
||||
}
|
||||
/*endswitch*/
|
||||
return samples;
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
int ima_adpcm_encode(ima_adpcm_state_t *s,
|
||||
uint8_t ima_data[],
|
||||
const int16_t amp[],
|
||||
int len)
|
||||
{
|
||||
int i;
|
||||
int bytes;
|
||||
uint8_t code;
|
||||
|
||||
bytes = 0;
|
||||
switch (s->variant)
|
||||
{
|
||||
case IMA_ADPCM_IMA4:
|
||||
i = 0;
|
||||
if (s->chunk_size == 0)
|
||||
{
|
||||
ima_data[bytes++] = (uint8_t)amp[1];
|
||||
ima_data[bytes++] = (uint8_t)(amp[1] >> 8);
|
||||
ima_data[bytes++] = (uint8_t)s->step_index;
|
||||
ima_data[bytes++] = 0;
|
||||
s->last = amp[1];
|
||||
s->bits = 0;
|
||||
i = 1;
|
||||
}
|
||||
for ( ; i < len; i++)
|
||||
{
|
||||
s->ima_byte = (uint8_t) ((s->ima_byte >> 4) | (encode(s, amp[i]) << 4));
|
||||
if ((s->bits++ & 1))
|
||||
ima_data[bytes++] = (uint8_t) s->ima_byte;
|
||||
/*endif*/
|
||||
}
|
||||
/*endfor*/
|
||||
break;
|
||||
case IMA_ADPCM_DVI4:
|
||||
if (s->chunk_size == 0)
|
||||
{
|
||||
ima_data[bytes++] = (uint8_t) (s->last >> 8);
|
||||
ima_data[bytes++] = (uint8_t) s->last;
|
||||
ima_data[bytes++] = (uint8_t) s->step_index;
|
||||
ima_data[bytes++] = 0;
|
||||
}
|
||||
for (i = 0; i < len; i++)
|
||||
{
|
||||
s->ima_byte = (uint8_t) ((s->ima_byte << 4) | encode(s, amp[i]));
|
||||
if ((s->bits++ & 1))
|
||||
ima_data[bytes++] = (uint8_t) s->ima_byte;
|
||||
/*endif*/
|
||||
}
|
||||
/*endfor*/
|
||||
break;
|
||||
case IMA_ADPCM_VDVI:
|
||||
if (s->chunk_size == 0)
|
||||
{
|
||||
ima_data[bytes++] = (uint8_t) (s->last >> 8);
|
||||
ima_data[bytes++] = (uint8_t) s->last;
|
||||
ima_data[bytes++] = (uint8_t) s->step_index;
|
||||
ima_data[bytes++] = 0;
|
||||
}
|
||||
s->bits = 0;
|
||||
for (i = 0; i < len; i++)
|
||||
{
|
||||
code = encode(s, amp[i]);
|
||||
s->ima_byte = (s->ima_byte << vdvi_encode[code].bits) | vdvi_encode[code].code;
|
||||
s->bits += vdvi_encode[code].bits;
|
||||
if (s->bits >= 8)
|
||||
{
|
||||
s->bits -= 8;
|
||||
ima_data[bytes++] = (uint8_t) (s->ima_byte >> s->bits);
|
||||
}
|
||||
/*endif*/
|
||||
}
|
||||
/*endfor*/
|
||||
if (s->bits)
|
||||
ima_data[bytes++] = (uint8_t) (((s->ima_byte << 8) | 0xFF) >> s->bits);
|
||||
/*endif*/
|
||||
break;
|
||||
}
|
||||
/*endswitch*/
|
||||
return bytes;
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
/*- End of file ------------------------------------------------------------*/
|
|
@ -1,241 +0,0 @@
|
|||
# Microsoft Developer Studio Project File - Name="voipcodecs" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
|
||||
|
||||
CFG=voipcodecs - Win32 Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "voipcodecs.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "voipcodecs.mak" CFG="voipcodecs - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "voipcodecs - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
|
||||
!MESSAGE "voipcodecs - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
MTL=midl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "voipcodecs - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D HAVE_TGMATH_H /YX /FD /c
|
||||
# ADD CPP /nologo /MT /W3 /GX /Zi /O2 /I "." /I "..\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D HAVE_TGMATH_H /D "_WINDLL" /FR /FD /c
|
||||
# SUBTRACT CPP /YX
|
||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
|
||||
# ADD LINK32 kernel32.lib ws2_32.lib winmm.lib /nologo /dll /map /debug /machine:I386 /out:"Release/libvoipcodecs.dll"
|
||||
|
||||
!ELSEIF "$(CFG)" == "voipcodecs - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D HAVE_TGMATH_H /YX /FD /GZ /c
|
||||
# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I "." /I "..\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D HAVE_TGMATH_H /FR /FD /GZ /c
|
||||
# SUBTRACT CPP /WX /YX
|
||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 kernel32.lib ws2_32.lib winmm.lib /nologo /dll /incremental:no /map /debug /machine:I386 /out:"Debug/libvoipcodecs.dll" /pdbtype:sept
|
||||
# SUBTRACT LINK32 /nodefaultlib
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "voipcodecs - Win32 Release"
|
||||
# Name "voipcodecs - Win32 Debug"
|
||||
# Begin Group "Source Files"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\bit_operations.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\bitstream.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\g711.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\g722_encode.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\g722_decode.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\g726.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\gsm0610_decode.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\gsm0610_encode.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\gsm0610_long_term.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\gsm0610_lpc.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\gsm0610_preprocess.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\gsm0610_rpe.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\gsm0610_short_term.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ima_adpcm.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\lpc10_analyse.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\lpc10_decode.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\lpc10_encode.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\lpc10_placev.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\lpc10_voicing.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\oki_adpcm.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\vector_int.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\voipcodecs/bit_operations.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\voipcodecs/bitstream.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\voipcodecs/dc_restore.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\voipcodecs/g711.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\voipcodecs/g722.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\voipcodecs/g726.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\voipcodecs/gsm0610.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\voipcodecs/ima_adpcm.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\voipcodecs/lpc10.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\voipcodecs/oki_adpcm.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\voipcodecs/telephony.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\voipcodecs/vector_int.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\voipcodecs.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\voipcodecs.h
|
||||
# End Source File
|
||||
# End Group
|
||||
|
||||
# Begin Group "Resource Files"
|
||||
|
||||
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
|
||||
# End Group
|
||||
# End Target
|
||||
# End Project
|
|
@ -1,29 +0,0 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 9.00
|
||||
# Visual Studio 2005
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libvoipcodecs", "libvoipcodecs.vcproj", "{CF70F278-3364-4395-A2E1-23501C9B8AD2}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{1CED5987-A529-46DC-B30F-870D85FF9C94} = {1CED5987-A529-46DC-B30F-870D85FF9C94}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "at_dictionary_gen", "src\msvc\at_dictionary_gen.vcproj", "{1CED5987-A529-46DC-B30F-870D85FF9C94}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
Release|Win32 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{CF70F278-3364-4395-A2E1-23501C9B8AD2}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{CF70F278-3364-4395-A2E1-23501C9B8AD2}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{CF70F278-3364-4395-A2E1-23501C9B8AD2}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{CF70F278-3364-4395-A2E1-23501C9B8AD2}.Release|Win32.Build.0 = Release|Win32
|
||||
{1CED5987-A529-46DC-B30F-870D85FF9C94}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{1CED5987-A529-46DC-B30F-870D85FF9C94}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{1CED5987-A529-46DC-B30F-870D85FF9C94}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{1CED5987-A529-46DC-B30F-870D85FF9C94}.Release|Win32.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
|
@ -1,713 +0,0 @@
|
|||
/*
|
||||
* VoIPcodecs - a series of DSP components for telephony
|
||||
*
|
||||
* lpc10_analyse.c - LPC10 low bit rate speech codec.
|
||||
*
|
||||
* Written by Steve Underwood <steveu@coppice.org>
|
||||
*
|
||||
* Copyright (C) 2006 Steve Underwood
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2, or
|
||||
* the Lesser GNU General Public License version 2.1, as published by
|
||||
* the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* This code is based on the U.S. Department of Defense reference
|
||||
* implementation of the LPC-10 2400 bps Voice Coder. They do not
|
||||
* exert copyright claims on their code, and it may be freely used.
|
||||
*
|
||||
* $Id: lpc10_analyse.c,v 1.15 2008/02/09 15:31:36 steveu Exp $
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <inttypes.h>
|
||||
#include <memory.h>
|
||||
#if defined(HAVE_TGMATH_H)
|
||||
#include <tgmath.h>
|
||||
#endif
|
||||
#if defined(HAVE_MATH_H)
|
||||
#include <math.h>
|
||||
#endif
|
||||
|
||||
#include "voipcodecs/telephony.h"
|
||||
#include "voipcodecs/dc_restore.h"
|
||||
#include "voipcodecs/lpc10.h"
|
||||
|
||||
#include "lpc10_encdecs.h"
|
||||
|
||||
static __inline__ float energyf(float amp[], int len)
|
||||
{
|
||||
int i;
|
||||
float rms;
|
||||
|
||||
rms = 0.0f;
|
||||
for (i = 0; i < len; i++)
|
||||
rms += amp[i]*amp[i];
|
||||
rms = sqrtf(rms/len);
|
||||
return rms;
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
static void remove_dc_bias(float speech[], int len, float sigout[])
|
||||
{
|
||||
float bias;
|
||||
int i;
|
||||
|
||||
bias = 0.0f;
|
||||
for (i = 0; i < len; i++)
|
||||
bias += speech[i];
|
||||
bias /= len;
|
||||
for (i = 0; i < len; i++)
|
||||
sigout[i] = speech[i] - bias;
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
static void eval_amdf(float speech[],
|
||||
int32_t lpita,
|
||||
const int32_t tau[],
|
||||
int32_t ltau,
|
||||
int32_t maxlag,
|
||||
float amdf[],
|
||||
int32_t *minptr,
|
||||
int32_t *maxptr)
|
||||
{
|
||||
float sum;
|
||||
int i;
|
||||
int j;
|
||||
int n1;
|
||||
int n2;
|
||||
|
||||
*minptr = 0;
|
||||
*maxptr = 0;
|
||||
for (i = 0; i < ltau; i++)
|
||||
{
|
||||
n1 = (maxlag - tau[i])/2 + 1;
|
||||
n2 = n1 + lpita - 1;
|
||||
sum = 0.0f;
|
||||
for (j = n1; j <= n2; j += 4)
|
||||
sum += fabsf(speech[j - 1] - speech[j + tau[i] - 1]);
|
||||
amdf[i] = sum;
|
||||
if (amdf[i] < amdf[*minptr])
|
||||
*minptr = i;
|
||||
if (amdf[i] > amdf[*maxptr])
|
||||
*maxptr = i;
|
||||
}
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
static void eval_highres_amdf(float speech[],
|
||||
int32_t lpita,
|
||||
const int32_t tau[],
|
||||
int32_t ltau,
|
||||
float amdf[],
|
||||
int32_t *minptr,
|
||||
int32_t *maxptr,
|
||||
int32_t *mintau)
|
||||
{
|
||||
float amdf2[6];
|
||||
int32_t tau2[6];
|
||||
int32_t minp2;
|
||||
int32_t ltau2;
|
||||
int32_t maxp2;
|
||||
int32_t minamd;
|
||||
int i;
|
||||
int i2;
|
||||
int ptr;
|
||||
|
||||
/* Compute full AMDF using log spaced lags, find coarse minimum */
|
||||
eval_amdf(speech, lpita, tau, ltau, tau[ltau - 1], amdf, minptr, maxptr);
|
||||
*mintau = tau[*minptr];
|
||||
minamd = (int32_t) amdf[*minptr];
|
||||
|
||||
/* Build table containing all lags within +/- 3 of the AMDF minimum,
|
||||
excluding all that have already been computed */
|
||||
ltau2 = 0;
|
||||
ptr = *minptr - 2;
|
||||
i2 = min(*mintau + 4, tau[ltau - 1]);
|
||||
for (i = max(*mintau - 3, 41); i < i2; i++)
|
||||
{
|
||||
while (tau[ptr] < i)
|
||||
ptr++;
|
||||
if (tau[ptr] != i)
|
||||
tau2[ltau2++] = i;
|
||||
}
|
||||
/* Compute AMDF of the new lags, if there are any, and choose one
|
||||
if it is better than the coarse minimum */
|
||||
if (ltau2 > 0)
|
||||
{
|
||||
eval_amdf(speech, lpita, tau2, ltau2, tau[ltau - 1], amdf2, &minp2, &maxp2);
|
||||
if (amdf2[minp2] < (float) minamd)
|
||||
{
|
||||
*mintau = tau2[minp2];
|
||||
minamd = (int32_t) amdf2[minp2];
|
||||
}
|
||||
}
|
||||
/* Check one octave up, if there are any lags not yet computed */
|
||||
if (*mintau >= 80)
|
||||
{
|
||||
i = *mintau/2;
|
||||
if ((i & 1) == 0)
|
||||
{
|
||||
ltau2 = 2;
|
||||
tau2[0] = i - 1;
|
||||
tau2[1] = i + 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
ltau2 = 1;
|
||||
tau2[0] = i;
|
||||
}
|
||||
eval_amdf(speech, lpita, tau2, ltau2, tau[ltau - 1], amdf2, &minp2, &maxp2);
|
||||
if (amdf2[minp2] < (float) minamd)
|
||||
{
|
||||
*mintau = tau2[minp2];
|
||||
minamd = (int32_t) amdf2[minp2];
|
||||
*minptr -= 20;
|
||||
}
|
||||
}
|
||||
/* Force minimum of the AMDF array to the high resolution minimum */
|
||||
amdf[*minptr] = (float) minamd;
|
||||
/* Find maximum of AMDF within 1/2 octave of minimum */
|
||||
*maxptr = max(*minptr - 5, 0);
|
||||
i2 = min(*minptr + 6, ltau);
|
||||
for (i = *maxptr; i < i2; i++)
|
||||
{
|
||||
if (amdf[i] > amdf[*maxptr])
|
||||
*maxptr = i;
|
||||
}
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
static void dynamic_pitch_tracking(lpc10_encode_state_t *s,
|
||||
float amdf[],
|
||||
int32_t ltau,
|
||||
int32_t *minptr,
|
||||
int32_t voice,
|
||||
int32_t *pitch,
|
||||
int32_t *midx)
|
||||
{
|
||||
int32_t pbar;
|
||||
float sbar;
|
||||
int32_t path[2];
|
||||
int32_t i;
|
||||
int32_t j;
|
||||
float alpha;
|
||||
float minsc;
|
||||
float maxsc;
|
||||
|
||||
/* Calculate the confidence factor ALPHA, used as a threshold slope in */
|
||||
/* SEESAW. If unvoiced, set high slope so that every point in P array */
|
||||
/*is marked as a potential pitch frequency. A scaled up version (ALPHAX )*/
|
||||
/* is used to maintain arithmetic precision. */
|
||||
if (voice == 1)
|
||||
s->alphax = s->alphax*0.75f + amdf[*minptr - 1]*0.5f;
|
||||
else
|
||||
s->alphax *= 0.984375f;
|
||||
alpha = s->alphax/16;
|
||||
if (voice == 0 && s->alphax < 128.0f)
|
||||
alpha = 8.0f;
|
||||
/* SEESAW: Construct a pitch pointer array and intermediate winner function */
|
||||
/* Left to right pass: */
|
||||
s->p[s->ipoint][0] = 1;
|
||||
pbar = 1;
|
||||
sbar = s->s[0];
|
||||
for (i = 0; i < ltau; i++)
|
||||
{
|
||||
sbar += alpha;
|
||||
if (sbar < s->s[i])
|
||||
{
|
||||
s->s[i] = sbar;
|
||||
}
|
||||
else
|
||||
{
|
||||
pbar = i + 1;
|
||||
sbar = s->s[i];
|
||||
}
|
||||
s->p[s->ipoint][i] = pbar;
|
||||
}
|
||||
/* Right to left pass: */
|
||||
sbar = s->s[pbar - 1];
|
||||
for (i = pbar - 2; i >= 0; i--)
|
||||
{
|
||||
sbar += alpha;
|
||||
if (sbar < s->s[i])
|
||||
{
|
||||
s->s[i] = sbar;
|
||||
s->p[s->ipoint][i] = pbar;
|
||||
}
|
||||
else
|
||||
{
|
||||
pbar = s->p[s->ipoint][i];
|
||||
i = pbar - 1;
|
||||
sbar = s->s[i];
|
||||
}
|
||||
}
|
||||
/* Update S using AMDF */
|
||||
/* Find maximum, minimum, and location of minimum */
|
||||
s->s[0] += amdf[0]/2;
|
||||
minsc = s->s[0];
|
||||
maxsc = minsc;
|
||||
*midx = 1;
|
||||
for (i = 1; i < ltau; i++)
|
||||
{
|
||||
s->s[i] += amdf[i]/2;
|
||||
if (s->s[i] > maxsc)
|
||||
maxsc = s->s[i];
|
||||
if (s->s[i] < minsc)
|
||||
{
|
||||
*midx = i + 1;
|
||||
minsc = s->s[i];
|
||||
}
|
||||
}
|
||||
/* Subtract MINSC from S to prevent overflow */
|
||||
for (i = 0; i < ltau; i++)
|
||||
s->s[i] -= minsc;
|
||||
maxsc -= minsc;
|
||||
/* Use higher octave pitch if significant null there */
|
||||
j = 0;
|
||||
for (i = 20; i <= 40; i += 10)
|
||||
{
|
||||
if (*midx > i)
|
||||
{
|
||||
if (s->s[*midx - i - 1] < maxsc / 4)
|
||||
j = i;
|
||||
}
|
||||
}
|
||||
*midx -= j;
|
||||
/* TRACE: look back two frames to find minimum cost pitch estimate */
|
||||
*pitch = *midx;
|
||||
for (i = 0, j = s->ipoint; i < 2; i++, j++)
|
||||
{
|
||||
*pitch = s->p[j & 1][*pitch - 1];
|
||||
path[i] = *pitch;
|
||||
}
|
||||
|
||||
/* The following statement subtracts one from IPOINT, mod DEPTH. I */
|
||||
/* think the author chose to add DEPTH-1, instead of subtracting 1, */
|
||||
/* because then it will work even if MOD doesn't work as desired on */
|
||||
/* negative arguments. */
|
||||
s->ipoint = (s->ipoint + 1) & 1;
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
/* Detection of onsets in (or slightly preceding) the futuremost frame of speech. */
|
||||
static void onset(lpc10_encode_state_t *s,
|
||||
float *pebuf,
|
||||
int32_t osbuf[],
|
||||
int32_t *osptr,
|
||||
int32_t oslen,
|
||||
int32_t sbufl,
|
||||
int32_t sbufh,
|
||||
int32_t lframe)
|
||||
{
|
||||
int32_t i;
|
||||
float r1;
|
||||
float l2sum2;
|
||||
|
||||
pebuf -= sbufl;
|
||||
|
||||
if (s->hyst)
|
||||
s->lasti -= lframe;
|
||||
for (i = sbufh - lframe + 1; i <= sbufh; i++)
|
||||
{
|
||||
/* Compute FPC; Use old FPC on divide by zero; Clamp FPC to +/- 1. */
|
||||
s->n = (pebuf[i]*pebuf[i - 1] + s->n*63.0f)/64.0f;
|
||||
/* Computing 2nd power */
|
||||
r1 = pebuf[i - 1];
|
||||
s->d__ = (r1*r1 + s->d__*63.0f)/64.0f;
|
||||
if (s->d__ != 0.0f)
|
||||
{
|
||||
if (fabsf(s->n) > s->d__)
|
||||
s->fpc = r_sign(1.0f, s->n);
|
||||
else
|
||||
s->fpc = s->n/s->d__;
|
||||
}
|
||||
/* Filter FPC */
|
||||
l2sum2 = s->l2buf[s->l2ptr1 - 1];
|
||||
s->l2sum1 = s->l2sum1 - s->l2buf[s->l2ptr2 - 1] + s->fpc;
|
||||
s->l2buf[s->l2ptr2 - 1] = s->l2sum1;
|
||||
s->l2buf[s->l2ptr1 - 1] = s->fpc;
|
||||
s->l2ptr1 = (s->l2ptr1 & 0xF) + 1;
|
||||
s->l2ptr2 = (s->l2ptr2 & 0xF) + 1;
|
||||
if (fabsf(s->l2sum1 - l2sum2) > 1.7f)
|
||||
{
|
||||
if (!s->hyst)
|
||||
{
|
||||
/* Ignore if buffer full */
|
||||
if (*osptr <= oslen)
|
||||
{
|
||||
osbuf[*osptr - 1] = i - 9;
|
||||
(*osptr)++;
|
||||
}
|
||||
s->hyst = TRUE;
|
||||
}
|
||||
s->lasti = i;
|
||||
/* After one onset detection, at least OSHYST sample times must go */
|
||||
/* by before another is allowed to occur. */
|
||||
}
|
||||
else if (s->hyst && i - s->lasti >= 10)
|
||||
{
|
||||
s->hyst = FALSE;
|
||||
}
|
||||
}
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
/* Load a covariance matrix. */
|
||||
static void mload(int32_t order, int32_t awins, int32_t awinf, float speech[], float phi[], float psi[])
|
||||
{
|
||||
int32_t start;
|
||||
int i;
|
||||
int r;
|
||||
|
||||
start = awins + order;
|
||||
for (r = 1; r <= order; r++)
|
||||
{
|
||||
phi[r - 1] = 0.0f;
|
||||
for (i = start; i <= awinf; i++)
|
||||
phi[r - 1] += speech[i - 2]*speech[i - r - 1];
|
||||
}
|
||||
|
||||
/* Load last element of vector PSI */
|
||||
psi[order - 1] = 0.0f;
|
||||
for (i = start - 1; i < awinf; i++)
|
||||
psi[order - 1] += speech[i]*speech[i - order];
|
||||
/* End correct to get additional columns of phi */
|
||||
for (r = 1; r < order; r++)
|
||||
{
|
||||
for (i = 1; i <= r; i++)
|
||||
{
|
||||
phi[i*order + r] = phi[(i - 1)*order + r - 1]
|
||||
- speech[awinf - (r + 1)]*speech[awinf - (i + 1)]
|
||||
+ speech[start - (r + 2)]*speech[start - (i + 2)];
|
||||
}
|
||||
}
|
||||
/* End correct to get additional elements of PSI */
|
||||
for (i = 0; i < order - 1; i++)
|
||||
{
|
||||
psi[i] = phi[i + 1]
|
||||
- speech[start - 2]*speech[start - i - 3]
|
||||
+ speech[awinf - 1]*speech[awinf - i - 2];
|
||||
}
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
/* Preemphasize speech with a single-zero filter. */
|
||||
/* (When coef = .9375, preemphasis is as in LPC43.) */
|
||||
static float preemp(float inbuf[], float pebuf[], int nsamp, float coeff, float z)
|
||||
{
|
||||
float temp;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < nsamp; i++)
|
||||
{
|
||||
temp = inbuf[i] - coeff*z;
|
||||
z = inbuf[i];
|
||||
pebuf[i] = temp;
|
||||
}
|
||||
return z;
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
/* Invert a covariance matrix using Choleski decomposition method. */
|
||||
static void invert(int32_t order, float phi[], float psi[], float rc[])
|
||||
{
|
||||
float r1;
|
||||
int32_t i;
|
||||
int32_t j;
|
||||
int32_t k;
|
||||
float v[10][10];
|
||||
|
||||
for (j = 0; j < order; j++)
|
||||
{
|
||||
for (i = j; i < order; i++)
|
||||
v[j][i] = phi[i + j*order];
|
||||
for (k = 0; k < j; k++)
|
||||
{
|
||||
r1 = v[k][j]*v[k][k];
|
||||
for (i = j; i <= order; i++)
|
||||
v[j][i] -= v[k][i]*r1;
|
||||
}
|
||||
/* Compute intermediate results, which are similar to RC's */
|
||||
if (fabsf(v[j][j]) < 1.0e-10f)
|
||||
{
|
||||
for (i = j; i < order; i++)
|
||||
rc[i] = 0.0f;
|
||||
return;
|
||||
}
|
||||
rc[j] = psi[j];
|
||||
for (k = 0; k < j; k++)
|
||||
rc[j] -= rc[k]*v[k][j];
|
||||
v[j][j] = 1.0f/v[j][j];
|
||||
rc[j] *= v[j][j];
|
||||
r1 = min(rc[j], 0.999f);
|
||||
rc[j] = max(r1, -0.999f);
|
||||
}
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
/* Check RC's, repeat previous frame's RC's if unstable */
|
||||
static int rcchk(int order, float rc1f[], float rc2f[])
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < order; i++)
|
||||
{
|
||||
if (fabsf(rc2f[i]) > 0.99f)
|
||||
{
|
||||
for (i = 0; i < order; i++)
|
||||
rc2f[i] = rc1f[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
static void lpfilt(float inbuf[], float lpbuf[], int32_t len, int32_t nsamp)
|
||||
{
|
||||
int32_t j;
|
||||
float t;
|
||||
|
||||
/* 31 point equiripple FIR LPF */
|
||||
/* Linear phase, delay = 15 samples */
|
||||
/* Passband: ripple = 0.25 dB, cutoff = 800 Hz */
|
||||
/* Stopband: atten. = 40. dB, cutoff = 1240 Hz */
|
||||
|
||||
for (j = len - nsamp; j < len; j++)
|
||||
{
|
||||
t = (inbuf[j] + inbuf[j - 30]) * -0.0097201988f;
|
||||
t += (inbuf[j - 1] + inbuf[j - 29]) * -0.0105179986f;
|
||||
t += (inbuf[j - 2] + inbuf[j - 28]) * -0.0083479648f;
|
||||
t += (inbuf[j - 3] + inbuf[j - 27]) * 5.860774e-4f;
|
||||
t += (inbuf[j - 4] + inbuf[j - 26]) * 0.0130892089f;
|
||||
t += (inbuf[j - 5] + inbuf[j - 25]) * 0.0217052232f;
|
||||
t += (inbuf[j - 6] + inbuf[j - 24]) * 0.0184161253f;
|
||||
t += (inbuf[j - 7] + inbuf[j - 23]) * 3.39723e-4f;
|
||||
t += (inbuf[j - 8] + inbuf[j - 22]) * -0.0260797087f;
|
||||
t += (inbuf[j - 9] + inbuf[j - 21]) * -0.0455563702f;
|
||||
t += (inbuf[j - 10] + inbuf[j - 20]) * -0.040306855f;
|
||||
t += (inbuf[j - 11] + inbuf[j - 19]) * 5.029835e-4f;
|
||||
t += (inbuf[j - 12] + inbuf[j - 18]) * 0.0729262903f;
|
||||
t += (inbuf[j - 13] + inbuf[j - 17]) * 0.1572008878f;
|
||||
t += (inbuf[j - 14] + inbuf[j - 16]) * 0.2247288674f;
|
||||
t += inbuf[j - 15] * 0.250535965f;
|
||||
lpbuf[j] = t;
|
||||
}
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
/* 2nd order inverse filter, speech is decimated 4:1 */
|
||||
static void ivfilt(float lpbuf[], float ivbuf[], int32_t len, int32_t nsamp, float ivrc[])
|
||||
{
|
||||
int32_t i;
|
||||
int32_t j;
|
||||
int32_t k;
|
||||
float r[3];
|
||||
float pc1;
|
||||
float pc2;
|
||||
|
||||
/* Calculate autocorrelations */
|
||||
for (i = 1; i <= 3; i++)
|
||||
{
|
||||
r[i - 1] = 0.0f;
|
||||
k = (i - 1) << 2;
|
||||
for (j = (i << 2) + len - nsamp; j <= len; j += 2)
|
||||
r[i - 1] += lpbuf[j - 1]*lpbuf[j - k - 1];
|
||||
}
|
||||
/* Calculate predictor coefficients */
|
||||
pc1 = 0.0f;
|
||||
pc2 = 0.0f;
|
||||
ivrc[0] = 0.0f;
|
||||
ivrc[1] = 0.0f;
|
||||
if (r[0] > 1.0e-10f)
|
||||
{
|
||||
ivrc[0] = r[1]/r[0];
|
||||
ivrc[1] = (r[2] - ivrc[0]*r[1])/(r[0] - ivrc[0]*r[1]);
|
||||
pc1 = ivrc[0] - ivrc[0]*ivrc[1];
|
||||
pc2 = ivrc[1];
|
||||
}
|
||||
/* Inverse filter LPBUF into IVBUF */
|
||||
for (i = len - nsamp; i < len; i++)
|
||||
ivbuf[i] = lpbuf[i] - pc1*lpbuf[i - 4] - pc2*lpbuf[i - 8];
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
void lpc10_analyse(lpc10_encode_state_t *s, float speech[], int32_t voice[], int32_t *pitch, float *rms, float rc[])
|
||||
{
|
||||
static const int32_t tau[60] =
|
||||
{
|
||||
20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
|
||||
35, 36, 37, 38, 39, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58,
|
||||
60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 84, 88, 92, 96,
|
||||
100, 104, 108, 112, 116, 120, 124, 128, 132, 136, 140, 144,
|
||||
148, 152, 156
|
||||
};
|
||||
static const int32_t buflim[4] =
|
||||
{
|
||||
181, 720, 25, 720
|
||||
};
|
||||
static const float precoef = 0.9375f;
|
||||
|
||||
float amdf[60];
|
||||
float abuf[156];
|
||||
float ivrc[2];
|
||||
float temp;
|
||||
float phi[100] /* was [10][10] */;
|
||||
float psi[10];
|
||||
int32_t half;
|
||||
int32_t midx;
|
||||
int32_t ewin[3][2];
|
||||
int32_t i;
|
||||
int32_t j;
|
||||
int32_t lanal;
|
||||
int32_t ipitch;
|
||||
int32_t mintau;
|
||||
int32_t minptr;
|
||||
int32_t maxptr;
|
||||
|
||||
/* Calculations are done on future frame due to requirements
|
||||
of the pitch tracker. Delay RMS and RC's 2 frames to give
|
||||
current frame parameters on return. */
|
||||
|
||||
for (i = 0; i <= 720 - LPC10_SAMPLES_PER_FRAME - 181; i++)
|
||||
{
|
||||
s->inbuf[i] = s->inbuf[LPC10_SAMPLES_PER_FRAME + i];
|
||||
s->pebuf[i] = s->pebuf[LPC10_SAMPLES_PER_FRAME + i];
|
||||
}
|
||||
for (i = 0; i <= 540 - LPC10_SAMPLES_PER_FRAME - 229; i++)
|
||||
s->ivbuf[i] = s->ivbuf[LPC10_SAMPLES_PER_FRAME + i];
|
||||
for (i = 0; i <= 720 - LPC10_SAMPLES_PER_FRAME - 25; i++)
|
||||
s->lpbuf[i] = s->lpbuf[LPC10_SAMPLES_PER_FRAME + i];
|
||||
for (i = 0, j = 0; i < s->osptr - 1; i++)
|
||||
{
|
||||
if (s->osbuf[i] > LPC10_SAMPLES_PER_FRAME)
|
||||
s->osbuf[j++] = s->osbuf[i] - LPC10_SAMPLES_PER_FRAME;
|
||||
}
|
||||
s->osptr = j + 1;
|
||||
s->voibuf[0][0] = s->voibuf[1][0];
|
||||
s->voibuf[0][1] = s->voibuf[1][1];
|
||||
for (i = 0; i < 2; i++)
|
||||
{
|
||||
s->vwin[i][0] = s->vwin[i + 1][0] - LPC10_SAMPLES_PER_FRAME;
|
||||
s->vwin[i][1] = s->vwin[i + 1][1] - LPC10_SAMPLES_PER_FRAME;
|
||||
s->awin[i][0] = s->awin[i + 1][0] - LPC10_SAMPLES_PER_FRAME;
|
||||
s->awin[i][1] = s->awin[i + 1][1] - LPC10_SAMPLES_PER_FRAME;
|
||||
s->obound[i] = s->obound[i + 1];
|
||||
s->voibuf[i + 1][0] = s->voibuf[i + 2][0];
|
||||
s->voibuf[i + 1][1] = s->voibuf[i + 2][1];
|
||||
s->rmsbuf[i] = s->rmsbuf[i + 1];
|
||||
for (j = 0; j < LPC10_ORDER; j++)
|
||||
s->rcbuf[i][j] = s->rcbuf[i + 1][j];
|
||||
}
|
||||
/* If the average value in the frame was over 1/4096 (after current
|
||||
BIAS correction), then subtract that much more from samples in the
|
||||
next frame. If the average value in the frame was under
|
||||
-1/4096, add 1/4096 more to samples in next frame. In all other
|
||||
cases, keep BIAS the same. */
|
||||
temp = 0.0f;
|
||||
for (i = 0; i < LPC10_SAMPLES_PER_FRAME; i++)
|
||||
{
|
||||
s->inbuf[720 - 2*LPC10_SAMPLES_PER_FRAME + i] = speech[i]*4096.0f - s->bias;
|
||||
temp += s->inbuf[720 - 2*LPC10_SAMPLES_PER_FRAME + i];
|
||||
}
|
||||
if (temp > (float) LPC10_SAMPLES_PER_FRAME)
|
||||
s->bias++;
|
||||
else if (temp < (float) (-LPC10_SAMPLES_PER_FRAME))
|
||||
s->bias--;
|
||||
/* Place voicing window */
|
||||
i = 721 - LPC10_SAMPLES_PER_FRAME;
|
||||
s->zpre = preemp(&s->inbuf[i - 181], &s->pebuf[i - 181], LPC10_SAMPLES_PER_FRAME, precoef, s->zpre);
|
||||
onset(s, s->pebuf, s->osbuf, &s->osptr, 10, 181, 720, LPC10_SAMPLES_PER_FRAME);
|
||||
|
||||
lpc10_placev(s->osbuf, &s->osptr, 10, &s->obound[2], s->vwin, 3, LPC10_SAMPLES_PER_FRAME, 90, 156, 307, 462);
|
||||
/* The Pitch Extraction algorithm estimates the pitch for a frame
|
||||
of speech by locating the minimum of the average magnitude difference
|
||||
function (AMDF). The AMDF operates on low-pass, inverse filtered
|
||||
speech. (The low-pass filter is an 800 Hz, 19 tap, equiripple, FIR
|
||||
filter and the inverse filter is a 2nd-order LPC filter.) The pitch
|
||||
estimate is later refined by dynamic tracking. However, since some
|
||||
of the tracking parameters are a function of the voicing decisions,
|
||||
a voicing decision must precede the final pitch estimation. */
|
||||
/* See subroutines LPFILT, IVFILT, and eval_highres_amdf. */
|
||||
/* LPFILT reads indices LBUFH-LFRAME-29 = 511 through LBUFH = 720
|
||||
of INBUF, and writes indices LBUFH+1-LFRAME = 541 through LBUFH
|
||||
= 720 of LPBUF. */
|
||||
lpfilt(&s->inbuf[228], &s->lpbuf[384], 312, LPC10_SAMPLES_PER_FRAME);
|
||||
/* IVFILT reads indices (PWINH-LFRAME-7) = 353 through PWINH = 540
|
||||
of LPBUF, and writes indices (PWINH-LFRAME+1) = 361 through
|
||||
PWINH = 540 of IVBUF. */
|
||||
ivfilt(&s->lpbuf[204], s->ivbuf, 312, LPC10_SAMPLES_PER_FRAME, ivrc);
|
||||
/* eval_highres_amdf reads indices PWINL = 229 through
|
||||
(PWINL-1)+MAXWIN+(TAU(LTAU)-TAU(1))/2 = 452 of IVBUF, and writes
|
||||
indices 1 through LTAU = 60 of AMDF. */
|
||||
eval_highres_amdf(s->ivbuf, 156, tau, 60, amdf, &minptr, &maxptr, &mintau);
|
||||
/* Voicing decisions are made for each half frame of input speech.
|
||||
An initial voicing classification is made for each half of the
|
||||
analysis frame, and the voicing decisions for the present frame
|
||||
are finalized. See subroutine VOICIN. */
|
||||
/* The voicing detector (VOICIN) classifies the input signal as
|
||||
unvoiced (including silence) or voiced using the AMDF windowed
|
||||
maximum-to-minimum ratio, the zero crossing rate, energy measures,
|
||||
reflection coefficients, and prediction gains. */
|
||||
/* The pitch and voicing rules apply smoothing and isolated
|
||||
corrections to the pitch and voicing estimates and, in the process,
|
||||
introduce two frames of delay into the corrected pitch estimates and
|
||||
voicing decisions. */
|
||||
for (half = 0; half < 2; half++)
|
||||
{
|
||||
lpc10_voicing(s,
|
||||
&s->vwin[2][0],
|
||||
s->inbuf,
|
||||
s->lpbuf,
|
||||
buflim,
|
||||
half,
|
||||
&amdf[minptr],
|
||||
&amdf[maxptr],
|
||||
&mintau,
|
||||
ivrc,
|
||||
s->obound);
|
||||
}
|
||||
/* Find the minimum cost pitch decision over several frames,
|
||||
given the current voicing decision and the AMDF array */
|
||||
minptr++;
|
||||
dynamic_pitch_tracking(s, amdf, 60, &minptr, s->voibuf[3][1], pitch, &midx);
|
||||
ipitch = tau[midx - 1];
|
||||
/* Place spectrum analysis and energy windows */
|
||||
lpc10_placea(&ipitch, s->voibuf, &s->obound[2], 3, s->vwin, s->awin, ewin, LPC10_SAMPLES_PER_FRAME, 156);
|
||||
/* Remove short term DC bias over the analysis window. */
|
||||
lanal = s->awin[2][1] + 1 - s->awin[2][0];
|
||||
remove_dc_bias(&s->pebuf[s->awin[2][0] - 181], lanal, abuf);
|
||||
/* Compute RMS over integer number of pitch periods within the analysis window. */
|
||||
/* Note that in a hardware implementation this computation may be
|
||||
simplified by using diagonal elements of phi computed by mload(). */
|
||||
s->rmsbuf[2] = energyf(&abuf[ewin[2][0] - s->awin[2][0]], ewin[2][1] - ewin[2][0] + 1);
|
||||
/* Matrix load and invert, check RC's for stability */
|
||||
mload(LPC10_ORDER, 1, lanal, abuf, phi, psi);
|
||||
invert(LPC10_ORDER, phi, psi, &s->rcbuf[2][0]);
|
||||
rcchk(LPC10_ORDER, &s->rcbuf[1][0], &s->rcbuf[2][0]);
|
||||
/* Set return parameters */
|
||||
voice[0] = s->voibuf[1][0];
|
||||
voice[1] = s->voibuf[1][1];
|
||||
*rms = s->rmsbuf[0];
|
||||
for (i = 0; i < LPC10_ORDER; i++)
|
||||
rc[i] = s->rcbuf[0][i];
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
/*- End of file ------------------------------------------------------------*/
|
File diff suppressed because it is too large
Load Diff
|
@ -1,107 +0,0 @@
|
|||
/*
|
||||
* SpanDSP - a series of DSP components for telephony
|
||||
*
|
||||
* lpc10_encdecs.h - LPC10 low bit rate speech codec.
|
||||
*
|
||||
* Written by Steve Underwood <steveu@coppice.org>
|
||||
*
|
||||
* Copyright (C) 2006 Steve Underwood
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: lpc10_encdecs.h,v 1.9 2006/11/30 15:41:47 steveu Exp $
|
||||
*/
|
||||
|
||||
#define LPC10_ORDER 10
|
||||
|
||||
#if !defined(min)
|
||||
#define min(a,b) ((a) <= (b) ? (a) : (b))
|
||||
#endif
|
||||
#if !defined(max)
|
||||
#define max(a,b) ((a) >= (b) ? (a) : (b))
|
||||
#endif
|
||||
|
||||
void lpc10_placea(int32_t *ipitch,
|
||||
int32_t voibuf[4][2],
|
||||
int32_t *obound,
|
||||
int32_t af,
|
||||
int32_t vwin[3][2],
|
||||
int32_t awin[3][2],
|
||||
int32_t ewin[3][2],
|
||||
int32_t lframe,
|
||||
int32_t maxwin);
|
||||
|
||||
void lpc10_placev(int32_t *osbuf,
|
||||
int32_t *osptr,
|
||||
int32_t oslen,
|
||||
int32_t *obound,
|
||||
int32_t vwin[3][2],
|
||||
int32_t af,
|
||||
int32_t lframe,
|
||||
int32_t minwin,
|
||||
int32_t maxwin,
|
||||
int32_t dvwinl,
|
||||
int32_t dvwinh);
|
||||
|
||||
void lpc10_voicing(lpc10_encode_state_t *st,
|
||||
int32_t *vwin,
|
||||
float *inbuf,
|
||||
float *lpbuf,
|
||||
const int32_t buflim[],
|
||||
int32_t half,
|
||||
float *minamd,
|
||||
float *maxamd,
|
||||
int32_t *mintau,
|
||||
float *ivrc,
|
||||
int32_t *obound);
|
||||
|
||||
void lpc10_analyse(lpc10_encode_state_t *st, float *speech, int32_t *voice, int32_t *pitch, float *rms, float rc[]);
|
||||
|
||||
static __inline__ int32_t pow_ii(int32_t x, int32_t n)
|
||||
{
|
||||
int32_t pow;
|
||||
uint32_t u;
|
||||
|
||||
if (n <= 0)
|
||||
{
|
||||
if (n == 0 || x == 1)
|
||||
return 1;
|
||||
if (x != -1)
|
||||
return (x == 0) ? 1/x : 0;
|
||||
n = -n;
|
||||
}
|
||||
u = n;
|
||||
for (pow = 1; ; )
|
||||
{
|
||||
if ((u & 1))
|
||||
pow *= x;
|
||||
if ((u >>= 1) == 0)
|
||||
break;
|
||||
x *= x;
|
||||
}
|
||||
return pow;
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
static __inline__ float r_sign(float a, float b)
|
||||
{
|
||||
float x;
|
||||
|
||||
x = fabsf(a);
|
||||
return (b >= 0.0f) ? x : -x;
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
/*- End of file ------------------------------------------------------------*/
|
|
@ -1,396 +0,0 @@
|
|||
/*
|
||||
* VoIPcodecs - a series of DSP components for telephony
|
||||
*
|
||||
* lpc10_encode.c - LPC10 low bit rate speech codec.
|
||||
*
|
||||
* Written by Steve Underwood <steveu@coppice.org>
|
||||
*
|
||||
* Copyright (C) 2006 Steve Underwood
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2, or
|
||||
* the Lesser GNU General Public License version 2.1, as published by
|
||||
* the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* This code is based on the U.S. Department of Defense reference
|
||||
* implementation of the LPC-10 2400 bps Voice Coder. They do not
|
||||
* exert copyright claims on their code, and it may be freely used.
|
||||
*
|
||||
* $Id: lpc10_encode.c,v 1.19 2008/02/09 15:31:36 steveu Exp $
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <inttypes.h>
|
||||
#include <memory.h>
|
||||
#if defined(HAVE_TGMATH_H)
|
||||
#include <tgmath.h>
|
||||
#endif
|
||||
#if defined(HAVE_MATH_H)
|
||||
#include <math.h>
|
||||
#endif
|
||||
|
||||
#include "voipcodecs/telephony.h"
|
||||
#include "voipcodecs/dc_restore.h"
|
||||
#include "voipcodecs/lpc10.h"
|
||||
|
||||
#include "lpc10_encdecs.h"
|
||||
|
||||
static void lpc10_pack(lpc10_encode_state_t *s, uint8_t ibits[], lpc10_frame_t *t)
|
||||
{
|
||||
static const int iblist[53] =
|
||||
{
|
||||
13, 12, 11, 1, 2, 13, 12, 11, 1, 2,
|
||||
13, 10, 11, 2, 1, 10, 13, 12, 11, 10,
|
||||
2, 13, 12, 11, 10, 2, 1, 12, 7, 6,
|
||||
1, 10, 9, 8, 7, 4, 6, 9, 8, 7,
|
||||
5, 1, 9, 8, 4, 6, 1, 5, 9, 8,
|
||||
7, 5, 6
|
||||
};
|
||||
int32_t itab[13];
|
||||
int x;
|
||||
int i;
|
||||
|
||||
/* ibits is 54 bits of LPC data ordered as follows: */
|
||||
/* R1-0, R2-0, R3-0, P-0, A-0, */
|
||||
/* R1-1, R2-1, R3-1, P-1, A-1, */
|
||||
/* R1-2, R4-0, R3-2, A-2, P-2, R4-1, */
|
||||
/* R1-3, R2-2, R3-3, R4-2, A-3, */
|
||||
/* R1-4, R2-3, R3-4, R4-3, A-4, */
|
||||
/* P-3, R2-4, R7-0, R8-0, P-4, R4-4, */
|
||||
/* R5-0, R6-0, R7-1,R10-0, R8-1, */
|
||||
/* R5-1, R6-1, R7-2, R9-0, P-5, */
|
||||
/* R5-2, R6-2,R10-1, R8-2, P-6, R9-1, */
|
||||
/* R5-3, R6-3, R7-3, R9-2, R8-3, SYNC */
|
||||
|
||||
itab[0] = t->ipitch;
|
||||
itab[1] = t->irms;
|
||||
itab[2] = 0;
|
||||
for (i = 0; i < LPC10_ORDER; i++)
|
||||
itab[i + 3] = t->irc[LPC10_ORDER - 1 - i] & 0x7FFF;
|
||||
/* Put 54 bits into the output buffer */
|
||||
x = 0;
|
||||
for (i = 0; i < 53; i++)
|
||||
{
|
||||
x = (x << 1) | (itab[iblist[i] - 1] & 1);
|
||||
if ((i & 7) == 7)
|
||||
ibits[i >> 3] = (uint8_t) (x & 0xFF);
|
||||
itab[iblist[i] - 1] >>= 1;
|
||||
}
|
||||
x = (x << 1) | (s->isync & 1);
|
||||
s->isync ^= 1;
|
||||
x <<= 2;
|
||||
ibits[6] = (uint8_t) (x & 0xFF);
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
/* Quantize LPC parameters for transmission */
|
||||
static int encode(lpc10_encode_state_t *s,
|
||||
lpc10_frame_t *t,
|
||||
int32_t *voice,
|
||||
int32_t pitch,
|
||||
float rms,
|
||||
float *rc)
|
||||
{
|
||||
static const int32_t enctab[16] =
|
||||
{
|
||||
0, 7, 11, 12, 13, 10, 6, 1, 14, 9, 5, 2, 3, 4, 8, 15
|
||||
};
|
||||
static const int32_t entau[60] =
|
||||
{
|
||||
19, 11, 27, 25, 29, 21, 23, 22, 30, 14, 15, 7, 39, 38, 46,
|
||||
42, 43, 41, 45, 37, 53, 49, 51, 50, 54, 52, 60, 56, 58, 26,
|
||||
90, 88, 92, 84, 86, 82, 83, 81, 85, 69, 77, 73, 75, 74, 78,
|
||||
70, 71, 67, 99, 97, 113, 112, 114, 98, 106, 104, 108, 100,
|
||||
101, 76
|
||||
};
|
||||
static const int32_t enadd[8] =
|
||||
{
|
||||
1920, -768, 2432, 1280, 3584, 1536, 2816, -1152
|
||||
};
|
||||
static const float enscl[8] =
|
||||
{
|
||||
0.0204f, 0.0167f, 0.0145f, 0.0147f, 0.0143f, 0.0135f, 0.0125f, 0.0112f
|
||||
};
|
||||
static const int32_t enbits[8] =
|
||||
{
|
||||
6, 5, 4, 4, 4, 4, 3, 3
|
||||
};
|
||||
static const int32_t entab6[64] =
|
||||
{
|
||||
0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 3, 3,
|
||||
3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6,
|
||||
7, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 10, 10, 11, 11, 12, 13, 14, 15
|
||||
};
|
||||
static const int32_t rmst[64] =
|
||||
{
|
||||
1024, 936, 856, 784, 718, 656, 600, 550, 502,
|
||||
460, 420, 384, 352, 328, 294, 270, 246, 226,
|
||||
206, 188, 172, 158, 144, 132, 120, 110, 102,
|
||||
92, 84, 78, 70, 64, 60, 54, 50,
|
||||
46, 42, 38, 34, 32, 30, 26, 24,
|
||||
22, 20, 18, 17, 16, 15, 14, 13,
|
||||
12, 11, 10, 9, 8, 7, 6, 5, 4,
|
||||
3, 2, 1, 0
|
||||
};
|
||||
|
||||
int32_t idel;
|
||||
int32_t nbit;
|
||||
int32_t i;
|
||||
int32_t j;
|
||||
int32_t i2;
|
||||
int32_t i3;
|
||||
int32_t mrk;
|
||||
|
||||
/* Scale RMS and RC's to int32_ts */
|
||||
t->irms = (int32_t) rms;
|
||||
for (i = 0; i < LPC10_ORDER; i++)
|
||||
t->irc[i] = (int32_t) (rc[i]*32768.0f);
|
||||
if (voice[0] != 0 && voice[1] != 0)
|
||||
{
|
||||
t->ipitch = entau[pitch - 1];
|
||||
}
|
||||
else
|
||||
{
|
||||
if (s->error_correction)
|
||||
{
|
||||
t->ipitch = 0;
|
||||
if (voice[0] != voice[1])
|
||||
t->ipitch = 127;
|
||||
}
|
||||
else
|
||||
{
|
||||
t->ipitch = (voice[0] << 1) + voice[1];
|
||||
}
|
||||
}
|
||||
/* Encode RMS by binary table search */
|
||||
j = 32;
|
||||
idel = 16;
|
||||
t->irms = min(t->irms, 1023);
|
||||
while (idel > 0)
|
||||
{
|
||||
if (t->irms > rmst[j - 1])
|
||||
j -= idel;
|
||||
if (t->irms < rmst[j - 1])
|
||||
j += idel;
|
||||
idel /= 2;
|
||||
}
|
||||
if (t->irms > rmst[j - 1])
|
||||
--j;
|
||||
t->irms = 31 - j/2;
|
||||
/* Encode RC(1) and (2) as log-area-ratios */
|
||||
for (i = 0; i < 2; i++)
|
||||
{
|
||||
i2 = t->irc[i];
|
||||
mrk = 0;
|
||||
if (i2 < 0)
|
||||
{
|
||||
i2 = -i2;
|
||||
mrk = 1;
|
||||
}
|
||||
i2 = min(i2/512, 63);
|
||||
i2 = entab6[i2];
|
||||
if (mrk != 0)
|
||||
i2 = -i2;
|
||||
t->irc[i] = i2;
|
||||
}
|
||||
/* Encode RC(3) - (10) linearly, remove bias then scale */
|
||||
for (i = 2; i < LPC10_ORDER; i++)
|
||||
{
|
||||
i2 = (int32_t) ((t->irc[i]/2 + enadd[LPC10_ORDER - 1 - i])*enscl[LPC10_ORDER - 1 - i]);
|
||||
i2 = max(i2, -127);
|
||||
i2 = min(i2, 127);
|
||||
nbit = enbits[LPC10_ORDER - 1 - i];
|
||||
i3 = (i2 < 0);
|
||||
i2 /= pow_ii(2, nbit);
|
||||
if (i3)
|
||||
i2--;
|
||||
t->irc[i] = i2;
|
||||
}
|
||||
/* Protect the most significant bits of the most
|
||||
important parameters during non-voiced frames.
|
||||
RC(1) - RC(4) are protected using 20 parity bits
|
||||
replacing RC(5) - RC(10). */
|
||||
if (s->error_correction)
|
||||
{
|
||||
if (t->ipitch == 0 || t->ipitch == 127)
|
||||
{
|
||||
t->irc[4] = enctab[(t->irc[0] & 0x1E) >> 1];
|
||||
t->irc[5] = enctab[(t->irc[1] & 0x1E) >> 1];
|
||||
t->irc[6] = enctab[(t->irc[2] & 0x1E) >> 1];
|
||||
t->irc[7] = enctab[(t->irms & 0x1E) >> 1];
|
||||
t->irc[8] = enctab[(t->irc[3] & 0x1E) >> 1] >> 1;
|
||||
t->irc[9] = enctab[(t->irc[3] & 0x1E) >> 1] & 1;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
static void high_pass_100hz(lpc10_encode_state_t *s, float speech[], int start, int len)
|
||||
{
|
||||
float si;
|
||||
float err;
|
||||
int i;
|
||||
|
||||
/* 100 Hz high pass filter */
|
||||
for (i = start; i < len; i++)
|
||||
{
|
||||
si = speech[i];
|
||||
err = si + s->z11*1.859076f - s->z21*0.8648249f;
|
||||
si = err - s->z11*2.0f + s->z21;
|
||||
s->z21 = s->z11;
|
||||
s->z11 = err;
|
||||
err = si + s->z12*1.935715f - s->z22*0.9417004f;
|
||||
si = err - s->z12*2.0f + s->z22;
|
||||
s->z22 = s->z12;
|
||||
s->z12 = err;
|
||||
speech[i] = si*0.902428f;
|
||||
}
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
lpc10_encode_state_t *lpc10_encode_init(lpc10_encode_state_t *s, int error_correction)
|
||||
{
|
||||
int i;
|
||||
int j;
|
||||
|
||||
if (s == NULL)
|
||||
{
|
||||
if ((s = (lpc10_encode_state_t *) malloc(sizeof(*s))) == NULL)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
s->error_correction = error_correction;
|
||||
|
||||
/* State used only by function high_pass_100hz */
|
||||
s->z11 = 0.0f;
|
||||
s->z21 = 0.0f;
|
||||
s->z12 = 0.0f;
|
||||
s->z22 = 0.0f;
|
||||
|
||||
/* State used by function lpc10_analyse */
|
||||
for (i = 0; i < 540; i++)
|
||||
{
|
||||
s->inbuf[i] = 0.0f;
|
||||
s->pebuf[i] = 0.0f;
|
||||
}
|
||||
for (i = 0; i < 696; i++)
|
||||
s->lpbuf[i] = 0.0f;
|
||||
for (i = 0; i < 312; i++)
|
||||
s->ivbuf[i] = 0.0f;
|
||||
s->bias = 0.0f;
|
||||
s->osptr = 1;
|
||||
for (i = 0; i < 3; i++)
|
||||
s->obound[i] = 0;
|
||||
s->vwin[2][0] = 307;
|
||||
s->vwin[2][1] = 462;
|
||||
s->awin[2][0] = 307;
|
||||
s->awin[2][1] = 462;
|
||||
for (i = 0; i < 4; i++)
|
||||
{
|
||||
s->voibuf[i][0] = 0;
|
||||
s->voibuf[i][1] = 0;
|
||||
}
|
||||
for (i = 0; i < 3; i++)
|
||||
s->rmsbuf[i] = 0.0f;
|
||||
for (i = 0; i < 3; i++)
|
||||
{
|
||||
for (j = 0; j < 10; j++)
|
||||
s->rcbuf[i][j] = 0.0f;
|
||||
}
|
||||
s->zpre = 0.0f;
|
||||
|
||||
/* State used by function onset */
|
||||
s->n = 0.0f;
|
||||
s->d__ = 1.0f;
|
||||
for (i = 0; i < 16; i++)
|
||||
s->l2buf[i] = 0.0f;
|
||||
s->l2sum1 = 0.0f;
|
||||
s->l2ptr1 = 1;
|
||||
s->l2ptr2 = 9;
|
||||
s->hyst = FALSE;
|
||||
|
||||
/* State used by function lpc10_voicing */
|
||||
s->dither = 20.0f;
|
||||
s->maxmin = 0.0f;
|
||||
for (i = 0; i < 3; i++)
|
||||
{
|
||||
s->voice[i][0] = 0.0f;
|
||||
s->voice[i][1] = 0.0f;
|
||||
}
|
||||
s->lbve = 3000;
|
||||
s->fbve = 3000;
|
||||
s->fbue = 187;
|
||||
s->ofbue = 187;
|
||||
s->sfbue = 187;
|
||||
s->lbue = 93;
|
||||
s->olbue = 93;
|
||||
s->slbue = 93;
|
||||
s->snr = (float) (s->fbve / s->fbue << 6);
|
||||
|
||||
/* State used by function dynamic_pitch_tracking */
|
||||
for (i = 0; i < 60; i++)
|
||||
s->s[i] = 0.0f;
|
||||
for (i = 0; i < 2; i++)
|
||||
{
|
||||
for (j = 0; j < 60; j++)
|
||||
s->p[i][j] = 0;
|
||||
}
|
||||
s->ipoint = 0;
|
||||
s->alphax = 0.0f;
|
||||
|
||||
/* State used by function lpc10_pack */
|
||||
s->isync = 0;
|
||||
|
||||
return s;
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
int lpc10_encode_release(lpc10_encode_state_t *s)
|
||||
{
|
||||
free(s);
|
||||
return 0;
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
int lpc10_encode(lpc10_encode_state_t *s, uint8_t code[], const int16_t amp[], int len)
|
||||
{
|
||||
int32_t voice[2];
|
||||
int32_t pitch;
|
||||
float speech[LPC10_SAMPLES_PER_FRAME];
|
||||
float rc[LPC10_ORDER];
|
||||
float rms;
|
||||
lpc10_frame_t frame;
|
||||
int i;
|
||||
int j;
|
||||
|
||||
len /= LPC10_SAMPLES_PER_FRAME;
|
||||
for (i = 0; i < len; i++)
|
||||
{
|
||||
for (j = 0; j < LPC10_SAMPLES_PER_FRAME; j++)
|
||||
speech[j] = (float) amp[i*LPC10_SAMPLES_PER_FRAME + j]/32768.0f;
|
||||
high_pass_100hz(s, speech, 0, LPC10_SAMPLES_PER_FRAME);
|
||||
lpc10_analyse(s, speech, voice, &pitch, &rms, rc);
|
||||
encode(s, &frame, voice, pitch, rms, rc);
|
||||
lpc10_pack(s, &code[7*i], &frame);
|
||||
}
|
||||
return len*7;
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
/*- End of file ------------------------------------------------------------*/
|
|
@ -1,336 +0,0 @@
|
|||
/*
|
||||
* VoIPcodecs - a series of DSP components for telephony
|
||||
*
|
||||
* lpc10_placev.c - LPC10 low bit rate speech codec.
|
||||
*
|
||||
* Written by Steve Underwood <steveu@coppice.org>
|
||||
*
|
||||
* Copyright (C) 2006 Steve Underwood
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2, or
|
||||
* the Lesser GNU General Public License version 2.1, as published by
|
||||
* the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* This code is based on the U.S. Department of Defense reference
|
||||
* implementation of the LPC-10 2400 bps Voice Coder. They do not
|
||||
* exert copyright claims on their code, and it may be freely used.
|
||||
*
|
||||
* $Id: lpc10_placev.c,v 1.13 2008/02/09 15:31:36 steveu Exp $
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <inttypes.h>
|
||||
#include <memory.h>
|
||||
#if defined(HAVE_TGMATH_H)
|
||||
#include <tgmath.h>
|
||||
#endif
|
||||
#if defined(HAVE_MATH_H)
|
||||
#include <math.h>
|
||||
#endif
|
||||
|
||||
#include "voipcodecs/telephony.h"
|
||||
#include "voipcodecs/dc_restore.h"
|
||||
#include "voipcodecs/lpc10.h"
|
||||
|
||||
#include "lpc10_encdecs.h"
|
||||
|
||||
#define subsc(x,y) (((x) << 1) + (y))
|
||||
|
||||
void lpc10_placea(int32_t *ipitch,
|
||||
int32_t voibuf[3][2],
|
||||
int32_t *obound,
|
||||
int32_t af,
|
||||
int32_t vwin[3][2],
|
||||
int32_t awin[3][2],
|
||||
int32_t ewin[3][2],
|
||||
int32_t lframe,
|
||||
int32_t maxwin)
|
||||
{
|
||||
int allv;
|
||||
int winv;
|
||||
int32_t i;
|
||||
int32_t j;
|
||||
int32_t k;
|
||||
int32_t l;
|
||||
int32_t hrange;
|
||||
int ephase;
|
||||
int32_t lrange;
|
||||
|
||||
lrange = (af - 2)*lframe + 1;
|
||||
hrange = af*lframe;
|
||||
|
||||
/* Place the analysis window based on the voicing window placement,
|
||||
onsets, tentative voicing decision, and pitch. */
|
||||
|
||||
/* Case 1: Sustained voiced speech
|
||||
If the five most recent voicing decisions are
|
||||
voiced, then the window is placed phase-synchronously with the
|
||||
previous window, as close to the present voicing window if possible.
|
||||
If onsets bound the voicing window, then preference is given to
|
||||
a phase-synchronous placement which does not overlap these onsets. */
|
||||
|
||||
/* Case 2: Voiced transition
|
||||
If at least one voicing decision in AF is voicied, and there are no
|
||||
onsets, then the window is placed as in case 1. */
|
||||
|
||||
/* Case 3: Unvoiced speech or onsets
|
||||
If both voicing decisions in AF are unvoiced, or there are onsets
|
||||
then the window is placed coincident with the voicing window. */
|
||||
|
||||
/* Note: During phase-synchronous placement of windows, the length
|
||||
is not altered from MAXWIN, since this would defeat the purpose
|
||||
of phase-synchronous placement. */
|
||||
|
||||
/* Check for case 1 and case 2 */
|
||||
allv = voibuf[af - 2][1] == 1
|
||||
&&
|
||||
voibuf[af - 1][0] == 1
|
||||
&&
|
||||
voibuf[af - 1][1] == 1
|
||||
&&
|
||||
voibuf[af][0] == 1
|
||||
&&
|
||||
voibuf[af][1] == 1;
|
||||
winv = voibuf[af][0] == 1 || voibuf[af][1] == 1;
|
||||
if (allv || (winv && *obound == 0))
|
||||
{
|
||||
/* APHASE: Phase synchronous window placement. */
|
||||
/* Get minimum lower index of the window. */
|
||||
i = (lrange + *ipitch - 1 - awin[af - 2][0]) / *ipitch;
|
||||
i *= *ipitch;
|
||||
i += awin[af - 2][0];
|
||||
/* l = the actual length of this frame's analysis window. */
|
||||
l = maxwin;
|
||||
/* Calculate the location where a perfectly centered window would start. */
|
||||
k = (vwin[af - 1][0] + vwin[af - 1][1] + 1 - l)/2;
|
||||
/* Choose the actual location to be the pitch multiple closest to this */
|
||||
awin[af - 1][0] = i + ((int) floorf((float) (k - i)/(float) *ipitch + 0.5f))*(*ipitch);
|
||||
awin[af - 1][1] = awin[af - 1][0] + l - 1;
|
||||
/* If there is an onset bounding the right of the voicing window and the
|
||||
analysis window overlaps that, then move the analysis window backward
|
||||
to avoid this onset. */
|
||||
if (*obound >= 2 && awin[af - 1][1] > vwin[af - 1][1])
|
||||
{
|
||||
awin[af - 1][0] -= *ipitch;
|
||||
awin[af - 1][1] -= *ipitch;
|
||||
}
|
||||
/* Similarly for the left of the voicing window. */
|
||||
if ((*obound == 1 || *obound == 3) && awin[af - 1][0] < vwin[af - 1][0])
|
||||
{
|
||||
awin[af - 1][0] += *ipitch;
|
||||
awin[af - 1][1] += *ipitch;
|
||||
}
|
||||
/* If this placement puts the analysis window above HRANGE, then
|
||||
move it backward an integer number of pitch periods. */
|
||||
while (awin[af - 1][1] > hrange)
|
||||
{
|
||||
awin[af - 1][0] -= *ipitch;
|
||||
awin[af - 1][1] -= *ipitch;
|
||||
}
|
||||
/* Similarly if the placement puts the analysis window below LRANGE. */
|
||||
while (awin[af - 1][0] < lrange)
|
||||
{
|
||||
awin[af - 1][0] += *ipitch;
|
||||
awin[af - 1][1] += *ipitch;
|
||||
}
|
||||
/* Make energy window be phase-synchronous. */
|
||||
ephase = TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Case 3 */
|
||||
awin[af - 1][0] = vwin[af - 1][0];
|
||||
awin[af - 1][1] = vwin[af - 1][1];
|
||||
ephase = FALSE;
|
||||
}
|
||||
/* RMS is computed over an integer number of pitch periods in the analysis
|
||||
window. When it is not placed phase-synchronously, it is placed as close
|
||||
as possible to onsets. */
|
||||
j = (awin[af - 1][1] - awin[af - 1][0] + 1) / *ipitch * *ipitch;
|
||||
if (j == 0 || !winv)
|
||||
{
|
||||
ewin[af - 1][0] = vwin[af - 1][0];
|
||||
ewin[af - 1][1] = vwin[af - 1][1];
|
||||
}
|
||||
else if (!ephase && *obound == 2)
|
||||
{
|
||||
ewin[af - 1][0] = awin[af - 1][1] - j + 1;
|
||||
ewin[af - 1][1] = awin[af - 1][1];
|
||||
}
|
||||
else
|
||||
{
|
||||
ewin[af - 1][0] = awin[af - 1][0];
|
||||
ewin[af - 1][1] = awin[af - 1][0] + j - 1;
|
||||
}
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
void lpc10_placev(int32_t *osbuf,
|
||||
int32_t *osptr,
|
||||
int32_t oslen,
|
||||
int32_t *obound,
|
||||
int32_t vwin[3][2],
|
||||
int32_t af,
|
||||
int32_t lframe,
|
||||
int32_t minwin,
|
||||
int32_t maxwin,
|
||||
int32_t dvwinl,
|
||||
int32_t dvwinh)
|
||||
{
|
||||
int32_t i1;
|
||||
int32_t i2;
|
||||
int crit;
|
||||
int32_t q;
|
||||
int32_t osptr1;
|
||||
int32_t hrange;
|
||||
int32_t lrange;
|
||||
int i;
|
||||
|
||||
/* Voicing window placement */
|
||||
|
||||
/* __________________ __________________ ______________ */
|
||||
/* | | | */
|
||||
/* | 1F | 2F | 3F ... */
|
||||
/* |__________________|__________________|______________ */
|
||||
|
||||
/* Previous | */
|
||||
/* Window | */
|
||||
/* ...________| */
|
||||
|
||||
/* | | */
|
||||
/* ------>| This window's placement range |<------ */
|
||||
/* | | */
|
||||
|
||||
/* There are three cases. Note these are different from those
|
||||
given in the LPC-10e phase 1 report. */
|
||||
|
||||
/* 1. If there are no onsets in this range, then the voicing window
|
||||
is centered in the pitch window. If such a placement is not within
|
||||
the window's placement range, then the window is placed in the left-most
|
||||
portion of the placement range. Its length is always MAXWIN. */
|
||||
|
||||
/* 2. If the first onset is in 2F and there is sufficient room to place
|
||||
the window immediately before this onset, then the window is placed
|
||||
there, and its length is set to the maximum possible under these
|
||||
constraints. */
|
||||
|
||||
/* "Critical Region Exception": If there is another onset in 2F
|
||||
such that a window can be placed between the two onsets, the
|
||||
window is placed there (ie, as in case 3). */
|
||||
|
||||
/* 3. Otherwise, the window is placed immediately after the onset. The
|
||||
window's length is the longest length that can fit in the range under these
|
||||
constraints, except that the window may be shortened even further to avoid
|
||||
overlapping other onsets in the placement range. In any case, the window's
|
||||
length is at least MINWIN. */
|
||||
|
||||
/* Note that the values of MINWIN and LFRAME must be chosen such
|
||||
that case 2 = false implies case 3 = true. This means that
|
||||
MINWIN <= LFRAME/2. If this were not the case, then a fourth case
|
||||
would have to be added for when the window cannot fit either before
|
||||
or after the onset. */
|
||||
|
||||
/* Note also that onsets which weren't in 2F last time may be in 1F this
|
||||
time, due to the filter delays in computing onsets. The result is that
|
||||
occasionally a voicing window will overlap that onset. The only way
|
||||
to circumvent this problem is to add more delay in processing input
|
||||
speech. In the trade-off between delay and window-placement, window
|
||||
placement lost. */
|
||||
|
||||
/* Compute the placement range */
|
||||
|
||||
/* Computing MAX */
|
||||
i1 = vwin[af - 2][1] + 1;
|
||||
i2 = (af - 2)*lframe + 1;
|
||||
lrange = max(i1, i2);
|
||||
hrange = af*lframe;
|
||||
/* Compute OSPTR1, so the following code only looks at relevant onsets. */
|
||||
for (osptr1 = *osptr - 1; osptr1 >= 1; osptr1--)
|
||||
{
|
||||
if (osbuf[osptr1 - 1] <= hrange)
|
||||
break;
|
||||
}
|
||||
osptr1++;
|
||||
/* Check for case 1 first (fast case) */
|
||||
if (osptr1 <= 1 || osbuf[osptr1 - 2] < lrange)
|
||||
{
|
||||
/* Compute max */
|
||||
i1 = vwin[af - 2][1] + 1;
|
||||
vwin[af - 1][0] = max(i1, dvwinl);
|
||||
vwin[af - 1][1] = vwin[af - 1][0] + maxwin - 1;
|
||||
*obound = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Search backward in OSBUF for first onset in range. */
|
||||
/* This code relies on the above check being performed first. */
|
||||
for (q = osptr1 - 1; q >= 1; q--)
|
||||
{
|
||||
if (osbuf[q - 1] < lrange)
|
||||
break;
|
||||
}
|
||||
q++;
|
||||
/* Check for case 2 (placement before onset): */
|
||||
/* Check for critical region exception: */
|
||||
crit = FALSE;
|
||||
for (i = q + 1; i < osptr1; i++)
|
||||
{
|
||||
if (osbuf[i - 1] - osbuf[q - 1] >= minwin)
|
||||
{
|
||||
crit = TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
/* Compute max */
|
||||
i1 = (af - 1)*lframe;
|
||||
i2 = lrange + minwin - 1;
|
||||
if (!crit && osbuf[q - 1] > max(i1, i2))
|
||||
{
|
||||
vwin[af - 1][1] = osbuf[q - 1] - 1;
|
||||
/* Compute max */
|
||||
i2 = vwin[af - 1][1] - maxwin + 1;
|
||||
vwin[af - 1][0] = max(lrange, i2);
|
||||
*obound = 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Case 3 (placement after onset) */
|
||||
vwin[af - 1][0] = osbuf[q - 1];
|
||||
do
|
||||
{
|
||||
if (++q >= osptr1
|
||||
||
|
||||
osbuf[q - 1] > vwin[af - 1][0] + maxwin)
|
||||
{
|
||||
/* Compute min */
|
||||
i1 = vwin[af - 1][0] + maxwin - 1;
|
||||
vwin[af - 1][1] = min(i1, hrange);
|
||||
*obound = 1;
|
||||
return;
|
||||
}
|
||||
}
|
||||
while (osbuf[q - 1] < vwin[af - 1][0] + minwin);
|
||||
vwin[af - 1][1] = osbuf[q - 1] - 1;
|
||||
*obound = 3;
|
||||
}
|
||||
}
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
/*- End of file ------------------------------------------------------------*/
|
|
@ -1,494 +0,0 @@
|
|||
/*
|
||||
* VoIPcodecs - a series of DSP components for telephony
|
||||
*
|
||||
* lpc10_voicing.c - LPC10 low bit rate speech codec.
|
||||
*
|
||||
* Written by Steve Underwood <steveu@coppice.org>
|
||||
*
|
||||
* Copyright (C) 2006 Steve Underwood
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2, or
|
||||
* the Lesser GNU General Public License version 2.1, as published by
|
||||
* the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* This code is based on the U.S. Department of Defense reference
|
||||
* implementation of the LPC-10 2400 bps Voice Coder. They do not
|
||||
* exert copyright claims on their code, and it may be freely used.
|
||||
*
|
||||
* $Id: lpc10_voicing.c,v 1.9 2008/02/09 15:31:36 steveu Exp $
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <inttypes.h>
|
||||
#include <memory.h>
|
||||
#if defined(HAVE_TGMATH_H)
|
||||
#include <tgmath.h>
|
||||
#endif
|
||||
#if defined(HAVE_MATH_H)
|
||||
#include <math.h>
|
||||
#endif
|
||||
|
||||
#include "voipcodecs/telephony.h"
|
||||
#include "voipcodecs/dc_restore.h"
|
||||
#include "voipcodecs/lpc10.h"
|
||||
|
||||
#include "lpc10_encdecs.h"
|
||||
|
||||
static void vparms(int32_t vwin[],
|
||||
float *inbuf,
|
||||
float *lpbuf,
|
||||
const int32_t buflim[],
|
||||
int32_t half,
|
||||
float *dither,
|
||||
int32_t *mintau,
|
||||
int32_t *zc,
|
||||
int32_t *lbe,
|
||||
int32_t *fbe,
|
||||
float *qs,
|
||||
float *rc1,
|
||||
float *ar_b,
|
||||
float *ar_f)
|
||||
{
|
||||
int32_t inbuf_offset;
|
||||
int32_t lpbuf_offset;
|
||||
int32_t vlen;
|
||||
int32_t stop;
|
||||
int32_t i;
|
||||
int32_t start;
|
||||
float r1;
|
||||
float r2;
|
||||
float e_pre;
|
||||
float ap_rms;
|
||||
float e_0;
|
||||
float oldsgn;
|
||||
float lp_rms;
|
||||
float e_b;
|
||||
float e_f;
|
||||
float r_b;
|
||||
float r_f;
|
||||
float e0ap;
|
||||
|
||||
/* Calculate zero crossings (ZC) and several energy and correlation */
|
||||
/* measures on low band and full band speech. Each measure is taken */
|
||||
/* over either the first or the second half of the voicing window, */
|
||||
/* depending on the variable HALF. */
|
||||
lpbuf_offset = buflim[2];
|
||||
lpbuf -= lpbuf_offset;
|
||||
inbuf_offset = buflim[0];
|
||||
inbuf -= inbuf_offset;
|
||||
|
||||
lp_rms = 0.0f;
|
||||
ap_rms = 0.0f;
|
||||
e_pre = 0.0f;
|
||||
e0ap = 0.0f;
|
||||
*rc1 = 0.0f;
|
||||
e_0 = 0.0f;
|
||||
e_b = 0.0f;
|
||||
e_f = 0.0f;
|
||||
r_f = 0.0f;
|
||||
r_b = 0.0f;
|
||||
*zc = 0;
|
||||
vlen = vwin[1] - vwin[0] + 1;
|
||||
start = vwin[0] + half*vlen/2 + 1;
|
||||
stop = start + vlen/2 - 1;
|
||||
|
||||
/* I'll use the symbol HVL in the table below to represent the value */
|
||||
/* VLEN/2. Note that if VLEN is odd, then HVL should be rounded down, */
|
||||
/* i.e., HVL = (VLEN-1)/2. */
|
||||
|
||||
/* HALF START STOP */
|
||||
|
||||
/* 1 VWIN(1)+1 VWIN(1)+HVL */
|
||||
/* 2 VWIN(1)+HVL+1 VWIN(1)+2*HVL */
|
||||
oldsgn = r_sign(1.0f, inbuf[start - 1] - *dither);
|
||||
for (i = start; i <= stop; i++)
|
||||
{
|
||||
lp_rms += fabsf(lpbuf[i]);
|
||||
ap_rms += fabsf(inbuf[i]);
|
||||
e_pre += fabsf(inbuf[i] - inbuf[i - 1]);
|
||||
r1 = inbuf[i];
|
||||
e0ap += r1*r1;
|
||||
*rc1 += inbuf[i]*inbuf[i - 1];
|
||||
r1 = lpbuf[i];
|
||||
e_0 += r1*r1;
|
||||
r1 = lpbuf[i - *mintau];
|
||||
e_b += r1*r1;
|
||||
r1 = lpbuf[i + *mintau];
|
||||
e_f += r1*r1;
|
||||
r_f += lpbuf[i]*lpbuf[i + *mintau];
|
||||
r_b += lpbuf[i]*lpbuf[i - *mintau];
|
||||
r1 = inbuf[i] + *dither;
|
||||
if (r_sign(1.0f, r1) != oldsgn)
|
||||
{
|
||||
++(*zc);
|
||||
oldsgn = -oldsgn;
|
||||
}
|
||||
*dither = -(*dither);
|
||||
}
|
||||
/* Normalized short-term autocovariance coefficient at unit sample delay */
|
||||
*rc1 /= max(e0ap, 1.0f);
|
||||
/* Ratio of the energy of the first difference signal (6 dB/oct preemphasis)*/
|
||||
/* to the energy of the full band signal */
|
||||
/* Computing MAX */
|
||||
r1 = ap_rms*2.0f;
|
||||
*qs = e_pre/max(r1, 1.0f);
|
||||
/* aR_b is the product of the forward and reverse prediction gains, */
|
||||
/* looking backward in time (the causal case). */
|
||||
*ar_b = r_b/max(e_b, 1.0f)*(r_b/max(e_0, 1.0f));
|
||||
/* aR_f is the same as aR_b, but looking forward in time (non causal case).*/
|
||||
*ar_f = r_f/max(e_f, 1.0f)*(r_f/max(e_0, 1.0f));
|
||||
/* Normalize ZC, LBE, and FBE to old fixed window length of 180. */
|
||||
/* (The fraction 90/VLEN has a range of 0.58 to 1) */
|
||||
r2 = (float) (*zc << 1);
|
||||
*zc = lrintf(r2*(90.0f/vlen));
|
||||
r1 = lp_rms/4*(90.0f/vlen);
|
||||
*lbe = min(lrintf(r1), 32767);
|
||||
r1 = ap_rms/4*(90.0f/vlen);
|
||||
*fbe = min(lrintf(r1), 32767);
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
/* Voicing detection makes voicing decisions for each half */
|
||||
/* frame of input speech. Tentative voicing decisions are made two frames*/
|
||||
/* in the future (2F) for each half frame. These decisions are carried */
|
||||
/* through one frame in the future (1F) to the present (P) frame where */
|
||||
/* they are examined and smoothed, resulting in the final voicing */
|
||||
/* decisions for each half frame. */
|
||||
|
||||
/* The voicing parameter (signal measurement) column vector (VALUE) */
|
||||
/* is based on a rectangular window of speech samples determined by the */
|
||||
/* window placement algorithm. The voicing parameter vector contains the*/
|
||||
/* AMDF windowed maximum-to-minimum ratio, the zero crossing rate, energy*/
|
||||
/* measures, reflection coefficients, and prediction gains. The voicing */
|
||||
/* window is placed to avoid contamination of the voicing parameter vector*/
|
||||
/* with speech onsets. */
|
||||
|
||||
/* The input signal is then classified as unvoiced (including */
|
||||
/* silence) or voiced. This decision is made by a linear discriminant */
|
||||
/* function consisting of a dot product of the voicing decision */
|
||||
/* coefficient (VDC) row vector with the measurement column vector */
|
||||
/* (VALUE). The VDC vector is 2-dimensional, each row vector is optimized*/
|
||||
/* for a particular signal-to-noise ratio (SNR). So, before the dot */
|
||||
/* product is performed, the SNR is estimated to select the appropriate */
|
||||
/* VDC vector. */
|
||||
|
||||
/* The smoothing algorithm is a modified median smoother. The */
|
||||
/* voicing discriminant function is used by the smoother to determine how*/
|
||||
/* strongly voiced or unvoiced a signal is. The smoothing is further */
|
||||
/* modified if a speech onset and a voicing decision transition occur */
|
||||
/* within one half frame. In this case, the voicing decision transition */
|
||||
/* is extended to the speech onset. For transmission purposes, there are*/
|
||||
/* constraints on the duration and transition of voicing decisions. The */
|
||||
/* smoother takes these constraints into account. */
|
||||
|
||||
/* Finally, the energy estimates are updated along with the dither */
|
||||
/* threshold used to calculate the zero crossing rate (ZC). */
|
||||
|
||||
void lpc10_voicing(lpc10_encode_state_t *s,
|
||||
int32_t vwin[],
|
||||
float *inbuf,
|
||||
float *lpbuf,
|
||||
const int32_t buflim[],
|
||||
int32_t half,
|
||||
float *minamd,
|
||||
float *maxamd,
|
||||
int32_t *mintau,
|
||||
float ivrc[],
|
||||
int32_t obound[])
|
||||
{
|
||||
static const float vdc[100] =
|
||||
{
|
||||
0.0f, 1714.0f, -110.0f, 334.0f, -4096.0f, -654.0f, 3752.0f, 3769.0f, 0.0f, 1181.0f,
|
||||
0.0f, 874.0f, -97.0f, 300.0f, -4096.0f, -1021.0f, 2451.0f, 2527.0f, 0.0f, -500.0f,
|
||||
0.0f, 510.0f, -70.0f, 250.0f, -4096.0f, -1270.0f, 2194.0f, 2491.0f, 0.0f, -1500.0f,
|
||||
0.0f, 500.0f, -10.0f, 200.0f, -4096.0f, -1300.0f, 2.0e3f, 2.0e3f, 0.0f, -2.0e3f,
|
||||
0.0f, 500.0f, 0.0f, 0.0f, -4096.0f, -1300.0f, 2.0e3f, 2.0e3f, 0.0f, -2500.0f,
|
||||
0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f,
|
||||
0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f,
|
||||
0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f,
|
||||
0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f,
|
||||
0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f
|
||||
};
|
||||
static const int nvdcl = 5;
|
||||
static const float vdcl[10] =
|
||||
{
|
||||
600.0f, 450.0f, 300.0f, 200.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f
|
||||
};
|
||||
|
||||
int32_t inbuf_offset;
|
||||
int32_t lpbuf_offset;
|
||||
int32_t i1;
|
||||
float r1;
|
||||
float r2;
|
||||
float ar_b;
|
||||
float ar_f;
|
||||
int32_t snrl;
|
||||
int32_t i;
|
||||
float value[9];
|
||||
int32_t zc;
|
||||
int ot;
|
||||
float qs;
|
||||
int32_t vstate;
|
||||
float rc1;
|
||||
int32_t fbe;
|
||||
int32_t lbe;
|
||||
float snr2;
|
||||
|
||||
#if (_MSC_VER >= 1400)
|
||||
__analysis_assume(half >=0 && half < 2);
|
||||
#endif
|
||||
|
||||
inbuf_offset = 0;
|
||||
lpbuf_offset = 0;
|
||||
if (inbuf)
|
||||
{
|
||||
inbuf_offset = buflim[0];
|
||||
inbuf -= inbuf_offset;
|
||||
}
|
||||
if (lpbuf)
|
||||
{
|
||||
lpbuf_offset = buflim[2];
|
||||
lpbuf -= lpbuf_offset;
|
||||
}
|
||||
|
||||
/* Voicing Decision Parameter vector (* denotes zero coefficient): */
|
||||
|
||||
/* * MAXMIN */
|
||||
/* LBE/LBVE */
|
||||
/* ZC */
|
||||
/* RC1 */
|
||||
/* QS */
|
||||
/* IVRC2 */
|
||||
/* aR_B */
|
||||
/* aR_F */
|
||||
/* * LOG(LBE/LBVE) */
|
||||
/* Define 2-D voicing decision coefficient vector according to the voicing */
|
||||
/* parameter order above. Each row (VDC vector) is optimized for a specific */
|
||||
/* SNR. The last element of the vector is the constant. */
|
||||
/* E ZC RC1 Qs IVRC2 aRb aRf c */
|
||||
|
||||
/* The VOICE array contains the result of the linear discriminant function*/
|
||||
/* (analog values). The VOIBUF array contains the hard-limited binary */
|
||||
/* voicing decisions. The VOICE and VOIBUF arrays, according to FORTRAN */
|
||||
/* memory allocation, are addressed as: */
|
||||
|
||||
/* (half-frame number, future-frame number) */
|
||||
|
||||
/* | Past | Present | Future1 | Future2 | */
|
||||
/* | 1,0 | 2,0 | 1,1 | 2,1 | 1,2 | 2,2 | 1,3 | 2,3 | ---> time */
|
||||
|
||||
/* Update linear discriminant function history each frame: */
|
||||
if (half == 0)
|
||||
{
|
||||
s->voice[0][0] = s->voice[1][0];
|
||||
s->voice[0][1] = s->voice[1][1];
|
||||
s->voice[1][0] = s->voice[2][0];
|
||||
s->voice[1][1] = s->voice[2][1];
|
||||
s->maxmin = *maxamd / max(*minamd, 1.0f);
|
||||
}
|
||||
vc_assert(lpbuf);
|
||||
vc_assert(inbuf);
|
||||
/* Calculate voicing parameters twice per frame */
|
||||
vparms(vwin,
|
||||
&inbuf[inbuf_offset],
|
||||
&lpbuf[lpbuf_offset],
|
||||
buflim,
|
||||
half,
|
||||
&s->dither,
|
||||
mintau,
|
||||
&zc,
|
||||
&lbe,
|
||||
&fbe,
|
||||
&qs,
|
||||
&rc1,
|
||||
&ar_b,
|
||||
&ar_f);
|
||||
/* Estimate signal-to-noise ratio to select the appropriate VDC vector. */
|
||||
/* The SNR is estimated as the running average of the ratio of the */
|
||||
/* running average full-band voiced energy to the running average */
|
||||
/* full-band unvoiced energy. SNR filter has gain of 63. */
|
||||
r1 = (s->snr + s->fbve/(float) max(s->fbue, 1))*63/64.0f;
|
||||
s->snr = (float) lrintf(r1);
|
||||
snr2 = s->snr*s->fbue/max(s->lbue, 1);
|
||||
/* Quantize SNR to SNRL according to VDCL thresholds. */
|
||||
i1 = nvdcl - 1;
|
||||
for (snrl = 0; snrl < i1; snrl++)
|
||||
{
|
||||
if (snr2 > vdcl[snrl])
|
||||
break;
|
||||
}
|
||||
/* (Note: SNRL = NVDCL here) */
|
||||
/* Linear discriminant voicing parameters: */
|
||||
value[0] = s->maxmin;
|
||||
value[1] = (float) lbe/max(s->lbve, 1);
|
||||
value[2] = (float) zc;
|
||||
value[3] = rc1;
|
||||
value[4] = qs;
|
||||
value[5] = ivrc[1];
|
||||
value[6] = ar_b;
|
||||
value[7] = ar_f;
|
||||
/* Evaluation of linear discriminant function: */
|
||||
s->voice[2][half] = vdc[snrl*10 + 9];
|
||||
for (i = 0; i < 8; i++)
|
||||
s->voice[2][half] += vdc[snrl*10 + i]*value[i];
|
||||
/* Classify as voiced if discriminant > 0, otherwise unvoiced */
|
||||
/* Voicing decision for current half-frame: 1 = Voiced; 0 = Unvoiced */
|
||||
s->voibuf[3][half] = (s->voice[2][half] > 0.0f) ? 1 : 0;
|
||||
/* Skip voicing decision smoothing in first half-frame: */
|
||||
/* Give a value to VSTATE, so that trace statements below will print */
|
||||
/* a consistent value from one call to the next when HALF .EQ. 1. */
|
||||
/* The value of VSTATE is not used for any other purpose when this is */
|
||||
/* true. */
|
||||
vstate = -1;
|
||||
if (half != 0)
|
||||
{
|
||||
/* Voicing decision smoothing rules (override of linear combination): */
|
||||
|
||||
/* Unvoiced half-frames: At least two in a row. */
|
||||
/* -------------------- */
|
||||
|
||||
/* Voiced half-frames: At least two in a row in one frame. */
|
||||
/* ------------------- Otherwise at least three in a row. */
|
||||
/* (Due to the way transition frames are encoded) */
|
||||
|
||||
/* In many cases, the discriminant function determines how to smooth. */
|
||||
/* In the following chart, the decisions marked with a * may be overridden. */
|
||||
|
||||
/* Voicing override of transitions at onsets: */
|
||||
/* If a V/UV or UV/V voicing decision transition occurs within one-half */
|
||||
/* frame of an onset bounding a voicing window, then the transition is */
|
||||
/* moved to occur at the onset. */
|
||||
|
||||
/* P 1F */
|
||||
/* ----- ----- */
|
||||
/* 0 0 0 0 */
|
||||
/* 0 0 0* 1 (If there is an onset there) */
|
||||
/* 0 0 1* 0* (Based on 2F and discriminant distance) */
|
||||
/* 0 0 1 1 */
|
||||
/* 0 1* 0 0 (Always) */
|
||||
/* 0 1* 0* 1 (Based on discriminant distance) */
|
||||
/* 0* 1 1 0* (Based on past, 2F, and discriminant distance) */
|
||||
/* 0 1* 1 1 (If there is an onset there) */
|
||||
/* 1 0* 0 0 (If there is an onset there) */
|
||||
/* 1 0 0 1 */
|
||||
/* 1 0* 1* 0 (Based on discriminant distance) */
|
||||
/* 1 0* 1 1 (Always) */
|
||||
/* 1 1 0 0 */
|
||||
/* 1 1 0* 1* (Based on 2F and discriminant distance) */
|
||||
/* 1 1 1* 0 (If there is an onset there) */
|
||||
/* 1 1 1 1 */
|
||||
|
||||
/* Determine if there is an onset transition between P and 1F. */
|
||||
/* OT (Onset Transition) is true if there is an onset between */
|
||||
/* P and 1F but not after 1F. */
|
||||
ot = ((obound[0] & 2) != 0 || obound[1] == 1) && (obound[2] & 1) == 0;
|
||||
/* Multi-way dispatch on voicing decision history: */
|
||||
vstate = (s->voibuf[1][0] << 3) + (s->voibuf[1][1] << 2) + (s->voibuf[2][0] << 1) + s->voibuf[2][1];
|
||||
switch (vstate + 1)
|
||||
{
|
||||
case 2:
|
||||
if (ot && s->voibuf[3][0] == 1)
|
||||
s->voibuf[2][0] = 1;
|
||||
break;
|
||||
case 3:
|
||||
if (s->voibuf[3][0] == 0 || s->voice[1][0] < -s->voice[1][1])
|
||||
s->voibuf[2][0] = 0;
|
||||
else
|
||||
s->voibuf[2][1] = 1;
|
||||
break;
|
||||
case 5:
|
||||
s->voibuf[1][1] = 0;
|
||||
break;
|
||||
case 6:
|
||||
if (s->voice[0][1] < -s->voice[1][0])
|
||||
s->voibuf[1][1] = 0;
|
||||
else
|
||||
s->voibuf[2][0] = 1;
|
||||
break;
|
||||
case 7:
|
||||
if (s->voibuf[0][0] == 1 || s->voibuf[3][0] == 1 || s->voice[1][1] > s->voice[0][0])
|
||||
s->voibuf[2][1] = 1;
|
||||
else
|
||||
s->voibuf[1][0] = 1;
|
||||
break;
|
||||
case 8:
|
||||
if (ot)
|
||||
s->voibuf[1][1] = 0;
|
||||
break;
|
||||
case 9:
|
||||
if (ot)
|
||||
s->voibuf[1][1] = 1;
|
||||
break;
|
||||
case 11:
|
||||
if (s->voice[1][9] < -s->voice[0][1])
|
||||
s->voibuf[2][0] = 0;
|
||||
else
|
||||
s->voibuf[1][1] = 1;
|
||||
break;
|
||||
case 12:
|
||||
s->voibuf[1][1] = 1;
|
||||
break;
|
||||
case 14:
|
||||
if (s->voibuf[3][0] == 0 && s->voice[1][1] < -s->voice[1][0])
|
||||
s->voibuf[2][1] = 0;
|
||||
else
|
||||
s->voibuf[2][0] = 1;
|
||||
break;
|
||||
case 15:
|
||||
if (ot && s->voibuf[3][0] == 0)
|
||||
s->voibuf[2][0] = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
/* During unvoiced half-frames, update the low band and full band unvoiced*/
|
||||
/* energy estimates (LBUE and FBUE) and also the zero crossing */
|
||||
/* threshold (DITHER). (The input to the unvoiced energy filters is */
|
||||
/* restricted to be less than 10dB above the previous inputs of the */
|
||||
/* filters.) */
|
||||
/* During voiced half-frames, update the low-pass (LBVE) and all-pass */
|
||||
/* (FBVE) voiced energy estimates. */
|
||||
if (s->voibuf[3][half] == 0)
|
||||
{
|
||||
r1 = (s->sfbue*63 + (min(fbe, s->ofbue*3) << 3))/64.0f;
|
||||
s->sfbue = lrintf(r1);
|
||||
s->fbue = s->sfbue/8;
|
||||
s->ofbue = fbe;
|
||||
r1 = (s->slbue*63 + (min(lbe, s->olbue*3) << 3))/64.0f;
|
||||
s->slbue = lrintf(r1);
|
||||
s->lbue = s->slbue/8;
|
||||
s->olbue = lbe;
|
||||
}
|
||||
else
|
||||
{
|
||||
s->lbve = lrintf((s->lbve*63 + lbe)/64.0f);
|
||||
s->fbve = lrintf((s->fbve*63 + fbe)/64.0f);
|
||||
}
|
||||
/* Set dither threshold to yield proper zero crossing rates in the */
|
||||
/* presence of low frequency noise and low level signal input. */
|
||||
/* NOTE: The divisor is a function of REF, the expected energies. */
|
||||
/* Computing MIN */
|
||||
/* Computing MAX */
|
||||
r2 = sqrtf((float) (s->lbue*s->lbve))*64/3000;
|
||||
r1 = max(r2, 1.0f);
|
||||
s->dither = min(r1, 20.0f);
|
||||
/* Voicing decisions are returned in VOIBUF. */
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
/*- End of file ------------------------------------------------------------*/
|
|
@ -1,14 +0,0 @@
|
|||
#ifdef _MSC_VER
|
||||
#pragma warning(disable:4100)
|
||||
#endif
|
||||
|
||||
#include "windows.h"
|
||||
|
||||
void gettimeofday(struct timeval *tv, void *tz)
|
||||
{
|
||||
long int l = GetTickCount();
|
||||
|
||||
tv->tv_sec = l / 1000;
|
||||
tv->tv_usec = (l % 1000) * 1000;
|
||||
return;
|
||||
}
|
|
@ -1,87 +0,0 @@
|
|||
/*
|
||||
* SpanDSP - a series of DSP components for telephony
|
||||
*
|
||||
* inttypes.h - a fudge for MSVC, which lacks this header
|
||||
*
|
||||
* Written by Steve Underwood <steveu@coppice.org>
|
||||
*
|
||||
* Copyright (C) 2006 Michael Jerris
|
||||
*
|
||||
*
|
||||
* This file is released in the public domain.
|
||||
*
|
||||
*/
|
||||
|
||||
#if !defined(_INTTYPES_H_)
|
||||
#define _INTTYPES_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#if (_MSC_VER >= 1400) // VC8+
|
||||
#ifndef _CRT_SECURE_NO_DEPRECATE
|
||||
#define _CRT_SECURE_NO_DEPRECATE
|
||||
#endif
|
||||
#ifndef _CRT_NONSTDC_NO_DEPRECATE
|
||||
#define _CRT_NONSTDC_NO_DEPRECATE
|
||||
#endif
|
||||
#endif // VC8+
|
||||
#include <windows.h>
|
||||
typedef unsigned __int8 uint8_t;
|
||||
typedef unsigned __int16 uint16_t;
|
||||
typedef unsigned __int32 uint32_t;
|
||||
typedef unsigned __int64 uint64_t;
|
||||
typedef __int8 int8_t;
|
||||
typedef __int16 int16_t;
|
||||
typedef __int32 int32_t;
|
||||
typedef __int64 int64_t;
|
||||
#define inline __inline
|
||||
#define __inline__ __inline
|
||||
#define INT16_MAX 0x7fff
|
||||
#define INT16_MIN (-INT16_MAX - 1)
|
||||
#define _MMX_H_
|
||||
|
||||
/* disable the following warnings
|
||||
* C4100: The formal parameter is not referenced in the body of the function. The unreferenced parameter is ignored.
|
||||
* C4200: Non standard extension C zero sized array
|
||||
* C4706: assignment within conditional expression
|
||||
* C4244: conversion from 'type1' to 'type2', possible loss of data
|
||||
* C4295: array is too small to include a terminating null character
|
||||
* C4125: decimal digit terminates octal escape sequence
|
||||
*/
|
||||
#pragma warning(disable:4100 4200 4706 4295 4125)
|
||||
|
||||
#pragma comment(lib, "ws2_32.lib")
|
||||
|
||||
#define strncasecmp _strnicmp
|
||||
#define strcasecmp _stricmp
|
||||
#define snprintf _snprintf
|
||||
|
||||
#if !defined(INFINITY)
|
||||
#define INFINITY 0x7fffffff
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define PACKAGE "voipcodecs"
|
||||
#define VERSION "0.0.1andabit"
|
||||
|
||||
#define INT32_MAX (2147483647)
|
||||
#define INT32_MIN (-2147483647 - 1)
|
||||
|
||||
#define PRId8 "d"
|
||||
#define PRId16 "d"
|
||||
#define PRId32 "ld"
|
||||
#define PRId64 "lld"
|
||||
|
||||
#define PRIu8 "u"
|
||||
#define PRIu16 "u"
|
||||
#define PRIu32 "lu"
|
||||
#define PRIu64 "llu"
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
|
@ -1,7 +0,0 @@
|
|||
|
||||
# Begin Group "Resource Files"
|
||||
|
||||
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
|
||||
# End Group
|
||||
# End Target
|
||||
# End Project
|
|
@ -1,92 +0,0 @@
|
|||
# Microsoft Developer Studio Project File - Name="voipcodecs" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
|
||||
|
||||
CFG=voipcodecs - Win32 Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "voipcodecs.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "voipcodecs.mak" CFG="voipcodecs - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "voipcodecs - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
|
||||
!MESSAGE "voipcodecs - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
MTL=midl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "voipcodecs - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D HAVE_TGMATH_H /YX /FD /c
|
||||
# ADD CPP /nologo /MT /W3 /GX /Zi /O2 /I "." /I "..\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D HAVE_TGMATH_H /D "_WINDLL" /FR /FD /c
|
||||
# SUBTRACT CPP /YX
|
||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
|
||||
# ADD LINK32 kernel32.lib ws2_32.lib winmm.lib /nologo /dll /map /debug /machine:I386 /out:"Release/libvoipcodecs.dll"
|
||||
|
||||
!ELSEIF "$(CFG)" == "voipcodecs - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D HAVE_TGMATH_H /YX /FD /GZ /c
|
||||
# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I "." /I "..\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D HAVE_TGMATH_H /FR /FD /GZ /c
|
||||
# SUBTRACT CPP /WX /YX
|
||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 kernel32.lib ws2_32.lib winmm.lib /nologo /dll /incremental:no /map /debug /machine:I386 /out:"Debug/libvoipcodecs.dll" /pdbtype:sept
|
||||
# SUBTRACT LINK32 /nodefaultlib
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "voipcodecs - Win32 Release"
|
||||
# Name "voipcodecs - Win32 Debug"
|
|
@ -1 +0,0 @@
|
|||
extern void gettimeofday(struct timeval *tv, void *tz);
|
|
@ -1,84 +0,0 @@
|
|||
/*
|
||||
* SpanDSP - a series of DSP components for telephony
|
||||
*
|
||||
* tgmath.h - a fudge for MSVC, which lacks this header
|
||||
*
|
||||
* Written by Steve Underwood <steveu@coppice.org>
|
||||
*
|
||||
* Copyright (C) 2006 Michael Jerris
|
||||
*
|
||||
*
|
||||
* This file is released in the public domain.
|
||||
*
|
||||
*/
|
||||
|
||||
#if !defined(_TGMATH_H_)
|
||||
#define _TGMATH_H_
|
||||
|
||||
#include <math.h>
|
||||
|
||||
#if !defined(M_PI)
|
||||
/* C99 systems may not define M_PI */
|
||||
#define M_PI 3.14159265358979323846264338327
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* A kindofa rint() for VC++ (only kindofa, because rint should be type generic,
|
||||
and this one is purely float to int */
|
||||
static inline long int lrintf(float a)
|
||||
{
|
||||
long int i;
|
||||
|
||||
__asm
|
||||
{
|
||||
fld a
|
||||
fistp i
|
||||
}
|
||||
return i;
|
||||
}
|
||||
|
||||
static inline long int lrint(double a)
|
||||
{
|
||||
long int i;
|
||||
|
||||
__asm
|
||||
{
|
||||
fld a
|
||||
fistp i
|
||||
}
|
||||
return i;
|
||||
}
|
||||
|
||||
static inline int rintf(float a)
|
||||
{
|
||||
int i;
|
||||
|
||||
__asm
|
||||
{
|
||||
fld a
|
||||
fistp i
|
||||
}
|
||||
return i;
|
||||
}
|
||||
|
||||
static inline int rint(double a)
|
||||
{
|
||||
int i;
|
||||
|
||||
__asm
|
||||
{
|
||||
fld a
|
||||
fistp i
|
||||
}
|
||||
return i;
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
|
@ -1,31 +0,0 @@
|
|||
/*
|
||||
* SpanDSP - a series of DSP components for telephony
|
||||
*
|
||||
* inttypes.h - a fudge for MSVC, which lacks this header
|
||||
*
|
||||
* Written by Steve Underwood <steveu@coppice.org>
|
||||
*
|
||||
* Copyright (C) 2006 Michael Jerris
|
||||
*
|
||||
*
|
||||
* This file is released in the public domain.
|
||||
*
|
||||
*/
|
||||
|
||||
#if !defined(_INTTYPES_H_)
|
||||
#define _INTTYPES_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define open _open
|
||||
#define write _write
|
||||
|
||||
extern int gethostname (char *name, size_t len);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
|
@ -1,11 +0,0 @@
|
|||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
|
||||
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
|
||||
>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
|
@ -1,180 +0,0 @@
|
|||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
Name="libvoipcodecs"
|
||||
ProjectGUID="{CF70F278-3364-4395-A2E1-23501C9B8AD2}"
|
||||
RootNamespace="libvoipcodecs"
|
||||
Keyword="Win32Proj"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="2"
|
||||
CharacterSet="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="src; src\voipcodecs; src\msvc"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBSPANDSP_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;HAVE_TGMATH_H"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="4"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="4"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
LinkIncremental="2"
|
||||
ModuleDefinitionFile="src/msvc/voipcodecs.def"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="2"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="2"
|
||||
CharacterSet="1"
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="src; src\voipcodecs; src\msvc"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBSPANDSP_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;HAVE_TGMATH_H"
|
||||
RuntimeLibrary="2"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="4"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
LinkIncremental="1"
|
||||
ModuleDefinitionFile="src/msvc/voipcodecs.def"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="2"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||
>
|
|
@ -1,13 +0,0 @@
|
|||
EXPORTS
|
||||
g722_encode_init
|
||||
g722_encode_release
|
||||
g722_encode
|
||||
g722_decode_init
|
||||
g722_decode_release
|
||||
g722_decode
|
||||
g726_init
|
||||
g726_release
|
||||
ima_adpcm_init
|
||||
ima_adpcm_release
|
||||
oki_adpcm_init
|
||||
oki_adpcm_release
|
|
@ -1,50 +0,0 @@
|
|||
/*
|
||||
* VoIPcodecs - a series of DSP components for telephony
|
||||
*
|
||||
* voipcodecs.h - The head guy amongst the headers
|
||||
*
|
||||
* Written by Steve Underwood <steveu@coppice.org>
|
||||
*
|
||||
* Copyright (C) 2003 Steve Underwood
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the Lesser GNU General Public License version 2.1, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
|
||||
#if !defined(_VOIPCODECS_H_)
|
||||
#define _VOIPCODECS_H_
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <limits.h>
|
||||
#include <time.h>
|
||||
|
||||
#include <voipcodecs/telephony.h>
|
||||
#include <voipcodecs/bit_operations.h>
|
||||
#include <voipcodecs/bitstream.h>
|
||||
#include <voipcodecs/g711.h>
|
||||
#include <voipcodecs/g722.h>
|
||||
#include <voipcodecs/g726.h>
|
||||
#include <voipcodecs/gsm0610.h>
|
||||
#include <voipcodecs/ima_adpcm.h>
|
||||
#include <voipcodecs/lpc10.h>
|
||||
#include <voipcodecs/oki_adpcm.h>
|
||||
|
||||
#endif
|
||||
/*- End of file ------------------------------------------------------------*/
|
|
@ -1,381 +0,0 @@
|
|||
/*
|
||||
* VoIPcodecs - a series of DSP components for telephony
|
||||
*
|
||||
* oki_adpcm.c - Conversion routines between linear 16 bit PCM data and
|
||||
* OKI (Dialogic) ADPCM format. Supports with the 32kbps
|
||||
* and 24kbps variants used by Dialogic.
|
||||
*
|
||||
* Written by Steve Underwood <steveu@coppice.org>
|
||||
*
|
||||
* Copyright (C) 2001, 2004 Steve Underwood
|
||||
*
|
||||
* The actual OKI ADPCM encode and decode method is derived from freely
|
||||
* available code, whose exact origins seem uncertain.
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2, or
|
||||
* the Lesser GNU General Public License version 2.1, as published by
|
||||
* the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: oki_adpcm.c,v 1.23 2008/02/09 15:33:40 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <inttypes.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "voipcodecs/telephony.h"
|
||||
#include "voipcodecs/oki_adpcm.h"
|
||||
|
||||
/* Routines to convert 12 bit linear samples to the Oki ADPCM coding format,
|
||||
widely used in CTI, because Dialogic use it. */
|
||||
|
||||
static const int16_t step_size[49] =
|
||||
{
|
||||
16, 17, 19, 21, 23, 25, 28, 31,
|
||||
34, 37, 41, 45, 50, 55, 60, 66,
|
||||
73, 80, 88, 97, 107, 118, 130, 143,
|
||||
157, 173, 190, 209, 230, 253, 279, 307,
|
||||
337, 371, 408, 449, 494, 544, 598, 658,
|
||||
724, 796, 876, 963, 1060, 1166, 1282, 1408,
|
||||
1552
|
||||
};
|
||||
|
||||
static const int16_t step_adjustment[8] =
|
||||
{
|
||||
-1, -1, -1, -1, 2, 4, 6, 8
|
||||
};
|
||||
|
||||
/* Band limiting filter, to allow sample rate conversion to and
|
||||
from 6k samples/second. */
|
||||
static const float cutoff_coeffs[] =
|
||||
{
|
||||
-3.648392e-4f,
|
||||
5.062391e-4f,
|
||||
1.206247e-3f,
|
||||
1.804452e-3f,
|
||||
1.691750e-3f,
|
||||
4.083405e-4f,
|
||||
-1.931085e-3f,
|
||||
-4.452107e-3f,
|
||||
-5.794821e-3f,
|
||||
-4.778489e-3f,
|
||||
-1.161266e-3f,
|
||||
3.928504e-3f,
|
||||
8.259786e-3f,
|
||||
9.500425e-3f,
|
||||
6.512800e-3f,
|
||||
2.227856e-4f,
|
||||
-6.531275e-3f,
|
||||
-1.026843e-2f,
|
||||
-8.718062e-3f,
|
||||
-2.280487e-3f,
|
||||
5.817733e-3f,
|
||||
1.096777e-2f,
|
||||
9.634404e-3f,
|
||||
1.569301e-3f,
|
||||
-9.522632e-3f,
|
||||
-1.748273e-2f,
|
||||
-1.684408e-2f,
|
||||
-6.100054e-3f,
|
||||
1.071206e-2f,
|
||||
2.525209e-2f,
|
||||
2.871779e-2f,
|
||||
1.664411e-2f,
|
||||
-7.706268e-3f,
|
||||
-3.331083e-2f,
|
||||
-4.521249e-2f,
|
||||
-3.085962e-2f,
|
||||
1.373653e-2f,
|
||||
8.089593e-2f,
|
||||
1.529060e-1f,
|
||||
2.080487e-1f,
|
||||
2.286834e-1f,
|
||||
2.080487e-1f,
|
||||
1.529060e-1f,
|
||||
8.089593e-2f,
|
||||
1.373653e-2f,
|
||||
-3.085962e-2f,
|
||||
-4.521249e-2f,
|
||||
-3.331083e-2f,
|
||||
-7.706268e-3f,
|
||||
1.664411e-2f,
|
||||
2.871779e-2f,
|
||||
2.525209e-2f,
|
||||
1.071206e-2f,
|
||||
-6.100054e-3f,
|
||||
-1.684408e-2f,
|
||||
-1.748273e-2f,
|
||||
-9.522632e-3f,
|
||||
1.569301e-3f,
|
||||
9.634404e-3f,
|
||||
1.096777e-2f,
|
||||
5.817733e-3f,
|
||||
-2.280487e-3f,
|
||||
-8.718062e-3f,
|
||||
-1.026843e-2f,
|
||||
-6.531275e-3f,
|
||||
2.227856e-4f,
|
||||
6.512800e-3f,
|
||||
9.500425e-3f,
|
||||
8.259786e-3f,
|
||||
3.928504e-3f,
|
||||
-1.161266e-3f,
|
||||
-4.778489e-3f,
|
||||
-5.794821e-3f,
|
||||
-4.452107e-3f,
|
||||
-1.931085e-3f,
|
||||
4.083405e-4f,
|
||||
1.691750e-3f,
|
||||
1.804452e-3f,
|
||||
1.206247e-3f,
|
||||
5.062391e-4f,
|
||||
-3.648392e-4f
|
||||
};
|
||||
|
||||
static int16_t decode(oki_adpcm_state_t *s, uint8_t adpcm)
|
||||
{
|
||||
int16_t e;
|
||||
int16_t ss;
|
||||
int16_t linear;
|
||||
|
||||
/* Doing the next part as follows:
|
||||
*
|
||||
* x = adpcm & 0x07;
|
||||
* e = (step_size[s->step_index]*(x + x + 1)) >> 3;
|
||||
*
|
||||
* Seems an obvious improvement on a modern machine, but remember
|
||||
* the truncation errors do not come out the same. It would
|
||||
* not, therefore, be an exact match for what this code is doing.
|
||||
*
|
||||
* Just what a Dialogic card does, I do not know!
|
||||
*/
|
||||
|
||||
ss = step_size[s->step_index];
|
||||
e = ss >> 3;
|
||||
if (adpcm & 0x01)
|
||||
e += (ss >> 2);
|
||||
/*endif*/
|
||||
if (adpcm & 0x02)
|
||||
e += (ss >> 1);
|
||||
/*endif*/
|
||||
if (adpcm & 0x04)
|
||||
e = (int16_t)(e + ss);
|
||||
/*endif*/
|
||||
if (adpcm & 0x08)
|
||||
e = -e;
|
||||
/*endif*/
|
||||
linear = s->last + e;
|
||||
|
||||
/* Saturate the values to +/- 2^11 (supposed to be 12 bits) */
|
||||
if (linear > 2047)
|
||||
linear = 2047;
|
||||
else if (linear < -2048)
|
||||
linear = -2048;
|
||||
/*endif*/
|
||||
|
||||
s->last = linear;
|
||||
s->step_index = (int16_t)(s->step_index + step_adjustment[adpcm & 0x07]);
|
||||
if (s->step_index < 0)
|
||||
s->step_index = 0;
|
||||
else if (s->step_index > 48)
|
||||
s->step_index = 48;
|
||||
/*endif*/
|
||||
/* Note: the result here is a 12 bit value */
|
||||
return linear;
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
static uint8_t encode(oki_adpcm_state_t *s, int16_t linear)
|
||||
{
|
||||
int16_t e;
|
||||
int16_t ss;
|
||||
uint8_t adpcm;
|
||||
|
||||
ss = step_size[s->step_index];
|
||||
e = (linear >> 4) - s->last;
|
||||
adpcm = (uint8_t) 0x00;
|
||||
if (e < 0)
|
||||
{
|
||||
adpcm = (uint8_t) 0x08;
|
||||
e = -e;
|
||||
}
|
||||
/*endif*/
|
||||
if (e >= ss)
|
||||
{
|
||||
adpcm |= (uint8_t) 0x04;
|
||||
e = (int16_t)(e - ss);
|
||||
}
|
||||
/*endif*/
|
||||
if (e >= (ss >> 1))
|
||||
{
|
||||
adpcm |= (uint8_t) 0x02;
|
||||
e = (int16_t)(e - ss);
|
||||
}
|
||||
/*endif*/
|
||||
if (e >= (ss >> 2))
|
||||
adpcm |= (uint8_t) 0x01;
|
||||
/*endif*/
|
||||
|
||||
/* Use the decoder to set the estimate of the last sample. */
|
||||
/* It also will adjust the step_index for us. */
|
||||
s->last = decode(s, adpcm);
|
||||
return adpcm;
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
oki_adpcm_state_t *oki_adpcm_init(oki_adpcm_state_t *s, int bit_rate)
|
||||
{
|
||||
if (bit_rate != 32000 && bit_rate != 24000)
|
||||
return NULL;
|
||||
if (s == NULL)
|
||||
{
|
||||
if ((s = (oki_adpcm_state_t *) malloc(sizeof(*s))) == NULL)
|
||||
return NULL;
|
||||
}
|
||||
memset(s, 0, sizeof(*s));
|
||||
s->bit_rate = bit_rate;
|
||||
|
||||
return s;
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
int oki_adpcm_release(oki_adpcm_state_t *s)
|
||||
{
|
||||
free(s);
|
||||
return 0;
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
int oki_adpcm_decode(oki_adpcm_state_t *s,
|
||||
int16_t amp[],
|
||||
const uint8_t oki_data[],
|
||||
int oki_bytes)
|
||||
{
|
||||
int i;
|
||||
int x;
|
||||
int l;
|
||||
int n;
|
||||
int samples;
|
||||
float z;
|
||||
|
||||
#if (_MSC_VER >= 1400)
|
||||
__analysis_assume(s->phase >=0 && s->phase <= 4);
|
||||
#endif
|
||||
|
||||
samples = 0;
|
||||
if (s->bit_rate == 32000)
|
||||
{
|
||||
for (i = 0; i < oki_bytes; i++)
|
||||
{
|
||||
amp[samples++] = decode(s, (oki_data[i] >> 4) & 0xF) << 4;
|
||||
amp[samples++] = decode(s, oki_data[i] & 0xF) << 4;
|
||||
}
|
||||
/*endwhile*/
|
||||
}
|
||||
else
|
||||
{
|
||||
n = 0;
|
||||
for (i = 0; i < oki_bytes; )
|
||||
{
|
||||
/* 6k to 8k sample/second conversion */
|
||||
if (s->phase)
|
||||
{
|
||||
s->history[s->ptr++] =
|
||||
decode(s, (n++ & 1) ? (oki_data[i++] & 0xF) : ((oki_data[i] >> 4) & 0xF)) << 4;
|
||||
s->ptr &= (32 - 1);
|
||||
}
|
||||
/*endif*/
|
||||
z = 0.0f;
|
||||
for (l = 80 - 3 + s->phase, x = s->ptr - 1; l >= 0; l -= 4, x--)
|
||||
z += cutoff_coeffs[l]*s->history[x & (32 - 1)];
|
||||
amp[samples++] = (int16_t) (z*4.0f);
|
||||
if (++s->phase > 3)
|
||||
s->phase = 0;
|
||||
/*endif*/
|
||||
}
|
||||
/*endfor*/
|
||||
}
|
||||
/*endif*/
|
||||
return samples;
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
int oki_adpcm_encode(oki_adpcm_state_t *s,
|
||||
uint8_t oki_data[],
|
||||
const int16_t amp[],
|
||||
int len)
|
||||
{
|
||||
int x;
|
||||
int l;
|
||||
int n;
|
||||
int bytes;
|
||||
float z;
|
||||
|
||||
bytes = 0;
|
||||
if (s->bit_rate == 32000)
|
||||
{
|
||||
for (n = 0; n < len; n++)
|
||||
{
|
||||
s->oki_byte = (s->oki_byte << 4) | encode(s, amp[n]);
|
||||
if ((s->mark++ & 1))
|
||||
oki_data[bytes++] = s->oki_byte;
|
||||
/*endif*/
|
||||
}
|
||||
/*endfor*/
|
||||
}
|
||||
else
|
||||
{
|
||||
n = 0;
|
||||
for (;;)
|
||||
{
|
||||
/* 8k to 6k sample/second conversion */
|
||||
if (s->phase > 2)
|
||||
{
|
||||
s->history[s->ptr++] = amp[n];
|
||||
s->ptr &= (32 - 1);
|
||||
s->phase = 0;
|
||||
if (++n >= len)
|
||||
break;
|
||||
/*endif*/
|
||||
}
|
||||
/*endif*/
|
||||
s->history[s->ptr++] = amp[n];
|
||||
s->ptr &= (32 - 1);
|
||||
z = 0.0f;
|
||||
for (l = 80 - s->phase, x = s->ptr - 1; l >= 0; l -= 3, x--)
|
||||
z += cutoff_coeffs[l]*s->history[x & (32 - 1)];
|
||||
/*endfor*/
|
||||
s->oki_byte = (s->oki_byte << 4) | encode(s, (int16_t) (z*3.0f));
|
||||
if ((s->mark++ & 1))
|
||||
oki_data[bytes++] = s->oki_byte;
|
||||
/*endif*/
|
||||
s->phase++;
|
||||
if (++n >= len)
|
||||
break;
|
||||
/*endif*/
|
||||
}
|
||||
/*endfor*/
|
||||
}
|
||||
/*endif*/
|
||||
return bytes;
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
/*- End of file ------------------------------------------------------------*/
|
|
@ -1,347 +0,0 @@
|
|||
/*
|
||||
* VoIPcodecs - a series of DSP components for telephony
|
||||
*
|
||||
* vector_int.c - Integer vector arithmetic
|
||||
*
|
||||
* Written by Steve Underwood <steveu@coppice.org>
|
||||
*
|
||||
* Copyright (C) 2006 Steve Underwood
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the Lesser Lesser GNU General Public License version 2.1.1, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: vector_int.c,v 1.6 2007/08/21 14:25:54 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#if defined(HAVE_TGMATH_H)
|
||||
#include <tgmath.h>
|
||||
#endif
|
||||
#if defined(HAVE_MATH_H)
|
||||
#include <math.h>
|
||||
#endif
|
||||
#include <assert.h>
|
||||
|
||||
#include "voipcodecs/telephony.h"
|
||||
#include "voipcodecs/vector_int.h"
|
||||
|
||||
int32_t vec_dot_prodi16(const int16_t x[], const int16_t y[], int n)
|
||||
{
|
||||
int32_t z;
|
||||
|
||||
#if defined(__GNUC__) && defined(__i386__)
|
||||
__asm__ __volatile__(
|
||||
" emms;\n"
|
||||
" pxor %%mm0,%%mm0;\n"
|
||||
" leal -32(%%esi,%%eax,2),%%edx;\n" /* edx = top - 32 */
|
||||
|
||||
" cmpl %%edx,%%esi;\n"
|
||||
" ja 1f;\n"
|
||||
|
||||
/* Work in blocks of 16 int16_t's until we are near the end */
|
||||
" .p2align 2;\n"
|
||||
"2:\n"
|
||||
" movq (%%edi),%%mm1;\n"
|
||||
" movq (%%esi),%%mm2;\n"
|
||||
" pmaddwd %%mm2,%%mm1;\n"
|
||||
" paddd %%mm1,%%mm0;\n"
|
||||
" movq 8(%%edi),%%mm1;\n"
|
||||
" movq 8(%%esi),%%mm2;\n"
|
||||
" pmaddwd %%mm2,%%mm1;\n"
|
||||
" paddd %%mm1,%%mm0;\n"
|
||||
" movq 16(%%edi),%%mm1;\n"
|
||||
" movq 16(%%esi),%%mm2;\n"
|
||||
" pmaddwd %%mm2,%%mm1;\n"
|
||||
" paddd %%mm1,%%mm0;\n"
|
||||
" movq 24(%%edi),%%mm1;\n"
|
||||
" movq 24(%%esi),%%mm2;\n"
|
||||
" pmaddwd %%mm2,%%mm1;\n"
|
||||
" paddd %%mm1,%%mm0;\n"
|
||||
|
||||
" addl $32,%%esi;\n"
|
||||
" addl $32,%%edi;\n"
|
||||
" cmpl %%edx,%%esi;\n"
|
||||
" jbe 2b;\n"
|
||||
|
||||
" .p2align 2;\n"
|
||||
"1:\n"
|
||||
" addl $24,%%edx;\n" /* now edx = top - 8 */
|
||||
" cmpl %%edx,%%esi;\n"
|
||||
" ja 3f;\n"
|
||||
|
||||
/* Work in blocks of 4 int16_t's until we are near the end */
|
||||
" .p2align 2;\n"
|
||||
"4:\n"
|
||||
" movq (%%edi),%%mm1;\n"
|
||||
" movq (%%esi),%%mm2;\n"
|
||||
" pmaddwd %%mm2,%%mm1;\n"
|
||||
" paddd %%mm1,%%mm0;\n"
|
||||
|
||||
" addl $8,%%esi;\n"
|
||||
" addl $8,%%edi;\n"
|
||||
" cmpl %%edx,%%esi;"
|
||||
" jbe 4b;\n"
|
||||
|
||||
" .p2align 2;\n"
|
||||
"3:\n"
|
||||
" addl $4,%%edx;\n" /* now edx = top - 4 */
|
||||
" cmpl %%edx,%%esi;\n"
|
||||
" ja 5f;\n"
|
||||
|
||||
/* Work in a block of 2 int16_t's */
|
||||
" movd (%%edi),%%mm1;\n"
|
||||
" movd (%%esi),%%mm2;\n"
|
||||
" pmaddwd %%mm2,%%mm1;\n"
|
||||
" paddd %%mm1,%%mm0;\n"
|
||||
|
||||
" addl $4,%%esi;\n"
|
||||
" addl $4,%%edi;\n"
|
||||
|
||||
" .p2align 2;\n"
|
||||
"5:\n"
|
||||
" addl $2,%%edx;\n" /* now edx = top - 2 */
|
||||
" cmpl %%edx,%%esi;\n"
|
||||
" ja 6f;\n"
|
||||
|
||||
/* Deal with the very last int16_t, when n is odd */
|
||||
" movswl (%%edi),%%eax;\n"
|
||||
" andl $65535,%%eax;\n"
|
||||
" movd %%eax,%%mm1;\n"
|
||||
" movswl (%%esi),%%eax;\n"
|
||||
" andl $65535,%%eax;\n"
|
||||
" movd %%eax,%%mm2;\n"
|
||||
" pmaddwd %%mm2,%%mm1;\n"
|
||||
" paddd %%mm1,%%mm0;\n"
|
||||
|
||||
" .p2align 2;\n"
|
||||
"6:\n"
|
||||
/* Merge the pieces of the answer */
|
||||
" movq %%mm0,%%mm1;\n"
|
||||
" punpckhdq %%mm0,%%mm1;\n"
|
||||
" paddd %%mm1,%%mm0;\n"
|
||||
/* et voila, eax has the final result */
|
||||
" movd %%mm0,%%eax;\n"
|
||||
|
||||
" emms;\n"
|
||||
: "=a" (z)
|
||||
: "S" (x), "D" (y), "a" (n)
|
||||
: "cc"
|
||||
);
|
||||
#else
|
||||
int i;
|
||||
|
||||
z = 0;
|
||||
for (i = 0; i < n; i++)
|
||||
z += (int32_t) x[i]*(int32_t) y[i];
|
||||
#endif
|
||||
return z;
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
int32_t vec_min_maxi16(const int16_t x[], int n, int16_t out[])
|
||||
{
|
||||
#if defined(__GNUC__) && defined(__i386__)
|
||||
static const int32_t lower_bound = 0x80008000;
|
||||
static const int32_t upper_bound = 0x7FFF7FFF;
|
||||
int32_t max;
|
||||
|
||||
__asm__ __volatile__(
|
||||
" emms;\n"
|
||||
" pushl %%edx;\n"
|
||||
" leal -8(%%esi,%%eax,2),%%edx;\n"
|
||||
|
||||
" cmpl %%edx,%%esi;\n"
|
||||
" jbe 2f;\n"
|
||||
" movd %[lower],%%mm0;\n"
|
||||
" movd %[upper],%%mm1;\n"
|
||||
" jmp 1f;\n"
|
||||
|
||||
" .p2align 2;\n"
|
||||
"2:\n"
|
||||
" movq (%%esi),%%mm0;\n" /* mm0 will be max's */
|
||||
" movq %%mm0,%%mm1;\n" /* mm1 will be min's */
|
||||
" addl $8,%%esi;\n"
|
||||
" cmpl %%edx,%%esi;\n"
|
||||
" ja 4f;\n"
|
||||
|
||||
" .p2align 2;\n"
|
||||
"3:\n"
|
||||
" movq (%%esi),%%mm2;\n"
|
||||
|
||||
" movq %%mm2,%%mm3;\n"
|
||||
" pcmpgtw %%mm0,%%mm3;\n" /* mm3 is bitmask for words where mm2 > mm0 */
|
||||
" movq %%mm3,%%mm4;\n"
|
||||
" pand %%mm2,%%mm3;\n" /* mm3 is mm2 masked to new max's */
|
||||
" pandn %%mm0,%%mm4;\n" /* mm4 is mm0 masked to its max's */
|
||||
" por %%mm3,%%mm4;\n"
|
||||
" movq %%mm4,%%mm0;\n" /* Now mm0 is updated max's */
|
||||
|
||||
" movq %%mm1,%%mm3;\n"
|
||||
" pcmpgtw %%mm2,%%mm3;\n" /* mm3 is bitmask for words where mm2 < mm1 */
|
||||
" pand %%mm3,%%mm2;\n" /* mm2 is mm2 masked to new min's */
|
||||
" pandn %%mm1,%%mm3;\n" /* mm3 is mm1 masked to its min's */
|
||||
" por %%mm3,%%mm2;\n"
|
||||
" movq %%mm2,%%mm1;\n" /* now mm1 is updated min's */
|
||||
|
||||
" addl $8,%%esi;\n"
|
||||
" cmpl %%edx,%%esi;\n"
|
||||
" jbe 3b;\n"
|
||||
|
||||
" .p2align 2;\n"
|
||||
"4:\n"
|
||||
/* Merge down the 4-word max/mins to lower 2 words */
|
||||
" movq %%mm0,%%mm2;\n"
|
||||
" psrlq $32,%%mm2;\n"
|
||||
" movq %%mm2,%%mm3;\n"
|
||||
" pcmpgtw %%mm0,%%mm3;\n" /* mm3 is bitmask for words where mm2 > mm0 */
|
||||
" pand %%mm3,%%mm2;\n" /* mm2 is mm2 masked to new max's */
|
||||
" pandn %%mm0,%%mm3;\n" /* mm3 is mm0 masked to its max's */
|
||||
" por %%mm3,%%mm2;\n"
|
||||
" movq %%mm2,%%mm0;\n" /* now mm0 is updated max's */
|
||||
|
||||
" movq %%mm1,%%mm2;\n"
|
||||
" psrlq $32,%%mm2;\n"
|
||||
" movq %%mm1,%%mm3;\n"
|
||||
" pcmpgtw %%mm2,%%mm3;\n" /* mm3 is bitmask for words where mm2 < mm1 */
|
||||
" pand %%mm3,%%mm2;\n" /* mm2 is mm2 masked to new min's */
|
||||
" pandn %%mm1,%%mm3;\n" /* mm3 is mm1 masked to its min's */
|
||||
" por %%mm3,%%mm2;\n"
|
||||
" movq %%mm2,%%mm1;\n" /* now mm1 is updated min's */
|
||||
|
||||
" .p2align 2;\n"
|
||||
"1:\n"
|
||||
" addl $4,%%edx;\n" /* now dx = top-4 */
|
||||
" cmpl %%edx,%%esi;\n"
|
||||
" ja 5f;\n"
|
||||
/* Here, there are >= 2 words of input remaining */
|
||||
" movd (%%esi),%%mm2;\n"
|
||||
|
||||
" movq %%mm2,%%mm3;\n"
|
||||
" pcmpgtw %%mm0,%%mm3;\n" /* mm3 is bitmask for words where mm2 > mm0 */
|
||||
" movq %%mm3,%%mm4;\n"
|
||||
" pand %%mm2,%%mm3;\n" /* mm3 is mm2 masked to new max's */
|
||||
" pandn %%mm0,%%mm4;\n" /* mm4 is mm0 masked to its max's */
|
||||
" por %%mm3,%%mm4;\n"
|
||||
" movq %%mm4,%%mm0;\n" /* now mm0 is updated max's */
|
||||
|
||||
" movq %%mm1,%%mm3;\n"
|
||||
" pcmpgtw %%mm2,%%mm3;\n" /* mm3 is bitmask for words where mm2 < mm1 */
|
||||
" pand %%mm3,%%mm2;\n" /* mm2 is mm2 masked to new min's */
|
||||
" pandn %%mm1,%%mm3;\n" /* mm3 is mm1 masked to its min's */
|
||||
" por %%mm3,%%mm2;\n"
|
||||
" movq %%mm2,%%mm1;\n" /* now mm1 is updated min's */
|
||||
|
||||
" addl $4,%%esi;\n"
|
||||
|
||||
" .p2align 2;\n"
|
||||
"5:\n"
|
||||
/* Merge down the 2-word max/mins to 1 word */
|
||||
" movq %%mm0,%%mm2;\n"
|
||||
" psrlq $16,%%mm2;\n"
|
||||
" movq %%mm2,%%mm3;\n"
|
||||
" pcmpgtw %%mm0,%%mm3;\n" /* mm3 is bitmask for words where mm2 > mm0 */
|
||||
" pand %%mm3,%%mm2;\n" /* mm2 is mm2 masked to new max's */
|
||||
" pandn %%mm0,%%mm3;\n" /* mm3 is mm0 masked to its max's */
|
||||
" por %%mm3,%%mm2;\n"
|
||||
" movd %%mm2,%%ecx;\n" /* cx is max so far */
|
||||
|
||||
" movq %%mm1,%%mm2;\n"
|
||||
" psrlq $16,%%mm2;\n"
|
||||
" movq %%mm1,%%mm3;\n"
|
||||
" pcmpgtw %%mm2,%%mm3;\n" /* mm3 is bitmask for words where mm2 < mm1 */
|
||||
" pand %%mm3,%%mm2;\n" /* mm2 is mm2 masked to new min's */
|
||||
" pandn %%mm1,%%mm3;\n" /* mm3 is mm1 masked to its min's */
|
||||
" por %%mm3,%%mm2;\n"
|
||||
" movd %%mm2,%%eax;\n" /* ax is min so far */
|
||||
|
||||
" addl $2,%%edx;\n" /* now dx = top-2 */
|
||||
" cmpl %%edx,%%esi;\n"
|
||||
" ja 6f;\n"
|
||||
|
||||
/* Here, there is one word of input left */
|
||||
" cmpw (%%esi),%%cx;\n"
|
||||
" jge 9f;\n"
|
||||
" movw (%%esi),%%cx;\n"
|
||||
" .p2align 2;\n"
|
||||
"9:\n"
|
||||
" cmpw (%%esi),%%ax;\n"
|
||||
" jle 6f;\n"
|
||||
" movw (%%esi),%%ax;\n"
|
||||
|
||||
" .p2align 2;\n"
|
||||
"6:\n"
|
||||
/* (finally!) cx is the max, ax the min */
|
||||
" movswl %%cx,%%ecx;\n"
|
||||
" movswl %%ax,%%eax;\n"
|
||||
|
||||
" popl %%edx;\n" /* ptr to output max,min vals */
|
||||
" andl %%edx,%%edx;\n"
|
||||
" jz 7f;\n"
|
||||
" movw %%cx,(%%edx);\n" /* max */
|
||||
" movw %%ax,2(%%edx);\n" /* min */
|
||||
" .p2align 2;\n"
|
||||
"7:\n"
|
||||
/* Now calculate max absolute value */
|
||||
" negl %%eax;\n"
|
||||
" cmpl %%ecx,%%eax;\n"
|
||||
" jge 8f;\n"
|
||||
" movl %%ecx,%%eax;\n"
|
||||
" .p2align 2;\n"
|
||||
"8:\n"
|
||||
" emms;\n"
|
||||
: "=a" (max)
|
||||
: "S" (x), "a" (n), "d" (out), [lower] "m" (lower_bound), [upper] "m" (upper_bound)
|
||||
: "ecx"
|
||||
);
|
||||
return max;
|
||||
#else
|
||||
int i;
|
||||
int16_t min;
|
||||
int16_t max;
|
||||
int16_t temp;
|
||||
int32_t z;
|
||||
|
||||
max = INT16_MIN;
|
||||
min = INT16_MAX;
|
||||
for (i = 0; i < n; i++)
|
||||
{
|
||||
temp = x[i];
|
||||
if (temp > max)
|
||||
max = temp;
|
||||
/*endif*/
|
||||
if (temp < min)
|
||||
min = temp;
|
||||
/*endif*/
|
||||
}
|
||||
/*endfor*/
|
||||
out[0] = max;
|
||||
out[1] = min;
|
||||
z = abs(min);
|
||||
if (z > max)
|
||||
return z;
|
||||
return max;
|
||||
#endif
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
/*- End of file ------------------------------------------------------------*/
|
|
@ -1,54 +0,0 @@
|
|||
/*
|
||||
* VoIPcodecs - a series of DSP components for telephony
|
||||
*
|
||||
* voipcodecs.h - The head guy amongst the headers
|
||||
*
|
||||
* Written by Steve Underwood <steveu@coppice.org>
|
||||
*
|
||||
* Copyright (C) 2003 Steve Underwood
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the Lesser GNU General Public License version 2.1, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
|
||||
#if !defined(_VOIPCODECS_H_)
|
||||
#define _VOIPCODECS_H_
|
||||
|
||||
@VOIPCODECS_USE_FIXED_POINT@
|
||||
|
||||
#include <stdlib.h>
|
||||
@INSERT_INTTYPES_HEADER@
|
||||
#include <string.h>
|
||||
#include <limits.h>
|
||||
#include <time.h>
|
||||
@INSERT_MATH_HEADER@
|
||||
|
||||
#include <voipcodecs/telephony.h>
|
||||
#include <voipcodecs/bit_operations.h>
|
||||
#include <voipcodecs/bitstream.h>
|
||||
#include <voipcodecs/g711.h>
|
||||
#include <voipcodecs/g722.h>
|
||||
#include <voipcodecs/g726.h>
|
||||
#include <voipcodecs/gsm0610.h>
|
||||
#include <voipcodecs/ima_adpcm.h>
|
||||
#include <voipcodecs/lpc10.h>
|
||||
#include <voipcodecs/oki_adpcm.h>
|
||||
|
||||
#endif
|
||||
/*- End of file ------------------------------------------------------------*/
|
|
@ -1,262 +0,0 @@
|
|||
/*
|
||||
* VoIPcodecs - a series of DSP components for telephony
|
||||
*
|
||||
* bit_operations.h - Various bit level operations, such as bit reversal
|
||||
*
|
||||
* Written by Steve Underwood <steveu@coppice.org>
|
||||
*
|
||||
* Copyright (C) 2006 Steve Underwood
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the Lesser GNU General Public License version 2.1, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: bit_operations.h,v 1.19 2007/12/13 11:31:32 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
|
||||
#if !defined(_SPANDSP_BIT_OPERATIONS_H_)
|
||||
#define _SPANDSP_BIT_OPERATIONS_H_
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
/*! \brief Find the bit position of the highest set bit in a word
|
||||
\param bits The word to be searched
|
||||
\return The bit number of the highest set bit, or -1 if the word is zero. */
|
||||
static __inline__ int top_bit(unsigned int bits)
|
||||
{
|
||||
int res;
|
||||
|
||||
#if defined(__i386__) || defined(__x86_64__)
|
||||
__asm__ (" xorl %[res],%[res];\n"
|
||||
" decl %[res];\n"
|
||||
" bsrl %[bits],%[res]\n"
|
||||
: [res] "=&r" (res)
|
||||
: [bits] "rm" (bits));
|
||||
return res;
|
||||
#elif defined(__ppc__) || defined(__powerpc__)
|
||||
__asm__ ("cntlzw %[res],%[bits];\n"
|
||||
: [res] "=&r" (res)
|
||||
: [bits] "r" (bits));
|
||||
return 31 - res;
|
||||
#else
|
||||
if (bits == 0)
|
||||
return -1;
|
||||
res = 0;
|
||||
if (bits & 0xFFFF0000)
|
||||
{
|
||||
bits &= 0xFFFF0000;
|
||||
res += 16;
|
||||
}
|
||||
if (bits & 0xFF00FF00)
|
||||
{
|
||||
bits &= 0xFF00FF00;
|
||||
res += 8;
|
||||
}
|
||||
if (bits & 0xF0F0F0F0)
|
||||
{
|
||||
bits &= 0xF0F0F0F0;
|
||||
res += 4;
|
||||
}
|
||||
if (bits & 0xCCCCCCCC)
|
||||
{
|
||||
bits &= 0xCCCCCCCC;
|
||||
res += 2;
|
||||
}
|
||||
if (bits & 0xAAAAAAAA)
|
||||
{
|
||||
bits &= 0xAAAAAAAA;
|
||||
res += 1;
|
||||
}
|
||||
return res;
|
||||
#endif
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
/*! \brief Find the bit position of the lowest set bit in a word
|
||||
\param bits The word to be searched
|
||||
\return The bit number of the lowest set bit, or -1 if the word is zero. */
|
||||
static __inline__ int bottom_bit(unsigned int bits)
|
||||
{
|
||||
int res;
|
||||
|
||||
#if defined(__i386__) || defined(__x86_64__)
|
||||
__asm__ (" xorl %[res],%[res];\n"
|
||||
" decl %[res];\n"
|
||||
" bsfl %[bits],%[res]\n"
|
||||
: [res] "=&r" (res)
|
||||
: [bits] "rm" (bits));
|
||||
return res;
|
||||
#else
|
||||
if (bits == 0)
|
||||
return -1;
|
||||
res = 31;
|
||||
if (bits & 0x0000FFFF)
|
||||
{
|
||||
bits &= 0x0000FFFF;
|
||||
res -= 16;
|
||||
}
|
||||
if (bits & 0x00FF00FF)
|
||||
{
|
||||
bits &= 0x00FF00FF;
|
||||
res -= 8;
|
||||
}
|
||||
if (bits & 0x0F0F0F0F)
|
||||
{
|
||||
bits &= 0x0F0F0F0F;
|
||||
res -= 4;
|
||||
}
|
||||
if (bits & 0x33333333)
|
||||
{
|
||||
bits &= 0x33333333;
|
||||
res -= 2;
|
||||
}
|
||||
if (bits & 0x55555555)
|
||||
{
|
||||
bits &= 0x55555555;
|
||||
res -= 1;
|
||||
}
|
||||
return res;
|
||||
#endif
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
/*! \brief Bit reverse a byte.
|
||||
\param data The byte to be reversed.
|
||||
\return The bit reversed version of data. */
|
||||
static __inline__ uint8_t bit_reverse8(uint8_t x)
|
||||
{
|
||||
#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__powerpc__)
|
||||
/* If multiply is fast */
|
||||
return ((x*0x0802U & 0x22110U) | (x*0x8020U & 0x88440U))*0x10101U >> 16;
|
||||
#else
|
||||
/* If multiply is slow, but we have a barrel shifter */
|
||||
x = (x >> 4) | (x << 4);
|
||||
x = ((x & 0xCC) >> 2) | ((x & 0x33) << 2);
|
||||
return ((x & 0xAA) >> 1) | ((x & 0x55) << 1);
|
||||
#endif
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
/*! \brief Bit reverse a 16 bit word.
|
||||
\param data The word to be reversed.
|
||||
\return The bit reversed version of data. */
|
||||
uint16_t bit_reverse16(uint16_t data);
|
||||
|
||||
/*! \brief Bit reverse a 32 bit word.
|
||||
\param data The word to be reversed.
|
||||
\return The bit reversed version of data. */
|
||||
uint32_t bit_reverse32(uint32_t data);
|
||||
|
||||
/*! \brief Bit reverse each of the four bytes in a 32 bit word.
|
||||
\param data The word to be reversed.
|
||||
\return The bit reversed version of data. */
|
||||
uint32_t bit_reverse_4bytes(uint32_t data);
|
||||
|
||||
#if defined(__x86_64__)
|
||||
/*! \brief Bit reverse each of the eight bytes in a 64 bit word.
|
||||
\param data The word to be reversed.
|
||||
\return The bit reversed version of data. */
|
||||
uint64_t bit_reverse_8bytes(uint64_t data);
|
||||
#endif
|
||||
|
||||
/*! \brief Bit reverse each bytes in a buffer.
|
||||
\param to The buffer to place the reversed data in.
|
||||
\param from The buffer containing the data to be reversed.
|
||||
\param len The length of the data in the buffer. */
|
||||
void bit_reverse(uint8_t to[], const uint8_t from[], int len);
|
||||
|
||||
/*! \brief Find the number of set bits in a 32 bit word.
|
||||
\param x The word to be searched.
|
||||
\return The number of set bits. */
|
||||
int one_bits32(uint32_t x);
|
||||
|
||||
/*! \brief Create a mask as wide as the number in a 32 bit word.
|
||||
\param x The word to be searched.
|
||||
\return The mask. */
|
||||
uint32_t make_mask32(uint32_t x);
|
||||
|
||||
/*! \brief Create a mask as wide as the number in a 16 bit word.
|
||||
\param x The word to be searched.
|
||||
\return The mask. */
|
||||
uint16_t make_mask16(uint16_t x);
|
||||
|
||||
/*! \brief Find the least significant one in a word, and return a word
|
||||
with just that bit set.
|
||||
\param x The word to be searched.
|
||||
\return The word with the single set bit. */
|
||||
static __inline__ uint32_t least_significant_one32(uint32_t x)
|
||||
{
|
||||
return (x & (-(int32_t) x));
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
/*! \brief Find the most significant one in a word, and return a word
|
||||
with just that bit set.
|
||||
\param x The word to be searched.
|
||||
\return The word with the single set bit. */
|
||||
static __inline__ uint32_t most_significant_one32(uint32_t x)
|
||||
{
|
||||
#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__powerpc__)
|
||||
return 1 << top_bit(x);
|
||||
#else
|
||||
x = make_mask32(x);
|
||||
return (x ^ (x >> 1));
|
||||
#endif
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
/*! \brief Find the parity of a byte.
|
||||
\param x The byte to be checked.
|
||||
\return 1 for odd, or 0 for even. */
|
||||
static __inline__ int parity8(uint8_t x)
|
||||
{
|
||||
x = (x ^ (x >> 4)) & 0x0F;
|
||||
return (0x6996 >> x) & 1;
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
/*! \brief Find the parity of a 16 bit word.
|
||||
\param x The word to be checked.
|
||||
\return 1 for odd, or 0 for even. */
|
||||
static __inline__ int parity16(uint16_t x)
|
||||
{
|
||||
x ^= (x >> 8);
|
||||
x = (x ^ (x >> 4)) & 0x0F;
|
||||
return (0x6996 >> x) & 1;
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
/*! \brief Find the parity of a 32 bit word.
|
||||
\param x The word to be checked.
|
||||
\return 1 for odd, or 0 for even. */
|
||||
static __inline__ int parity32(uint32_t x)
|
||||
{
|
||||
x ^= (x >> 16);
|
||||
x ^= (x >> 8);
|
||||
x = (x ^ (x >> 4)) & 0x0F;
|
||||
return (0x6996 >> x) & 1;
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
/*- End of file ------------------------------------------------------------*/
|
|
@ -1,89 +0,0 @@
|
|||
/*
|
||||
* VoIPcodecs - a series of DSP components for telephony
|
||||
*
|
||||
* bitstream.h - Bitstream composition and decomposition routines.
|
||||
*
|
||||
* Written by Steve Underwood <steveu@coppice.org>
|
||||
*
|
||||
* Copyright (C) 2006 Steve Underwood
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the Lesser GNU General Public License version 2.1, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: bitstream.h,v 1.8 2007/12/13 11:31:32 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
|
||||
#if !defined(_SPANDSP_BITSTREAM_H_)
|
||||
#define _SPANDSP_BITSTREAM_H_
|
||||
|
||||
/*! \page bitstream_page Bitstream composition and decomposition
|
||||
\section bitstream_page_sec_1 What does it do?
|
||||
|
||||
\section bitstream_page_sec_2 How does it work?
|
||||
*/
|
||||
|
||||
/*! Bitstream handler state */
|
||||
typedef struct
|
||||
{
|
||||
/*! The bit stream. */
|
||||
unsigned int bitstream;
|
||||
/*! The residual bits in bitstream. */
|
||||
unsigned int residue;
|
||||
} bitstream_state_t;
|
||||
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
/*! \brief Put a chunk of bits into the output buffer.
|
||||
\param s A pointer to the bitstream context.
|
||||
\param c A pointer to the bitstream output buffer.
|
||||
\param value The value to be pushed into the output buffer.
|
||||
\param bits The number of bits of value to be pushed. 1 to 25 bit is valid. */
|
||||
void bitstream_put(bitstream_state_t *s, uint8_t **c, unsigned int value, int bits);
|
||||
|
||||
void bitstream_put2(bitstream_state_t *s, uint8_t **c, unsigned int value, int bits);
|
||||
|
||||
/*! \brief Get a chunk of bits from the input buffer.
|
||||
\param s A pointer to the bitstream context.
|
||||
\param c A pointer to the bitstream input buffer.
|
||||
\param bits The number of bits of value to be grabbed. 1 to 25 bit is valid.
|
||||
\return The value retrieved from the input buffer. */
|
||||
unsigned int bitstream_get(bitstream_state_t *s, const uint8_t **c, int bits);
|
||||
|
||||
unsigned int bitstream_get2(bitstream_state_t *s, const uint8_t **c, int bits);
|
||||
|
||||
/*! \brief Flush any residual bit to the output buffer.
|
||||
\param s A pointer to the bitstream context.
|
||||
\param c A pointer to the bitstream output buffer. */
|
||||
void bitstream_flush(bitstream_state_t *s, uint8_t **c);
|
||||
|
||||
void bitstream_flush2(bitstream_state_t *s, uint8_t **c);
|
||||
|
||||
/*! \brief Initialise a bitstream context.
|
||||
\param s A pointer to the bitstream context.
|
||||
\return A pointer to the bitstream context. */
|
||||
bitstream_state_t *bitstream_init(bitstream_state_t *s);
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
/*- End of file ------------------------------------------------------------*/
|
|
@ -1,186 +0,0 @@
|
|||
/*
|
||||
* VoIPcodecs - a series of DSP components for telephony
|
||||
*
|
||||
* dc_restore.h - General telephony routines to restore the zero D.C.
|
||||
* level to audio which has a D.C. bias.
|
||||
*
|
||||
* Written by Steve Underwood <steveu@coppice.org>
|
||||
*
|
||||
* Copyright (C) 2001 Steve Underwood
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: dc_restore.h,v 1.18 2007/04/08 08:16:17 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
|
||||
#if !defined(_SPANDSP_DC_RESTORE_H_)
|
||||
#define _SPANDSP_DC_RESTORE_H_
|
||||
|
||||
/*! \page dc_restore_page Removing DC bias from a signal
|
||||
|
||||
\section dc_restore_page_sec_1 What does it do?
|
||||
|
||||
Telecoms signals often contain considerable DC, but DC upsets a lot of signal
|
||||
processing functions. Placing a zero DC restorer at the front of the processing
|
||||
chain can often simplify the downstream processing.
|
||||
|
||||
\section dc_restore_page_sec_2 How does it work?
|
||||
|
||||
The DC restorer uses a leaky integrator to provide a long-ish term estimate of
|
||||
the DC bias in the signal. A 32 bit estimate is used for the 16 bit audio, so
|
||||
the noise introduced by the estimation can be keep in the lower bits, and the 16
|
||||
bit DC value, which is subtracted from the signal, is fairly clean. The
|
||||
following code fragment shows the algorithm used. dc_bias is a 32 bit integer,
|
||||
while the sample and the resulting clean_sample are 16 bit integers.
|
||||
|
||||
dc_bias += ((((int32_t) sample << 15) - dc_bias) >> 14);
|
||||
clean_sample = sample - (dc_bias >> 15);
|
||||
*/
|
||||
|
||||
/*!
|
||||
Zero DC restoration descriptor. This defines the working state for a single
|
||||
instance of DC content filter.
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
int32_t state;
|
||||
} dc_restore_state_t;
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
static __inline__ void dc_restore_init(dc_restore_state_t *dc)
|
||||
{
|
||||
dc->state = 0;
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
static __inline__ int16_t dc_restore(dc_restore_state_t *dc, int16_t sample)
|
||||
{
|
||||
dc->state += ((((int32_t) sample << 15) - dc->state) >> 14);
|
||||
return (int16_t) (sample - (dc->state >> 15));
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
static __inline__ int16_t dc_restore_estimate(dc_restore_state_t *dc)
|
||||
{
|
||||
return (int16_t) (dc->state >> 15);
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
static __inline__ int16_t saturate(int32_t amp)
|
||||
{
|
||||
int16_t amp16;
|
||||
|
||||
/* Hopefully this is optimised for the common case - not clipping */
|
||||
amp16 = (int16_t) amp;
|
||||
if (amp == amp16)
|
||||
return amp16;
|
||||
if (amp > INT16_MAX)
|
||||
return INT16_MAX;
|
||||
return INT16_MIN;
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
#if defined(_MSC_VER) && !defined(_WIN64)
|
||||
__inline float rintf (float flt)
|
||||
{
|
||||
_asm
|
||||
{ fld flt
|
||||
frndint
|
||||
}
|
||||
}
|
||||
|
||||
__inline double rint(double dbl)
|
||||
{
|
||||
__asm
|
||||
{
|
||||
fld dbl
|
||||
frndint
|
||||
}
|
||||
}
|
||||
|
||||
__inline long lrintf (float flt)
|
||||
{
|
||||
long retval;
|
||||
_asm
|
||||
{ fld flt
|
||||
fistp retval
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
#elif defined(_WIN64)
|
||||
#include <intrin.h>
|
||||
|
||||
__inline__ long int rint(double x)
|
||||
{
|
||||
#ifdef _M_X64
|
||||
return (long int)_mm_cvtsd_si64x( _mm_loadu_pd ((const double*)&x) );
|
||||
#else
|
||||
#warning "Not Supported: Replacing with a simple C cast."
|
||||
return (long int) (x);
|
||||
#endif
|
||||
}
|
||||
__inline__ int rintf(float x)
|
||||
{
|
||||
#ifdef _M_X64
|
||||
return _mm_cvt_ss2si( _mm_load_ss((const float*)&x) );
|
||||
#else
|
||||
#warning "Not Supported: Replacing with a simple C cast."
|
||||
return (int) (x);
|
||||
#endif
|
||||
}
|
||||
__inline__ long int lrintf(float x)
|
||||
{
|
||||
#ifdef _M_X64
|
||||
return _mm_cvt_ss2si( _mm_load_ss((const float*)&x) );
|
||||
#else
|
||||
#warning "Not Supported: Replacing with a simple C cast."
|
||||
return (long int) (x);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
static __inline__ int16_t fsaturatef(float famp)
|
||||
{
|
||||
if (famp > 32767.0)
|
||||
return INT16_MAX;
|
||||
if (famp < -32768.0)
|
||||
return INT16_MIN;
|
||||
return (int16_t) rintf(famp);
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
static __inline__ int16_t fsaturate(double damp)
|
||||
{
|
||||
if (damp > 32767.0)
|
||||
return INT16_MAX;
|
||||
if (damp < -32768.0)
|
||||
return INT16_MIN;
|
||||
return (int16_t) rint(damp);
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
/*- End of file ------------------------------------------------------------*/
|
|
@ -1,256 +0,0 @@
|
|||
/*
|
||||
* VoIPcodecs - a series of DSP components for telephony
|
||||
*
|
||||
* g711.h - In line A-law and u-law conversion routines
|
||||
*
|
||||
* Written by Steve Underwood <steveu@coppice.org>
|
||||
*
|
||||
* Copyright (C) 2001 Steve Underwood
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2, or
|
||||
* the Lesser GNU General Public License version 2.1, as published by
|
||||
* the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: g711.h,v 1.9 2008/02/09 15:32:26 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
|
||||
/*! \page g711_page A-law and mu-law handling
|
||||
Lookup tables for A-law and u-law look attractive, until you consider the impact
|
||||
on the CPU cache. If it causes a substantial area of your processor cache to get
|
||||
hit too often, cache sloshing will severely slow things down. The main reason
|
||||
these routines are slow in C, is the lack of direct access to the CPU's "find
|
||||
the first 1" instruction. A little in-line assembler fixes that, and the
|
||||
conversion routines can be faster than lookup tables, in most real world usage.
|
||||
A "find the first 1" instruction is available on most modern CPUs, and is a
|
||||
much underused feature.
|
||||
|
||||
If an assembly language method of bit searching is not available, these routines
|
||||
revert to a method that can be a little slow, so the cache thrashing might not
|
||||
seem so bad :(
|
||||
|
||||
Feel free to submit patches to add fast "find the first 1" support for your own
|
||||
favourite processor.
|
||||
|
||||
Look up tables are used for transcoding between A-law and u-law, since it is
|
||||
difficult to achieve the precise transcoding procedure laid down in the G.711
|
||||
specification by other means.
|
||||
*/
|
||||
|
||||
#if !defined(_SPANDSP_G711_H_)
|
||||
#define _SPANDSP_G711_H_
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
/* N.B. It is tempting to use look-up tables for A-law and u-law conversion.
|
||||
* However, you should consider the cache footprint.
|
||||
*
|
||||
* A 64K byte table for linear to x-law and a 512 byte table for x-law to
|
||||
* linear sound like peanuts these days, and shouldn't an array lookup be
|
||||
* real fast? No! When the cache sloshes as badly as this one will, a tight
|
||||
* calculation may be better. The messiest part is normally finding the
|
||||
* segment, but a little inline assembly can fix that on an i386, x86_64 and
|
||||
* many other modern processors.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Mu-law is basically as follows:
|
||||
*
|
||||
* Biased Linear Input Code Compressed Code
|
||||
* ------------------------ ---------------
|
||||
* 00000001wxyza 000wxyz
|
||||
* 0000001wxyzab 001wxyz
|
||||
* 000001wxyzabc 010wxyz
|
||||
* 00001wxyzabcd 011wxyz
|
||||
* 0001wxyzabcde 100wxyz
|
||||
* 001wxyzabcdef 101wxyz
|
||||
* 01wxyzabcdefg 110wxyz
|
||||
* 1wxyzabcdefgh 111wxyz
|
||||
*
|
||||
* Each biased linear code has a leading 1 which identifies the segment
|
||||
* number. The value of the segment number is equal to 7 minus the number
|
||||
* of leading 0's. The quantization interval is directly available as the
|
||||
* four bits wxyz. * The trailing bits (a - h) are ignored.
|
||||
*
|
||||
* Ordinarily the complement of the resulting code word is used for
|
||||
* transmission, and so the code word is complemented before it is returned.
|
||||
*
|
||||
* For further information see John C. Bellamy's Digital Telephony, 1982,
|
||||
* John Wiley & Sons, pps 98-111 and 472-476.
|
||||
*/
|
||||
|
||||
//#define ULAW_ZEROTRAP /* turn on the trap as per the MIL-STD */
|
||||
#define ULAW_BIAS 0x84 /* Bias for linear code. */
|
||||
|
||||
/*! \brief Encode a linear sample to u-law
|
||||
\param linear The sample to encode.
|
||||
\return The u-law value.
|
||||
*/
|
||||
static __inline__ uint8_t linear_to_ulaw(int linear)
|
||||
{
|
||||
uint8_t u_val;
|
||||
int mask;
|
||||
int seg;
|
||||
|
||||
/* Get the sign and the magnitude of the value. */
|
||||
if (linear >= 0)
|
||||
{
|
||||
linear = ULAW_BIAS + linear;
|
||||
mask = 0xFF;
|
||||
}
|
||||
else
|
||||
{
|
||||
linear = ULAW_BIAS - linear;
|
||||
mask = 0x7F;
|
||||
}
|
||||
|
||||
seg = top_bit(linear | 0xFF) - 7;
|
||||
|
||||
/*
|
||||
* Combine the sign, segment, quantization bits,
|
||||
* and complement the code word.
|
||||
*/
|
||||
if (seg >= 8)
|
||||
u_val = (uint8_t) (0x7F ^ mask);
|
||||
else
|
||||
u_val = (uint8_t) (((seg << 4) | ((linear >> (seg + 3)) & 0xF)) ^ mask);
|
||||
#ifdef ULAW_ZEROTRAP
|
||||
/* Optional ITU trap */
|
||||
if (u_val == 0)
|
||||
u_val = 0x02;
|
||||
#endif
|
||||
return u_val;
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
/*! \brief Decode an u-law sample to a linear value.
|
||||
\param ulaw The u-law sample to decode.
|
||||
\return The linear value.
|
||||
*/
|
||||
static __inline__ int16_t ulaw_to_linear(uint8_t ulaw)
|
||||
{
|
||||
int t;
|
||||
|
||||
/* Complement to obtain normal u-law value. */
|
||||
ulaw = ~ulaw;
|
||||
/*
|
||||
* Extract and bias the quantization bits. Then
|
||||
* shift up by the segment number and subtract out the bias.
|
||||
*/
|
||||
t = (((ulaw & 0x0F) << 3) + ULAW_BIAS) << (((int) ulaw & 0x70) >> 4);
|
||||
return (int16_t) ((ulaw & 0x80) ? (ULAW_BIAS - t) : (t - ULAW_BIAS));
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
/*
|
||||
* A-law is basically as follows:
|
||||
*
|
||||
* Linear Input Code Compressed Code
|
||||
* ----------------- ---------------
|
||||
* 0000000wxyza 000wxyz
|
||||
* 0000001wxyza 001wxyz
|
||||
* 000001wxyzab 010wxyz
|
||||
* 00001wxyzabc 011wxyz
|
||||
* 0001wxyzabcd 100wxyz
|
||||
* 001wxyzabcde 101wxyz
|
||||
* 01wxyzabcdef 110wxyz
|
||||
* 1wxyzabcdefg 111wxyz
|
||||
*
|
||||
* For further information see John C. Bellamy's Digital Telephony, 1982,
|
||||
* John Wiley & Sons, pps 98-111 and 472-476.
|
||||
*/
|
||||
|
||||
#define ALAW_AMI_MASK 0x55
|
||||
|
||||
/*! \brief Encode a linear sample to A-law
|
||||
\param linear The sample to encode.
|
||||
\return The A-law value.
|
||||
*/
|
||||
static __inline__ uint8_t linear_to_alaw(int linear)
|
||||
{
|
||||
int mask;
|
||||
int seg;
|
||||
|
||||
if (linear >= 0)
|
||||
{
|
||||
/* Sign (bit 7) bit = 1 */
|
||||
mask = ALAW_AMI_MASK | 0x80;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Sign (bit 7) bit = 0 */
|
||||
mask = ALAW_AMI_MASK;
|
||||
linear = -linear - 1;
|
||||
}
|
||||
|
||||
/* Convert the scaled magnitude to segment number. */
|
||||
seg = top_bit(linear | 0xFF) - 7;
|
||||
if (seg >= 8)
|
||||
{
|
||||
if (linear >= 0)
|
||||
{
|
||||
/* Out of range. Return maximum value. */
|
||||
return (uint8_t) (0x7F ^ mask);
|
||||
}
|
||||
/* We must be just a tiny step below zero */
|
||||
return (uint8_t) (0x00 ^ mask);
|
||||
}
|
||||
/* Combine the sign, segment, and quantization bits. */
|
||||
return (uint8_t) (((seg << 4) | ((linear >> ((seg) ? (seg + 3) : 4)) & 0x0F)) ^ mask);
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
/*! \brief Decode an A-law sample to a linear value.
|
||||
\param alaw The A-law sample to decode.
|
||||
\return The linear value.
|
||||
*/
|
||||
static __inline__ int16_t alaw_to_linear(uint8_t alaw)
|
||||
{
|
||||
int i;
|
||||
int seg;
|
||||
|
||||
alaw ^= ALAW_AMI_MASK;
|
||||
i = ((alaw & 0x0F) << 4);
|
||||
seg = (((int) alaw & 0x70) >> 4);
|
||||
if (seg)
|
||||
i = (i + 0x108) << (seg - 1);
|
||||
else
|
||||
i += 8;
|
||||
return (int16_t) ((alaw & 0x80) ? i : -i);
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
/*! \brief Transcode from A-law to u-law, using the procedure defined in G.711.
|
||||
\param alaw The A-law sample to transcode.
|
||||
\return The best matching u-law value.
|
||||
*/
|
||||
uint8_t alaw_to_ulaw(uint8_t alaw);
|
||||
|
||||
/*! \brief Transcode from u-law to A-law, using the procedure defined in G.711.
|
||||
\param ulaw The u-law sample to transcode.
|
||||
\return The best matching A-law value.
|
||||
*/
|
||||
uint8_t ulaw_to_alaw(uint8_t ulaw);
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
/*- End of file ------------------------------------------------------------*/
|
|
@ -1,181 +0,0 @@
|
|||
/*
|
||||
* VoIPcodecs - a series of DSP components for telephony
|
||||
*
|
||||
* g722.h - The ITU G.722 codec.
|
||||
*
|
||||
* Written by Steve Underwood <steveu@coppice.org>
|
||||
*
|
||||
* Copyright (C) 2005 Steve Underwood
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2, or
|
||||
* the Lesser GNU General Public License version 2.1, as published by
|
||||
* the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* Based on a single channel G.722 codec which is:
|
||||
*
|
||||
***** Copyright (c) CMU 1993 *****
|
||||
* Computer Science, Speech Group
|
||||
* Chengxiang Lu and Alex Hauptmann
|
||||
*
|
||||
* $Id: g722.h,v 1.17 2008/02/09 15:32:26 steveu Exp $
|
||||
*/
|
||||
|
||||
|
||||
/*! \file */
|
||||
|
||||
#if !defined(_SPANDSP_G722_H_)
|
||||
#define _SPANDSP_G722_H_
|
||||
|
||||
/*! \page g722_page G.722 encoding and decoding
|
||||
\section g722_page_sec_1 What does it do?
|
||||
The G.722 module is a bit exact implementation of the ITU G.722 specification for all three
|
||||
specified bit rates - 64000bps, 56000bps and 48000bps. It passes the ITU tests.
|
||||
|
||||
To allow fast and flexible interworking with narrow band telephony, the encoder and decoder
|
||||
support an option for the linear audio to be an 8k samples/second stream. In this mode the
|
||||
codec is considerably faster, and still fully compatible with wideband terminals using G.722.
|
||||
|
||||
\section g722_page_sec_2 How does it work?
|
||||
???.
|
||||
*/
|
||||
|
||||
enum
|
||||
{
|
||||
G722_SAMPLE_RATE_8000 = 0x0001,
|
||||
G722_PACKED = 0x0002
|
||||
};
|
||||
|
||||
typedef struct
|
||||
{
|
||||
/*! TRUE if the operating in the special ITU test mode, with the band split filters
|
||||
disabled. */
|
||||
int itu_test_mode;
|
||||
/*! TRUE if the G.722 data is packed */
|
||||
int packed;
|
||||
/*! TRUE if encode from 8k samples/second */
|
||||
int eight_k;
|
||||
/*! 6 for 48000kbps, 7 for 56000kbps, or 8 for 64000kbps. */
|
||||
int bits_per_sample;
|
||||
|
||||
/*! Signal history for the QMF */
|
||||
int x[24];
|
||||
|
||||
struct
|
||||
{
|
||||
int s;
|
||||
int sp;
|
||||
int sz;
|
||||
int r[3];
|
||||
int a[3];
|
||||
int ap[3];
|
||||
int p[3];
|
||||
int d[7];
|
||||
int b[7];
|
||||
int bp[7];
|
||||
int sg[7];
|
||||
int nb;
|
||||
int det;
|
||||
} band[2];
|
||||
|
||||
unsigned int in_buffer;
|
||||
int in_bits;
|
||||
unsigned int out_buffer;
|
||||
int out_bits;
|
||||
} g722_encode_state_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
/*! TRUE if the operating in the special ITU test mode, with the band split filters
|
||||
disabled. */
|
||||
int itu_test_mode;
|
||||
/*! TRUE if the G.722 data is packed */
|
||||
int packed;
|
||||
/*! TRUE if decode to 8k samples/second */
|
||||
int eight_k;
|
||||
/*! 6 for 48000kbps, 7 for 56000kbps, or 8 for 64000kbps. */
|
||||
int bits_per_sample;
|
||||
|
||||
/*! Signal history for the QMF */
|
||||
int x[24];
|
||||
|
||||
struct
|
||||
{
|
||||
int s;
|
||||
int sp;
|
||||
int sz;
|
||||
int r[3];
|
||||
int a[3];
|
||||
int ap[3];
|
||||
int p[3];
|
||||
int d[7];
|
||||
int b[7];
|
||||
int bp[7];
|
||||
int sg[7];
|
||||
int nb;
|
||||
int det;
|
||||
} band[2];
|
||||
|
||||
unsigned int in_buffer;
|
||||
int in_bits;
|
||||
unsigned int out_buffer;
|
||||
int out_bits;
|
||||
} g722_decode_state_t;
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
/*! Initialise an G.722 encode context.
|
||||
\param s The G.722 encode context.
|
||||
\param rate The required bit rate for the G.722 data.
|
||||
The valid rates are 64000, 56000 and 48000.
|
||||
\param options
|
||||
\return A pointer to the G.722 encode context, or NULL for error. */
|
||||
g722_encode_state_t *g722_encode_init(g722_encode_state_t *s, int rate, int options);
|
||||
|
||||
int g722_encode_release(g722_encode_state_t *s);
|
||||
|
||||
/*! Encode a buffer of linear PCM data to G.722
|
||||
\param s The G.722 context.
|
||||
\param g722_data The G.722 data produced.
|
||||
\param amp The audio sample buffer.
|
||||
\param len The number of samples in the buffer.
|
||||
\return The number of bytes of G.722 data produced. */
|
||||
int g722_encode(g722_encode_state_t *s, uint8_t g722_data[], const int16_t amp[], int len);
|
||||
|
||||
/*! Initialise an G.722 decode context.
|
||||
\param s The G.722 decode context.
|
||||
\param rate The bit rate of the G.722 data.
|
||||
The valid rates are 64000, 56000 and 48000.
|
||||
\param options
|
||||
\return A pointer to the G.722 decode context, or NULL for error. */
|
||||
g722_decode_state_t *g722_decode_init(g722_decode_state_t *s, int rate, int options);
|
||||
|
||||
int g722_decode_release(g722_decode_state_t *s);
|
||||
|
||||
/*! Decode a buffer of G.722 data to linear PCM.
|
||||
\param s The G.722 context.
|
||||
\param amp The audio sample buffer.
|
||||
\param g722_data
|
||||
\param len
|
||||
\return The number of samples returned. */
|
||||
int g722_decode(g722_decode_state_t *s, int16_t amp[], const uint8_t g722_data[], int len);
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
|
@ -1,170 +0,0 @@
|
|||
/*
|
||||
* VoIPcodecs - a series of DSP components for telephony
|
||||
*
|
||||
* g726.h - ITU G.726 codec.
|
||||
*
|
||||
* Written by Steve Underwood <steveu@coppice.org>
|
||||
*
|
||||
* Copyright (C) 2006 Steve Underwood
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2, or
|
||||
* the Lesser GNU General Public License version 2.1, as published by
|
||||
* the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: g726.h,v 1.19 2008/02/09 15:32:26 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
|
||||
#if !defined(_SPANDSP_G726_H_)
|
||||
#define _SPANDSP_G726_H_
|
||||
|
||||
/*! \page g726_page G.726 encoding and decoding
|
||||
\section g726_page_sec_1 What does it do?
|
||||
|
||||
The G.726 module is a bit exact implementation of the full ITU G.726 specification.
|
||||
It supports:
|
||||
- 16 kbps, 24kbps, 32kbps, and 40kbps operation.
|
||||
- Tandem adjustment, for interworking with A-law and u-law.
|
||||
- Annex A support, for use in environments not using A-law or u-law.
|
||||
|
||||
It passes the ITU tests.
|
||||
|
||||
\section g726_page_sec_2 How does it work?
|
||||
???.
|
||||
*/
|
||||
|
||||
enum
|
||||
{
|
||||
G726_ENCODING_LINEAR = 0, /* Interworking with 16 bit signed linear */
|
||||
G726_ENCODING_ULAW, /* Interworking with u-law */
|
||||
G726_ENCODING_ALAW /* Interworking with A-law */
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
G726_PACKING_NONE = 0,
|
||||
G726_PACKING_LEFT = 1,
|
||||
G726_PACKING_RIGHT = 2
|
||||
};
|
||||
|
||||
struct g726_state_s;
|
||||
|
||||
typedef int16_t (*g726_decoder_func_t)(struct g726_state_s *s, uint8_t code);
|
||||
|
||||
typedef uint8_t (*g726_encoder_func_t)(struct g726_state_s *s, int16_t amp);
|
||||
|
||||
/*!
|
||||
* The following is the definition of the state structure
|
||||
* used by the G.726 encoder and decoder to preserve their internal
|
||||
* state between successive calls. The meanings of the majority
|
||||
* of the state structure fields are explained in detail in the
|
||||
* CCITT Recommendation G.721. The field names are essentially indentical
|
||||
* to variable names in the bit level description of the coding algorithm
|
||||
* included in this Recommendation.
|
||||
*/
|
||||
typedef struct g726_state_s
|
||||
{
|
||||
/*! The bit rate */
|
||||
int rate;
|
||||
/*! The external coding, for tandem operation */
|
||||
int ext_coding;
|
||||
/*! The number of bits per sample */
|
||||
unsigned int bits_per_sample;
|
||||
/*! One of the G.726_PACKING_xxx options */
|
||||
int packing;
|
||||
|
||||
/*! Locked or steady state step size multiplier. */
|
||||
int32_t yl;
|
||||
/*! Unlocked or non-steady state step size multiplier. */
|
||||
int16_t yu;
|
||||
/*! int16_t term energy estimate. */
|
||||
int16_t dms;
|
||||
/*! Long term energy estimate. */
|
||||
int16_t dml;
|
||||
/*! Linear weighting coefficient of 'yl' and 'yu'. */
|
||||
int16_t ap;
|
||||
|
||||
/*! Coefficients of pole portion of prediction filter. */
|
||||
int16_t a[2];
|
||||
/*! Coefficients of zero portion of prediction filter. */
|
||||
int16_t b[6];
|
||||
/*! Signs of previous two samples of a partially reconstructed signal. */
|
||||
int16_t pk[2];
|
||||
/*! Previous 6 samples of the quantized difference signal represented in
|
||||
an internal floating point format. */
|
||||
int16_t dq[6];
|
||||
/*! Previous 2 samples of the quantized difference signal represented in an
|
||||
internal floating point format. */
|
||||
int16_t sr[2];
|
||||
/*! Delayed tone detect */
|
||||
int td;
|
||||
|
||||
/*! \brief The bit stream processing context. */
|
||||
bitstream_state_t bs;
|
||||
|
||||
/*! \brief The current encoder function. */
|
||||
g726_encoder_func_t enc_func;
|
||||
/*! \brief The current decoder function. */
|
||||
g726_decoder_func_t dec_func;
|
||||
} g726_state_t;
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
/*! Initialise a G.726 encode or decode context.
|
||||
\param s The G.726 context.
|
||||
\param bit_rate The required bit rate for the ADPCM data.
|
||||
The valid rates are 16000, 24000, 32000 and 40000.
|
||||
\param ext_coding The coding used outside G.726.
|
||||
\param packing One of the G.726_PACKING_xxx options.
|
||||
\return A pointer to the G.726 context, or NULL for error. */
|
||||
g726_state_t *g726_init(g726_state_t *s, int bit_rate, int ext_coding, int packing);
|
||||
|
||||
/*! Free a G.726 encode or decode context.
|
||||
\param s The G.726 context.
|
||||
\return 0 for OK. */
|
||||
int g726_release(g726_state_t *s);
|
||||
|
||||
/*! Decode a buffer of G.726 ADPCM data to linear PCM, a-law or u-law.
|
||||
\param s The G.726 context.
|
||||
\param amp The audio sample buffer.
|
||||
\param g726_data
|
||||
\param g726_bytes
|
||||
\return The number of samples returned. */
|
||||
int g726_decode(g726_state_t *s,
|
||||
int16_t amp[],
|
||||
const uint8_t g726_data[],
|
||||
int g726_bytes);
|
||||
|
||||
/*! Encode a buffer of linear PCM data to G.726 ADPCM.
|
||||
\param s The G.726 context.
|
||||
\param g726_data The G.726 data produced.
|
||||
\param amp The audio sample buffer.
|
||||
\param len The number of samples in the buffer.
|
||||
\return The number of bytes of G.726 data produced. */
|
||||
int g726_encode(g726_state_t *s,
|
||||
uint8_t g726_data[],
|
||||
const int16_t amp[],
|
||||
int len);
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
/*- End of file ------------------------------------------------------------*/
|
|
@ -1,176 +0,0 @@
|
|||
/*
|
||||
* VoIPcodecs - a series of DSP components for telephony
|
||||
*
|
||||
* gsm0610.h - GSM 06.10 full rate speech codec.
|
||||
*
|
||||
* Written by Steve Underwood <steveu@coppice.org>
|
||||
*
|
||||
* Copyright (C) 2006 Steve Underwood
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2, or
|
||||
* the Lesser GNU General Public License version 2.1, as published by
|
||||
* the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: gsm0610.h,v 1.15 2008/02/12 12:27:48 steveu Exp $
|
||||
*/
|
||||
|
||||
#if !defined(_VOIPCODECS_GSM0610_H_)
|
||||
#define _VOIPCODECS_GSM0610_H_
|
||||
|
||||
/*! \page gsm0610_page GSM 06.10 encoding and decoding
|
||||
\section gsm0610_page_sec_1 What does it do?
|
||||
|
||||
The GSM 06.10 module is an version of the widely used GSM FR codec software
|
||||
available from http://kbs.cs.tu-berlin.de/~jutta/toast.html. This version
|
||||
was produced since some versions of this codec are not bit exact, or not
|
||||
very efficient on modern processors. This implementation can use MMX instructions
|
||||
on Pentium class processors, or alternative methods on other processors. It
|
||||
passes all the ETSI test vectors. That is, it is a tested bit exact implementation.
|
||||
|
||||
This implementation supports encoded data in one of three packing formats:
|
||||
- Unpacked, with the 76 parameters of a GSM 06.10 code frame each occupying a
|
||||
separate byte. (note that none of the parameters exceed 8 bits).
|
||||
- Packed the the 33 byte per frame, used for VoIP, where 4 bits per frame are wasted.
|
||||
- Packed in WAV49 format, where 2 frames are packed into 65 bytes.
|
||||
|
||||
\section gsm0610_page_sec_2 How does it work?
|
||||
???.
|
||||
*/
|
||||
|
||||
enum
|
||||
{
|
||||
GSM0610_PACKING_NONE,
|
||||
GSM0610_PACKING_WAV49,
|
||||
GSM0610_PACKING_VOIP
|
||||
};
|
||||
|
||||
/*!
|
||||
GSM 06.10 FR codec unpacked frame.
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
int16_t LARc[8];
|
||||
int16_t Nc[4];
|
||||
int16_t bc[4];
|
||||
int16_t Mc[4];
|
||||
int16_t xmaxc[4];
|
||||
int16_t xMc[4][13];
|
||||
} gsm0610_frame_t;
|
||||
|
||||
/*!
|
||||
GSM 06.10 FR codec state descriptor. This defines the state of
|
||||
a single working instance of the GSM 06.10 FR encoder or decoder.
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
/*! \brief One of the packing modes */
|
||||
int packing;
|
||||
|
||||
int16_t dp0[280];
|
||||
|
||||
/*! Preprocessing */
|
||||
int16_t z1;
|
||||
int32_t L_z2;
|
||||
/*! Pre-emphasis */
|
||||
int16_t mp;
|
||||
|
||||
/*! Short term delay filter */
|
||||
int16_t u[8];
|
||||
int16_t LARpp[2][8];
|
||||
int16_t j;
|
||||
|
||||
/*! Long term synthesis */
|
||||
int16_t nrp;
|
||||
/*! Short term synthesis */
|
||||
int16_t v[9];
|
||||
/*! Decoder postprocessing */
|
||||
int16_t msr;
|
||||
|
||||
/*! Encoder data */
|
||||
int16_t e[50];
|
||||
} gsm0610_state_t;
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
/*! Initialise a GSM 06.10 encode or decode context.
|
||||
\param s The GSM 06.10 context
|
||||
\param packing One of the GSM0610_PACKING_xxx options.
|
||||
\return A pointer to the GSM 06.10 context, or NULL for error. */
|
||||
gsm0610_state_t *gsm0610_init(gsm0610_state_t *s, int packing);
|
||||
|
||||
/*! Release a GSM 06.10 encode or decode context.
|
||||
\param s The GSM 06.10 context
|
||||
\return 0 for success, else -1. */
|
||||
int gsm0610_release(gsm0610_state_t *s);
|
||||
|
||||
/*! Set the packing format for a GSM 06.10 encode or decode context.
|
||||
\param s The GSM 06.10 context
|
||||
\param packing One of the GSM0610_PACKING_xxx options.
|
||||
\return 0 for success, else -1. */
|
||||
int gsm0610_set_packing(gsm0610_state_t *s, int packing);
|
||||
|
||||
/*! Encode a buffer of linear PCM data to GSM 06.10.
|
||||
\param s The GSM 06.10 context.
|
||||
\param code The GSM 06.10 data produced.
|
||||
\param amp The audio sample buffer.
|
||||
\param len The number of samples in the buffer.
|
||||
\return The number of bytes of GSM 06.10 data produced. */
|
||||
int gsm0610_encode(gsm0610_state_t *s, uint8_t code[], const int16_t amp[], int len);
|
||||
|
||||
/*! Decode a buffer of GSM 06.10 data to linear PCM.
|
||||
\param s The GSM 06.10 context.
|
||||
\param amp The audio sample buffer.
|
||||
\param code The GSM 06.10 data.
|
||||
\param len The number of bytes of GSM 06.10 data to be decoded.
|
||||
\return The number of samples returned. */
|
||||
int gsm0610_decode(gsm0610_state_t *s, int16_t amp[], const uint8_t code[], int len);
|
||||
|
||||
int gsm0610_pack_none(uint8_t c[], const gsm0610_frame_t *s);
|
||||
|
||||
/*! Pack a pair of GSM 06.10 frames in the format used for wave files (wave type 49).
|
||||
\param c The buffer for the packed data. This must be at least 65 bytes long.
|
||||
\param s A pointer to the frames to be packed.
|
||||
\return The number of bytes generated. */
|
||||
int gsm0610_pack_wav49(uint8_t c[], const gsm0610_frame_t *s);
|
||||
|
||||
/*! Pack a GSM 06.10 frames in the format used for VoIP.
|
||||
\param c The buffer for the packed data. This must be at least 33 bytes long.
|
||||
\param s A pointer to the frame to be packed.
|
||||
\return The number of bytes generated. */
|
||||
int gsm0610_pack_voip(uint8_t c[], const gsm0610_frame_t *s);
|
||||
|
||||
int gsm0610_unpack_none(gsm0610_frame_t *s, const uint8_t c[]);
|
||||
|
||||
/*! Unpack a pair of GSM 06.10 frames from the format used for wave files (wave type 49).
|
||||
\param s A pointer to a buffer into which the frames will be packed.
|
||||
\param c The buffer containing the data to be unpacked. This must be at least 65 bytes long.
|
||||
\return The number of bytes absorbed. */
|
||||
int gsm0610_unpack_wav49(gsm0610_frame_t *s, const uint8_t c[]);
|
||||
|
||||
/*! Unpack a GSM 06.10 frame from the format used for VoIP.
|
||||
\param s A pointer to a buffer into which the frame will be packed.
|
||||
\param c The buffer containing the data to be unpacked. This must be at least 33 bytes long.
|
||||
\return The number of bytes absorbed. */
|
||||
int gsm0610_unpack_voip(gsm0610_frame_t *s, const uint8_t c[]);
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
/*- End of include ---------------------------------------------------------*/
|
|
@ -1,123 +0,0 @@
|
|||
/*
|
||||
* VoIPcodecs - a series of DSP components for telephony
|
||||
*
|
||||
* imaadpcm.c - Conversion routines between linear 16 bit PCM data and
|
||||
* IMA/DVI/Intel ADPCM format.
|
||||
*
|
||||
* Written by Steve Underwood <steveu@coppice.org>
|
||||
*
|
||||
* Copyright (C) 2004 Steve Underwood
|
||||
*
|
||||
* Based on a bit from here, a bit from there, eye of toad,
|
||||
* ear of bat, etc - plus, of course, my own 2 cents.
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2, or
|
||||
* the Lesser GNU General Public License version 2.1, as published by
|
||||
* the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: ima_adpcm.h,v 1.18 2008/02/09 15:33:40 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
|
||||
#if !defined(_SPANDSP_IMA_ADPCM_H_)
|
||||
#define _SPANDSP_IMA_ADPCM_H_
|
||||
|
||||
/*! \page ima_adpcm_page IMA/DVI/Intel ADPCM encoding and decoding
|
||||
\section ima_adpcm_page_sec_1 What does it do?
|
||||
IMA ADPCM offers a good balance of simplicity and quality at a rate of
|
||||
32kbps.
|
||||
|
||||
\section ima_adpcm_page_sec_2 How does it work?
|
||||
|
||||
\section ima_adpcm_page_sec_3 How do I use it?
|
||||
*/
|
||||
|
||||
enum
|
||||
{
|
||||
/*! IMA4 is the original IMA ADPCM variant */
|
||||
IMA_ADPCM_IMA4 = 0,
|
||||
/*! DVI4 is the IMA ADPCM variant defined in RFC3551 */
|
||||
IMA_ADPCM_DVI4 = 1,
|
||||
/*! VDVI is the variable bit rate IMA ADPCM variant defined in RFC3551 */
|
||||
IMA_ADPCM_VDVI = 2
|
||||
};
|
||||
|
||||
/*!
|
||||
IMA (DVI/Intel) ADPCM conversion state descriptor. This defines the state of
|
||||
a single working instance of the IMA ADPCM converter. This is used for
|
||||
either linear to ADPCM or ADPCM to linear conversion.
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
int variant;
|
||||
/*! \brief The size of a chunk, in samples. */
|
||||
int chunk_size;
|
||||
/*! \brief The last state of the ADPCM algorithm. */
|
||||
int last;
|
||||
/*! \brief Current index into the step size table. */
|
||||
int step_index;
|
||||
/*! \brief The current IMA code byte in progress. */
|
||||
uint16_t ima_byte;
|
||||
int bits;
|
||||
} ima_adpcm_state_t;
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
/*! Initialise an IMA ADPCM encode or decode context.
|
||||
\param s The IMA ADPCM context
|
||||
\param variant ???
|
||||
\param chunk_size The size of a chunk, in samples. A chunk size of
|
||||
zero sample samples means treat each encode or decode operation
|
||||
as a chunk.
|
||||
\return A pointer to the IMA ADPCM context, or NULL for error. */
|
||||
ima_adpcm_state_t *ima_adpcm_init(ima_adpcm_state_t *s, int variant, int chunk_size);
|
||||
|
||||
/*! Free an IMA ADPCM encode or decode context.
|
||||
\param s The IMA ADPCM context.
|
||||
\return 0 for OK. */
|
||||
int ima_adpcm_release(ima_adpcm_state_t *s);
|
||||
|
||||
/*! Encode a buffer of linear PCM data to IMA ADPCM.
|
||||
\param s The IMA ADPCM context.
|
||||
\param ima_data The IMA ADPCM data produced.
|
||||
\param amp The audio sample buffer.
|
||||
\param len The number of samples in the buffer.
|
||||
\return The number of bytes of IMA ADPCM data produced. */
|
||||
int ima_adpcm_encode(ima_adpcm_state_t *s,
|
||||
uint8_t ima_data[],
|
||||
const int16_t amp[],
|
||||
int len);
|
||||
|
||||
/*! Decode a buffer of IMA ADPCM data to linear PCM.
|
||||
\param s The IMA ADPCM context.
|
||||
\param amp The audio sample buffer.
|
||||
\param ima_data
|
||||
\param ima_bytes
|
||||
\return The number of samples returned. */
|
||||
int ima_adpcm_decode(ima_adpcm_state_t *s,
|
||||
int16_t amp[],
|
||||
const uint8_t ima_data[],
|
||||
int ima_bytes);
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
/*- End of file ------------------------------------------------------------*/
|
|
@ -1,216 +0,0 @@
|
|||
/*
|
||||
* VoIPcodecs - a series of DSP components for telephony
|
||||
*
|
||||
* lpc10.h - LPC10 low bit rate speech codec.
|
||||
*
|
||||
* Written by Steve Underwood <steveu@coppice.org>
|
||||
*
|
||||
* Copyright (C) 2006 Steve Underwood
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2, or
|
||||
* the Lesser GNU General Public License version 2.1, as published by
|
||||
* the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: lpc10.h,v 1.15 2008/02/09 15:31:36 steveu Exp $
|
||||
*/
|
||||
|
||||
#if !defined(_SPANDSP_LPC10_H_)
|
||||
#define _SPANDSP_LPC10_H_
|
||||
|
||||
/*! \page lpc10_page LPC10 encoding and decoding
|
||||
\section lpc10_page_sec_1 What does it do?
|
||||
The LPC10 module implements the US Department of Defense LPC10
|
||||
codec. This codec produces compressed data at 2400bps. At such
|
||||
a low rate high fidelity cannot be expected. However, the speech
|
||||
clarity is quite good, and this codec is unencumbered by patent
|
||||
or other restrictions.
|
||||
|
||||
\section lpc10_page_sec_2 How does it work?
|
||||
???.
|
||||
*/
|
||||
|
||||
#define LPC10_SAMPLES_PER_FRAME 180
|
||||
#define LPC10_BITS_IN_COMPRESSED_FRAME 54
|
||||
|
||||
/*!
|
||||
LPC10 codec unpacked frame.
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
int32_t ipitch;
|
||||
int32_t irms;
|
||||
int32_t irc[10];
|
||||
} lpc10_frame_t;
|
||||
|
||||
/*!
|
||||
LPC10 codec encoder state descriptor. This defines the state of
|
||||
a single working instance of the LPC10 encoder.
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
int error_correction;
|
||||
|
||||
/* State used only by function high_pass_100hz */
|
||||
float z11;
|
||||
float z21;
|
||||
float z12;
|
||||
float z22;
|
||||
|
||||
/* State used by function lpc10_analyse */
|
||||
float inbuf[LPC10_SAMPLES_PER_FRAME*3];
|
||||
float pebuf[LPC10_SAMPLES_PER_FRAME*3];
|
||||
float lpbuf[696];
|
||||
float ivbuf[312];
|
||||
float bias;
|
||||
int32_t osbuf[10]; /* No initial value necessary */
|
||||
int32_t osptr; /* Initial value 1 */
|
||||
int32_t obound[3];
|
||||
int32_t vwin[3][2]; /* Initial value vwin[2][0] = 307; vwin[2][1] = 462; */
|
||||
int32_t awin[3][2]; /* Initial value awin[2][0] = 307; awin[2][1] = 462; */
|
||||
int32_t voibuf[4][2];
|
||||
float rmsbuf[3];
|
||||
float rcbuf[3][10];
|
||||
float zpre;
|
||||
|
||||
/* State used by function onset */
|
||||
float n;
|
||||
float d__; /* Initial value 1.0f */
|
||||
float fpc; /* No initial value necessary */
|
||||
float l2buf[16];
|
||||
float l2sum1;
|
||||
int32_t l2ptr1; /* Initial value 1 */
|
||||
int32_t l2ptr2; /* Initial value 9 */
|
||||
int32_t lasti; /* No initial value necessary */
|
||||
int hyst; /* Initial value FALSE */
|
||||
|
||||
/* State used by function lpc10_voicing */
|
||||
float dither; /* Initial value 20.0f */
|
||||
float snr;
|
||||
float maxmin;
|
||||
float voice[3][2]; /* Initial value is probably unnecessary */
|
||||
int32_t lbve;
|
||||
int32_t lbue;
|
||||
int32_t fbve;
|
||||
int32_t fbue;
|
||||
int32_t ofbue;
|
||||
int32_t sfbue;
|
||||
int32_t olbue;
|
||||
int32_t slbue;
|
||||
|
||||
/* State used by function dynamic_pitch_tracking */
|
||||
float s[60];
|
||||
int32_t p[2][60];
|
||||
int32_t ipoint;
|
||||
float alphax;
|
||||
|
||||
/* State used by function lpc10_pack */
|
||||
int32_t isync;
|
||||
} lpc10_encode_state_t;
|
||||
|
||||
/*!
|
||||
LPC10 codec decoder state descriptor. This defines the state of
|
||||
a single working instance of the LPC10 decoder.
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
int error_correction;
|
||||
|
||||
/* State used by function decode */
|
||||
int32_t iptold; /* Initial value 60 */
|
||||
int first; /* Initial value TRUE */
|
||||
int32_t ivp2h;
|
||||
int32_t iovoic;
|
||||
int32_t iavgp; /* Initial value 60 */
|
||||
int32_t erate;
|
||||
int32_t drc[10][3];
|
||||
int32_t dpit[3];
|
||||
int32_t drms[3];
|
||||
|
||||
/* State used by function synths */
|
||||
float buf[LPC10_SAMPLES_PER_FRAME*2];
|
||||
int32_t buflen; /* Initial value LPC10_SAMPLES_PER_FRAME */
|
||||
|
||||
/* State used by function pitsyn */
|
||||
int32_t ivoico; /* No initial value necessary as long as first_pitsyn is initially TRUE_ */
|
||||
int32_t ipito; /* No initial value necessary as long as first_pitsyn is initially TRUE_ */
|
||||
float rmso; /* Initial value 1.0f */
|
||||
float rco[10]; /* No initial value necessary as long as first_pitsyn is initially TRUE_ */
|
||||
int32_t jsamp; /* Nno initial value necessary as long as first_pitsyn is initially TRUE_ */
|
||||
int first_pitsyn; /* Initial value TRUE */
|
||||
|
||||
/* State used by function bsynz */
|
||||
int32_t ipo;
|
||||
float exc[166];
|
||||
float exc2[166];
|
||||
float lpi[3];
|
||||
float hpi[3];
|
||||
float rmso_bsynz;
|
||||
|
||||
/* State used by function random */
|
||||
int32_t j;
|
||||
int32_t k;
|
||||
int16_t y[5];
|
||||
|
||||
/* State used by function deemp */
|
||||
float dei[2];
|
||||
float deo[3];
|
||||
} lpc10_decode_state_t;
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
/*! Initialise an LPC10e encode context.
|
||||
\param s The LPC10e context
|
||||
\param error_correction ???
|
||||
\return A pointer to the LPC10e context, or NULL for error. */
|
||||
lpc10_encode_state_t *lpc10_encode_init(lpc10_encode_state_t *s, int error_correction);
|
||||
|
||||
int lpc10_encode_release(lpc10_encode_state_t *s);
|
||||
|
||||
/*! Encode a buffer of linear PCM data to LPC10e.
|
||||
\param s The LPC10e context.
|
||||
\param ima_data The LPC10e data produced.
|
||||
\param amp The audio sample buffer.
|
||||
\param len The number of samples in the buffer. This must be a multiple of 180, as
|
||||
this is the number of samples on a frame.
|
||||
\return The number of bytes of LPC10e data produced. */
|
||||
int lpc10_encode(lpc10_encode_state_t *s, uint8_t code[], const int16_t amp[], int len);
|
||||
|
||||
/*! Initialise an LPC10e decode context.
|
||||
\param s The LPC10e context
|
||||
\param error_correction ???
|
||||
\return A pointer to the LPC10e context, or NULL for error. */
|
||||
lpc10_decode_state_t *lpc10_decode_init(lpc10_decode_state_t *st, int error_correction);
|
||||
|
||||
int lpc10_decode_release(lpc10_decode_state_t *s);
|
||||
|
||||
/*! Decode a buffer of LPC10e data to linear PCM.
|
||||
\param s The LPC10e context.
|
||||
\param amp The audio sample buffer.
|
||||
\param code The LPC10e data.
|
||||
\param len The number of bytes of LPC10e data to be decoded. This must be a multiple of 7,
|
||||
as each frame is packed into 7 bytes.
|
||||
\return The number of samples returned. */
|
||||
int lpc10_decode(lpc10_decode_state_t *s, int16_t amp[], const uint8_t code[], int len);
|
||||
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
/*- End of include ---------------------------------------------------------*/
|
|
@ -1,117 +0,0 @@
|
|||
/*
|
||||
* VoIPcodecs - a series of DSP components for telephony
|
||||
*
|
||||
* oki_adpcm.h - Conversion routines between linear 16 bit PCM data and
|
||||
* OKI (Dialogic) ADPCM format.
|
||||
*
|
||||
* Written by Steve Underwood <steveu@coppice.org>
|
||||
*
|
||||
* Copyright (C) 2001 Steve Underwood
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2, or
|
||||
* the Lesser GNU General Public License version 2.1, as published by
|
||||
* the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: oki_adpcm.h,v 1.18 2008/02/09 15:33:40 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
|
||||
#if !defined(_SPANDSP_OKI_ADPCM_H_)
|
||||
#define _SPANDSP_OKI_ADPCM_H_
|
||||
|
||||
/*! \page okiadpcm_page OKI (Dialogic) ADPCM encoding and decoding
|
||||
\section okiadpcm_page_sec_1 What does it do?
|
||||
OKI ADPCM is widely used in the CTI industry because it is the principal format
|
||||
supported by Dialogic. As the market leader, they tend to define "common
|
||||
practice". It offers a good balance of simplicity and quality at rates of
|
||||
24kbps or 32kbps. 32kbps is obtained by ADPCM compressing 8k samples/second linear
|
||||
PCM. 24kbps is obtained by resampling to 6k samples/second and using the same ADPCM
|
||||
compression algorithm on the slower samples.
|
||||
|
||||
The algorithms for this ADPCM codec can be found in "PC Telephony - The complete guide
|
||||
to designing, building and programming systems using Dialogic and Related Hardware"
|
||||
by Bob Edgar. pg 272-276. */
|
||||
|
||||
/*!
|
||||
Oki (Dialogic) ADPCM conversion state descriptor. This defines the state of
|
||||
a single working instance of the Oki ADPCM converter. This is used for
|
||||
either linear to ADPCM or ADPCM to linear conversion.
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
/*! \brief The bit rate - 24000 or 32000. */
|
||||
int bit_rate;
|
||||
/*! \brief The last state of the ADPCM algorithm. */
|
||||
int16_t last;
|
||||
/*! \brief Current index into the step size table. */
|
||||
int16_t step_index;
|
||||
/*! \brief The compressed data byte in progress. */
|
||||
uint8_t oki_byte;
|
||||
/*! \brief The signal history for the sample rate converter. */
|
||||
int16_t history[32];
|
||||
/*! \brief Pointer into the history buffer. */
|
||||
int ptr;
|
||||
/*! \brief Odd/even sample counter. */
|
||||
int mark;
|
||||
/*! \brief Phase accumulator for the sample rate converter. */
|
||||
int phase;
|
||||
} oki_adpcm_state_t;
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
/*! Initialise an Oki ADPCM encode or decode context.
|
||||
\param s The Oki ADPCM context.
|
||||
\param bit_rate The required bit rate for the ADPCM data.
|
||||
The valid rates are 24000 and 32000.
|
||||
\return A pointer to the Oki ADPCM context, or NULL for error. */
|
||||
oki_adpcm_state_t *oki_adpcm_init(oki_adpcm_state_t *s, int bit_rate);
|
||||
|
||||
/*! Free an Oki ADPCM encode or decode context.
|
||||
\param s The Oki ADPCM context.
|
||||
\return 0 for OK. */
|
||||
int oki_adpcm_release(oki_adpcm_state_t *s);
|
||||
|
||||
/*! Decode a buffer of Oki ADPCM data to linear PCM.
|
||||
\param s The Oki ADPCM context.
|
||||
\param amp The audio sample buffer.
|
||||
\param oki_data
|
||||
\param oki_bytes
|
||||
\return The number of samples returned. */
|
||||
int oki_adpcm_decode(oki_adpcm_state_t *s,
|
||||
int16_t amp[],
|
||||
const uint8_t oki_data[],
|
||||
int oki_bytes);
|
||||
|
||||
/*! Encode a buffer of linear PCM data to Oki ADPCM.
|
||||
\param s The Oki ADPCM context.
|
||||
\param oki_data The Oki ADPCM data produced
|
||||
\param amp The audio sample buffer.
|
||||
\param len The number of samples in the buffer.
|
||||
\return The number of bytes of Oki ADPCM data produced. */
|
||||
int oki_adpcm_encode(oki_adpcm_state_t *s,
|
||||
uint8_t oki_data[],
|
||||
const int16_t amp[],
|
||||
int len);
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
/*- End of file ------------------------------------------------------------*/
|
|
@ -1,74 +0,0 @@
|
|||
/*
|
||||
* VoIPcodecs - a series of DSP components for telephony
|
||||
*
|
||||
* telephony.h - some very basic telephony definitions
|
||||
*
|
||||
* Written by Steve Underwood <steveu@coppice.org>
|
||||
*
|
||||
* Copyright (C) 2003 Steve Underwood
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the Lesser GNU General Public License version 2.1, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: telephony.h,v 1.10 2007/04/05 19:20:50 steveu Exp $
|
||||
*/
|
||||
|
||||
#if !defined(_SPANDSP_TELEPHONY_H_)
|
||||
#define _SPANDSP_TELEPHONY_H_
|
||||
|
||||
#define SAMPLE_RATE 8000
|
||||
|
||||
/* This is based on A-law, but u-law is only 0.03dB different */
|
||||
#define DBM0_MAX_POWER (3.14f + 3.02f)
|
||||
#define DBM0_MAX_SINE_POWER (3.14f)
|
||||
/* This is based on the ITU definition of dbOv in G.100.1 */
|
||||
#define DBOV_MAX_POWER (0.0f)
|
||||
#define DBOV_MAX_SINE_POWER (-3.02f)
|
||||
|
||||
/*! \brief A handler for pure receive. The buffer cannot be altered. */
|
||||
typedef int (span_rx_handler_t)(void *s, const int16_t amp[], int len);
|
||||
|
||||
/*! \brief A handler for receive, where the buffer can be altered. */
|
||||
typedef int (span_mod_handler_t)(void *s, int16_t amp[], int len);
|
||||
|
||||
/*! \brief A handler for transmit, where the buffer will be filled. */
|
||||
typedef int (span_tx_handler_t)(void *s, int16_t amp[], int max_len);
|
||||
|
||||
#define ms_to_samples(t) (((t)*SAMPLE_RATE)/1000)
|
||||
|
||||
#if !defined(FALSE)
|
||||
#define FALSE 0
|
||||
#endif
|
||||
#if !defined(TRUE)
|
||||
#define TRUE (!FALSE)
|
||||
#endif
|
||||
|
||||
#include <assert.h>
|
||||
#if (_MSC_VER >= 1400) // VC8+
|
||||
#define vc_assert(expr) assert(expr);__analysis_assume( expr )
|
||||
#else
|
||||
#define vc_assert(expr) assert(expr)
|
||||
#endif
|
||||
|
||||
#if defined(__cplusplus)
|
||||
/* C++ doesn't seem to have sane rounding functions/macros yet */
|
||||
#ifndef _MSC_VER
|
||||
#define lrint(x) ((long int) (x))
|
||||
#define lrintf(x) ((long int) (x))
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif
|
||||
/*- End of file ------------------------------------------------------------*/
|
|
@ -1,99 +0,0 @@
|
|||
/*
|
||||
* VoIPcodecs - a series of DSP components for telephony
|
||||
*
|
||||
* vector_int.h
|
||||
*
|
||||
* Written by Steve Underwood <steveu@coppice.org>
|
||||
*
|
||||
* Copyright (C) 2003 Steve Underwood
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the Lesser GNU General Public License version 2.1, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: vector_int.h,v 1.8 2007/12/13 11:31:33 steveu Exp $
|
||||
*/
|
||||
|
||||
#if !defined(_SPANDSP_VECTOR_INT_H_)
|
||||
#define _SPANDSP_VECTOR_INT_H_
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
int32_t vec_dot_prodi16(const int16_t x[], const int16_t y[], int n);
|
||||
|
||||
/*! \brief Find the minimum and maximum values in a vector.
|
||||
\param x The vector to be searched.
|
||||
\param n The number of elements in the vetor.
|
||||
\param out A two element vector. The first will receive the
|
||||
maximum. The second will receive the minimum. This parameter
|
||||
may be set to NULL.
|
||||
\return The absolute maximum value. Since the range of negative numbers
|
||||
exceeds the range of positive one, the returned integer is longer
|
||||
than the ones being searched. */
|
||||
int32_t vec_min_maxi16(const int16_t x[], int n, int16_t out[]);
|
||||
|
||||
static __inline__ int vec_norm2i16(const int16_t *vec, int len)
|
||||
{
|
||||
int i;
|
||||
int sum;
|
||||
|
||||
sum = 0;
|
||||
for (i = 0; i < len; i++)
|
||||
sum += vec[i]*vec[i];
|
||||
return sum;
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
static __inline__ void vec_sari16(int16_t *vec, int len, int shift)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < len; i++)
|
||||
vec[i] >>= shift;
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
static __inline__ int vec_max_bitsi16(const int16_t *vec, int len)
|
||||
{
|
||||
int i;
|
||||
int max;
|
||||
int v;
|
||||
int b;
|
||||
|
||||
max = 0;
|
||||
for (i = 0; i < len; i++)
|
||||
{
|
||||
v = abs(vec[i]);
|
||||
if (v > max)
|
||||
max = v;
|
||||
}
|
||||
b = 0;
|
||||
while (max != 0)
|
||||
{
|
||||
b++;
|
||||
max >>= 1;
|
||||
}
|
||||
return b;
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
/*- End of file ------------------------------------------------------------*/
|
|
@ -1,37 +0,0 @@
|
|||
/*
|
||||
* VoIPcodecs - a series of DSP components for telephony
|
||||
*
|
||||
* version.h - A tag file, so the exact installed revision can be assertained.
|
||||
*
|
||||
* Written by Steve Underwood <steveu@coppice.org>
|
||||
*
|
||||
* Copyright (C) 2007 Steve Underwood
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: version.h.in,v 1.2 2007/04/06 13:20:36 steveu Exp $
|
||||
*/
|
||||
|
||||
#if !defined(_SPANDSP_VERSION_H_)
|
||||
#define _SPANDSP_VERSION_H_
|
||||
|
||||
/* The date and time of the version are in UTC form. */
|
||||
|
||||
#define SPANDSP_RELEASE_DATE $SPANDSP_RELEASE_DATE
|
||||
#define SPANDSP_RELEASE_TIME $SPANDSP_RELEASE_TIME
|
||||
|
||||
#endif
|
||||
/*- End of file ------------------------------------------------------------*/
|
|
@ -1,37 +0,0 @@
|
|||
/*
|
||||
* VoIPcodecs - a series of DSP components for telephony
|
||||
*
|
||||
* version.h - A tag file, so the exact installed revision can be assertained.
|
||||
*
|
||||
* Written by Steve Underwood <steveu@coppice.org>
|
||||
*
|
||||
* Copyright (C) 2007 Steve Underwood
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: version.h.in,v 1.2 2007/04/06 13:20:36 steveu Exp $
|
||||
*/
|
||||
|
||||
#if !defined(_SPANDSP_VERSION_H_)
|
||||
#define _SPANDSP_VERSION_H_
|
||||
|
||||
/* The date and time of the version are in UTC form. */
|
||||
|
||||
#define SPANDSP_RELEASE_DATE $SPANDSP_RELEASE_DATE
|
||||
#define SPANDSP_RELEASE_TIME $SPANDSP_RELEASE_TIME
|
||||
|
||||
#endif
|
||||
/*- End of file ------------------------------------------------------------*/
|
|
@ -1,60 +0,0 @@
|
|||
##
|
||||
## SpanDSP - a series of DSP components for telephony
|
||||
##
|
||||
## Makefile.am -- Process this file with automake to produce Makefile.in
|
||||
##
|
||||
## This program is free software; you can redistribute it and/or modify
|
||||
## it under the terms of the GNU General Public License version 2, as
|
||||
## published by the Free Software Foundation.
|
||||
##
|
||||
## This program is distributed in the hope that it will be useful,
|
||||
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
## GNU General Public License for more details.
|
||||
##
|
||||
## You should have received a copy of the GNU General Public License
|
||||
## along with this program; if not, write to the Free Software
|
||||
## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
##
|
||||
## $Id: Makefile.am,v 1.94 2008/01/31 13:34:40 steveu Exp $
|
||||
|
||||
AM_CFLAGS = $(COMP_VENDOR_CFLAGS)
|
||||
|
||||
LIBS += $(TESTLIBS)
|
||||
|
||||
EXTRA_DIST = regression_tests.sh
|
||||
|
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
|
||||
INCLUDES = -I$(top_builddir)/src -DDATADIR="\"$(pkgdatadir)\""
|
||||
|
||||
LIBDIR = -L$(top_builddir)/src
|
||||
|
||||
noinst_PROGRAMS = g711_tests \
|
||||
g722_tests \
|
||||
g726_tests \
|
||||
gsm0610_tests \
|
||||
ima_adpcm_tests \
|
||||
lpc10_tests \
|
||||
oki_adpcm_tests
|
||||
|
||||
g711_tests_SOURCES = g711_tests.c
|
||||
g711_tests_LDADD = $(LIBDIR) -lvoipcodecs -lspandsp
|
||||
|
||||
g722_tests_SOURCES = g722_tests.c
|
||||
g722_tests_LDADD = $(LIBDIR) -lvoipcodecs
|
||||
|
||||
g726_tests_SOURCES = g726_tests.c
|
||||
g726_tests_LDADD = $(LIBDIR) -lvoipcodecs
|
||||
|
||||
gsm0610_tests_SOURCES = gsm0610_tests.c
|
||||
gsm0610_tests_LDADD = $(LIBDIR) -lvoipcodecs
|
||||
|
||||
ima_adpcm_tests_SOURCES = ima_adpcm_tests.c
|
||||
ima_adpcm_tests_LDADD = $(LIBDIR) -lvoipcodecs
|
||||
|
||||
lpc10_tests_SOURCES = lpc10_tests.c
|
||||
lpc10_tests_LDADD = $(LIBDIR) -lvoipcodecs
|
||||
|
||||
oki_adpcm_tests_SOURCES = oki_adpcm_tests.c
|
||||
oki_adpcm_tests_LDADD = $(LIBDIR) -lvoipcodecs
|
|
@ -1,287 +0,0 @@
|
|||
/*
|
||||
* VoIPcodecs - a series of DSP components for telephony
|
||||
*
|
||||
* g711_tests.c
|
||||
*
|
||||
* Written by Steve Underwood <steveu@coppice.org>
|
||||
*
|
||||
* Copyright (C) 2006 Steve Underwood
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: g711_tests.c,v 1.7 2007/11/10 11:14:58 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \page g711_tests_page A-law and u-law conversion tests
|
||||
\section g711_tests_page_sec_1 What does it do?
|
||||
|
||||
\section g711_tests_page_sec_2 How is it used?
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <fcntl.h>
|
||||
#include <string.h>
|
||||
#include <audiofile.h>
|
||||
|
||||
#include "voipcodecs.h"
|
||||
#include <spandsp/power_meter.h>
|
||||
|
||||
#define OUT_FILE_NAME "g711.wav"
|
||||
|
||||
int16_t amp[65536];
|
||||
|
||||
const uint8_t alaw_1khz_sine[] = {0x34, 0x21, 0x21, 0x34, 0xB4, 0xA1, 0xA1, 0xB4};
|
||||
const uint8_t ulaw_1khz_sine[] = {0x1E, 0x0B, 0x0B, 0x1E, 0x9E, 0x8B, 0x8B, 0x9E};
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
AFfilehandle outhandle;
|
||||
AFfilesetup filesetup;
|
||||
power_meter_t power_meter;
|
||||
int outframes;
|
||||
int i;
|
||||
int block;
|
||||
int pre;
|
||||
int post;
|
||||
int post_post;
|
||||
int alaw_failures;
|
||||
int ulaw_failures;
|
||||
float worst_alaw;
|
||||
float worst_ulaw;
|
||||
float tmp;
|
||||
|
||||
if ((filesetup = afNewFileSetup()) == AF_NULL_FILESETUP)
|
||||
{
|
||||
fprintf(stderr, " Failed to create file setup\n");
|
||||
exit(2);
|
||||
}
|
||||
afInitSampleFormat(filesetup, AF_DEFAULT_TRACK, AF_SAMPFMT_TWOSCOMP, 16);
|
||||
afInitRate(filesetup, AF_DEFAULT_TRACK, (float) SAMPLE_RATE);
|
||||
afInitFileFormat(filesetup, AF_FILE_WAVE);
|
||||
afInitChannels(filesetup, AF_DEFAULT_TRACK, 1);
|
||||
|
||||
if ((outhandle = afOpenFile(OUT_FILE_NAME, "w", filesetup)) == AF_NULL_FILEHANDLE)
|
||||
{
|
||||
fprintf(stderr, " Cannot create wave file '%s'\n", OUT_FILE_NAME);
|
||||
exit(2);
|
||||
}
|
||||
|
||||
printf("Conversion accuracy tests.\n");
|
||||
alaw_failures = 0;
|
||||
ulaw_failures = 0;
|
||||
worst_alaw = 0.0;
|
||||
worst_ulaw = 0.0;
|
||||
for (block = 0; block < 1; block++)
|
||||
{
|
||||
for (i = 0; i < 65536; i++)
|
||||
{
|
||||
pre = i - 32768;
|
||||
post = alaw_to_linear(linear_to_alaw(pre));
|
||||
if (abs(pre) > 140)
|
||||
{
|
||||
tmp = (float) abs(post - pre)/(float) abs(pre);
|
||||
if (tmp > 0.10)
|
||||
{
|
||||
printf("A-law: Excessive error at %d (%d)\n", pre, post);
|
||||
alaw_failures++;
|
||||
}
|
||||
if (tmp > worst_alaw)
|
||||
worst_alaw = tmp;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Small values need different handling for sensible measurement */
|
||||
if (abs(post - pre) > 15)
|
||||
{
|
||||
printf("A-law: Excessive error at %d (%d)\n", pre, post);
|
||||
alaw_failures++;
|
||||
}
|
||||
}
|
||||
amp[i] = post;
|
||||
}
|
||||
outframes = afWriteFrames(outhandle,
|
||||
AF_DEFAULT_TRACK,
|
||||
amp,
|
||||
65536);
|
||||
if (outframes != 65536)
|
||||
{
|
||||
fprintf(stderr, " Error writing wave file\n");
|
||||
exit(2);
|
||||
}
|
||||
for (i = 0; i < 65536; i++)
|
||||
{
|
||||
pre = i - 32768;
|
||||
post = ulaw_to_linear(linear_to_ulaw(pre));
|
||||
if (abs(pre) > 40)
|
||||
{
|
||||
tmp = (float) abs(post - pre)/(float) abs(pre);
|
||||
if (tmp > 0.10)
|
||||
{
|
||||
printf("u-law: Excessive error at %d (%d)\n", pre, post);
|
||||
ulaw_failures++;
|
||||
}
|
||||
if (tmp > worst_ulaw)
|
||||
worst_ulaw = tmp;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Small values need different handling for sensible measurement */
|
||||
if (abs(post - pre) > 4)
|
||||
{
|
||||
printf("u-law: Excessive error at %d (%d)\n", pre, post);
|
||||
ulaw_failures++;
|
||||
}
|
||||
}
|
||||
amp[i] = post;
|
||||
}
|
||||
outframes = afWriteFrames(outhandle,
|
||||
AF_DEFAULT_TRACK,
|
||||
amp,
|
||||
65536);
|
||||
if (outframes != 65536)
|
||||
{
|
||||
fprintf(stderr, " Error writing wave file\n");
|
||||
exit(2);
|
||||
}
|
||||
}
|
||||
printf("Worst A-law error (ignoring small values) %f%%\n", worst_alaw*100.0);
|
||||
printf("Worst u-law error (ignoring small values) %f%%\n", worst_ulaw*100.0);
|
||||
if (alaw_failures || ulaw_failures)
|
||||
{
|
||||
printf("%d A-law values with excessive error\n", alaw_failures);
|
||||
printf("%d u-law values with excessive error\n", ulaw_failures);
|
||||
printf("Tests failed\n");
|
||||
exit(2);
|
||||
}
|
||||
|
||||
printf("Cyclic conversion repeatability tests.\n");
|
||||
/* Find what happens to every possible linear value after a round trip. */
|
||||
for (i = 0; i < 65536; i++)
|
||||
{
|
||||
pre = i - 32768;
|
||||
/* Make a round trip */
|
||||
post = alaw_to_linear(linear_to_alaw(pre));
|
||||
/* A second round trip should cause no further change */
|
||||
post_post = alaw_to_linear(linear_to_alaw(post));
|
||||
if (post_post != post)
|
||||
{
|
||||
printf("A-law second round trip mismatch - at %d, %d != %d\n", pre, post, post_post);
|
||||
printf("Tests failed\n");
|
||||
exit(2);
|
||||
}
|
||||
/* Make a round trip */
|
||||
post = ulaw_to_linear(linear_to_ulaw(pre));
|
||||
/* A second round trip should cause no further change */
|
||||
post_post = ulaw_to_linear(linear_to_ulaw(post));
|
||||
if (post_post != post)
|
||||
{
|
||||
printf("u-law round trip mismatch - at %d, %d != %d\n", pre, post, post_post);
|
||||
printf("Tests failed\n");
|
||||
exit(2);
|
||||
}
|
||||
}
|
||||
|
||||
printf("Reference power level tests.\n");
|
||||
power_meter_init(&power_meter, 7);
|
||||
|
||||
for (i = 0; i < 8000; i++)
|
||||
{
|
||||
amp[i] = ulaw_to_linear(ulaw_1khz_sine[i & 7]);
|
||||
power_meter_update(&power_meter, amp[i]);
|
||||
}
|
||||
printf("Reference u-law 1kHz tone is %fdBm0\n", power_meter_current_dbm0(&power_meter));
|
||||
outframes = afWriteFrames(outhandle,
|
||||
AF_DEFAULT_TRACK,
|
||||
amp,
|
||||
8000);
|
||||
if (outframes != 8000)
|
||||
{
|
||||
fprintf(stderr, " Error writing wave file\n");
|
||||
exit(2);
|
||||
}
|
||||
if (0.1f < fabs(power_meter_current_dbm0(&power_meter)))
|
||||
{
|
||||
printf("Test failed.\n");
|
||||
exit(2);
|
||||
}
|
||||
|
||||
for (i = 0; i < 8000; i++)
|
||||
{
|
||||
amp[i] = alaw_to_linear(alaw_1khz_sine[i & 7]);
|
||||
power_meter_update(&power_meter, amp[i]);
|
||||
}
|
||||
printf("Reference A-law 1kHz tone is %fdBm0\n", power_meter_current_dbm0(&power_meter));
|
||||
outframes = afWriteFrames(outhandle,
|
||||
AF_DEFAULT_TRACK,
|
||||
amp,
|
||||
8000);
|
||||
if (outframes != 8000)
|
||||
{
|
||||
fprintf(stderr, " Error writing wave file\n");
|
||||
exit(2);
|
||||
}
|
||||
if (0.1f < fabs(power_meter_current_dbm0(&power_meter)))
|
||||
{
|
||||
printf("Test failed.\n");
|
||||
exit(2);
|
||||
}
|
||||
|
||||
/* Check the transcoding functions. */
|
||||
printf("Testing transcoding A-law -> u-law -> A-law\n");
|
||||
for (i = 0; i < 256; i++)
|
||||
{
|
||||
if (alaw_to_ulaw(ulaw_to_alaw(i)) != i)
|
||||
{
|
||||
if (abs(alaw_to_ulaw(ulaw_to_alaw(i)) - i) > 1)
|
||||
{
|
||||
printf("u-law -> A-law -> u-law gave %d -> %d\n", i, alaw_to_ulaw(ulaw_to_alaw(i)));
|
||||
printf("Test failed\n");
|
||||
exit(2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
printf("Testing transcoding u-law -> A-law -> u-law\n");
|
||||
for (i = 0; i < 256; i++)
|
||||
{
|
||||
if (ulaw_to_alaw(alaw_to_ulaw(i)) != i)
|
||||
{
|
||||
if (abs(alaw_to_ulaw(ulaw_to_alaw(i)) - i) > 1)
|
||||
{
|
||||
printf("A-law -> u-law -> A-law gave %d -> %d\n", i, ulaw_to_alaw(alaw_to_ulaw(i)));
|
||||
printf("Test failed\n");
|
||||
exit(2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (afCloseFile(outhandle))
|
||||
{
|
||||
fprintf(stderr, " Cannot close wave file '%s'\n", OUT_FILE_NAME);
|
||||
exit(2);
|
||||
}
|
||||
afFreeFileSetup(filesetup);
|
||||
|
||||
printf("Tests passed.\n");
|
||||
return 0;
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
/*- End of file ------------------------------------------------------------*/
|
|
@ -1,521 +0,0 @@
|
|||
/*
|
||||
* VoIPcodecs - a series of DSP components for telephony
|
||||
*
|
||||
* g722_tests.c - Test G.722 encode and decode.
|
||||
*
|
||||
* Written by Steve Underwood <steveu@coppice.org>
|
||||
*
|
||||
* Copyright (C) 2005 Steve Underwood
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: g722_tests.c,v 1.19 2007/11/10 11:14:58 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
|
||||
/*! \page g722_tests_page G.722 tests
|
||||
\section g722_tests_page_sec_1 What does it do?
|
||||
This modules implements two sets of tests:
|
||||
- The tests defined in the G.722 specification, using the test data files supplied
|
||||
with the specification.
|
||||
- A generally audio quality test, consisting of compressing and decompressing a speeech
|
||||
file for audible comparison.
|
||||
|
||||
The speech file should be recorded at 16 bits/sample, 16000 samples/second, and named
|
||||
"pre_g722.wav".
|
||||
|
||||
The ITU tests use the codec in a special mode, in which the QMFs, which split and recombine the
|
||||
sub-bands, are disabled. This means they do not test 100% of the codec. This is the reason for
|
||||
including the additional listening test.
|
||||
|
||||
\section g722_tests_page_sec_2 How is it used?
|
||||
To perform the tests in the G.722 specification you need to obtain the test data files from the
|
||||
specification. These are copyright material, and so cannot be distributed with this test software.
|
||||
|
||||
The files, containing test vectors, which are supplied with the G.722 specification, should be
|
||||
copied to itutests/g722. The ITU tests can then be run by executing g722_tests without
|
||||
any parameters.
|
||||
|
||||
To perform a general audio quality test, g722_tests should be run with a parameter specifying
|
||||
the required bit rate for compression. The valid parameters are "-48", "-56", and "-64".
|
||||
The file ../localtests/short_wb_voice.wav will be compressed to the specified bit rate, decompressed,
|
||||
and the resulting audio stored in post_g722.wav.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
#include <memory.h>
|
||||
#include <ctype.h>
|
||||
#include <audiofile.h>
|
||||
|
||||
#include "voipcodecs.h"
|
||||
|
||||
#define G722_SAMPLE_RATE 16000
|
||||
|
||||
#define BLOCK_LEN 320
|
||||
|
||||
#define MAX_TEST_VECTOR_LEN 40000
|
||||
|
||||
#define TESTDATA_DIR "../itutests/g722/"
|
||||
|
||||
#define EIGHTK_IN_FILE_NAME "../localtests/short_nb_voice.wav"
|
||||
#define IN_FILE_NAME "../localtests/short_wb_voice.wav"
|
||||
#define OUT_FILE_NAME "post_g722.wav"
|
||||
|
||||
#if 0
|
||||
static const char *itu_test_files[] =
|
||||
{
|
||||
TESTDATA_DIR "T1C1.XMT", /* 69973 bytes */
|
||||
TESTDATA_DIR "T1C2.XMT", /* 3605 bytes */
|
||||
TESTDATA_DIR "T1D3.COD", /* 69973 bytes */
|
||||
|
||||
TESTDATA_DIR "T2R1.COD", /* 69973 bytes */
|
||||
TESTDATA_DIR "T2R2.COD", /* 3605 bytes */
|
||||
|
||||
TESTDATA_DIR "T3L1.RC1", /* 69973 bytes */
|
||||
TESTDATA_DIR "T3L1.RC2", /* 69973 bytes */
|
||||
TESTDATA_DIR "T3L1.RC3", /* 69973 bytes */
|
||||
TESTDATA_DIR "T3H1.RC0", /* 69973 bytes */
|
||||
TESTDATA_DIR "T3L2.RC1", /* 3605 bytes */
|
||||
TESTDATA_DIR "T3L2.RC2", /* 3605 bytes */
|
||||
TESTDATA_DIR "T3L2.RC3", /* 3605 bytes */
|
||||
TESTDATA_DIR "T3H2.RC0", /* 3605 bytes */
|
||||
TESTDATA_DIR "T3L3.RC1", /* 69973 bytes */
|
||||
TESTDATA_DIR "T3L3.RC2", /* 69973 bytes */
|
||||
TESTDATA_DIR "T3L3.RC3", /* 69973 bytes */
|
||||
TESTDATA_DIR "T3H3.RC0" /* 69973 bytes */
|
||||
};
|
||||
#endif
|
||||
|
||||
static const char *encode_test_files[] =
|
||||
{
|
||||
TESTDATA_DIR "T1C1.XMT", TESTDATA_DIR "T2R1.COD",
|
||||
TESTDATA_DIR "T1C2.XMT", TESTDATA_DIR "T2R2.COD",
|
||||
NULL
|
||||
};
|
||||
|
||||
static const char *decode_test_files[] =
|
||||
{
|
||||
TESTDATA_DIR "T2R1.COD",
|
||||
TESTDATA_DIR "T3L1.RC1",
|
||||
TESTDATA_DIR "T3L1.RC2",
|
||||
TESTDATA_DIR "T3L1.RC3",
|
||||
TESTDATA_DIR "T3H1.RC0",
|
||||
|
||||
TESTDATA_DIR "T2R2.COD",
|
||||
TESTDATA_DIR "T3L2.RC1",
|
||||
TESTDATA_DIR "T3L2.RC2",
|
||||
TESTDATA_DIR "T3L2.RC3",
|
||||
TESTDATA_DIR "T3H2.RC0",
|
||||
|
||||
TESTDATA_DIR "T1D3.COD",
|
||||
TESTDATA_DIR "T3L3.RC1",
|
||||
TESTDATA_DIR "T3L3.RC2",
|
||||
TESTDATA_DIR "T3L3.RC3",
|
||||
TESTDATA_DIR "T3H3.RC0",
|
||||
|
||||
NULL
|
||||
};
|
||||
|
||||
int16_t itu_data[MAX_TEST_VECTOR_LEN];
|
||||
uint16_t itu_ref[MAX_TEST_VECTOR_LEN];
|
||||
uint16_t itu_ref_upper[MAX_TEST_VECTOR_LEN];
|
||||
uint8_t compressed[MAX_TEST_VECTOR_LEN];
|
||||
int16_t decompressed[MAX_TEST_VECTOR_LEN];
|
||||
|
||||
static int hex_get(char *s)
|
||||
{
|
||||
int i;
|
||||
int value;
|
||||
int x;
|
||||
|
||||
for (value = i = 0; i < 4; i++)
|
||||
{
|
||||
x = *s++ - 0x30;
|
||||
if (x > 9)
|
||||
x -= 0x07;
|
||||
if (x > 15)
|
||||
x -= 0x20;
|
||||
if (x < 0 || x > 15)
|
||||
return -1;
|
||||
value <<= 4;
|
||||
value |= x;
|
||||
}
|
||||
return value;
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
static int get_vector(FILE *file, uint16_t vec[])
|
||||
{
|
||||
char buf[132 + 1];
|
||||
char *s;
|
||||
int i;
|
||||
int value;
|
||||
|
||||
while (fgets(buf, 133, file))
|
||||
{
|
||||
if (buf[0] == '/' && buf[1] == '*')
|
||||
continue;
|
||||
s = buf;
|
||||
i = 0;
|
||||
while ((value = hex_get(s)) >= 0)
|
||||
{
|
||||
vec[i++] = value;
|
||||
s += 4;
|
||||
}
|
||||
return i;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
static int get_test_vector(const char *file, uint16_t buf[], int max_len)
|
||||
{
|
||||
int octets;
|
||||
int i;
|
||||
FILE *infile;
|
||||
|
||||
if ((infile = fopen(file, "r")) == NULL)
|
||||
{
|
||||
fprintf(stderr, " Failed to open '%s'\n", file);
|
||||
exit(2);
|
||||
}
|
||||
octets = 0;
|
||||
while ((i = get_vector(infile, buf + octets)) > 0)
|
||||
octets += i;
|
||||
fclose(infile);
|
||||
return octets;
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
g722_encode_state_t enc_state;
|
||||
g722_decode_state_t dec_state;
|
||||
int len;
|
||||
int len_comp;
|
||||
int len_comp_upper;
|
||||
int len_data;
|
||||
int len2;
|
||||
int len3;
|
||||
int i;
|
||||
int j;
|
||||
int k;
|
||||
int file;
|
||||
AFfilehandle inhandle;
|
||||
AFfilehandle outhandle;
|
||||
AFfilesetup filesetup;
|
||||
int outframes;
|
||||
int samples;
|
||||
int mode;
|
||||
int itutests;
|
||||
int bit_rate;
|
||||
int eight_k_in;
|
||||
int eight_k_out;
|
||||
float x;
|
||||
int16_t indata[BLOCK_LEN];
|
||||
int16_t outdata[BLOCK_LEN];
|
||||
uint8_t adpcmdata[BLOCK_LEN];
|
||||
|
||||
i = 1;
|
||||
bit_rate = 64000;
|
||||
eight_k_in = FALSE;
|
||||
eight_k_out = FALSE;
|
||||
itutests = TRUE;
|
||||
while (argc > i)
|
||||
{
|
||||
if (strcmp(argv[i], "-48") == 0)
|
||||
{
|
||||
bit_rate = 48000;
|
||||
itutests = FALSE;
|
||||
i++;
|
||||
}
|
||||
else if (strcmp(argv[i], "-56") == 0)
|
||||
{
|
||||
bit_rate = 56000;
|
||||
itutests = FALSE;
|
||||
i++;
|
||||
}
|
||||
else if (strcmp(argv[i], "-64") == 0)
|
||||
{
|
||||
bit_rate = 64000;
|
||||
itutests = FALSE;
|
||||
i++;
|
||||
}
|
||||
else if (strcmp(argv[i], "-8k8k") == 0)
|
||||
{
|
||||
eight_k_in = TRUE;
|
||||
eight_k_out = TRUE;
|
||||
i++;
|
||||
}
|
||||
else if (strcmp(argv[i], "-8k16k") == 0)
|
||||
{
|
||||
eight_k_in = TRUE;
|
||||
eight_k_out = FALSE;
|
||||
i++;
|
||||
}
|
||||
else if (strcmp(argv[i], "-16k8k") == 0)
|
||||
{
|
||||
eight_k_in = FALSE;
|
||||
eight_k_out = TRUE;
|
||||
i++;
|
||||
}
|
||||
else if (strcmp(argv[i], "-16k16k") == 0)
|
||||
{
|
||||
eight_k_in = FALSE;
|
||||
eight_k_out = FALSE;
|
||||
i++;
|
||||
}
|
||||
else
|
||||
{
|
||||
fprintf(stderr, "Unknown parameter %s specified.\n", argv[i]);
|
||||
exit(2);
|
||||
}
|
||||
}
|
||||
|
||||
if (itutests)
|
||||
{
|
||||
/* ITU G.722 encode tests, using configuration 1. The QMF is bypassed */
|
||||
for (file = 0; encode_test_files[file]; file += 2)
|
||||
{
|
||||
printf("Testing %s -> %s\n", encode_test_files[file], encode_test_files[file + 1]);
|
||||
|
||||
/* Get the input data */
|
||||
len_data = get_test_vector(encode_test_files[file], (uint16_t *) itu_data, MAX_TEST_VECTOR_LEN);
|
||||
|
||||
/* Get the reference output data */
|
||||
len_comp = get_test_vector(encode_test_files[file + 1], itu_ref, MAX_TEST_VECTOR_LEN);
|
||||
|
||||
/* Process the input data */
|
||||
/* Skip the reset stuff at each end of the data */
|
||||
for (i = 0; i < len_data; i++)
|
||||
{
|
||||
if ((itu_data[i] & 1) == 0)
|
||||
break;
|
||||
}
|
||||
for (j = i; j < len_data; j++)
|
||||
{
|
||||
if ((itu_data[j] & 1))
|
||||
break;
|
||||
}
|
||||
len = j - i;
|
||||
g722_encode_init(&enc_state, 64000, 0);
|
||||
enc_state.itu_test_mode = TRUE;
|
||||
len2 = g722_encode(&enc_state, compressed, itu_data + i, len);
|
||||
|
||||
/* Check the result against the ITU's reference output data */
|
||||
j = 0;
|
||||
for (k = 0; k < len2; k++)
|
||||
{
|
||||
if ((compressed[k] & 0xFF) != ((itu_ref[k + i] >> 8) & 0xFF))
|
||||
{
|
||||
printf(">>> %6d %4x %4x\n", k, compressed[k] & 0xFF, itu_ref[k + i] & 0xFFFF);
|
||||
j++;
|
||||
}
|
||||
}
|
||||
printf("%d bad samples, out of %d/%d samples\n", j, len, len_data);
|
||||
if (j)
|
||||
{
|
||||
printf("Test failed\n");
|
||||
exit(2);
|
||||
}
|
||||
printf("Test passed\n");
|
||||
}
|
||||
|
||||
/* ITU G.722 decode tests, using configuration 2. The QMF is bypassed */
|
||||
/* Run each of the tests for each of the modes - 48kbps, 56kbps and 64kbps. */
|
||||
for (mode = 1; mode <= 3; mode++)
|
||||
{
|
||||
for (file = 0; decode_test_files[file]; file += 5)
|
||||
{
|
||||
printf("Testing mode %d, %s -> %s + %s\n",
|
||||
mode,
|
||||
decode_test_files[file],
|
||||
decode_test_files[file + mode],
|
||||
decode_test_files[file + 4]);
|
||||
|
||||
/* Get the input data */
|
||||
len_data = get_test_vector(decode_test_files[file], (uint16_t *) itu_data, MAX_TEST_VECTOR_LEN);
|
||||
|
||||
/* Get the lower reference output data */
|
||||
len_comp = get_test_vector(decode_test_files[file + mode], itu_ref, MAX_TEST_VECTOR_LEN);
|
||||
|
||||
/* Get the upper reference output data */
|
||||
len_comp_upper = get_test_vector(decode_test_files[file + 4], itu_ref_upper, MAX_TEST_VECTOR_LEN);
|
||||
|
||||
/* Process the input data */
|
||||
/* Skip the reset stuff at each end of the data */
|
||||
for (i = 0; i < len_data; i++)
|
||||
{
|
||||
if ((itu_data[i] & 1) == 0)
|
||||
break;
|
||||
}
|
||||
for (j = i; j < len_data; j++)
|
||||
{
|
||||
if ((itu_data[j] & 1))
|
||||
break;
|
||||
}
|
||||
len = j - i;
|
||||
for (k = 0; k < len; k++)
|
||||
compressed[k] = itu_data[k + i] >> ((mode == 3) ? 10 : (mode == 2) ? 9 : 8);
|
||||
|
||||
g722_decode_init(&dec_state, (mode == 3) ? 48000 : (mode == 2) ? 56000 : 64000, 0);
|
||||
dec_state.itu_test_mode = TRUE;
|
||||
len2 = g722_decode(&dec_state, decompressed, compressed, len);
|
||||
|
||||
/* Check the result against the ITU's reference output data */
|
||||
j = 0;
|
||||
for (k = 0; k < len2; k += 2)
|
||||
{
|
||||
if ((decompressed[k] & 0xFFFF) != (itu_ref[(k >> 1) + i] & 0xFFFF)
|
||||
||
|
||||
(decompressed[k + 1] & 0xFFFF) != (itu_ref_upper[(k >> 1) + i] & 0xFFFF))
|
||||
{
|
||||
printf(">>> %6d %4x %4x %4x %4x\n", k >> 1, decompressed[k] & 0xFFFF, decompressed[k + 1] & 0xFFFF, itu_ref[(k >> 1) + i] & 0xFFFF, itu_ref_upper[(k >> 1) + i] & 0xFFFF);
|
||||
j++;
|
||||
}
|
||||
}
|
||||
printf("%d bad samples, out of %d/%d samples\n", j, len, len_data);
|
||||
if (j)
|
||||
{
|
||||
printf("Test failed\n");
|
||||
exit(2);
|
||||
}
|
||||
printf("Test passed\n");
|
||||
}
|
||||
}
|
||||
|
||||
printf("Tests passed.\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (eight_k_in)
|
||||
{
|
||||
if ((inhandle = afOpenFile(EIGHTK_IN_FILE_NAME, "r", NULL)) == AF_NULL_FILEHANDLE)
|
||||
{
|
||||
fprintf(stderr, " Cannot open wave file '%s'\n", EIGHTK_IN_FILE_NAME);
|
||||
exit(2);
|
||||
}
|
||||
if ((x = afGetFrameSize(inhandle, AF_DEFAULT_TRACK, 1)) != 2.0)
|
||||
{
|
||||
printf(" Unexpected frame size in wave file '%s'\n", EIGHTK_IN_FILE_NAME);
|
||||
exit(2);
|
||||
}
|
||||
if ((x = afGetRate(inhandle, AF_DEFAULT_TRACK)) != (float) SAMPLE_RATE)
|
||||
{
|
||||
printf(" Unexpected sample rate %f in wave file '%s'\n", x, EIGHTK_IN_FILE_NAME);
|
||||
exit(2);
|
||||
}
|
||||
if ((x = afGetChannels(inhandle, AF_DEFAULT_TRACK)) != 1.0)
|
||||
{
|
||||
printf(" Unexpected number of channels in wave file '%s'\n", EIGHTK_IN_FILE_NAME);
|
||||
exit(2);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((inhandle = afOpenFile(IN_FILE_NAME, "r", NULL)) == AF_NULL_FILEHANDLE)
|
||||
{
|
||||
fprintf(stderr, " Cannot open wave file '%s'\n", IN_FILE_NAME);
|
||||
exit(2);
|
||||
}
|
||||
if ((x = afGetFrameSize(inhandle, AF_DEFAULT_TRACK, 1)) != 2.0)
|
||||
{
|
||||
printf(" Unexpected frame size in wave file '%s'\n", IN_FILE_NAME);
|
||||
exit(2);
|
||||
}
|
||||
if ((x = afGetRate(inhandle, AF_DEFAULT_TRACK)) != (float) G722_SAMPLE_RATE)
|
||||
{
|
||||
printf(" Unexpected sample rate %f in wave file '%s'\n", x, IN_FILE_NAME);
|
||||
exit(2);
|
||||
}
|
||||
if ((x = afGetChannels(inhandle, AF_DEFAULT_TRACK)) != 1.0)
|
||||
{
|
||||
printf(" Unexpected number of channels in wave file '%s'\n", IN_FILE_NAME);
|
||||
exit(2);
|
||||
}
|
||||
}
|
||||
|
||||
if ((filesetup = afNewFileSetup()) == AF_NULL_FILESETUP)
|
||||
{
|
||||
fprintf(stderr, " Failed to create file setup\n");
|
||||
exit(2);
|
||||
}
|
||||
afInitSampleFormat(filesetup, AF_DEFAULT_TRACK, AF_SAMPFMT_TWOSCOMP, 16);
|
||||
if (eight_k_out)
|
||||
afInitRate(filesetup, AF_DEFAULT_TRACK, (float) SAMPLE_RATE);
|
||||
else
|
||||
afInitRate(filesetup, AF_DEFAULT_TRACK, (float) G722_SAMPLE_RATE);
|
||||
afInitFileFormat(filesetup, AF_FILE_WAVE);
|
||||
afInitChannels(filesetup, AF_DEFAULT_TRACK, 1);
|
||||
if ((outhandle = afOpenFile(OUT_FILE_NAME, "w", filesetup)) == AF_NULL_FILEHANDLE)
|
||||
{
|
||||
fprintf(stderr, " Cannot create wave file '%s'\n", OUT_FILE_NAME);
|
||||
exit(2);
|
||||
}
|
||||
if (eight_k_in)
|
||||
g722_encode_init(&enc_state, bit_rate, G722_PACKED | G722_SAMPLE_RATE_8000);
|
||||
else
|
||||
g722_encode_init(&enc_state, bit_rate, G722_PACKED);
|
||||
if (eight_k_out)
|
||||
g722_decode_init(&dec_state, bit_rate, G722_PACKED | G722_SAMPLE_RATE_8000);
|
||||
else
|
||||
g722_decode_init(&dec_state, bit_rate, G722_PACKED);
|
||||
for (;;)
|
||||
{
|
||||
samples = afReadFrames(inhandle,
|
||||
AF_DEFAULT_TRACK,
|
||||
indata,
|
||||
BLOCK_LEN);
|
||||
if (samples <= 0)
|
||||
break;
|
||||
len2 = g722_encode(&enc_state, adpcmdata, indata, samples);
|
||||
len3 = g722_decode(&dec_state, outdata, adpcmdata, len2);
|
||||
outframes = afWriteFrames(outhandle,
|
||||
AF_DEFAULT_TRACK,
|
||||
outdata,
|
||||
len3);
|
||||
if (outframes != len3)
|
||||
{
|
||||
fprintf(stderr, " Error writing wave file\n");
|
||||
exit(2);
|
||||
}
|
||||
}
|
||||
if (afCloseFile(inhandle))
|
||||
{
|
||||
fprintf(stderr, " Cannot close wave file '%s'\n", IN_FILE_NAME);
|
||||
exit(2);
|
||||
}
|
||||
if (afCloseFile(outhandle))
|
||||
{
|
||||
fprintf(stderr, " Cannot close wave file '%s'\n", OUT_FILE_NAME);
|
||||
exit(2);
|
||||
}
|
||||
afFreeFileSetup(filesetup);
|
||||
|
||||
printf("'%s' transcoded to '%s' at %dbps.\n", IN_FILE_NAME, OUT_FILE_NAME, bit_rate);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
/*- End of file ------------------------------------------------------------*/
|
File diff suppressed because it is too large
Load Diff
|
@ -1,649 +0,0 @@
|
|||
/*
|
||||
* VoIPcodecs - a series of DSP components for telephony
|
||||
*
|
||||
* gsm0610_tests.c - Test the GSM 06.10 FR codec.
|
||||
*
|
||||
* Written by Steve Underwood <steveu@coppice.org>
|
||||
*
|
||||
* Copyright (C) 2006 Steve Underwood
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: gsm0610_tests.c,v 1.8 2007/11/10 11:14:58 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
|
||||
/*! \page gsm0610_tests_page GSM 06.10 full rate codec tests
|
||||
\section gsm0610_tests_page_sec_1 What does it do?
|
||||
Two sets of tests are performed:
|
||||
- The tests defined in the GSM 06.10 specification, using the test data files supplied with
|
||||
the specification.
|
||||
- A generally audio quality test, consisting of compressing and decompressing a speeech
|
||||
file for audible comparison.
|
||||
|
||||
The speech file should be recorded at 16 bits/sample, 8000 samples/second, and named
|
||||
"pre_gsm0610.wav".
|
||||
|
||||
\section gsm0610_tests_page_sec_2 How is it used?
|
||||
To perform the tests in the GSM 06.10 specification you need to obtain the test data files from the
|
||||
specification. These are copyright material, and so cannot be distributed with this test software.
|
||||
They can, however, be freely downloaded from the ETSI web site.
|
||||
|
||||
The files, containing test vectors, which are supplied with the GSM 06.10 specification, should be
|
||||
copied to etsitests/gsm0610/unpacked so the files are arranged in the following directories.
|
||||
|
||||
./fr_A:
|
||||
Seq01-A.cod Seq01-A.inp Seq01-A.out
|
||||
Seq02-A.cod Seq02-A.inp Seq02-A.out
|
||||
Seq03-A.cod Seq03-A.inp Seq03-A.out
|
||||
Seq04-A.cod Seq04-A.inp Seq04-A.out
|
||||
Seq05-A.out
|
||||
|
||||
./fr_L:
|
||||
Seq01.cod Seq01.inp Seq01.out
|
||||
Seq02.cod Seq02.inp Seq02.out
|
||||
Seq03.cod Seq03.inp Seq03.out
|
||||
Seq04.cod Seq04.inp Seq04.out
|
||||
Seq05.cod Seq05.out
|
||||
|
||||
./fr_U:
|
||||
Seq01-U.cod Seq01-U.inp Seq01-U.out
|
||||
Seq02-U.cod Seq02-U.inp Seq02-U.out
|
||||
Seq03-U.cod Seq03-U.inp Seq03-U.out
|
||||
Seq04-U.cod Seq04-U.inp Seq04-U.out
|
||||
Seq05-U.out
|
||||
|
||||
./fr_homing_A:
|
||||
Homing01_A.out
|
||||
Seq01H_A.cod Seq01H_A.inp Seq01H_A.out
|
||||
Seq02H_A.cod Seq02H_A.inp Seq02H_A.out
|
||||
Seq03H_A.cod Seq03H_A.inp Seq03H_A.out
|
||||
Seq04H_A.cod Seq04H_A.inp Seq04H_A.out
|
||||
Seq05H_A.out
|
||||
Seq06H_A.cod Seq06H_A.inp
|
||||
|
||||
./fr_homing_L:
|
||||
Homing01.cod Homing01.out
|
||||
Seq01h.cod Seq01h.inp Seq01h.out
|
||||
Seq02h.cod Seq02h.inp Seq02h.out
|
||||
Seq03h.cod Seq03h.inp Seq03h.out
|
||||
Seq04h.cod Seq04h.inp Seq04h.out
|
||||
Seq05h.cod Seq05h.out
|
||||
Seq06h.cod Seq06h.inp
|
||||
|
||||
./fr_homing_U:
|
||||
Homing01_U.out
|
||||
Seq01H_U.cod Seq01H_U.inp Seq01H_U.out
|
||||
Seq02H_U.cod Seq02H_U.inp Seq02H_U.out
|
||||
Seq03H_U.cod Seq03H_U.inp Seq03H_U.out
|
||||
Seq04H_U.cod Seq04H_U.inp Seq04H_U.out
|
||||
Seq05H_U.out
|
||||
Seq06H_U.cod Seq06H_U.inp
|
||||
|
||||
./fr_sync_A:
|
||||
Seqsync_A.inp
|
||||
Sync000_A.cod --to-- Sync159_A.cod
|
||||
|
||||
./fr_sync_L:
|
||||
Bitsync.inp
|
||||
Seqsync.inp
|
||||
Sync000.cod --to-- Sync159.cod
|
||||
|
||||
./fr_sync_U:
|
||||
Seqsync_U.inp
|
||||
Sync000_U.cod --to-- Sync159_U.cod
|
||||
|
||||
This is different from the directory structure in which they are supplied. Also, the files names are a little
|
||||
different. The supplied names are messy, and inconsistent across the sets. The names required by these tests
|
||||
just clean up these inconsistencies. Note that you will need a Windows machine to unpack some of the supplied
|
||||
files.
|
||||
|
||||
To perform a general audio quality test, gsm0610_tests should be run. The file ../localtests/short_nb_voice.wav
|
||||
will be compressed to GSM 06.10 data, decompressed, and the resulting audio stored in post_gsm0610.wav.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <audiofile.h>
|
||||
|
||||
#include "voipcodecs.h"
|
||||
|
||||
#define BLOCK_LEN 160
|
||||
|
||||
#define TEST_DIR "../etsitests/gsm0610/unpacked/fr_"
|
||||
|
||||
#define IN_FILE_NAME "../localtests/short_nb_voice.wav"
|
||||
#define OUT_FILE_NAME "post_gsm0610.wav"
|
||||
|
||||
#define HIST_LEN 1000
|
||||
|
||||
uint8_t law_in_vector[1000000];
|
||||
int16_t in_vector[1000000];
|
||||
uint16_t code_vector_buf[1000000];
|
||||
uint8_t code_vector[1000000];
|
||||
uint8_t ref_code_vector[1000000];
|
||||
uint8_t decoder_code_vector[1000000];
|
||||
uint8_t law_out_vector[1000000];
|
||||
int16_t out_vector[1000000];
|
||||
int16_t ref_out_vector[1000000];
|
||||
uint8_t ref_law_out_vector[1000000];
|
||||
int vector_len;
|
||||
|
||||
static int get_test_vector(int full, int disk, const char *name)
|
||||
{
|
||||
char buf[500];
|
||||
int in;
|
||||
int len;
|
||||
int i;
|
||||
|
||||
if (full)
|
||||
{
|
||||
sprintf(buf, "%s%c/%s.inp", TEST_DIR, 'L', name);
|
||||
if ((in = open(buf, O_RDONLY)) < 0)
|
||||
{
|
||||
fprintf(stderr, "Cannot open %s\n", buf);
|
||||
exit(2);
|
||||
}
|
||||
len = read(in, in_vector, 1000000);
|
||||
close(in);
|
||||
len /= sizeof(int16_t);
|
||||
vector_len = len;
|
||||
}
|
||||
|
||||
sprintf(buf, "%s%c/%s.out", TEST_DIR, 'L', name);
|
||||
if ((in = open(buf, O_RDONLY)) < 0)
|
||||
{
|
||||
fprintf(stderr, "Cannot open %s\n", buf);
|
||||
exit(2);
|
||||
}
|
||||
len = read(in, ref_out_vector, 1000000);
|
||||
close(in);
|
||||
len /= sizeof(int16_t);
|
||||
if (full)
|
||||
{
|
||||
if (len != vector_len)
|
||||
{
|
||||
fprintf(stderr, "Input and reference vector lengths do not match - %d %d\n", vector_len, len);
|
||||
exit(2);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
vector_len = len;
|
||||
}
|
||||
|
||||
sprintf(buf, "%s%c/%s.cod", TEST_DIR, 'L', name);
|
||||
if ((in = open(buf, O_RDONLY)) < 0)
|
||||
{
|
||||
fprintf(stderr, "Cannot open %s\n", buf);
|
||||
exit(2);
|
||||
}
|
||||
len = read(in, code_vector_buf, 1000000);
|
||||
close(in);
|
||||
len /= sizeof(int16_t);
|
||||
for (i = 0; i < len; i++)
|
||||
{
|
||||
ref_code_vector[i] = code_vector_buf[i];
|
||||
decoder_code_vector[i] = code_vector_buf[i];
|
||||
}
|
||||
if (len*BLOCK_LEN != vector_len*76)
|
||||
{
|
||||
fprintf(stderr, "Input and code vector lengths do not match - %d %d\n", vector_len, len);
|
||||
exit(2);
|
||||
}
|
||||
|
||||
return len;
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
static int get_law_test_vector(int full, int law, const char *name)
|
||||
{
|
||||
char buf[500];
|
||||
int in;
|
||||
int len;
|
||||
int i;
|
||||
int law_uc;
|
||||
|
||||
law_uc = toupper(law);
|
||||
|
||||
if (full)
|
||||
{
|
||||
sprintf(buf, "%s%c/%s-%c.inp", TEST_DIR, law_uc, name, law_uc);
|
||||
if ((in = open(buf, O_RDONLY)) < 0)
|
||||
{
|
||||
fprintf(stderr, "Cannot open %s\n", buf);
|
||||
exit(2);
|
||||
}
|
||||
len = read(in, law_in_vector, 1000000);
|
||||
close(in);
|
||||
vector_len = len;
|
||||
|
||||
sprintf(buf, "%s%c/%s-%c.cod", TEST_DIR, law_uc, name, law_uc);
|
||||
if ((in = open(buf, O_RDONLY)) < 0)
|
||||
{
|
||||
fprintf(stderr, "Cannot open %s\n", buf);
|
||||
exit(2);
|
||||
}
|
||||
len = read(in, code_vector_buf, 1000000);
|
||||
close(in);
|
||||
len /= sizeof(int16_t);
|
||||
for (i = 0; i < len; i++)
|
||||
ref_code_vector[i] = code_vector_buf[i];
|
||||
if (len*BLOCK_LEN != vector_len*76)
|
||||
{
|
||||
fprintf(stderr, "Input and code vector lengths do not match - %d %d\n", vector_len, len);
|
||||
exit(2);
|
||||
}
|
||||
}
|
||||
|
||||
sprintf(buf, "%s%c/%s-%c.out", TEST_DIR, law_uc, name, law_uc);
|
||||
if ((in = open(buf, O_RDONLY)) < 0)
|
||||
{
|
||||
fprintf(stderr, "Cannot open %s\n", buf);
|
||||
exit(2);
|
||||
}
|
||||
len = read(in, ref_law_out_vector, 1000000);
|
||||
close(in);
|
||||
if (full)
|
||||
{
|
||||
if (len != vector_len)
|
||||
{
|
||||
fprintf(stderr, "Input and reference vector lengths do not match - %d %d\n", vector_len, len);
|
||||
exit(2);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
vector_len = len;
|
||||
}
|
||||
|
||||
sprintf(buf, "%s%c/%s.cod", TEST_DIR, 'L', name);
|
||||
if ((in = open(buf, O_RDONLY)) < 0)
|
||||
{
|
||||
fprintf(stderr, "Cannot open %s\n", buf);
|
||||
exit(2);
|
||||
}
|
||||
len = read(in, code_vector_buf, 1000000);
|
||||
close(in);
|
||||
len /= sizeof(int16_t);
|
||||
for (i = 0; i < len; i++)
|
||||
decoder_code_vector[i] = code_vector_buf[i];
|
||||
|
||||
return len;
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
static int perform_linear_test(int full, int disk, const char *name)
|
||||
{
|
||||
gsm0610_state_t *gsm0610_enc_state;
|
||||
gsm0610_state_t *gsm0610_dec_state;
|
||||
int i;
|
||||
int xxx;
|
||||
int mismatches;
|
||||
|
||||
printf("Performing linear test '%s' from disk %d\n", name, disk);
|
||||
|
||||
get_test_vector(full, disk, name);
|
||||
|
||||
if (full)
|
||||
{
|
||||
if ((gsm0610_enc_state = gsm0610_init(NULL, GSM0610_PACKING_NONE)) == NULL)
|
||||
{
|
||||
fprintf(stderr, " Cannot create encoder\n");
|
||||
exit(2);
|
||||
}
|
||||
xxx = gsm0610_encode(gsm0610_enc_state, code_vector, in_vector, vector_len/BLOCK_LEN);
|
||||
|
||||
printf("Check code vector of length %d\n", xxx);
|
||||
for (i = 0, mismatches = 0; i < xxx; i++)
|
||||
{
|
||||
if (code_vector[i] != ref_code_vector[i])
|
||||
{
|
||||
printf("%8d/%3d: %6d %6d\n", i/76, i%76, code_vector[i], ref_code_vector[i]);
|
||||
mismatches++;
|
||||
}
|
||||
}
|
||||
gsm0610_release(gsm0610_enc_state);
|
||||
if (mismatches)
|
||||
{
|
||||
printf("Test failed: %d of %d samples mismatch\n", mismatches, xxx);
|
||||
exit(2);
|
||||
}
|
||||
printf("Test passed\n");
|
||||
}
|
||||
|
||||
if ((gsm0610_dec_state = gsm0610_init(NULL, GSM0610_PACKING_NONE)) == NULL)
|
||||
{
|
||||
fprintf(stderr, " Cannot create decoder\n");
|
||||
exit(2);
|
||||
}
|
||||
xxx = gsm0610_decode(gsm0610_dec_state, out_vector, decoder_code_vector, vector_len/BLOCK_LEN);
|
||||
printf("Check output vector of length %d\n", vector_len);
|
||||
for (i = 0, mismatches = 0; i < vector_len; i++)
|
||||
{
|
||||
if (out_vector[i] != ref_out_vector[i])
|
||||
{
|
||||
printf("%8d: %6d %6d\n", i, out_vector[i], ref_out_vector[i]);
|
||||
mismatches++;
|
||||
}
|
||||
}
|
||||
if (mismatches)
|
||||
{
|
||||
printf("Test failed: %d of %d samples mismatch\n", mismatches, vector_len);
|
||||
exit(2);
|
||||
}
|
||||
gsm0610_release(gsm0610_dec_state);
|
||||
printf("Test passed\n");
|
||||
return 0;
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
static int perform_law_test(int full, int law, const char *name)
|
||||
{
|
||||
gsm0610_state_t *gsm0610_enc_state;
|
||||
gsm0610_state_t *gsm0610_dec_state;
|
||||
int i;
|
||||
int xxx;
|
||||
int mismatches;
|
||||
|
||||
if (law == 'a')
|
||||
printf("Performing A-law test '%s'\n", name);
|
||||
else
|
||||
printf("Performing u-law test '%s'\n", name);
|
||||
|
||||
get_law_test_vector(full, law, name);
|
||||
|
||||
if (full)
|
||||
{
|
||||
if ((gsm0610_enc_state = gsm0610_init(NULL, GSM0610_PACKING_NONE)) == NULL)
|
||||
{
|
||||
fprintf(stderr, " Cannot create encoder\n");
|
||||
exit(2);
|
||||
}
|
||||
if (law == 'a')
|
||||
{
|
||||
for (i = 0; i < vector_len; i++)
|
||||
in_vector[i] = alaw_to_linear(law_in_vector[i]);
|
||||
}
|
||||
else
|
||||
{
|
||||
for (i = 0; i < vector_len; i++)
|
||||
in_vector[i] = ulaw_to_linear(law_in_vector[i]);
|
||||
}
|
||||
xxx = gsm0610_encode(gsm0610_enc_state, code_vector, in_vector, vector_len/BLOCK_LEN);
|
||||
|
||||
printf("Check code vector of length %d\n", xxx);
|
||||
for (i = 0, mismatches = 0; i < xxx; i++)
|
||||
{
|
||||
if (code_vector[i] != ref_code_vector[i])
|
||||
{
|
||||
printf("%8d/%3d: %6d %6d %6d\n", i/76, i%76, code_vector[i], ref_code_vector[i], decoder_code_vector[i]);
|
||||
mismatches++;
|
||||
}
|
||||
}
|
||||
if (mismatches)
|
||||
{
|
||||
printf("Test failed: %d of %d samples mismatch\n", mismatches, xxx);
|
||||
exit(2);
|
||||
}
|
||||
printf("Test passed\n");
|
||||
gsm0610_release(gsm0610_enc_state);
|
||||
}
|
||||
|
||||
if ((gsm0610_dec_state = gsm0610_init(NULL, GSM0610_PACKING_NONE)) == NULL)
|
||||
{
|
||||
fprintf(stderr, " Cannot create decoder\n");
|
||||
exit(2);
|
||||
}
|
||||
xxx = gsm0610_decode(gsm0610_dec_state, out_vector, decoder_code_vector, vector_len/BLOCK_LEN);
|
||||
if (law == 'a')
|
||||
{
|
||||
for (i = 0; i < vector_len; i++)
|
||||
law_out_vector[i] = linear_to_alaw(out_vector[i]);
|
||||
}
|
||||
else
|
||||
{
|
||||
for (i = 0; i < vector_len; i++)
|
||||
law_out_vector[i] = linear_to_ulaw(out_vector[i]);
|
||||
}
|
||||
printf("Check output vector of length %d\n", vector_len);
|
||||
for (i = 0, mismatches = 0; i < vector_len; i++)
|
||||
{
|
||||
if (law_out_vector[i] != ref_law_out_vector[i])
|
||||
{
|
||||
printf("%8d: %6d %6d\n", i, law_out_vector[i], ref_law_out_vector[i]);
|
||||
mismatches++;
|
||||
}
|
||||
}
|
||||
if (mismatches)
|
||||
{
|
||||
printf("Test failed: %d of %d samples mismatch\n", mismatches, vector_len);
|
||||
exit(2);
|
||||
}
|
||||
gsm0610_release(gsm0610_dec_state);
|
||||
printf("Test passed\n");
|
||||
return 0;
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
static int repack_gsm0610_voip_to_wav49(uint8_t c[], const uint8_t d[])
|
||||
{
|
||||
gsm0610_frame_t frame[2];
|
||||
int n;
|
||||
|
||||
n = gsm0610_unpack_voip(&frame[0], d);
|
||||
gsm0610_unpack_voip(&frame[1], d + n);
|
||||
n = gsm0610_pack_wav49(c, frame);
|
||||
return n;
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
static int repack_gsm0610_wav49_to_voip(uint8_t d[], const uint8_t c[])
|
||||
{
|
||||
gsm0610_frame_t frame[2];
|
||||
int n[2];
|
||||
|
||||
gsm0610_unpack_wav49(frame, c);
|
||||
n[0] = gsm0610_pack_voip(d, &frame[0]);
|
||||
n[1] = gsm0610_pack_voip(d + n[0], &frame[1]);
|
||||
return n[0] + n[1];
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
static int perform_pack_unpack_test(void)
|
||||
{
|
||||
uint8_t a[66];
|
||||
uint8_t b[66];
|
||||
uint8_t c[66];
|
||||
int i;
|
||||
int j;
|
||||
|
||||
printf("Performing packing/unpacking tests (not part of the ETSI conformance tests).\n");
|
||||
/* Try trans-packing a lot of random data looking for before/after mismatch. */
|
||||
for (j = 0; j < 1000; j++)
|
||||
{
|
||||
for (i = 0; i < 65; i++)
|
||||
a[i] = rand();
|
||||
repack_gsm0610_wav49_to_voip(b, a);
|
||||
repack_gsm0610_voip_to_wav49(c, b);
|
||||
if (memcmp(a, c, 65))
|
||||
{
|
||||
printf("Test failed: data mismatch\n");
|
||||
exit(2);
|
||||
}
|
||||
|
||||
for (i = 0; i < 66; i++)
|
||||
a[i] = rand();
|
||||
/* Insert the magic code */
|
||||
a[0] = (a[0] & 0xF) | 0xD0;
|
||||
a[33] = (a[33] & 0xF) | 0xD0;
|
||||
repack_gsm0610_voip_to_wav49(b, a);
|
||||
repack_gsm0610_wav49_to_voip(c, b);
|
||||
//for (i = 0; i < 66; i++)
|
||||
// printf("%2d: 0x%02X 0x%02X\n", i, a[i], c[i]);
|
||||
if (memcmp(a, c, 66))
|
||||
{
|
||||
printf("Test failed: data mismatch\n");
|
||||
exit(2);
|
||||
}
|
||||
}
|
||||
printf("Test passed\n");
|
||||
return 0;
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
AFfilehandle inhandle;
|
||||
AFfilehandle outhandle;
|
||||
AFfilesetup filesetup;
|
||||
int frames;
|
||||
int outframes;
|
||||
float x;
|
||||
int16_t pre_amp[HIST_LEN];
|
||||
int16_t post_amp[HIST_LEN];
|
||||
uint8_t gsm0610_data[HIST_LEN];
|
||||
gsm0610_state_t *gsm0610_enc_state;
|
||||
gsm0610_state_t *gsm0610_dec_state;
|
||||
int etsitests;
|
||||
int packing;
|
||||
int i;
|
||||
|
||||
etsitests = TRUE;
|
||||
packing = GSM0610_PACKING_NONE;
|
||||
for (i = 1; i < argc; i++)
|
||||
{
|
||||
if (strcmp(argv[i], "-l") == 0)
|
||||
{
|
||||
etsitests = FALSE;
|
||||
continue;
|
||||
}
|
||||
if (strcmp(argv[i], "-p") == 0)
|
||||
{
|
||||
packing = atoi(argv[++i]);
|
||||
continue;
|
||||
}
|
||||
fprintf(stderr, "Unknown parameter %s specified.\n", argv[i]);
|
||||
exit(2);
|
||||
}
|
||||
|
||||
if (etsitests)
|
||||
{
|
||||
perform_linear_test(TRUE, 1, "Seq01");
|
||||
perform_linear_test(TRUE, 1, "Seq02");
|
||||
perform_linear_test(TRUE, 1, "Seq03");
|
||||
perform_linear_test(TRUE, 1, "Seq04");
|
||||
perform_linear_test(FALSE, 1, "Seq05");
|
||||
perform_law_test(TRUE, 'a', "Seq01");
|
||||
perform_law_test(TRUE, 'a', "Seq02");
|
||||
perform_law_test(TRUE, 'a', "Seq03");
|
||||
perform_law_test(TRUE, 'a', "Seq04");
|
||||
perform_law_test(FALSE, 'a', "Seq05");
|
||||
perform_law_test(TRUE, 'u', "Seq01");
|
||||
perform_law_test(TRUE, 'u', "Seq02");
|
||||
perform_law_test(TRUE, 'u', "Seq03");
|
||||
perform_law_test(TRUE, 'u', "Seq04");
|
||||
perform_law_test(FALSE, 'u', "Seq05");
|
||||
/* This is not actually an ETSI test */
|
||||
perform_pack_unpack_test();
|
||||
|
||||
printf("Tests passed.\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((inhandle = afOpenFile(IN_FILE_NAME, "r", 0)) == AF_NULL_FILEHANDLE)
|
||||
{
|
||||
printf(" Cannot open wave file '%s'\n", IN_FILE_NAME);
|
||||
exit(2);
|
||||
}
|
||||
if ((x = afGetFrameSize(inhandle, AF_DEFAULT_TRACK, 1)) != 2.0)
|
||||
{
|
||||
printf(" Unexpected frame size in wave file '%s'\n", IN_FILE_NAME);
|
||||
exit(2);
|
||||
}
|
||||
if ((x = afGetRate(inhandle, AF_DEFAULT_TRACK)) != (float) SAMPLE_RATE)
|
||||
{
|
||||
printf(" Unexpected sample rate in wave file '%s'\n", IN_FILE_NAME);
|
||||
exit(2);
|
||||
}
|
||||
if ((x = afGetChannels(inhandle, AF_DEFAULT_TRACK)) != 1.0)
|
||||
{
|
||||
printf(" Unexpected number of channels in wave file '%s'\n", IN_FILE_NAME);
|
||||
exit(2);
|
||||
}
|
||||
if ((filesetup = afNewFileSetup()) == AF_NULL_FILESETUP)
|
||||
{
|
||||
fprintf(stderr, " Failed to create file setup\n");
|
||||
exit(2);
|
||||
}
|
||||
afInitSampleFormat(filesetup, AF_DEFAULT_TRACK, AF_SAMPFMT_TWOSCOMP, 16);
|
||||
afInitRate(filesetup, AF_DEFAULT_TRACK, (float) SAMPLE_RATE);
|
||||
afInitFileFormat(filesetup, AF_FILE_WAVE);
|
||||
afInitChannels(filesetup, AF_DEFAULT_TRACK, 1);
|
||||
|
||||
outhandle = afOpenFile(OUT_FILE_NAME, "w", filesetup);
|
||||
if (outhandle == AF_NULL_FILEHANDLE)
|
||||
{
|
||||
fprintf(stderr, " Cannot create wave file '%s'\n", OUT_FILE_NAME);
|
||||
exit(2);
|
||||
}
|
||||
|
||||
if ((gsm0610_enc_state = gsm0610_init(NULL, packing)) == NULL)
|
||||
{
|
||||
fprintf(stderr, " Cannot create encoder\n");
|
||||
exit(2);
|
||||
}
|
||||
|
||||
if ((gsm0610_dec_state = gsm0610_init(NULL, packing)) == NULL)
|
||||
{
|
||||
fprintf(stderr, " Cannot create decoder\n");
|
||||
exit(2);
|
||||
}
|
||||
|
||||
while ((frames = afReadFrames(inhandle, AF_DEFAULT_TRACK, pre_amp, 2*BLOCK_LEN)))
|
||||
{
|
||||
gsm0610_encode(gsm0610_enc_state, gsm0610_data, pre_amp, (packing == GSM0610_PACKING_WAV49) ? 1 : 2);
|
||||
gsm0610_decode(gsm0610_dec_state, post_amp, gsm0610_data, (packing == GSM0610_PACKING_WAV49) ? 1 : 2);
|
||||
outframes = afWriteFrames(outhandle, AF_DEFAULT_TRACK, post_amp, frames);
|
||||
}
|
||||
|
||||
if (afCloseFile(inhandle) != 0)
|
||||
{
|
||||
printf(" Cannot close wave file '%s'\n", IN_FILE_NAME);
|
||||
exit(2);
|
||||
}
|
||||
if (afCloseFile(outhandle) != 0)
|
||||
{
|
||||
printf(" Cannot close wave file '%s'\n", OUT_FILE_NAME);
|
||||
exit(2);
|
||||
}
|
||||
afFreeFileSetup(filesetup);
|
||||
gsm0610_release(gsm0610_enc_state);
|
||||
gsm0610_release(gsm0610_dec_state);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
/*- End of file ------------------------------------------------------------*/
|
|
@ -1,206 +0,0 @@
|
|||
/*
|
||||
* VoIPcodecs - a series of DSP components for telephony
|
||||
*
|
||||
* ima_adpcm_tests.c - Test the IMA/DVI/Intel ADPCM encode and decode
|
||||
* software.
|
||||
*
|
||||
* Written by Steve Underwood <steveu@coppice.org>
|
||||
*
|
||||
* Copyright (C) 2004 Steve Underwood
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
|
||||
/*! \page ima_adpcm_tests_page IMA ADPCM tests
|
||||
\section ima_adpcm_tests_page_sec_1 What does it do?
|
||||
To perform a general audio quality test, ima_adpcm_tests should be run. The test file
|
||||
../localtests/short_nb_voice.wav will be compressed to the specified bit rate,
|
||||
decompressed, and the resulting audio stored in post_ima_adpcm.wav. A simple SNR test
|
||||
is automatically performed. Listening tests may be used for a more detailed evaluation
|
||||
of the degradation in quality caused by the compression.
|
||||
|
||||
\section ima_adpcm_tests_page_sec_2 How is it used?
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <fcntl.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
#include <audiofile.h>
|
||||
|
||||
#include "voipcodecs.h"
|
||||
|
||||
#define IN_FILE_NAME "../localtests/short_nb_voice.wav"
|
||||
#define OUT_FILE_NAME "post_ima_adpcm.wav"
|
||||
|
||||
#define HIST_LEN 1000
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
int i;
|
||||
AFfilehandle inhandle;
|
||||
AFfilehandle outhandle;
|
||||
AFfilesetup filesetup;
|
||||
int frames;
|
||||
int dec_frames;
|
||||
int outframes;
|
||||
int ima_bytes;
|
||||
float x;
|
||||
double pre_energy;
|
||||
double post_energy;
|
||||
double diff_energy;
|
||||
int16_t pre_amp[HIST_LEN];
|
||||
int16_t post_amp[HIST_LEN];
|
||||
uint8_t ima_data[HIST_LEN];
|
||||
int16_t history[HIST_LEN];
|
||||
int hist_in;
|
||||
int hist_out;
|
||||
ima_adpcm_state_t *ima_enc_state;
|
||||
ima_adpcm_state_t *ima_dec_state;
|
||||
int xx;
|
||||
int vbr;
|
||||
const char *in_file_name;
|
||||
|
||||
vbr = FALSE;
|
||||
in_file_name = IN_FILE_NAME;
|
||||
for (i = 1; i < argc; i++)
|
||||
{
|
||||
if (strcmp(argv[i], "-v") == 0)
|
||||
{
|
||||
vbr = TRUE;
|
||||
continue;
|
||||
}
|
||||
if (strcmp(argv[i], "-i") == 0)
|
||||
{
|
||||
in_file_name = argv[++i];
|
||||
continue;
|
||||
}
|
||||
fprintf(stderr, "Unknown parameter %s specified.\n", argv[i]);
|
||||
exit(2);
|
||||
}
|
||||
|
||||
if ((inhandle = afOpenFile(in_file_name, "r", 0)) == AF_NULL_FILEHANDLE)
|
||||
{
|
||||
printf(" Cannot open wave file '%s'\n", in_file_name);
|
||||
exit(2);
|
||||
}
|
||||
if ((x = afGetFrameSize(inhandle, AF_DEFAULT_TRACK, 1)) != 2.0)
|
||||
{
|
||||
printf(" Unexpected frame size in wave file '%s'\n", in_file_name);
|
||||
exit(2);
|
||||
}
|
||||
if ((x = afGetRate(inhandle, AF_DEFAULT_TRACK)) != (float) SAMPLE_RATE)
|
||||
{
|
||||
printf(" Unexpected sample rate in wave file '%s'\n", in_file_name);
|
||||
exit(2);
|
||||
}
|
||||
if ((x = afGetChannels(inhandle, AF_DEFAULT_TRACK)) != 1.0)
|
||||
{
|
||||
printf(" Unexpected number of channels in wave file '%s'\n", in_file_name);
|
||||
exit(2);
|
||||
}
|
||||
|
||||
if ((filesetup = afNewFileSetup()) == AF_NULL_FILESETUP)
|
||||
{
|
||||
fprintf(stderr, " Failed to create file setup\n");
|
||||
exit(2);
|
||||
}
|
||||
afInitSampleFormat(filesetup, AF_DEFAULT_TRACK, AF_SAMPFMT_TWOSCOMP, 16);
|
||||
afInitRate(filesetup, AF_DEFAULT_TRACK, (float) SAMPLE_RATE);
|
||||
afInitFileFormat(filesetup, AF_FILE_WAVE);
|
||||
afInitChannels(filesetup, AF_DEFAULT_TRACK, 1);
|
||||
if ((outhandle = afOpenFile(OUT_FILE_NAME, "w", filesetup)) == AF_NULL_FILEHANDLE)
|
||||
{
|
||||
fprintf(stderr, " Cannot create wave file '%s'\n", OUT_FILE_NAME);
|
||||
exit(2);
|
||||
}
|
||||
|
||||
if ((ima_enc_state = ima_adpcm_init(NULL, (vbr) ? IMA_ADPCM_VDVI : IMA_ADPCM_DVI4)) == NULL)
|
||||
{
|
||||
fprintf(stderr, " Cannot create encoder\n");
|
||||
exit(2);
|
||||
}
|
||||
|
||||
if ((ima_dec_state = ima_adpcm_init(NULL, (vbr) ? IMA_ADPCM_VDVI : IMA_ADPCM_DVI4)) == NULL)
|
||||
{
|
||||
fprintf(stderr, " Cannot create decoder\n");
|
||||
exit(2);
|
||||
}
|
||||
|
||||
hist_in = 0;
|
||||
hist_out = 0;
|
||||
pre_energy = 0.0;
|
||||
post_energy = 0.0;
|
||||
diff_energy = 0.0;
|
||||
while ((frames = afReadFrames(inhandle, AF_DEFAULT_TRACK, pre_amp, 159)))
|
||||
{
|
||||
ima_bytes = ima_adpcm_encode(ima_enc_state, ima_data, pre_amp, frames);
|
||||
dec_frames = ima_adpcm_decode(ima_dec_state, post_amp, ima_data, ima_bytes);
|
||||
for (i = 0; i < frames; i++)
|
||||
{
|
||||
history[hist_in++] = pre_amp[i];
|
||||
if (hist_in >= HIST_LEN)
|
||||
hist_in = 0;
|
||||
pre_energy += (double) pre_amp[i] * (double) pre_amp[i];
|
||||
}
|
||||
for (i = 0; i < dec_frames; i++)
|
||||
{
|
||||
post_energy += (double) post_amp[i] * (double) post_amp[i];
|
||||
xx = post_amp[i] - history[hist_out++];
|
||||
if (hist_out >= HIST_LEN)
|
||||
hist_out = 0;
|
||||
diff_energy += (double) xx * (double) xx;
|
||||
}
|
||||
outframes = afWriteFrames(outhandle, AF_DEFAULT_TRACK, post_amp, dec_frames);
|
||||
}
|
||||
if (afCloseFile(inhandle) != 0)
|
||||
{
|
||||
printf(" Cannot close wave file '%s'\n", in_file_name);
|
||||
exit(2);
|
||||
}
|
||||
if (afCloseFile(outhandle) != 0)
|
||||
{
|
||||
printf(" Cannot close wave file '%s'\n", OUT_FILE_NAME);
|
||||
exit(2);
|
||||
}
|
||||
afFreeFileSetup(filesetup);
|
||||
ima_adpcm_release(ima_enc_state);
|
||||
ima_adpcm_release(ima_dec_state);
|
||||
|
||||
printf("Output energy is %f%% of input energy.\n", 100.0*post_energy/pre_energy);
|
||||
printf("Residual energy is %f%% of the total.\n", 100.0*diff_energy/post_energy);
|
||||
if (fabs(1.0 - post_energy/pre_energy) > 0.05
|
||||
||
|
||||
fabs(diff_energy/post_energy) > 0.03)
|
||||
{
|
||||
printf("Tests failed.\n");
|
||||
exit(2);
|
||||
}
|
||||
|
||||
printf("Tests passed.\n");
|
||||
return 0;
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
/*- End of file ------------------------------------------------------------*/
|
|
@ -1,307 +0,0 @@
|
|||
/*
|
||||
* VoIPcodecs - a series of DSP components for telephony
|
||||
*
|
||||
* lpc10_tests.c - Test the LPC10 low bit rate speech codec.
|
||||
*
|
||||
* Written by Steve Underwood <steveu@coppice.org>
|
||||
*
|
||||
* Copyright (C) 2006 Steve Underwood
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: lpc10_tests.c,v 1.11 2007/11/10 11:14:58 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
|
||||
/*! \page lpc10_tests_page LPC10 codec tests
|
||||
\section lpc10_tests_page_sec_1 What does it do?
|
||||
|
||||
\section lpc10_tests_page_sec_2 How is it used?
|
||||
To perform a general audio quality test, lpc10 should be run. The file ../localtests/short_nb_voice.wav
|
||||
will be compressed to LPC10 data, decompressed, and the resulting audio stored in post_lpc10.wav.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
#include <ctype.h>
|
||||
#include <audiofile.h>
|
||||
|
||||
#include "voipcodecs.h"
|
||||
|
||||
#define BLOCK_LEN 180
|
||||
|
||||
#define BLOCKS_PER_READ 1
|
||||
|
||||
#define IN_FILE_NAME "../localtests/dam9.wav"
|
||||
#define REF_FILE_NAME "../localtests/dam9_lpc55.wav"
|
||||
#define COMPRESS_FILE_NAME "lpc10_out.lpc10"
|
||||
#define DECOMPRESS_FILE_NAME "lpc10_in.lpc10"
|
||||
#define OUT_FILE_NAME "post_lpc10.wav"
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
AFfilehandle inhandle;
|
||||
AFfilehandle refhandle;
|
||||
AFfilehandle outhandle;
|
||||
AFfilesetup filesetup;
|
||||
int frames;
|
||||
int outframes;
|
||||
float x;
|
||||
double pre_energy;
|
||||
double post_energy;
|
||||
double ref_energy;
|
||||
double diff_energy;
|
||||
int16_t pre_amp[BLOCKS_PER_READ*BLOCK_LEN];
|
||||
int16_t post_amp[BLOCKS_PER_READ*BLOCK_LEN];
|
||||
int16_t ref_amp[BLOCKS_PER_READ*BLOCK_LEN];
|
||||
int16_t log_amp[BLOCKS_PER_READ*BLOCK_LEN*3];
|
||||
uint8_t lpc10_data[BLOCKS_PER_READ*7];
|
||||
double xx;
|
||||
lpc10_encode_state_t *lpc10_enc_state;
|
||||
lpc10_decode_state_t *lpc10_dec_state;
|
||||
int i;
|
||||
int block_no;
|
||||
int log_error;
|
||||
int compress;
|
||||
int decompress;
|
||||
const char *in_file_name;
|
||||
int compress_file;
|
||||
int decompress_file;
|
||||
int len;
|
||||
|
||||
compress = FALSE;
|
||||
decompress = FALSE;
|
||||
log_error = TRUE;
|
||||
in_file_name = IN_FILE_NAME;
|
||||
for (i = 1; i < argc; i++)
|
||||
{
|
||||
if (strcmp(argv[i], "-c") == 0)
|
||||
{
|
||||
compress = TRUE;
|
||||
continue;
|
||||
}
|
||||
if (strcmp(argv[i], "-d") == 0)
|
||||
{
|
||||
decompress = TRUE;
|
||||
continue;
|
||||
}
|
||||
if (strcmp(argv[i], "-i") == 0)
|
||||
{
|
||||
in_file_name = argv[++i];
|
||||
continue;
|
||||
}
|
||||
if (strcmp(argv[i], "-l") == 0)
|
||||
{
|
||||
log_error = FALSE;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
compress_file = -1;
|
||||
decompress_file = -1;
|
||||
inhandle = AF_NULL_FILEHANDLE;
|
||||
refhandle = AF_NULL_FILEHANDLE;
|
||||
outhandle = AF_NULL_FILEHANDLE;
|
||||
if (!decompress)
|
||||
{
|
||||
if ((inhandle = afOpenFile(in_file_name, "r", 0)) == AF_NULL_FILEHANDLE)
|
||||
{
|
||||
printf(" Cannot open wave file '%s'\n", in_file_name);
|
||||
exit(2);
|
||||
}
|
||||
if ((x = afGetFrameSize(inhandle, AF_DEFAULT_TRACK, 1)) != 2.0)
|
||||
{
|
||||
printf(" Unexpected frame size in wave file '%s'\n", in_file_name);
|
||||
exit(2);
|
||||
}
|
||||
if ((x = afGetRate(inhandle, AF_DEFAULT_TRACK)) != (float) SAMPLE_RATE)
|
||||
{
|
||||
printf(" Unexpected sample rate in wave file '%s'\n", in_file_name);
|
||||
exit(2);
|
||||
}
|
||||
if ((x = afGetChannels(inhandle, AF_DEFAULT_TRACK)) != 1.0)
|
||||
{
|
||||
printf(" Unexpected number of channels in wave file '%s'\n", in_file_name);
|
||||
exit(2);
|
||||
}
|
||||
if ((filesetup = afNewFileSetup()) == AF_NULL_FILESETUP)
|
||||
{
|
||||
fprintf(stderr, " Failed to create file setup\n");
|
||||
exit(2);
|
||||
}
|
||||
|
||||
if ((refhandle = afOpenFile(REF_FILE_NAME, "r", 0)) == AF_NULL_FILEHANDLE)
|
||||
{
|
||||
printf(" Cannot open wave file '%s'\n", REF_FILE_NAME);
|
||||
exit(2);
|
||||
}
|
||||
if ((x = afGetFrameSize(refhandle, AF_DEFAULT_TRACK, 1)) != 2.0)
|
||||
{
|
||||
printf(" Unexpected frame size in wave file '%s'\n", REF_FILE_NAME);
|
||||
exit(2);
|
||||
}
|
||||
if ((x = afGetRate(refhandle, AF_DEFAULT_TRACK)) != (float) SAMPLE_RATE)
|
||||
{
|
||||
printf(" Unexpected sample rate in wave file '%s'\n", REF_FILE_NAME);
|
||||
exit(2);
|
||||
}
|
||||
if ((x = afGetChannels(refhandle, AF_DEFAULT_TRACK)) != 1.0)
|
||||
{
|
||||
printf(" Unexpected number of channels in wave file '%s'\n", REF_FILE_NAME);
|
||||
exit(2);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((decompress_file = open(DECOMPRESS_FILE_NAME, O_RDONLY)) < 0)
|
||||
{
|
||||
fprintf(stderr, " Cannot open decompressed data file '%s'\n", DECOMPRESS_FILE_NAME);
|
||||
exit(2);
|
||||
}
|
||||
}
|
||||
|
||||
if ((filesetup = afNewFileSetup()) == AF_NULL_FILESETUP)
|
||||
{
|
||||
fprintf(stderr, " Failed to create file setup\n");
|
||||
exit(2);
|
||||
}
|
||||
afInitSampleFormat(filesetup, AF_DEFAULT_TRACK, AF_SAMPFMT_TWOSCOMP, 16);
|
||||
afInitRate(filesetup, AF_DEFAULT_TRACK, (float) SAMPLE_RATE);
|
||||
afInitFileFormat(filesetup, AF_FILE_WAVE);
|
||||
afInitChannels(filesetup, AF_DEFAULT_TRACK, 1);
|
||||
|
||||
if ((outhandle = afOpenFile(OUT_FILE_NAME, "w", filesetup)) == AF_NULL_FILEHANDLE)
|
||||
{
|
||||
fprintf(stderr, " Cannot create wave file '%s'\n", OUT_FILE_NAME);
|
||||
exit(2);
|
||||
}
|
||||
|
||||
if ((lpc10_enc_state = lpc10_encode_init(NULL, TRUE)) == NULL)
|
||||
{
|
||||
fprintf(stderr, " Cannot create encoder\n");
|
||||
exit(2);
|
||||
}
|
||||
|
||||
if ((lpc10_dec_state = lpc10_decode_init(NULL, TRUE)) == NULL)
|
||||
{
|
||||
fprintf(stderr, " Cannot create decoder\n");
|
||||
exit(2);
|
||||
}
|
||||
|
||||
if (compress)
|
||||
{
|
||||
if ((compress_file = open(COMPRESS_FILE_NAME, O_WRONLY | O_CREAT | O_TRUNC, 0666)) < 0)
|
||||
{
|
||||
fprintf(stderr, " Cannot create compressed data file '%s'\n", COMPRESS_FILE_NAME);
|
||||
exit(2);
|
||||
}
|
||||
}
|
||||
|
||||
pre_energy = 0.0;
|
||||
post_energy = 0.0;
|
||||
ref_energy = 0.0;
|
||||
diff_energy = 0.0;
|
||||
|
||||
if (decompress)
|
||||
{
|
||||
while ((len = read(decompress_file, lpc10_data, BLOCKS_PER_READ*7)) > 0)
|
||||
{
|
||||
lpc10_decode(lpc10_dec_state, post_amp, lpc10_data, len/7);
|
||||
outframes = afWriteFrames(outhandle, AF_DEFAULT_TRACK, post_amp, BLOCK_LEN*len/7);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
block_no = 0;
|
||||
while ((frames = afReadFrames(inhandle, AF_DEFAULT_TRACK, pre_amp, BLOCKS_PER_READ*BLOCK_LEN)) == BLOCKS_PER_READ*BLOCK_LEN
|
||||
&&
|
||||
(frames = afReadFrames(refhandle, AF_DEFAULT_TRACK, ref_amp, BLOCKS_PER_READ*BLOCK_LEN)) == BLOCKS_PER_READ*BLOCK_LEN)
|
||||
{
|
||||
lpc10_encode(lpc10_enc_state, lpc10_data, pre_amp, BLOCKS_PER_READ);
|
||||
if (compress)
|
||||
write(compress_file, lpc10_data, BLOCKS_PER_READ*7);
|
||||
lpc10_decode(lpc10_dec_state, post_amp, lpc10_data, BLOCKS_PER_READ);
|
||||
for (i = 0; i < BLOCK_LEN; i++)
|
||||
{
|
||||
pre_energy += (double) pre_amp[i]*(double) pre_amp[i];
|
||||
post_energy += (double) post_amp[i]*(double) post_amp[i];
|
||||
ref_energy += (double) ref_amp[i]*(double) ref_amp[i];
|
||||
/* The reference file has some odd clipping, so eliminate this from the
|
||||
energy measurement. */
|
||||
if (ref_amp[i] == 32767 || ref_amp[i] == -32768)
|
||||
xx = 0.0;
|
||||
else
|
||||
xx = post_amp[i] - ref_amp[i];
|
||||
diff_energy += (double) xx*(double) xx;
|
||||
log_amp[i] = xx;
|
||||
}
|
||||
block_no++;
|
||||
if (log_error)
|
||||
outframes = afWriteFrames(outhandle, AF_DEFAULT_TRACK, log_amp, frames);
|
||||
else
|
||||
outframes = afWriteFrames(outhandle, AF_DEFAULT_TRACK, post_amp, frames);
|
||||
}
|
||||
if (afCloseFile(inhandle) != 0)
|
||||
{
|
||||
printf(" Cannot close wave file '%s'\n", in_file_name);
|
||||
exit(2);
|
||||
}
|
||||
if (afCloseFile(refhandle) != 0)
|
||||
{
|
||||
printf(" Cannot close wave file '%s'\n", REF_FILE_NAME);
|
||||
exit(2);
|
||||
}
|
||||
}
|
||||
|
||||
if (afCloseFile(outhandle) != 0)
|
||||
{
|
||||
printf(" Cannot close wave file '%s'\n", OUT_FILE_NAME);
|
||||
exit(2);
|
||||
}
|
||||
afFreeFileSetup(filesetup);
|
||||
if (compress)
|
||||
close(compress_file);
|
||||
if (decompress)
|
||||
close(decompress_file);
|
||||
lpc10_encode_release(lpc10_enc_state);
|
||||
lpc10_decode_release(lpc10_dec_state);
|
||||
|
||||
if (!decompress)
|
||||
{
|
||||
printf("Output energy is %f%% of input energy.\n", 100.0*post_energy/pre_energy);
|
||||
printf("Difference energy is %f%% of the total.\n", 100.0*diff_energy/ref_energy);
|
||||
if (fabs(1.0 - post_energy/pre_energy) > 0.05
|
||||
||
|
||||
fabs(diff_energy/post_energy) > 0.03)
|
||||
{
|
||||
printf("Tests failed.\n");
|
||||
exit(2);
|
||||
}
|
||||
printf("Tests passed.\n");
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
/*- End of file ------------------------------------------------------------*/
|
|
@ -1,239 +0,0 @@
|
|||
/*
|
||||
* VoIPcodecs - a series of DSP components for telephony
|
||||
*
|
||||
* oki_adpcm_tests.c - Test the Oki (Dialogic) ADPCM encode and decode
|
||||
* software at 24kbps and 32kbps.
|
||||
*
|
||||
* Written by Steve Underwood <steveu@coppice.org>
|
||||
*
|
||||
* Copyright (C) 2004 Steve Underwood
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: oki_adpcm_tests.c,v 1.24 2007/11/10 11:14:58 steveu Exp $
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
|
||||
/*! \page oki_adpcm_tests_page OKI (Dialogic) ADPCM tests
|
||||
\section oki_adpcm_tests_page_sec_1 What does it do?
|
||||
To perform a general audio quality test, oki_adpcm_tests should be run. The test file
|
||||
../localtests/short_nb_voice.wav will be compressed to the specified bit rate,
|
||||
decompressed, and the resulting audio stored in post_oki_adpcm.wav. A simple SNR test
|
||||
is automatically performed. Listening tests may be used for a more detailed evaluation
|
||||
of the degradation in quality caused by the compression. Both 32k bps and 24k bps
|
||||
compression may be tested.
|
||||
|
||||
\section oki_adpcm_tests_page_sec_2 How is it used?
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <fcntl.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
#include <audiofile.h>
|
||||
|
||||
#include "voipcodecs.h"
|
||||
|
||||
#define IN_FILE_NAME "../localtests/short_nb_voice.wav"
|
||||
#define OUT_FILE_NAME "post_oki_adpcm.wav"
|
||||
|
||||
#define HIST_LEN 1000
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
int i;
|
||||
AFfilehandle inhandle;
|
||||
AFfilehandle outhandle;
|
||||
AFfilesetup filesetup;
|
||||
int frames;
|
||||
int dec_frames;
|
||||
int outframes;
|
||||
int oki_bytes;
|
||||
int bit_rate;
|
||||
float x;
|
||||
double pre_energy;
|
||||
double post_energy;
|
||||
double diff_energy;
|
||||
int16_t pre_amp[HIST_LEN];
|
||||
int16_t post_amp[HIST_LEN];
|
||||
uint8_t oki_data[HIST_LEN];
|
||||
int16_t history[HIST_LEN];
|
||||
int hist_in;
|
||||
int hist_out;
|
||||
oki_adpcm_state_t *oki_enc_state;
|
||||
oki_adpcm_state_t *oki_dec_state;
|
||||
int xx;
|
||||
int total_pre_samples;
|
||||
int total_compressed_bytes;
|
||||
int total_post_samples;
|
||||
const char *in_file_name;
|
||||
|
||||
bit_rate = 32000;
|
||||
in_file_name = IN_FILE_NAME;
|
||||
for (i = 1; i < argc; i++)
|
||||
{
|
||||
if (strcmp(argv[i], "-2") == 0)
|
||||
{
|
||||
bit_rate = 24000;
|
||||
continue;
|
||||
}
|
||||
if (strcmp(argv[i], "-i") == 0)
|
||||
{
|
||||
in_file_name = argv[++i];
|
||||
continue;
|
||||
}
|
||||
fprintf(stderr, "Unknown parameter %s specified.\n", argv[i]);
|
||||
exit(2);
|
||||
}
|
||||
|
||||
if ((inhandle = afOpenFile(in_file_name, "r", 0)) == AF_NULL_FILEHANDLE)
|
||||
{
|
||||
printf(" Cannot open wave file '%s'\n", in_file_name);
|
||||
exit(2);
|
||||
}
|
||||
if ((x = afGetFrameSize(inhandle, AF_DEFAULT_TRACK, 1)) != 2.0)
|
||||
{
|
||||
printf(" Unexpected frame size in wave file '%s'\n", in_file_name);
|
||||
exit(2);
|
||||
}
|
||||
if ((x = afGetRate(inhandle, AF_DEFAULT_TRACK)) != (float) SAMPLE_RATE)
|
||||
{
|
||||
printf(" Unexpected sample rate in wave file '%s'\n", in_file_name);
|
||||
exit(2);
|
||||
}
|
||||
if ((x = afGetChannels(inhandle, AF_DEFAULT_TRACK)) != 1.0)
|
||||
{
|
||||
printf(" Unexpected number of channels in wave file '%s'\n", in_file_name);
|
||||
exit(2);
|
||||
}
|
||||
if ((filesetup = afNewFileSetup()) == AF_NULL_FILESETUP)
|
||||
{
|
||||
fprintf(stderr, " Failed to create file setup\n");
|
||||
exit(2);
|
||||
}
|
||||
afInitSampleFormat(filesetup, AF_DEFAULT_TRACK, AF_SAMPFMT_TWOSCOMP, 16);
|
||||
afInitRate(filesetup, AF_DEFAULT_TRACK, (float) SAMPLE_RATE);
|
||||
afInitFileFormat(filesetup, AF_FILE_WAVE);
|
||||
afInitChannels(filesetup, AF_DEFAULT_TRACK, 1);
|
||||
|
||||
outhandle = afOpenFile(OUT_FILE_NAME, "w", filesetup);
|
||||
if (outhandle == AF_NULL_FILEHANDLE)
|
||||
{
|
||||
fprintf(stderr, " Cannot create wave file '%s'\n", OUT_FILE_NAME);
|
||||
exit(2);
|
||||
}
|
||||
|
||||
if ((oki_enc_state = oki_adpcm_init(NULL, bit_rate)) == NULL)
|
||||
{
|
||||
fprintf(stderr, " Cannot create encoder\n");
|
||||
exit(2);
|
||||
}
|
||||
|
||||
if ((oki_dec_state = oki_adpcm_init(NULL, bit_rate)) == NULL)
|
||||
{
|
||||
fprintf(stderr, " Cannot create decoder\n");
|
||||
exit(2);
|
||||
}
|
||||
|
||||
hist_in = 0;
|
||||
if (bit_rate == 32000)
|
||||
hist_out = 0;
|
||||
else
|
||||
hist_out = HIST_LEN - 27;
|
||||
memset(history, 0, sizeof(history));
|
||||
pre_energy = 0.0;
|
||||
post_energy = 0.0;
|
||||
diff_energy = 0.0;
|
||||
total_pre_samples = 0;
|
||||
total_compressed_bytes = 0;
|
||||
total_post_samples = 0;
|
||||
while ((frames = afReadFrames(inhandle, AF_DEFAULT_TRACK, pre_amp, 159)))
|
||||
{
|
||||
total_pre_samples +=frames;
|
||||
oki_bytes = oki_adpcm_encode(oki_enc_state, oki_data, pre_amp, frames);
|
||||
total_compressed_bytes += oki_bytes;
|
||||
dec_frames = oki_adpcm_decode(oki_dec_state, post_amp, oki_data, oki_bytes);
|
||||
total_post_samples += dec_frames;
|
||||
for (i = 0; i < frames; i++)
|
||||
{
|
||||
history[hist_in++] = pre_amp[i];
|
||||
if (hist_in >= HIST_LEN)
|
||||
hist_in = 0;
|
||||
pre_energy += (double) pre_amp[i] * (double) pre_amp[i];
|
||||
}
|
||||
for (i = 0; i < dec_frames; i++)
|
||||
{
|
||||
post_energy += (double) post_amp[i] * (double) post_amp[i];
|
||||
xx = post_amp[i] - history[hist_out++];
|
||||
if (hist_out >= HIST_LEN)
|
||||
hist_out = 0;
|
||||
diff_energy += (double) xx * (double) xx;
|
||||
//post_amp[i] = xx;
|
||||
}
|
||||
outframes = afWriteFrames(outhandle, AF_DEFAULT_TRACK, post_amp, dec_frames);
|
||||
}
|
||||
if (afCloseFile(inhandle) != 0)
|
||||
{
|
||||
printf(" Cannot close wave file '%s'\n", in_file_name);
|
||||
exit(2);
|
||||
}
|
||||
if (afCloseFile(outhandle) != 0)
|
||||
{
|
||||
printf(" Cannot close wave file '%s'\n", OUT_FILE_NAME);
|
||||
exit(2);
|
||||
}
|
||||
afFreeFileSetup(filesetup);
|
||||
oki_adpcm_release(oki_enc_state);
|
||||
oki_adpcm_release(oki_dec_state);
|
||||
|
||||
printf("Pre samples: %d\n", total_pre_samples);
|
||||
printf("Compressed bytes: %d\n", total_compressed_bytes);
|
||||
printf("Post samples: %d\n", total_post_samples);
|
||||
|
||||
printf("Output energy is %f%% of input energy.\n", 100.0*post_energy/pre_energy);
|
||||
printf("Residual energy is %f%% of the total.\n", 100.0*diff_energy/post_energy);
|
||||
if (bit_rate == 32000)
|
||||
{
|
||||
if (fabs(1.0 - post_energy/pre_energy) > 0.05
|
||||
||
|
||||
fabs(diff_energy/post_energy) > 0.03)
|
||||
{
|
||||
printf("Tests failed.\n");
|
||||
exit(2);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (fabs(1.0 - post_energy/pre_energy) > 0.20
|
||||
||
|
||||
fabs(diff_energy/post_energy) > 0.10)
|
||||
{
|
||||
printf("Tests failed.\n");
|
||||
exit(2);
|
||||
}
|
||||
}
|
||||
|
||||
printf("Tests passed.\n");
|
||||
return 0;
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
/*- End of file ------------------------------------------------------------*/
|
|
@ -1,93 +0,0 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# VoIPcodecs - a series of DSP components for telephony
|
||||
#
|
||||
# regression_tests.sh
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License version 2, as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
#
|
||||
# $Id: regression_tests.sh,v 1.47 2007/12/22 12:37:22 steveu Exp $
|
||||
#
|
||||
|
||||
STDOUT_DEST=xyzzy
|
||||
STDERR_DEST=xyzzy2
|
||||
|
||||
echo Performing basic VoIP codecs regression tests
|
||||
echo
|
||||
|
||||
./g711_tests >$STDOUT_DEST 2>$STDERR_DEST
|
||||
RETVAL=$?
|
||||
if [ $RETVAL != 0 ]
|
||||
then
|
||||
echo g711_tests failed!
|
||||
exit $RETVAL
|
||||
fi
|
||||
echo g711_tests completed OK
|
||||
|
||||
./g722_tests >$STDOUT_DEST 2>$STDERR_DEST
|
||||
RETVAL=$?
|
||||
if [ $RETVAL != 0 ]
|
||||
then
|
||||
echo g722_tests failed!
|
||||
exit $RETVAL
|
||||
fi
|
||||
echo g722_tests completed OK
|
||||
|
||||
./g726_tests >$STDOUT_DEST 2>$STDERR_DEST
|
||||
RETVAL=$?
|
||||
if [ $RETVAL != 0 ]
|
||||
then
|
||||
echo g726_tests failed!
|
||||
exit $RETVAL
|
||||
fi
|
||||
echo g726_tests completed OK
|
||||
|
||||
./gsm0610_tests >$STDOUT_DEST 2>$STDERR_DEST
|
||||
RETVAL=$?
|
||||
if [ $RETVAL != 0 ]
|
||||
then
|
||||
echo gsm0610_tests failed!
|
||||
exit $RETVAL
|
||||
fi
|
||||
echo gsm0610_tests completed OK
|
||||
|
||||
./ima_adpcm_tests >$STDOUT_DEST 2>$STDERR_DEST
|
||||
RETVAL=$?
|
||||
if [ $RETVAL != 0 ]
|
||||
then
|
||||
echo ima_adpcm_tests failed!
|
||||
exit $RETVAL
|
||||
fi
|
||||
echo ima_adpcm_tests completed OK
|
||||
|
||||
./lpc10_tests >$STDOUT_DEST 2>$STDERR_DEST
|
||||
RETVAL=$?
|
||||
if [ $RETVAL != 0 ]
|
||||
then
|
||||
echo lpc10_tests failed!
|
||||
exit $RETVAL
|
||||
fi
|
||||
echo lpc10_tests completed OK
|
||||
|
||||
./oki_adpcm_tests >$STDOUT_DEST 2>$STDERR_DEST
|
||||
RETVAL=$?
|
||||
if [ $RETVAL != 0 ]
|
||||
then
|
||||
echo oki_adpcm_tests failed!
|
||||
exit $RETVAL
|
||||
fi
|
||||
echo oki_adpcm_tests completed OK
|
||||
|
||||
echo
|
||||
echo All regression tests successfully completed
|
|
@ -1,65 +0,0 @@
|
|||
Summary: VoIPcodecs is a library of unencumbered codecs commonly used for VoIP
|
||||
Name: @PACKAGE@
|
||||
Version: @VERSION@
|
||||
Release: 1
|
||||
License: GPL
|
||||
Group: System Environment/Libraries
|
||||
URL: http://www.soft-switch.org/voipcodecs
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
||||
Source: http://www.soft-switch.org/downloads/voipcodecs/@PACKAGE@-@VERSION@.tar.gz
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
|
||||
Docdir: %{_prefix}/doc
|
||||
|
||||
BuildRequires: audiofile-devel
|
||||
BuildRequires: doxygen
|
||||
|
||||
%description
|
||||
VoIPcodecs is a library of unencumbered codecs commonly used for VoIP.
|
||||
|
||||
%package devel
|
||||
Summary: VoIPcodecs development files
|
||||
Group: Development/Libraries
|
||||
Requires: voipcodecs = %{version}
|
||||
PreReq: /sbin/install-info
|
||||
|
||||
%description devel
|
||||
VoIPcodecs development files.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
|
||||
%build
|
||||
%configure --enable-doc --disable-static --disable-rpath
|
||||
make
|
||||
|
||||
%install
|
||||
rm -rf %{buildroot}
|
||||
make install DESTDIR=%{buildroot}
|
||||
rm %{buildroot}%{_libdir}/libvoipcodecs.la
|
||||
|
||||
%clean
|
||||
rm -rf %{buildroot}
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%doc ChangeLog AUTHORS COPYING NEWS README
|
||||
|
||||
%{_libdir}/libvoipcodecs.so.*
|
||||
|
||||
%{_datadir}/voipcodecs
|
||||
|
||||
%files devel
|
||||
%defattr(-,root,root,-)
|
||||
%doc doc/api
|
||||
%{_includedir}/voipcodecs.h
|
||||
%{_includedir}/voipcodecs
|
||||
%{_libdir}/libvoipcodecs.so
|
||||
|
||||
%post -p /sbin/ldconfig
|
||||
|
||||
%postun -p /sbin/ldconfig
|
||||
|
||||
%changelog
|
||||
* Thu Feb 7 2008 Steve Underwood <steveu@coppice.org> 0.0.1
|
||||
- First pass
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue