Windows
This commit is contained in:
Родитель
4f5b4b77b9
Коммит
a67a03ee03
|
@ -0,0 +1,21 @@
|
|||
@echo off
|
||||
setlocal
|
||||
|
||||
set wav_file=t.wav
|
||||
set ac3_file=t.ac3
|
||||
set timer_exe=timer.exe
|
||||
|
||||
set OutPath=output
|
||||
|
||||
echo [aften_x86]
|
||||
%timer_exe% "%OutPath%/aften_x86/aften.exe" "%wav_file%" "%ac3_file%"
|
||||
echo [aften_x86_SSE]
|
||||
%timer_exe% "%OutPath%/aften_x86_SSE/aften.exe" "%wav_file%" "%ac3_file%"
|
||||
echo [aften_x86_SSE2]
|
||||
%timer_exe% "%OutPath%/aften_x86_SSE2/aften.exe" "%wav_file%" "%ac3_file%"
|
||||
echo [aften_x86_SSE3]
|
||||
%timer_exe% "%OutPath%/aften_x86_SSE3/aften.exe" "%wav_file%" "%ac3_file%"
|
||||
|
||||
del /Q "%ac3_file%"
|
||||
|
||||
endlocal
|
|
@ -0,0 +1,19 @@
|
|||
@echo off
|
||||
setlocal
|
||||
|
||||
set wav_file=t.wav
|
||||
set ac3_file=t.ac3
|
||||
set timer_exe=timer.exe
|
||||
|
||||
set OutPath=output
|
||||
|
||||
echo [aften_AMD64]
|
||||
%timer_exe% "%OutPath%/aften_AMD64/aften.exe" "%wav_file%" "%ac3_file%"
|
||||
echo [aften_AMD64_SSE2]
|
||||
%timer_exe% "%OutPath%/aften_AMD64_SSE2/aften.exe" "%wav_file%" "%ac3_file%"
|
||||
echo [aften_AMD64_SSE3]
|
||||
%timer_exe% "%OutPath%/aften_AMD64_SSE3/aften.exe" "%wav_file%" "%ac3_file%"
|
||||
|
||||
del /Q "%ac3_file%"
|
||||
|
||||
endlocal
|
|
@ -0,0 +1,410 @@
|
|||
@echo off
|
||||
setlocal
|
||||
|
||||
rem
|
||||
rem USAGE: @call build_intel.cmd <compiler_version> <build_name> <optimizations> [<debug_flag>]
|
||||
rem
|
||||
|
||||
title Building Aften Win32 and Win64 Binaries (C) 2006-2009 Wieslaw Soltes
|
||||
|
||||
rem
|
||||
rem SELECT COMPILER
|
||||
rem
|
||||
|
||||
rem Select proper compiler environment variables
|
||||
goto use_intel_compiler_%1
|
||||
|
||||
:use_intel_compiler_11_1_054
|
||||
|
||||
rem Set environment variables for Intel C++ Compiler v11.1.054 (x86 PGO, MMX, SSE, SSE2 and SSE3 Builds)
|
||||
@call "c:\Program Files (x86)\Intel\Compiler\11.1\054\bin\ia32\iclvars_ia32.bat"
|
||||
goto common_settings
|
||||
|
||||
:use_intel_compiler_11_1_054_x64
|
||||
|
||||
rem Set environment variables for Intel C++ Compiler v11.1.054 (x86-64, EM64T PGO, MMX, SSE, SSE2 and SSE3 Builds)
|
||||
@call "c:\Program Files (x86)\Intel\Compiler\11.1\054\bin\intel64\iclvars_intel64.bat"
|
||||
goto common_settings
|
||||
|
||||
rem
|
||||
rem PREPARE BUILD NAMES
|
||||
rem
|
||||
|
||||
:common_settings
|
||||
|
||||
rem Set working directory path and output directory prefix
|
||||
set out_path=output
|
||||
|
||||
rem Set output directory names for release binaries
|
||||
|
||||
if /i "11_1_054_x64"=="%1" set build_type=AMD64
|
||||
if /i "11_1_054"=="%1" set build_type=x86
|
||||
|
||||
if /i "DEFAULT"=="%3" (
|
||||
set build_opt=
|
||||
) else (
|
||||
set build_opt=_%3
|
||||
)
|
||||
|
||||
if /i "DEBUG"=="%4" (
|
||||
set build_opt=%build_opt%_DEBUG
|
||||
) else (
|
||||
set build_opt=%build_opt%
|
||||
)
|
||||
|
||||
set bin_wavfilter=wavfilter_%build_type%
|
||||
set bin_wavinfo=wavinfo_%build_type%
|
||||
set bin_wavrms=wavrms_%build_type%
|
||||
set bin_libaftendll=libaftendll_%build_type%%build_opt%
|
||||
set bin_aften=aften_%build_type%%build_opt%
|
||||
|
||||
rem Set base names for output binaries
|
||||
set name_lib=libaften
|
||||
set name_dll=libaften
|
||||
set name_exe=aften
|
||||
|
||||
rem
|
||||
rem PREPARE TOOLS
|
||||
rem
|
||||
|
||||
rem Set command-line tools paths used for builds
|
||||
set cmd_icl=icl.exe
|
||||
set cmd_xilib=xilib.exe
|
||||
set cmd_xilink=xilink.exe
|
||||
|
||||
rem
|
||||
rem PREPARE OPTIONS
|
||||
rem
|
||||
|
||||
rem Set Compiler common command-line options
|
||||
set opt_icl_cmn=/c /TC /nologo /W3
|
||||
|
||||
if /i "DEBUG"=="%4" (
|
||||
set opt_icl_cmn=%opt_icl_cmn% /MTd
|
||||
) else (
|
||||
set opt_icl_cmn=%opt_icl_cmn% /MT
|
||||
)
|
||||
|
||||
set opt_icl_cmn=%opt_icl_cmn% /I "./" /I "../" /I "../libaften" /I "../libaften/x86/" /I "../pcm/" /Fo"%out_path%/"
|
||||
|
||||
if /i "DEBUG"=="%4" (
|
||||
set opt_icl_cmn=%opt_icl_cmn% /D "_DEBUG"
|
||||
) else (
|
||||
set opt_icl_cmn=%opt_icl_cmn% /D "NDEBUG"
|
||||
)
|
||||
|
||||
set opt_icl_cmn=%opt_icl_cmn% /D "_CONSOLE" /D "_MBCS" /D "EMULATE_INTTYPES" /D "AFTEN_BUILD_LIBRARY" /D "MAX_NUM_THREADS=32" /D "HAVE_MM_MALLOC" /D "HAVE_CPU_CAPS_DETECTION" /D "HAVE_WINDOWS_THREADS" /D "_CRT_SECURE_NO_DEPRECATE"
|
||||
set opt_icl_cmn=%opt_icl_cmn% /Qwd177 /Qwd186 /Qwd188 /Qwd1478
|
||||
|
||||
if /i "11_1_054"=="%1" set opt_icl_cmn=%opt_icl_cmn% /Gd /D "WIN32"
|
||||
if /i "11_1_054_x64"=="%1" set opt_icl_cmn=%opt_icl_cmn% /D "WIN32" /D "WIN64"
|
||||
|
||||
rem Set Compiler optimization command-line options
|
||||
if /i "DEBUG"=="%4" (
|
||||
set opt_icl_opt=%opt_icl_cmn% /Od /ZI /RTC1
|
||||
) else (
|
||||
set opt_icl_opt=%opt_icl_cmn% /GA /Ox /Og /Ob1 /Ot
|
||||
)
|
||||
|
||||
if /i "11_1_054"=="%1" set opt_icl_opt=%opt_icl_opt% /Gd /Qipo4 /fp:fast /Qprec-div- /Qcomplex-limited-range /Qipo-jobs:8 /Qunroll-aggressive
|
||||
if /i "11_1_054_x64"=="%1" set opt_icl_opt=%opt_icl_opt% /Qipo4 /fp:fast /Qprec-div- /Qcomplex-limited-range /Qipo-jobs:8 /Qunroll-aggressive
|
||||
|
||||
set opt_icl_opt=%opt_icl_opt% /D "HAVE_MMX" /D "HAVE_SSE" /D "HAVE_SSE2" /D "HAVE_SSE3"
|
||||
|
||||
if /i "DEFAULT"=="%3" set opt_icl_opt=%opt_icl_opt% /G7
|
||||
if /i "SSE"=="%3" set opt_icl_opt=%opt_icl_opt% /G7 /arch:SSE
|
||||
if /i "SSE2"=="%3" set opt_icl_opt=%opt_icl_opt% /G7 /arch:SSE2
|
||||
if /i "SSE3"=="%3" set opt_icl_opt=%opt_icl_opt% /G7 /arch:SSE3
|
||||
|
||||
set opt_icl_mmx=/D "USE_MMX"
|
||||
set opt_icl_sse=/D "USE_MMX" /D "USE_SSE"
|
||||
set opt_icl_sse2=/D "USE_MMX" /D "USE_SSE" /D "USE_SSE2"
|
||||
set opt_icl_sse3=/D "USE_MMX" /D "USE_SSE" /D "USE_SSE2" /D "USE_SSE3"
|
||||
|
||||
rem Set Compiler PGO command-line options
|
||||
set opt_icl_pgo_gen=/Qprof-gen /Qprof_dir "%out_path%"
|
||||
set opt_icl_pgo_use=/Qprof_use /Qprof_dir "%out_path%"
|
||||
|
||||
set opt_icl_lib=/D "_LIB"
|
||||
set opt_icl_dll=/D "_WINDLL"
|
||||
|
||||
rem Set Library Manager command-line options
|
||||
set opt_xilib=/OUT:"%out_path%/%name_lib%.lib" /NOLOGO
|
||||
|
||||
rem Set Linker command-line options
|
||||
set opt_xilink=/NOLOGO /INCREMENTAL:NO /OPT:REF /OPT:ICF /TLBID:1
|
||||
|
||||
rem DEBUG!!!
|
||||
if /i "DEBUG"=="%4" set opt_xilink=%opt_xilink% /DEBUG
|
||||
|
||||
if /i "11_1_054"=="%1" set opt_xilink=%opt_xilink% /MACHINE:IX86
|
||||
if /i "11_1_054_x64"=="%1" set opt_xilink=%opt_xilink% /MACHINE:X64
|
||||
|
||||
set opt_xilink_exe=%opt_xilink% /OUT:"%out_path%/%name_exe%.exe" /SUBSYSTEM:CONSOLE "%out_path%\%name_lib%.lib"
|
||||
|
||||
set opt_xilink_dll=%opt_xilink% /OUT:"%out_path%/%name_dll%.dll" /DLL /IMPLIB:"%out_path%\%name_lib%.lib"
|
||||
|
||||
rem
|
||||
rem PREPARE SOURCES
|
||||
rem
|
||||
|
||||
rem Set libaften sources
|
||||
|
||||
set src_lib="../libaften/a52.c"
|
||||
set src_lib=%src_lib% "../libaften/a52enc.c"
|
||||
set src_lib=%src_lib% "../libaften/a52tab.c"
|
||||
set src_lib=%src_lib% "../libaften/bitalloc.c"
|
||||
set src_lib=%src_lib% "../libaften/bitio.c"
|
||||
set src_lib=%src_lib% "../libaften/convert.c"
|
||||
set src_lib=%src_lib% "../libaften/crc.c"
|
||||
set src_lib=%src_lib% "../libaften/dynrng.c"
|
||||
set src_lib=%src_lib% "../libaften/exponent.c"
|
||||
set src_lib=%src_lib% "../libaften/filter.c"
|
||||
set src_lib=%src_lib% "../libaften/mdct.c"
|
||||
set src_lib=%src_lib% "../libaften/util.c"
|
||||
set src_lib=%src_lib% "../libaften/window.c"
|
||||
set src_lib=%src_lib% "../libaften/x86/cpu_caps.c"
|
||||
|
||||
rem Set MMX optimized sources
|
||||
set src_lib_mmx="../libaften/x86/exponent_mmx.c"
|
||||
|
||||
rem Set SSE optimized sources
|
||||
set src_lib_sse="../libaften/x86/mdct_sse.c"
|
||||
set src_lib_sse=%src_lib_sse% "../libaften/x86/mdct_common_sse.c"
|
||||
set src_lib_sse=%src_lib_sse% "../libaften/x86/window_sse.c"
|
||||
|
||||
rem Set SSE2 optimized sources
|
||||
set src_lib_sse2="../libaften/x86/exponent_sse2.c"
|
||||
|
||||
rem Set SSE3 optimized sources
|
||||
set src_lib_sse3="../libaften/x86/mdct_sse3.c"
|
||||
|
||||
rem Set PCM sources
|
||||
set src_pcm="../pcm/aiff.c"
|
||||
set src_pcm=%src_pcm% "../pcm/byteio.c"
|
||||
set src_pcm=%src_pcm% "../pcm/caff.c"
|
||||
set src_pcm=%src_pcm% "../pcm/convert.c"
|
||||
set src_pcm=%src_pcm% "../pcm/formats.c"
|
||||
set src_pcm=%src_pcm% "../pcm/pcm.c"
|
||||
set src_pcm=%src_pcm% "../pcm/pcm_io.c"
|
||||
set src_pcm=%src_pcm% "../pcm/pcmfile.c"
|
||||
set src_pcm=%src_pcm% "../pcm/raw.c"
|
||||
set src_pcm=%src_pcm% "../pcm/wav.c"
|
||||
|
||||
rem Set Aften sources
|
||||
set src_exe="../aften/aften.c"
|
||||
set src_exe=%src_exe% "../aften/opts.c"
|
||||
set src_exe=%src_exe% %src_pcm%
|
||||
|
||||
rem
|
||||
rem PREPARE OBJECTS
|
||||
rem
|
||||
|
||||
rem Set libaften object files
|
||||
|
||||
set obj_lib="%out_path%/a52.obj"
|
||||
set obj_lib=%obj_lib% "%out_path%/a52enc.obj"
|
||||
set obj_lib=%obj_lib% "%out_path%/a52tab.obj"
|
||||
set obj_lib=%obj_lib% "%out_path%/bitalloc.obj"
|
||||
set obj_lib=%obj_lib% "%out_path%/bitio.obj"
|
||||
set obj_lib=%obj_lib% "%out_path%/convert.obj"
|
||||
set obj_lib=%obj_lib% "%out_path%/crc.obj"
|
||||
set obj_lib=%obj_lib% "%out_path%/dynrng.obj"
|
||||
set obj_lib=%obj_lib% "%out_path%/exponent.obj"
|
||||
set obj_lib=%obj_lib% "%out_path%/filter.obj"
|
||||
set obj_lib=%obj_lib% "%out_path%/mdct.obj"
|
||||
set obj_lib=%obj_lib% "%out_path%/util.obj"
|
||||
set obj_lib=%obj_lib% "%out_path%/window.obj"
|
||||
set obj_lib=%obj_lib% "%out_path%/cpu_caps.obj"
|
||||
|
||||
rem Set MMX object files
|
||||
set obj_lib_mmx=%obj_lib% "%out_path%/exponent_mmx.obj"
|
||||
|
||||
rem Set SSE object files
|
||||
set obj_lib_sse=%obj_lib_mmx% "%out_path%/mdct_sse.obj"
|
||||
set obj_lib_sse=%obj_lib_sse% "%out_path%/mdct_common_sse.obj"
|
||||
set obj_lib_sse=%obj_lib_sse% "%out_path%/window_sse.obj"
|
||||
|
||||
rem Set SSE2 object files
|
||||
set obj_lib_sse2=%obj_lib_sse% "%out_path%/exponent_sse2.obj"
|
||||
|
||||
rem Set SSE3 object files
|
||||
set obj_lib_sse3=%obj_lib_sse2% "%out_path%/mdct_sse3.obj"
|
||||
|
||||
rem Set PCM object files
|
||||
set obj_pcm="%out_path%/aiff.obj"
|
||||
set obj_pcm=%obj_pcm% "%out_path%/byteio.obj"
|
||||
set obj_pcm=%obj_pcm% "%out_path%/caff.obj"
|
||||
set obj_pcm=%obj_pcm% "%out_path%/convert.obj"
|
||||
set obj_pcm=%obj_pcm% "%out_path%/formats.obj"
|
||||
set obj_pcm=%obj_pcm% "%out_path%/pcm.obj"
|
||||
set obj_pcm=%obj_pcm% "%out_path%/pcm_io.obj"
|
||||
set obj_pcm=%obj_pcm% "%out_path%/pcmfile.obj"
|
||||
set obj_pcm=%obj_pcm% "%out_path%/raw.obj"
|
||||
set obj_pcm=%obj_pcm% "%out_path%/wav.obj"
|
||||
|
||||
rem Set Aften object files
|
||||
set obj_exe="%out_path%/aften.obj"
|
||||
set obj_exe=%obj_exe% "%out_path%/opts.obj"
|
||||
set obj_exe=%obj_exe% %obj_pcm%
|
||||
|
||||
rem
|
||||
rem CLEAN COMMANDS
|
||||
rem
|
||||
|
||||
set cmd_clean_pgo_gen=del /Q
|
||||
set cmd_clean_pgo_gen=%cmd_clean_pgo_gen% "%out_path%\*.obj"
|
||||
set cmd_clean_pgo_gen=%cmd_clean_pgo_gen% "%out_path%\%name_lib%.lib"
|
||||
set cmd_clean_pgo_gen=%cmd_clean_pgo_gen% "%out_path%\%name_exe%.exe"
|
||||
set cmd_clean_pgo_gen=%cmd_clean_pgo_gen% "%out_path%\%name_exe%.lib"
|
||||
set cmd_clean_pgo_gen=%cmd_clean_pgo_gen% "%out_path%\%name_exe%.exp"
|
||||
|
||||
set cmd_clean_pgo_use=del /Q
|
||||
set cmd_clean_pgo_use=%cmd_clean_pgo_use% "%out_path%\*.obj"
|
||||
set cmd_clean_pgo_use=%cmd_clean_pgo_use% "%out_path%\*.dpi"
|
||||
set cmd_clean_pgo_use=%cmd_clean_pgo_use% "%out_path%\*.dyn"
|
||||
set cmd_clean_pgo_use=%cmd_clean_pgo_use% "%out_path%\*.spi"
|
||||
set cmd_clean_pgo_use=%cmd_clean_pgo_use% "%out_path%\*.spl"
|
||||
set cmd_clean_pgo_use=%cmd_clean_pgo_use% "%out_path%\*.lock"
|
||||
|
||||
set cmd_clean_pgo_use_exe=%cmd_clean_pgo_use% "%out_path%\%name_lib%.lib"
|
||||
|
||||
rem
|
||||
rem SELECT OUTPUT BUILD
|
||||
rem
|
||||
|
||||
:make_output_path
|
||||
|
||||
rem Create output directory
|
||||
if not exist "%out_path%" mkdir "%out_path%"
|
||||
|
||||
rem Go to selected build configuration
|
||||
if /i "%2"=="" goto all_done
|
||||
goto %2
|
||||
|
||||
rem
|
||||
rem BUILD UTIL
|
||||
rem
|
||||
|
||||
:wavfilter
|
||||
|
||||
if not exist "%out_path%\%bin_wavfilter%\" mkdir "%out_path%\%bin_wavfilter%\"
|
||||
|
||||
%cmd_icl% %opt_icl_opt% /I "../util" /I "../aften/" /I "../pcm/" "../util/wavfilter.c" "../libaften/filter.c" %src_pcm%
|
||||
%cmd_xilink% %opt_xilink% /OUT:"%out_path%/wavfilter.exe" /SUBSYSTEM:CONSOLE "%out_path%/wavfilter.obj" "%out_path%/filter.obj" %obj_pcm%
|
||||
|
||||
del /Q "%out_path%\*.obj"
|
||||
move /Y "%out_path%\wavfilter.exe" "%out_path%\%bin_wavfilter%\"
|
||||
if /i "DEBUG"=="%4" move /Y "%out_path%\wavfilter.pdb" "%out_path%\%bin_wavfilter%\"
|
||||
|
||||
goto all_done
|
||||
|
||||
:wavinfo
|
||||
|
||||
if not exist "%out_path%\%bin_wavinfo%\" mkdir "%out_path%\%bin_wavinfo%\"
|
||||
|
||||
%cmd_icl%%opt_icl_opt% /I "../util" /I "../aften/" /I "../pcm/" "../util/wavinfo.c" %src_pcm%
|
||||
%cmd_xilink% %opt_xilink% /OUT:"%out_path%/wavinfo.exe" /SUBSYSTEM:CONSOLE "%out_path%/wavinfo.obj" %obj_pcm%
|
||||
|
||||
del /Q "%out_path%\*.obj"
|
||||
move /Y "%out_path%\wavinfo.exe" "%out_path%\%bin_wavinfo%\"
|
||||
if /i "DEBUG"=="%4" move /Y "%out_path%\wavinfo.pdb" "%out_path%\%bin_wavinfo%\"
|
||||
|
||||
goto all_done
|
||||
|
||||
:wavrms
|
||||
|
||||
if not exist "%out_path%\%bin_wavrms%\" mkdir "%out_path%\%bin_wavrms%\"
|
||||
|
||||
%cmd_icl% %opt_icl_opt% /I "../util" /I "../aften/" /I "../pcm/" "../util/wavrms.c" %src_pcm%
|
||||
%cmd_xilink% %opt_xilink% /OUT:"%out_path%/wavrms.exe" /SUBSYSTEM:CONSOLE "%out_path%/wavrms.obj" %obj_pcm%
|
||||
|
||||
del /Q "%out_path%\*.obj"
|
||||
move /Y "%out_path%\wavrms.exe" "%out_path%\%bin_wavrms%\"
|
||||
if /i "DEBUG"=="%4" move /Y "%out_path%\wavrms.pdb" "%out_path%\%bin_wavrms%\"
|
||||
|
||||
goto all_done
|
||||
|
||||
rem
|
||||
rem BUILD LIBAFTEN.DLL
|
||||
rem
|
||||
|
||||
:libaftendll
|
||||
|
||||
if not exist "%out_path%\%bin_libaftendll%\" mkdir "%out_path%\%bin_libaftendll%\"
|
||||
|
||||
%cmd_icl% %opt_icl_opt% %opt_icl_pgo_gen% %src_lib% %opt_icl_dll%
|
||||
%cmd_icl% %opt_icl_opt% %opt_icl_mmx% %opt_icl_pgo_gen% %src_lib_mmx% %opt_icl_lib%
|
||||
%cmd_icl% %opt_icl_opt% %opt_icl_sse% %opt_icl_pgo_gen% %src_lib_sse% %opt_icl_lib%
|
||||
%cmd_icl% %opt_icl_opt% %opt_icl_sse2% %opt_icl_pgo_gen% %src_lib_sse2% %opt_icl_lib%
|
||||
%cmd_icl% %opt_icl_opt% %opt_icl_sse3% %opt_icl_pgo_gen% %src_lib_sse3% %opt_icl_lib%
|
||||
%cmd_xilink% %opt_xilink_dll% %obj_lib_sse3%
|
||||
%cmd_icl% %opt_icl_opt% %opt_icl_pgo_gen% %src_exe%
|
||||
%cmd_xilink% %opt_xilink_exe% %obj_exe%
|
||||
|
||||
@call feedback.cmd "%out_path%\%name_exe%.exe"
|
||||
|
||||
%cmd_clean_pgo_gen%
|
||||
|
||||
%cmd_icl% %opt_icl_opt% %opt_icl_pgo_use% %src_lib% %opt_icl_dll%
|
||||
%cmd_icl% %opt_icl_opt% %opt_icl_mmx% %opt_icl_pgo_use% %src_lib_mmx% %opt_icl_lib%
|
||||
%cmd_icl% %opt_icl_opt% %opt_icl_sse% %opt_icl_pgo_use% %src_lib_sse% %opt_icl_lib%
|
||||
%cmd_icl% %opt_icl_opt% %opt_icl_sse2% %opt_icl_pgo_use% %src_lib_sse2% %opt_icl_lib%
|
||||
%cmd_icl% %opt_icl_opt% %opt_icl_sse3% %opt_icl_pgo_use% %src_lib_sse3% %opt_icl_lib%
|
||||
%cmd_xilink% %opt_xilink_dll% %obj_lib_sse3%
|
||||
%cmd_icl% %opt_icl_opt% %opt_icl_pgo_use% %src_exe%
|
||||
%cmd_xilink% %opt_xilink_exe% %obj_exe%
|
||||
|
||||
%cmd_clean_pgo_use%
|
||||
|
||||
move /Y "%out_path%\%name_dll%.dll" "%out_path%\%bin_libaftendll%\"
|
||||
move /Y "%out_path%\%name_dll%.lib" "%out_path%\%bin_libaftendll%\"
|
||||
move /Y "%out_path%\%name_dll%.exp" "%out_path%\%bin_libaftendll%\"
|
||||
move /Y "%out_path%\%name_exe%.exe" "%out_path%\%bin_libaftendll%\"
|
||||
if /i "DEBUG"=="%4" move /Y "%out_path%\%name_dll%.pdb" "%out_path%\%bin_libaftendll%\"
|
||||
if /i "DEBUG"=="%4" move /Y "%out_path%\%name_exe%.pdb" "%out_path%\%bin_libaftendll%\"
|
||||
|
||||
goto all_done
|
||||
|
||||
rem
|
||||
rem BUILD AFTEN.EXE
|
||||
rem
|
||||
|
||||
:aften
|
||||
|
||||
if not exist "%out_path%\%bin_aften%\" mkdir "%out_path%\%bin_aften%\"
|
||||
|
||||
%cmd_icl% %opt_icl_opt% %opt_icl_pgo_gen% %src_lib% %opt_icl_lib%
|
||||
%cmd_icl% %opt_icl_opt% %opt_icl_mmx% %opt_icl_pgo_gen% %src_lib_mmx% %opt_icl_lib%
|
||||
%cmd_icl% %opt_icl_opt% %opt_icl_sse% %opt_icl_pgo_gen% %src_lib_sse% %opt_icl_lib%
|
||||
%cmd_icl% %opt_icl_opt% %opt_icl_sse2% %opt_icl_pgo_gen% %src_lib_sse2% %opt_icl_lib%
|
||||
%cmd_icl% %opt_icl_opt% %opt_icl_sse3% %opt_icl_pgo_gen% %src_lib_sse3% %opt_icl_lib%
|
||||
%cmd_xilib% %opt_xilib% %obj_lib_sse3%
|
||||
%cmd_icl% %opt_icl_opt% %opt_icl_pgo_gen% %src_exe%
|
||||
%cmd_xilink% %opt_xilink_exe% %obj_exe%
|
||||
|
||||
@call feedback.cmd "%out_path%\%name_exe%.exe"
|
||||
|
||||
%cmd_clean_pgo_gen%
|
||||
|
||||
%cmd_icl% %opt_icl_opt% %opt_icl_pgo_use% %src_lib% %opt_icl_lib%
|
||||
%cmd_icl% %opt_icl_opt% %opt_icl_mmx% %opt_icl_pgo_use% %src_lib_mmx% %opt_icl_lib%
|
||||
%cmd_icl% %opt_icl_opt% %opt_icl_sse% %opt_icl_pgo_use% %src_lib_sse% %opt_icl_lib%
|
||||
%cmd_icl% %opt_icl_opt% %opt_icl_sse2% %opt_icl_pgo_use% %src_lib_sse2% %opt_icl_lib%
|
||||
%cmd_icl% %opt_icl_opt% %opt_icl_sse3% %opt_icl_pgo_use% %src_lib_sse3% %opt_icl_lib%
|
||||
%cmd_xilib% %opt_xilib% %obj_lib_sse3%
|
||||
%cmd_icl% %opt_icl_opt% %opt_icl_pgo_use% %src_exe%
|
||||
%cmd_xilink% %opt_xilink_exe% %obj_exe%
|
||||
|
||||
%cmd_clean_pgo_use_exe%
|
||||
|
||||
move /Y "%out_path%\%name_exe%.lib" "%out_path%\%bin_aften%\"
|
||||
move /Y "%out_path%\%name_exe%.exp" "%out_path%\%bin_aften%\"
|
||||
move /Y "%out_path%\%name_exe%.exe" "%out_path%\%bin_aften%\"
|
||||
if /i "DEBUG"=="%4" move /Y "%out_path%\%name_exe%.pdb" "%out_path%\%bin_aften%\"
|
||||
|
||||
goto all_done
|
||||
|
||||
:all_done
|
||||
|
||||
endlocal
|
|
@ -0,0 +1,32 @@
|
|||
@echo off
|
||||
setlocal
|
||||
|
||||
rem Win32 builds
|
||||
rem Available Intel C++ Compiler versions: 11_1_054
|
||||
|
||||
set icl_version=11_1_054
|
||||
set OutPath=output
|
||||
|
||||
@call build_intel.cmd %icl_version% wavfilter DEFAULT DEBUG
|
||||
@call build_intel.cmd %icl_version% wavinfo DEFAULT DEBUG
|
||||
@call build_intel.cmd %icl_version% wavrms DEFAULT DEBUG
|
||||
|
||||
@call build_intel.cmd %icl_version% libaftendll DEFAULT DEBUG
|
||||
@call build_intel.cmd %icl_version% libaftendll SSE DEBUG
|
||||
@call build_intel.cmd %icl_version% libaftendll SSE2 DEBUG
|
||||
@call build_intel.cmd %icl_version% libaftendll SSE3 DEBUG
|
||||
|
||||
@call build_intel.cmd %icl_version% aften DEFAULT DEBUG
|
||||
@call build_intel.cmd %icl_version% aften SSE DEBUG
|
||||
@call build_intel.cmd %icl_version% aften SSE2 DEBUG
|
||||
@call build_intel.cmd %icl_version% aften SSE3 DEBUG
|
||||
|
||||
rem Copy additional files for binary package
|
||||
copy /Y ..\libaften\aften.h %OutPath%
|
||||
copy /Y ..\COPYING %OutPath%
|
||||
copy /Y "help\*.txt" %OutPath%
|
||||
|
||||
:build_done
|
||||
|
||||
endlocal
|
||||
pause
|
|
@ -0,0 +1,32 @@
|
|||
@echo off
|
||||
setlocal
|
||||
|
||||
rem Win32 builds
|
||||
rem Available Intel C++ Compiler versions: 11_1_054
|
||||
|
||||
set icl_version=11_1_054
|
||||
set OutPath=output
|
||||
|
||||
@call build_intel.cmd %icl_version% wavfilter DEFAULT
|
||||
@call build_intel.cmd %icl_version% wavinfo DEFAULT
|
||||
@call build_intel.cmd %icl_version% wavrms DEFAULT
|
||||
|
||||
@call build_intel.cmd %icl_version% libaftendll DEFAULT
|
||||
@call build_intel.cmd %icl_version% libaftendll SSE
|
||||
@call build_intel.cmd %icl_version% libaftendll SSE2
|
||||
@call build_intel.cmd %icl_version% libaftendll SSE3
|
||||
|
||||
@call build_intel.cmd %icl_version% aften DEFAULT
|
||||
@call build_intel.cmd %icl_version% aften SSE
|
||||
@call build_intel.cmd %icl_version% aften SSE2
|
||||
@call build_intel.cmd %icl_version% aften SSE3
|
||||
|
||||
rem Copy additional files for binary package
|
||||
copy /Y ..\libaften\aften.h %OutPath%
|
||||
copy /Y ..\COPYING %OutPath%
|
||||
copy /Y "help\*.txt" %OutPath%
|
||||
|
||||
:build_done
|
||||
|
||||
endlocal
|
||||
pause
|
|
@ -0,0 +1,30 @@
|
|||
@echo off
|
||||
setlocal
|
||||
|
||||
rem Win64 builds
|
||||
rem Available Intel C++ Compiler versions: 11_1_054_x64
|
||||
|
||||
set icl_version=11_1_054_x64
|
||||
set OutPath=output
|
||||
|
||||
@call build_intel.cmd %icl_version% wavfilter DEFAULT DEBUG
|
||||
@call build_intel.cmd %icl_version% wavinfo DEFAULT DEBUG
|
||||
@call build_intel.cmd %icl_version% wavrms DEFAULT DEBUG
|
||||
|
||||
@call build_intel.cmd %icl_version% libaftendll DEFAULT DEBUG
|
||||
@call build_intel.cmd %icl_version% libaftendll SSE2 DEBUG
|
||||
@call build_intel.cmd %icl_version% libaftendll SSE3 DEBUG
|
||||
|
||||
@call build_intel.cmd %icl_version% aften DEFAULT DEBUG
|
||||
@call build_intel.cmd %icl_version% aften SSE2 DEBUG
|
||||
@call build_intel.cmd %icl_version% aften SSE3 DEBUG
|
||||
|
||||
rem Copy additional files for binary package
|
||||
copy /Y ..\libaften\aften.h %OutPath%
|
||||
copy /Y ..\COPYING %OutPath%
|
||||
copy /Y "help\*.txt" %OutPath%
|
||||
|
||||
:build_done
|
||||
|
||||
endlocal
|
||||
pause
|
|
@ -0,0 +1,30 @@
|
|||
@echo off
|
||||
setlocal
|
||||
|
||||
rem Win64 builds
|
||||
rem Available Intel C++ Compiler versions: 11_1_054_x64
|
||||
|
||||
set icl_version=11_1_054_x64
|
||||
set OutPath=output
|
||||
|
||||
@call build_intel.cmd %icl_version% wavfilter DEFAULT
|
||||
@call build_intel.cmd %icl_version% wavinfo DEFAULT
|
||||
@call build_intel.cmd %icl_version% wavrms DEFAULT
|
||||
|
||||
@call build_intel.cmd %icl_version% libaftendll DEFAULT
|
||||
@call build_intel.cmd %icl_version% libaftendll SSE2
|
||||
@call build_intel.cmd %icl_version% libaftendll SSE3
|
||||
|
||||
@call build_intel.cmd %icl_version% aften DEFAULT
|
||||
@call build_intel.cmd %icl_version% aften SSE2
|
||||
@call build_intel.cmd %icl_version% aften SSE3
|
||||
|
||||
rem Copy additional files for binary package
|
||||
copy /Y ..\libaften\aften.h %OutPath%
|
||||
copy /Y ..\COPYING %OutPath%
|
||||
copy /Y "help\*.txt" %OutPath%
|
||||
|
||||
:build_done
|
||||
|
||||
endlocal
|
||||
pause
|
|
@ -0,0 +1,24 @@
|
|||
@echo off
|
||||
setlocal
|
||||
|
||||
rem Currently using this wave file:
|
||||
rem http://www-mmsp.ece.mcgill.ca/Documents/AudioFormats/WAVE/Samples/Microsoft/6_Channel_ID.wav
|
||||
rem Mono WAV files are extracted from 6_Channel_ID.wav WAV file
|
||||
|
||||
set WavFiles=c:\DOWNLOADS\DOCS\DEV\WAV
|
||||
set WavFiles_Mono=c:\DOWNLOADS\DOCS\DEV\WAV\MONO
|
||||
|
||||
set EncoderExe=%1
|
||||
set EncoderOptions=feedback.txt
|
||||
set OutputFile=temp.ac3
|
||||
|
||||
FOR /F "tokens=*" %%i IN (%EncoderOptions%) DO (
|
||||
echo [ Multi channel input WAV, used encoder options: %%i ]
|
||||
%EncoderExe% %%i "%WavFiles%\6_Channel_ID.wav" "%OutputFile%"
|
||||
del "%OutputFile%"
|
||||
echo [ Multi mono input WAV, used encoder options: %%i ]
|
||||
%EncoderExe% %%i -ch_fl "%WavFiles_Mono%\FL.wav" -ch_fr "%WavFiles_Mono%\FR.wav" -ch_fc "%WavFiles_Mono%\C.wav" -ch_lfe "%WavFiles_Mono%\LFE.wav" -ch_sl "%WavFiles_Mono%\SL.wav" -ch_sr "%WavFiles_Mono%\SR.wav" "%OutputFile%"
|
||||
del "%OutputFile%"
|
||||
)
|
||||
|
||||
endlocal
|
|
@ -0,0 +1,17 @@
|
|||
-threads 1
|
||||
-threads 2
|
||||
-fba 1
|
||||
-fba 1 -exps 32
|
||||
-exps 1
|
||||
-exps 32
|
||||
-s 1
|
||||
-q 240
|
||||
-q 240 -fba 1
|
||||
-q 240 -exps 32
|
||||
-q 240 -fba 1 -exps 32
|
||||
-q 240 -fba 1 -exps 1
|
||||
-q 240 -s 1
|
||||
-nosimd sse3
|
||||
-nosimd sse2,sse3
|
||||
-nosimd sse,sse2,sse3
|
||||
-nosimd mmx,sse,sse2,sse3
|
|
@ -0,0 +1,149 @@
|
|||
|
||||
Aften: A/52 audio encoder
|
||||
Version git
|
||||
(c) 2006-2009 Justin Ruggles, Prakash Punnoor, et al.
|
||||
|
||||
usage: aften [options] <input.wav> <output.ac3>
|
||||
options:
|
||||
[-h] Print out list of commandline options
|
||||
[-longhelp] Print out commandline option details
|
||||
[-version] Print out the build version
|
||||
[-v #] Verbosity (controls output to console)
|
||||
0 = quiet mode
|
||||
1 = show average stats (default)
|
||||
2 = show each frame's stats
|
||||
[-threads #] Number of parallel threads to use
|
||||
0 = detect number of CPUs (default)
|
||||
[-nosimd X] Comma-separated list of SIMD instruction sets not to use
|
||||
Available sets are mmx, sse, sse2, sse3 and altivec.
|
||||
No spaces are allowed between the sets and the commas.
|
||||
[-b #] CBR bitrate in kbps (default: about 96kbps per channel)
|
||||
[-q #] VBR quality [0 - 1023] (default: 240)
|
||||
[-fba #] Fast bit allocation (default: 0)
|
||||
0 = more accurate encoding
|
||||
1 = faster encoding
|
||||
[-exps #] Exponent strategy search size (default: 8)
|
||||
1 to 32 (lower is faster, higher is better quality)
|
||||
[-pad #] Start-of-stream padding
|
||||
0 = no padding
|
||||
1 = 256 samples of padding (default)
|
||||
[-w #] Bandwidth
|
||||
0 to 60 = fixed bandwidth (28%-99% of full bandwidth)
|
||||
-1 = fixed adaptive bandwidth (default)
|
||||
-2 = variable adaptive bandwidth
|
||||
[-wmin #] Minimum bandwidth [0 - 60] (default: 0)
|
||||
[-wmax #] Maximum bandwidth [0 - 60] (default: 60)
|
||||
[-m #] Stereo rematrixing
|
||||
0 = independent L+R channels
|
||||
1 = mid/side rematrixing (default)
|
||||
[-s #] Block switching
|
||||
0 = use only 512-point MDCT (default)
|
||||
1 = selectively use 256-point MDCT
|
||||
[-cmix #] Center mix level
|
||||
0 = -3.0 dB (default)
|
||||
1 = -4.5 dB
|
||||
2 = -6.0 dB
|
||||
[-smix #] Surround mix level
|
||||
0 = -3 dB (default)
|
||||
1 = -6 dB
|
||||
2 = 0
|
||||
[-dsur #] Dolby Surround mode
|
||||
0 = not indicated (default)
|
||||
1 = not Dolby surround encoded
|
||||
2 = Dolby surround encoded
|
||||
[-dnorm #] Dialog normalization [0 - 31] (default: 31)
|
||||
[-dynrng #] Dynamic Range Compression profile
|
||||
0 = Film Light
|
||||
1 = Film Standard
|
||||
2 = Music Light
|
||||
3 = Music Standard
|
||||
4 = Speech
|
||||
5 = None (default)
|
||||
[-acmod #] Audio coding mode (overrides wav header)
|
||||
0 = 1+1 (Ch1,Ch2)
|
||||
1 = 1/0 (C)
|
||||
2 = 2/0 (L,R)
|
||||
3 = 3/0 (L,R,C)
|
||||
4 = 2/1 (L,R,S)
|
||||
5 = 3/1 (L,R,C,S)
|
||||
6 = 2/2 (L,R,SL,SR)
|
||||
7 = 3/2 (L,R,C,SL,SR)
|
||||
[-lfe #] Specify use of LFE channel (overrides wav header)
|
||||
0 = LFE channel is not present
|
||||
1 = LFE channel is present
|
||||
[-chconfig X] Specify channel configuration (overrides wav header)
|
||||
1+1 = (Ch1,Ch2)
|
||||
1/0 = (C)
|
||||
2/0 = (L,R)
|
||||
3/0 = (L,R,C)
|
||||
2/1 = (L,R,S)
|
||||
3/1 = (L,R,C,S)
|
||||
2/2 = (L,R,SL,SR)
|
||||
3/2 = (L,R,C,SL,SR)
|
||||
adding "+LFE" indicates use of the LFE channel
|
||||
[-ch_X file] Add a mono file to the input list as the channel specified
|
||||
ch_fl = Front Left
|
||||
ch_fc = Front Center
|
||||
ch_fr = Front Right
|
||||
ch_sl = Surround Left
|
||||
ch_s = Surround
|
||||
ch_sr = Surround Right
|
||||
ch_m1 = Dual Mono Channel 1
|
||||
ch_m2 = Dual Mono Channel 2
|
||||
ch_lfe = LFE
|
||||
[-raw_fmt X] Raw audio input sample format (default: s16_le)
|
||||
One of the pre-defined sample formats:
|
||||
u8, s8, s16_le, s16_be, s20_le, s20_be, s24_le, s24_be,
|
||||
s32_le, s32_be, float_le, float_be, double_le, double_be
|
||||
[-raw_sr #] Raw audio input sample rate (default: 48000)
|
||||
[-raw_ch #] Raw audio input channels (default: 1)
|
||||
[-chmap #] Channel mapping order of input audio
|
||||
0 = WAVE mapping (default)
|
||||
1 = AC-3 mapping
|
||||
2 = MPEG mapping
|
||||
[-readtoeof #] Read input WAVE audio data until the end-of-file
|
||||
0 = use data size in header (default)
|
||||
1 = read data until end-of-file
|
||||
[-bwfilter #] Specify use of the bandwidth low-pass filter
|
||||
0 = do not apply filter (default)
|
||||
1 = apply filter
|
||||
[-dcfilter #] Specify use of the DC high-pass filter
|
||||
0 = do not apply filter (default)
|
||||
1 = apply filter
|
||||
[-lfefilter #] Specify use of the LFE low-pass filter
|
||||
0 = do not apply filter (default)
|
||||
1 = apply filter
|
||||
[-xbsi1 #] Specify use of extended bitstream info 1
|
||||
0 = do not write xbsi1
|
||||
1 = write xbsi1
|
||||
[-dmixmod #] Preferred stereo downmix mode
|
||||
0 = not indicated (default)
|
||||
1 = Lt/Rt downmix preferred
|
||||
2 = Lo/Ro downmix preferred
|
||||
[-ltrtcmix #] Lt/Rt center mix level
|
||||
[-ltrtsmix #] Lt/Rt surround mix level
|
||||
[-lorocmix #] Lo/Ro center mix level
|
||||
[-lorosmix #] Lo/Ro surround mix level
|
||||
0 = +3.0 dB
|
||||
1 = +1.5 dB
|
||||
2 = 0.0 dB
|
||||
3 = -1.5 dB
|
||||
4 = -3.0 dB (default)
|
||||
5 = -4.5 dB
|
||||
6 = -6.0 dB
|
||||
7 = -inf dB
|
||||
[-xbsi2 #] Specify use of extended bitstream info 2
|
||||
0 = do not write xbsi2
|
||||
1 = write xbsi2
|
||||
[-dsurexmod #] Dolby Surround EX mode
|
||||
0 = not indicated (default)
|
||||
1 = Not Dolby Surround EX encoded
|
||||
2 = Dolby Surround EX encoded
|
||||
[-dheadphon #] Dolby Headphone mode
|
||||
0 = not indicated (default)
|
||||
1 = Not Dolby Headphone encoded
|
||||
2 = Dolby Headphone encoded
|
||||
[-adconvtyp #] A/D converter type
|
||||
0 = Standard (default)
|
||||
1 = HDCD
|
||||
|
|
@ -0,0 +1,386 @@
|
|||
|
||||
Aften: A/52 audio encoder
|
||||
Version git
|
||||
(c) 2006-2009 Justin Ruggles, Prakash Punnoor, et al.
|
||||
|
||||
usage: aften [options] <input.wav> <output.ac3>
|
||||
options:
|
||||
|
||||
CONSOLE OUTPUT OPTIONS
|
||||
|
||||
[-h] Print out list of commandline options.
|
||||
|
||||
[-longhelp] Print out commandline option details.
|
||||
|
||||
[-version] Print out the build version.
|
||||
|
||||
[-v #] Verbosity
|
||||
This controls the level of console output to stderr.
|
||||
0 - Quiet Mode. No output to stderr.
|
||||
1 - Shows a running average of encoding statistics.
|
||||
This is the default setting.
|
||||
2 - Shows the statistics for each frame.
|
||||
|
||||
ENCODING OPTIONS
|
||||
|
||||
[-threads #] Number of threads
|
||||
Aften can use multiple threads to speed up encoding.
|
||||
By default, Aften uses one thread for each logical CPU
|
||||
your system has, but you can override this value. A
|
||||
value of 0 is the default and indicates that Aften
|
||||
should try to detect the number of CPUs.
|
||||
|
||||
[-nosimd X] Comma-separated list of SIMD instruction sets not to use
|
||||
Aften will auto-detect available SIMD instruction sets
|
||||
for your CPU, so you shouldn't need to disable sets
|
||||
explicitly - unless for speed or debugging reasons.
|
||||
Available sets are mmx, sse, sse2, sse3 and altivec.
|
||||
No spaces are allowed between the sets and the commas.
|
||||
Example: -nosimd sse2,sse3
|
||||
|
||||
[-b #] CBR bitrate in kbps
|
||||
CBR mode is selected by default. This option allows for
|
||||
setting the fixed bitrate. The default bitrate depends
|
||||
on the number of channels (not including LFE).
|
||||
mono = 96 kbps
|
||||
stereo = 192 kbps
|
||||
3-channel = 256 kbps
|
||||
4-channel = 384 kbps
|
||||
5-channel = 448 kbps
|
||||
|
||||
[-q #] VBR quality
|
||||
A value 0 to 1023 which corresponds to SNR offset, where
|
||||
q=240 equates to an SNR offset of 0. 240 is the default
|
||||
value. This scale will most likely be replaced in the
|
||||
future with a better quality measurement.
|
||||
|
||||
[-fba #] Fast bit allocation
|
||||
Fast bit allocation is a less-accurate search method
|
||||
for CBR bit allocation. It only narrows down the SNR
|
||||
value to within 16 of the optimal value. The result
|
||||
is lower overall quality, but faster encoding. This
|
||||
may not give the same results each time when using
|
||||
parallel encoding.
|
||||
|
||||
[-exps #] Exponent strategy search size
|
||||
The encoder determines the best combination of
|
||||
exponent strategies for a frame by searching through
|
||||
a list of pre-defined exponent strategies. This option
|
||||
controls the size of the list to be searched. The
|
||||
value can range from 1 (lower quality but faster) to
|
||||
32 (higher quality but slower). The default value is 8.
|
||||
|
||||
[-pad #] Start-of-stream padding
|
||||
The AC-3 format uses an overlap/add cycle for encoding
|
||||
each block. By default, Aften pads the delay buffer
|
||||
with a block of silence to avoid inaccurate encoding
|
||||
of the first frame of audio. If this behavior is not
|
||||
wanted, it can be disabled. The pad value can be a
|
||||
1 (default) to use padding or 0 to not use padding.
|
||||
|
||||
[-w #] Bandwidth
|
||||
The bandwidth setting corresponds to the high-frequency
|
||||
cutoff. Specifically, it sets the highest frequency bin
|
||||
which is encoded. The AC-3 format uses a 512-point MDCT
|
||||
which gives 256 frequency levels from 0 to 1/2 of the
|
||||
samplerate. The formula to give the number of coded
|
||||
frequency bins from bandwidth setting is:
|
||||
(w * 3) + 73, which gives a range of 73 to 253
|
||||
I hope to replace this setting with one where the user
|
||||
specifies the actual cutoff frequency rather than the
|
||||
bandwidth code.
|
||||
There are 2 special values, -1 and -2.
|
||||
When -1 is used, Aften automatically selects what
|
||||
it thinks is an appropriate bandwidth. This is the
|
||||
default setting.
|
||||
When -2 is used, a bandwidth is chosen for each frame
|
||||
based on CBR frame size and a target quality of 240.
|
||||
Variable bandwidth cannot be used with VBR mode.
|
||||
|
||||
[-wmin #] Minimum bandwidth
|
||||
For variable bandwidth mode (-2), this option sets the
|
||||
minimum value for the bandwidth code. This allows the
|
||||
user to avoid a harsh cutoff frequency by sacrificing
|
||||
general audio quality. The default value is 0.
|
||||
|
||||
[-wmax #] Maximum bandwidth
|
||||
For variable bandwidth mode (-2), this option sets the
|
||||
maximum value for the bandwidth code. This can be used
|
||||
to speed up encoding by using a lower value than 60,
|
||||
which is the default.
|
||||
|
||||
[-m #] Stereo rematrixing
|
||||
Using stereo rematrixing can increase quality by
|
||||
removing redundant information between the left and
|
||||
right channels. This technique is common in audio
|
||||
encoding, and is sometimes called mid/side encoding.
|
||||
When this setting is turned on, Aften adaptively turns
|
||||
rematrixing on or off for each of 4 frequency bands for
|
||||
each block. When this setting is turned off,
|
||||
rematrixing is not used for any blocks. The default
|
||||
value is 1.
|
||||
|
||||
[-s #] Block switching
|
||||
The AC-3 format allows for 2 different types of MDCT
|
||||
transformations to translate from time-domain to
|
||||
frequency-domain. The default is a 512-point transform,
|
||||
which gives better frequency resolution. There is also
|
||||
a 256-point transform, which gives better time
|
||||
resolution. The specification gives a suggested method
|
||||
for determining when to use the 256-point transform.
|
||||
When block switching is turned on, Aften uses the spec
|
||||
method for selecting the 256-point MDCT. When it is
|
||||
turned off, only the 512-point MDCT is used, which is
|
||||
faster. Block switching is turned off by default.
|
||||
|
||||
BITSTREAM INFO METADATA
|
||||
|
||||
[-cmix #] Center mix level
|
||||
When three front channels are in use, this code
|
||||
indicates the nominal down mix level of the center
|
||||
channel with respect to the left and right channels.
|
||||
0 = -3.0 dB (default)
|
||||
1 = -4.5 dB
|
||||
2 = -6.0 dB
|
||||
|
||||
[-smix #] Surround mix level
|
||||
If surround channels are in use, this code indicates
|
||||
the nominal down mix level of the surround channels.
|
||||
0 = -3 dB (default)
|
||||
1 = -6 dB
|
||||
2 = 0
|
||||
|
||||
[-dsur #] Dolby Surround mode
|
||||
When operating in the two channel mode, this code
|
||||
indicates whether or not the program has been encoded in
|
||||
Dolby Surround. This information is not used by the
|
||||
AC-3 decoder, but may be used by other portions of the
|
||||
audio reproduction equipment.
|
||||
0 = not indicated (default)
|
||||
1 = not Dolby surround encoded
|
||||
2 = Dolby surround encoded
|
||||
|
||||
DYNAMIC RANGE COMPRESSION AND DIALOG NORMALIZATION
|
||||
|
||||
[-dynrng #] Dynamic Range Compression profile
|
||||
Dynamic Range Compression allows for the final output
|
||||
dynamic range to be limited without sacrificing quality.
|
||||
The full dynamic range audio is still encoded, but a
|
||||
code is given for each block which tells the decoder to
|
||||
adjust the output volume for that block. The encoder
|
||||
must analyze the input audio to determine the best way
|
||||
to compress the dynamic range based on the loudness and
|
||||
type of input (film, music, speech).
|
||||
0 = Film Light
|
||||
1 = Film Standard
|
||||
2 = Music Light
|
||||
3 = Music Standard
|
||||
4 = Speech
|
||||
5 = None (default)
|
||||
|
||||
[-dnorm #] Dialog normalization [0 - 31] (default: 31)
|
||||
The dialog normalization value sets the average dialog
|
||||
level. The value is typically constant for a particular
|
||||
audio program. The decoder has a target output dialog
|
||||
level of -31dB, so if the dialog level is specified as
|
||||
being -31dB already (default), the output volume is not
|
||||
altered. Otherwise, the overall output volume is
|
||||
decreased so that the dialog level is adjusted down to
|
||||
-31dB.
|
||||
|
||||
INPUT OPTIONS
|
||||
|
||||
By default, information about the input file, such as the channel
|
||||
configuration and data size, is determined by the input file wav header.
|
||||
However, the basic WAVE format is limited in that it can only support
|
||||
up to 4 GB of data and cannot specify all channel layouts possible in the
|
||||
AC-3 format. The acmod, lfe, and chconfig options allow the user to
|
||||
explicitly select the desired channel layout. This only controls the
|
||||
interpretation of the input, so no downmixing or upmixing is done. The
|
||||
readtoeof option overrides the header and lets the user specify that Aften
|
||||
should keep reading data until the end-of-file.
|
||||
|
||||
[-acmod #] Audio coding mode (overrides wav header)
|
||||
0 = 1+1 (Ch1,Ch2)
|
||||
1 = 1/0 (C)
|
||||
2 = 2/0 (L,R)
|
||||
3 = 3/0 (L,R,C)
|
||||
4 = 2/1 (L,R,S)
|
||||
5 = 3/1 (L,R,C,S)
|
||||
6 = 2/2 (L,R,SL,SR)
|
||||
7 = 3/2 (L,R,C,SL,SR)
|
||||
|
||||
[-lfe #] Specify use of LFE channel (overrides wav header)
|
||||
0 = LFE channel is not present
|
||||
1 = LFE channel is present
|
||||
|
||||
[-chconfig X] Specify channel configuration (overrides wav header)
|
||||
1+1 = (Ch1,Ch2)
|
||||
1/0 = (C)
|
||||
2/0 = (L,R)
|
||||
3/0 = (L,R,C)
|
||||
2/1 = (L,R,S)
|
||||
3/1 = (L,R,C,S)
|
||||
2/2 = (L,R,SL,SR)
|
||||
3/2 = (L,R,C,SL,SR)
|
||||
adding "+LFE" indicates use of the LFE channel
|
||||
|
||||
[-ch_X file] Add a mono file to the input list as the channel specified
|
||||
These parameters are used to specify multiple mono
|
||||
source files instead of a single multi-channel source
|
||||
file. Only valid AC-3 combinations are allowed. The
|
||||
acmod, lfe, chconfig, and chmap parameters are all
|
||||
ignored if multi-mono inputs are used.
|
||||
ch_fl = Front Left
|
||||
ch_fc = Front Center
|
||||
ch_fr = Front Right
|
||||
ch_sl = Surround Left
|
||||
ch_s = Surround
|
||||
ch_sr = Surround Right
|
||||
ch_m1 = Dual Mono Channel 1
|
||||
ch_m2 = Dual Mono Channel 2
|
||||
ch_lfe = LFE
|
||||
|
||||
[-raw_fmt X] Raw audio input sample format (default: s16_le)
|
||||
This options specifies the sample format when using
|
||||
raw audio input. Using this option forces Aften to
|
||||
treat the input as raw audio. The choices for the
|
||||
pre-defined sample formats are:
|
||||
u8, s8, s16_le, s16_be, s20_le, s20_be, s24_le, s24_be,
|
||||
s32_le, s32_be, float_le, float_be, double_le, double_be
|
||||
|
||||
[-raw_sr #] Raw audio input sample rate (default: 48000)
|
||||
Using this option forces Aften to treat the input as
|
||||
raw audio.
|
||||
|
||||
[-raw_ch #] Raw audio input channels (default: 1)
|
||||
Using this option forces Aften to treat the input as
|
||||
raw audio.
|
||||
|
||||
[-chmap #] Channel mapping order of input audio
|
||||
Some programs create WAVE files which use a channel
|
||||
mapping other than the standard WAVE mapping. This
|
||||
option allows the user to specify if the input file
|
||||
uses WAVE, AC-3, or MPEG channel mapping. The MPEG
|
||||
channel mapping is used by DTS and by MPEG-2/4 formats
|
||||
such as MP2 and AAC.
|
||||
0 = WAVE mapping (default)
|
||||
1 = AC-3 mapping
|
||||
2 = MPEG mapping
|
||||
|
||||
[-readtoeof #] Read input WAVE audio data until the end-of-file.
|
||||
This overrides the data size in the WAVE header, and
|
||||
can be useful for streaming input or files larger than
|
||||
4 GB.
|
||||
0 = use data size in header (default)
|
||||
1 = read data until end-of-file
|
||||
|
||||
INPUT FILTERS
|
||||
|
||||
[-bwfilter #] Specify use of the bandwidth low-pass filter
|
||||
The bandwidth low-pass filter pre-filters the input
|
||||
audio before converting to frequency-domain. This
|
||||
smooths the cutoff frequency transition for slightly
|
||||
better quality. When used with variable bandwidth
|
||||
mode, the maximum bandwidth setting used as the cutoff
|
||||
frequency.
|
||||
0 = do not apply filter (default)
|
||||
1 = apply filter
|
||||
|
||||
[-dcfilter #] Specify use of the DC high-pass filter
|
||||
The DC high-pass filter is listed as optional by the
|
||||
AC-3 specification. The implementation, as suggested,
|
||||
is a single pole filter at 3 Hz.
|
||||
0 = do not apply filter (default)
|
||||
1 = apply filter
|
||||
|
||||
[-lfefilter #] Specify use of the LFE low-pass filter
|
||||
The LFE low-pass filter is recommended by the AC-3
|
||||
specification. The cutoff is 120 Hz. The specification
|
||||
recommends an 8th order elliptic filter, but instead,
|
||||
Aften uses a Butterworth 2nd order cascaded direct
|
||||
form II filter.
|
||||
0 = do not apply filter (default)
|
||||
1 = apply filter
|
||||
|
||||
ALTERNATE BIT STREAM SYNTAX
|
||||
|
||||
The alternate bit stream syntax allows for encoding additional metadata by
|
||||
adding 1 or 2 extended bitstream info sections to each frame.
|
||||
|
||||
[-xbsi1 #] Specify use of extended bitstream info 1
|
||||
Extended bitstream info 1 contains the dmixmod,
|
||||
ltrtcmix, ltrtsmix, lorocmix, and lorosmix fields. If
|
||||
this option is turned on, all these values are written
|
||||
to the output stream.
|
||||
0 = do not write xbsi1
|
||||
1 = write xbsi1
|
||||
|
||||
[-dmixmod #] Preferred stereo downmix mode
|
||||
This code indicates the type of stereo downmix preferred
|
||||
by the mastering engineer, and can be optionally used,
|
||||
overridden, or ignored by the decoder.
|
||||
0 = not indicated (default)
|
||||
1 = Lt/Rt downmix preferred
|
||||
2 = Lo/Ro downmix preferred
|
||||
|
||||
The 4 mix level options below all use the same code table:
|
||||
0 = +3.0 dB
|
||||
1 = +1.5 dB
|
||||
2 = 0.0 dB
|
||||
3 = -1.5 dB
|
||||
4 = -3.0 dB (default)
|
||||
5 = -4.5 dB
|
||||
6 = -6.0 dB
|
||||
7 = -inf dB
|
||||
|
||||
[-ltrtcmix #] Lt/Rt center mix level
|
||||
This code indicates the nominal down mix level of the
|
||||
center channel with respect to the left and right
|
||||
channels in an Lt/Rt downmix.
|
||||
|
||||
[-ltrtsmix #] Lt/Rt surround mix level
|
||||
This code indicates the nominal down mix level of the
|
||||
surround channels with respect to the left and right
|
||||
channels in an Lt/Rt downmix.
|
||||
|
||||
[-lorocmix #] Lo/Ro center mix level
|
||||
This code indicates the nominal down mix level of the
|
||||
center channel with respect to the left and right
|
||||
channels in an Lo/Ro downmix.
|
||||
|
||||
[-lorosmix #] Lo/Ro surround mix level
|
||||
This code indicates the nominal down mix level of the
|
||||
surround channels with respect to the left and right
|
||||
channels in an Lo/Ro downmix.
|
||||
|
||||
[-xbsi2 #] Specify use of extended bitstream info 2
|
||||
Extended bitstream info 2 contains the dsurexmod,
|
||||
dheadphon, and adconvtyp fields. If this option is
|
||||
turned on, all these values are written to the output
|
||||
stream. These options are not used by the AC-3 decoder,
|
||||
but may be used by other portions of the audio
|
||||
reproduction equipment.
|
||||
0 = do not write xbsi2
|
||||
1 = write xbsi2
|
||||
|
||||
[-dsurexmod #] Dolby Surround EX mode
|
||||
This code indicates whether or not the program has been
|
||||
encoded in Dolby Surround EX.
|
||||
0 = not indicated (default)
|
||||
1 = Not Dolby Surround EX encoded
|
||||
2 = Dolby Surround EX encoded
|
||||
|
||||
[-dheadphon #] Dolby Headphone mode
|
||||
This code indicates whether or not the program has been
|
||||
Dolby Headphone-encoded.
|
||||
0 = not indicated (default)
|
||||
1 = Not Dolby Headphone encoded
|
||||
2 = Dolby Headphone encoded
|
||||
|
||||
[-adconvtyp #] A/D converter type
|
||||
This code indicates the type of A/D converter technology
|
||||
used to capture the PCM audio.
|
||||
0 = Standard (default)
|
||||
1 = HDCD
|
||||
|
|
@ -0,0 +1 @@
|
|||
usage: wavfilter <lp | hp> <cutoff> <in.wav> <out.wav>
|
|
@ -0,0 +1 @@
|
|||
usage: wavinfo [test.wav]
|
|
@ -0,0 +1,6 @@
|
|||
WavRMS: utility program to calculate AC-3 dialnorm.
|
||||
(c) 2006-2007 Justin Ruggles, et al.
|
||||
|
||||
usage: wavrms <test.wav> [<start> [<end>]]
|
||||
use '-' to input from stdin.
|
||||
unit for start and end is seconds.
|
|
@ -0,0 +1,74 @@
|
|||
Aften Windows Win32 and Win64 builds by Wiesław Šoltés <wieslaw.soltes@gmail.com>
|
||||
|
||||
Win32 and Win64 builds website:
|
||||
|
||||
https://github.com/wieslawsoltes/wavtoac3encoder
|
||||
|
||||
What is Aften:
|
||||
|
||||
Aften is an audio encoder which generates compressed audio streams
|
||||
based on ATSC A/52 specification. This type of audio is also known
|
||||
as AC-3 or Dolby® Digital and is one of the audio codecs used in DVD-Video content.
|
||||
|
||||
Aften, Copyright (c) 2006-2007 Justin Ruggles <justinruggles@bellsouth.net>
|
||||
2006-2007 Prakash Punnoor <prakash@punnoor.de>
|
||||
|
||||
http://aften.sourceforge.net/
|
||||
|
||||
Win32 Builds (x86):
|
||||
|
||||
.\wavfilter_x86\wavfilter.exe - x86 ICL Build
|
||||
.\wavinfo_x86\wavinfo.exe - x86 ICL Build
|
||||
.\wavrms_x86\wavrms.exe - x86 ICL Build
|
||||
.\libaftendll_x86\libaften.dll - x86 ICL PGO Build with Parallelization Enabled
|
||||
.\libaftendll_x86_SSE\libaften.dll - x86 ICL PGO SSE Build with Parallelization Enabled
|
||||
.\libaftendll_x86_SSE2\libaften.dll - x86 ICL PGO SSE2 Build with Parallelization Enabled
|
||||
.\libaftendll_x86_SSE3\libaften.dll - x86 ICL PGO SSE3 Build with Parallelization Enabled
|
||||
.\aften_x86\aften.exe - x86 ICL PGO Build with Parallelization Enabled
|
||||
.\aften_x86_SSE\aften.exe - x86 ICL PGO SSE Build with Parallelization Enabled
|
||||
.\aften_x86_SSE2\aften.exe - x86 ICL PGO SSE2 Build with Parallelization Enabled
|
||||
.\aften_x86_SSE3\aften.exe - x86 ICL PGO SSE3 Build with Parallelization Enabled
|
||||
|
||||
Win64 Builds (AMD64):
|
||||
|
||||
.\wavfilter_AMD64\wavfilter.exe - AMD64 ICL Build
|
||||
.\wavinfo_AMD64\wavinfo.exe - AMD64 ICL Build
|
||||
.\wavrms_AMD64\wavrms.exe - AMD64 ICL Build
|
||||
.\libaftendll_AMD64\libaften.dll - AMD64 ICL PGO Build with Parallelization Enabled
|
||||
.\libaftendll_AMD64_SSE2\libaften.dll - AMD64 ICL PGO SSE2 Build with Parallelization Enabled
|
||||
.\libaftendll_AMD64_SSE3\libaften.dll - AMD64 ICL PGO SSE3 Build with Parallelization Enabled
|
||||
.\aften_AMD64\aften.exe - AMD64 ICL PGO Build with Parallelization Enabled
|
||||
.\aften_AMD64_SSE2\aften.exe - AMD64 ICL PGO SSE2 Build with Parallelization Enabled
|
||||
.\aften_AMD64_SSE3\aften.exe - AMD64 ICL PGO SSE3 Build with Parallelization Enabled
|
||||
|
||||
Glossary:
|
||||
|
||||
ICL - Intel C++ Compiler
|
||||
PGO - Profile-Guided Optimizations by Intel C++ Compiler (http://www.intel.com/)
|
||||
IPO - Interprocedural Optimization by Intel C++ Compiler (http://www.intel.com/)
|
||||
MMX - Assembly Opimizations for MMX (http://en.wikipedia.org/wiki/MMX)
|
||||
SSE - Assembly Opimizations for SSE (http://en.wikipedia.org/wiki/Streaming_SIMD_Extensions)
|
||||
SSE2 - Assembly Opimizations for SSE2 (http://en.wikipedia.org/wiki/SSE2)
|
||||
SSE3 - Assembly Opimizations for SSE2 (http://en.wikipedia.org/wiki/SSE3)
|
||||
x86 - Binaries for 32-bit microprocessor architecture (http://en.wikipedia.org/wiki/X86), and
|
||||
used under Miscorsoft Windows 32 bit operating systems.
|
||||
AMD64 - Binaries for 64-bit microprocessor architecture (http://en.wikipedia.org/wiki/AMD64),
|
||||
used under Miscorsoft Windows 64 bit operating systems.
|
||||
|
||||
Find more about Intel C++ Compiler: http://www.intel.com/cd/software/products/asmo-na/eng/compilers/cwin/279578.htm
|
||||
|
||||
Notes:
|
||||
|
||||
Win32 builds will run under Win64 operating systems but Win64 will not run under Win32 OS's.
|
||||
SSE, SSE2 and SSE3 builds require compatible CPU's. Use http://www.cpuid.com/cpuz.php
|
||||
program to check if your hardware is compatible with specific build.
|
||||
|
||||
SSE3 builds include SSE3, SSE2, SSE and MMX optimizations.
|
||||
SSE2 builds include SSE2, SSE and MMX optimizations.
|
||||
SSE builds include SSE, MMX optimizations.
|
||||
|
||||
For each libaften.dll build there is libaften.exp and libaften.lib available,
|
||||
to use it in your software.
|
||||
|
||||
Thanks,
|
||||
Wiesław Šoltés
|
|
@ -0,0 +1,504 @@
|
|||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 2.1, February 1999
|
||||
|
||||
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
[This is the first released version of the Lesser GPL. It also counts
|
||||
as the successor of the GNU Library Public License, version 2, hence
|
||||
the version number 2.1.]
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
Licenses are intended to guarantee your freedom to share and change
|
||||
free software--to make sure the software is free for all its users.
|
||||
|
||||
This license, the Lesser General Public License, applies to some
|
||||
specially designated software packages--typically libraries--of the
|
||||
Free Software Foundation and other authors who decide to use it. You
|
||||
can use it too, but we suggest you first think carefully about whether
|
||||
this license or the ordinary General Public License is the better
|
||||
strategy to use in any particular case, based on the explanations below.
|
||||
|
||||
When we speak of free software, we are referring to freedom of use,
|
||||
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 and use pieces of
|
||||
it in new free programs; and that you are informed that you can do
|
||||
these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
distributors to deny you these rights or to ask you to surrender these
|
||||
rights. These restrictions translate to certain responsibilities for
|
||||
you if you distribute copies of the library or if you modify it.
|
||||
|
||||
For example, if you distribute copies of the library, whether gratis
|
||||
or for a fee, you must give the recipients all the rights that we gave
|
||||
you. You must make sure that they, too, receive or can get the source
|
||||
code. If you link other code with the library, you must provide
|
||||
complete object files to the recipients, so that they can relink them
|
||||
with the library after making changes to the library and recompiling
|
||||
it. And you must show them these terms so they know their rights.
|
||||
|
||||
We protect your rights with a two-step method: (1) we copyright the
|
||||
library, and (2) we offer you this license, which gives you legal
|
||||
permission to copy, distribute and/or modify the library.
|
||||
|
||||
To protect each distributor, we want to make it very clear that
|
||||
there is no warranty for the free library. Also, if the library is
|
||||
modified by someone else and passed on, the recipients should know
|
||||
that what they have is not the original version, so that the original
|
||||
author's reputation will not be affected by problems that might be
|
||||
introduced by others.
|
||||
|
||||
Finally, software patents pose a constant threat to the existence of
|
||||
any free program. We wish to make sure that a company cannot
|
||||
effectively restrict the users of a free program by obtaining a
|
||||
restrictive license from a patent holder. Therefore, we insist that
|
||||
any patent license obtained for a version of the library must be
|
||||
consistent with the full freedom of use specified in this license.
|
||||
|
||||
Most GNU software, including some libraries, is covered by the
|
||||
ordinary GNU General Public License. This license, the GNU Lesser
|
||||
General Public License, applies to certain designated libraries, and
|
||||
is quite different from the ordinary General Public License. We use
|
||||
this license for certain libraries in order to permit linking those
|
||||
libraries into non-free programs.
|
||||
|
||||
When a program is linked with a library, whether statically or using
|
||||
a shared library, the combination of the two is legally speaking a
|
||||
combined work, a derivative of the original library. The ordinary
|
||||
General Public License therefore permits such linking only if the
|
||||
entire combination fits its criteria of freedom. The Lesser General
|
||||
Public License permits more lax criteria for linking other code with
|
||||
the library.
|
||||
|
||||
We call this license the "Lesser" General Public License because it
|
||||
does Less to protect the user's freedom than the ordinary General
|
||||
Public License. It also provides other free software developers Less
|
||||
of an advantage over competing non-free programs. These disadvantages
|
||||
are the reason we use the ordinary General Public License for many
|
||||
libraries. However, the Lesser license provides advantages in certain
|
||||
special circumstances.
|
||||
|
||||
For example, on rare occasions, there may be a special need to
|
||||
encourage the widest possible use of a certain library, so that it becomes
|
||||
a de-facto standard. To achieve this, non-free programs must be
|
||||
allowed to use the library. A more frequent case is that a free
|
||||
library does the same job as widely used non-free libraries. In this
|
||||
case, there is little to gain by limiting the free library to free
|
||||
software only, so we use the Lesser General Public License.
|
||||
|
||||
In other cases, permission to use a particular library in non-free
|
||||
programs enables a greater number of people to use a large body of
|
||||
free software. For example, permission to use the GNU C Library in
|
||||
non-free programs enables many more people to use the whole GNU
|
||||
operating system, as well as its variant, the GNU/Linux operating
|
||||
system.
|
||||
|
||||
Although the Lesser General Public License is Less protective of the
|
||||
users' freedom, it does ensure that the user of a program that is
|
||||
linked with the Library has the freedom and the wherewithal to run
|
||||
that program using a modified version of the Library.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow. Pay close attention to the difference between a
|
||||
"work based on the library" and a "work that uses the library". The
|
||||
former contains code derived from the library, whereas the latter must
|
||||
be combined with the library in order to run.
|
||||
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License Agreement applies to any software library or other
|
||||
program which contains a notice placed by the copyright holder or
|
||||
other authorized party saying it may be distributed under the terms of
|
||||
this Lesser General Public License (also called "this License").
|
||||
Each licensee is addressed as "you".
|
||||
|
||||
A "library" means a collection of software functions and/or data
|
||||
prepared so as to be conveniently linked with application programs
|
||||
(which use some of those functions and data) to form executables.
|
||||
|
||||
The "Library", below, refers to any such software library or work
|
||||
which has been distributed under these terms. A "work based on the
|
||||
Library" means either the Library or any derivative work under
|
||||
copyright law: that is to say, a work containing the Library or a
|
||||
portion of it, either verbatim or with modifications and/or translated
|
||||
straightforwardly into another language. (Hereinafter, translation is
|
||||
included without limitation in the term "modification".)
|
||||
|
||||
"Source code" for a work means the preferred form of the work for
|
||||
making modifications to it. For a library, 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 library.
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running a program using the Library is not restricted, and output from
|
||||
such a program is covered only if its contents constitute a work based
|
||||
on the Library (independent of the use of the Library in a tool for
|
||||
writing it). Whether that is true depends on what the Library does
|
||||
and what the program that uses the Library does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Library's
|
||||
complete 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 distribute a copy of this License along with the
|
||||
Library.
|
||||
|
||||
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 Library or any portion
|
||||
of it, thus forming a work based on the Library, 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) The modified work must itself be a software library.
|
||||
|
||||
b) You must cause the files modified to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
c) You must cause the whole of the work to be licensed at no
|
||||
charge to all third parties under the terms of this License.
|
||||
|
||||
d) If a facility in the modified Library refers to a function or a
|
||||
table of data to be supplied by an application program that uses
|
||||
the facility, other than as an argument passed when the facility
|
||||
is invoked, then you must make a good faith effort to ensure that,
|
||||
in the event an application does not supply such function or
|
||||
table, the facility still operates, and performs whatever part of
|
||||
its purpose remains meaningful.
|
||||
|
||||
(For example, a function in a library to compute square roots has
|
||||
a purpose that is entirely well-defined independent of the
|
||||
application. Therefore, Subsection 2d requires that any
|
||||
application-supplied function or table used by this function must
|
||||
be optional: if the application does not supply it, the square
|
||||
root function must still compute square roots.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Library,
|
||||
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 Library, 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 Library.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Library
|
||||
with the Library (or with a work based on the Library) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may opt to apply the terms of the ordinary GNU General Public
|
||||
License instead of this License to a given copy of the Library. To do
|
||||
this, you must alter all the notices that refer to this License, so
|
||||
that they refer to the ordinary GNU General Public License, version 2,
|
||||
instead of to this License. (If a newer version than version 2 of the
|
||||
ordinary GNU General Public License has appeared, then you can specify
|
||||
that version instead if you wish.) Do not make any other change in
|
||||
these notices.
|
||||
|
||||
Once this change is made in a given copy, it is irreversible for
|
||||
that copy, so the ordinary GNU General Public License applies to all
|
||||
subsequent copies and derivative works made from that copy.
|
||||
|
||||
This option is useful when you wish to copy part of the code of
|
||||
the Library into a program that is not a library.
|
||||
|
||||
4. You may copy and distribute the Library (or a portion or
|
||||
derivative of it, under Section 2) in object code or executable form
|
||||
under the terms of Sections 1 and 2 above provided that you 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.
|
||||
|
||||
If distribution of 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 satisfies the requirement to
|
||||
distribute the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
5. A program that contains no derivative of any portion of the
|
||||
Library, but is designed to work with the Library by being compiled or
|
||||
linked with it, is called a "work that uses the Library". Such a
|
||||
work, in isolation, is not a derivative work of the Library, and
|
||||
therefore falls outside the scope of this License.
|
||||
|
||||
However, linking a "work that uses the Library" with the Library
|
||||
creates an executable that is a derivative of the Library (because it
|
||||
contains portions of the Library), rather than a "work that uses the
|
||||
library". The executable is therefore covered by this License.
|
||||
Section 6 states terms for distribution of such executables.
|
||||
|
||||
When a "work that uses the Library" uses material from a header file
|
||||
that is part of the Library, the object code for the work may be a
|
||||
derivative work of the Library even though the source code is not.
|
||||
Whether this is true is especially significant if the work can be
|
||||
linked without the Library, or if the work is itself a library. The
|
||||
threshold for this to be true is not precisely defined by law.
|
||||
|
||||
If such an object file uses only numerical parameters, data
|
||||
structure layouts and accessors, and small macros and small inline
|
||||
functions (ten lines or less in length), then the use of the object
|
||||
file is unrestricted, regardless of whether it is legally a derivative
|
||||
work. (Executables containing this object code plus portions of the
|
||||
Library will still fall under Section 6.)
|
||||
|
||||
Otherwise, if the work is a derivative of the Library, you may
|
||||
distribute the object code for the work under the terms of Section 6.
|
||||
Any executables containing that work also fall under Section 6,
|
||||
whether or not they are linked directly with the Library itself.
|
||||
|
||||
6. As an exception to the Sections above, you may also combine or
|
||||
link a "work that uses the Library" with the Library to produce a
|
||||
work containing portions of the Library, and distribute that work
|
||||
under terms of your choice, provided that the terms permit
|
||||
modification of the work for the customer's own use and reverse
|
||||
engineering for debugging such modifications.
|
||||
|
||||
You must give prominent notice with each copy of the work that the
|
||||
Library is used in it and that the Library and its use are covered by
|
||||
this License. You must supply a copy of this License. If the work
|
||||
during execution displays copyright notices, you must include the
|
||||
copyright notice for the Library among them, as well as a reference
|
||||
directing the user to the copy of this License. Also, you must do one
|
||||
of these things:
|
||||
|
||||
a) Accompany the work with the complete corresponding
|
||||
machine-readable source code for the Library including whatever
|
||||
changes were used in the work (which must be distributed under
|
||||
Sections 1 and 2 above); and, if the work is an executable linked
|
||||
with the Library, with the complete machine-readable "work that
|
||||
uses the Library", as object code and/or source code, so that the
|
||||
user can modify the Library and then relink to produce a modified
|
||||
executable containing the modified Library. (It is understood
|
||||
that the user who changes the contents of definitions files in the
|
||||
Library will not necessarily be able to recompile the application
|
||||
to use the modified definitions.)
|
||||
|
||||
b) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (1) uses at run time a
|
||||
copy of the library already present on the user's computer system,
|
||||
rather than copying library functions into the executable, and (2)
|
||||
will operate properly with a modified version of the library, if
|
||||
the user installs one, as long as the modified version is
|
||||
interface-compatible with the version that the work was made with.
|
||||
|
||||
c) Accompany the work with a written offer, valid for at
|
||||
least three years, to give the same user the materials
|
||||
specified in Subsection 6a, above, for a charge no more
|
||||
than the cost of performing this distribution.
|
||||
|
||||
d) If distribution of the work is made by offering access to copy
|
||||
from a designated place, offer equivalent access to copy the above
|
||||
specified materials from the same place.
|
||||
|
||||
e) Verify that the user has already received a copy of these
|
||||
materials or that you have already sent this user a copy.
|
||||
|
||||
For an executable, the required form of the "work that uses the
|
||||
Library" must include any data and utility programs needed for
|
||||
reproducing the executable from it. However, as a special exception,
|
||||
the materials to be 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.
|
||||
|
||||
It may happen that this requirement contradicts the license
|
||||
restrictions of other proprietary libraries that do not normally
|
||||
accompany the operating system. Such a contradiction means you cannot
|
||||
use both them and the Library together in an executable that you
|
||||
distribute.
|
||||
|
||||
7. You may place library facilities that are a work based on the
|
||||
Library side-by-side in a single library together with other library
|
||||
facilities not covered by this License, and distribute such a combined
|
||||
library, provided that the separate distribution of the work based on
|
||||
the Library and of the other library facilities is otherwise
|
||||
permitted, and provided that you do these two things:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work
|
||||
based on the Library, uncombined with any other library
|
||||
facilities. This must be distributed under the terms of the
|
||||
Sections above.
|
||||
|
||||
b) Give prominent notice with the combined library of the fact
|
||||
that part of it is a work based on the Library, and explaining
|
||||
where to find the accompanying uncombined form of the same work.
|
||||
|
||||
8. You may not copy, modify, sublicense, link with, or distribute
|
||||
the Library except as expressly provided under this License. Any
|
||||
attempt otherwise to copy, modify, sublicense, link with, or
|
||||
distribute the Library 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.
|
||||
|
||||
9. 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 Library or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Library (or any work based on the
|
||||
Library), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Library or works based on it.
|
||||
|
||||
10. Each time you redistribute the Library (or any work based on the
|
||||
Library), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute, link with or modify the Library
|
||||
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 with
|
||||
this License.
|
||||
|
||||
11. 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 Library at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Library 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 Library.
|
||||
|
||||
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.
|
||||
|
||||
12. If the distribution and/or use of the Library is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Library 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.
|
||||
|
||||
13. The Free Software Foundation may publish revised and/or new
|
||||
versions of the Lesser 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 Library
|
||||
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 Library does not specify a
|
||||
license version number, you may choose any version ever published by
|
||||
the Free Software Foundation.
|
||||
|
||||
14. If you wish to incorporate parts of the Library into other free
|
||||
programs whose distribution conditions are incompatible with these,
|
||||
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
|
||||
|
||||
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
||||
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
||||
OTHER PARTIES PROVIDE THE LIBRARY "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
|
||||
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
||||
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. 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 LIBRARY 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
|
||||
LIBRARY (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 LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), 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 Libraries
|
||||
|
||||
If you develop a new library, and you want it to be of the greatest
|
||||
possible use to the public, we recommend making it free software that
|
||||
everyone can redistribute and change. You can do so by permitting
|
||||
redistribution under these terms (or, alternatively, under the terms of the
|
||||
ordinary General Public License).
|
||||
|
||||
To apply these terms, attach the following notices to the library. 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 library's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library 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 library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the library, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
||||
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1990
|
||||
Ty Coon, President of Vice
|
||||
|
||||
That's all there is to it!
|
||||
|
||||
|
|
@ -0,0 +1,159 @@
|
|||
/**
|
||||
* Aften: A/52 audio encoder
|
||||
* Copyright (c) 2006-2007 Justin Ruggles
|
||||
* 2006-2007 Prakash Punnoor <prakash@punnoor.de>
|
||||
*
|
||||
* Based on "The simplest AC3 encoder" from FFmpeg
|
||||
* Copyright (c) 2000 Fabrice Bellard.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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 library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file aften.h
|
||||
* libaften public header for function declarations
|
||||
*/
|
||||
|
||||
#ifndef AFTEN_H
|
||||
#define AFTEN_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "aften-types.h"
|
||||
|
||||
#if defined(_WIN32) && !defined(_XBOX)
|
||||
#if defined(AFTEN_BUILD_LIBRARY)
|
||||
#define AFTEN_API __declspec(dllexport)
|
||||
#else
|
||||
#define AFTEN_API __declspec(dllimport)
|
||||
#endif
|
||||
#else
|
||||
#if defined(AFTEN_BUILD_LIBRARY) && defined(HAVE_GCC_VISIBILITY)
|
||||
#define AFTEN_API __attribute__((visibility("default")))
|
||||
#else
|
||||
#define AFTEN_API extern
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @defgroup encoding Main encoding functions
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* Gets the libaften version string.
|
||||
*/
|
||||
AFTEN_API const char *aften_get_version(void);
|
||||
|
||||
/**
|
||||
* Sets the parameters for an encoding context to their default values.
|
||||
* @param s The encoding context
|
||||
*/
|
||||
AFTEN_API void aften_set_defaults(AftenContext *s);
|
||||
|
||||
/**
|
||||
* Initializes an encoding context.
|
||||
* This must be called before any calls to @c aften_encode_frame
|
||||
* @param s The encoding context
|
||||
* @return Returns 0 on success, non-zero on failure.
|
||||
*/
|
||||
AFTEN_API int aften_encode_init(AftenContext *s);
|
||||
|
||||
/**
|
||||
* Encodes a single AC-3 frame.
|
||||
* @param s The encoding context
|
||||
* @param[out] frame_buffer Pointer to output frame data
|
||||
* @param[in] samples Pointer to input audio samples
|
||||
* @param[in] count Number of input audio samples (per channel);
|
||||
* must be equal to A52_SAMPLES_PER_FRAME, less than A52_SAMPLES_PER_FRAME
|
||||
* for the last frame, and equal to 0 while flushing
|
||||
* @return Returns the number of bytes written to @p frame_buffer, or returns
|
||||
* a negative value on error.
|
||||
*/
|
||||
AFTEN_API int aften_encode_frame(AftenContext *s, unsigned char *frame_buffer,
|
||||
const void *samples, int count);
|
||||
|
||||
/**
|
||||
* Sets the parameters in the context @p s to their default values.
|
||||
* @param s The encoding context
|
||||
* @return Returns a negative value on error.
|
||||
*/
|
||||
AFTEN_API int aften_encode_close(AftenContext *s);
|
||||
|
||||
/** @} end encoding functions */
|
||||
|
||||
/**
|
||||
* @defgroup utility Utility functions
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* Determines the proper A/52 acmod and lfe parameters based on the
|
||||
* number of channels and the WAVE_FORMAT_EXTENSIBLE channel mask. If the
|
||||
* chmask value has the high bit set to 1 (e.g. 0xFFFFFFFF), then the default
|
||||
* plain WAVE channel selection is assumed.
|
||||
* @param[in] ch number of channels
|
||||
* @param[in] chmask channel mask
|
||||
* @param[out] acmod pointer to audio coding mode
|
||||
* @param[out] lfe pointer to LFE flag
|
||||
* @return On error, the @p acmod and @p lfe output params are set to -1 and
|
||||
* the function returns -1; on success, the @p acmod and @p lfe params are set
|
||||
* to appropriate values and the function returns 0.
|
||||
*/
|
||||
AFTEN_API int aften_wav_channels_to_acmod(int ch, unsigned int chmask,
|
||||
int *acmod, int *lfe);
|
||||
|
||||
/**
|
||||
* Takes a channel-interleaved array of audio samples, where the channel order
|
||||
* is the default WAV order. The samples are rearranged to the proper A/52
|
||||
* channel order based on the @p acmod and @p lfe parameters.
|
||||
* @param samples array of interleaved audio samples
|
||||
* @param[in] n number of samples in the array
|
||||
* @param[in] ch number of channels
|
||||
* @param[in] fmt sample format
|
||||
* @param[in] acmod audio coding mode
|
||||
*/
|
||||
AFTEN_API void aften_remap_wav_to_a52(void *samples, int n, int ch,
|
||||
A52SampleFormat fmt, int acmod);
|
||||
|
||||
/**
|
||||
* Takes a channel-interleaved array of audio samples, where the channels are
|
||||
* in MPEG order. The samples are rearranged to the proper A/52 channel order
|
||||
* based on the @p acmod parameter.
|
||||
* @param samples array of interleaved audio samples
|
||||
* @param[in] n number of samples in the array
|
||||
* @param[in] ch number of channels
|
||||
* @param[in] fmt sample format
|
||||
* @param[in] acmod audio coding mode
|
||||
*/
|
||||
AFTEN_API void aften_remap_mpeg_to_a52(void *samples, int n, int ch,
|
||||
A52SampleFormat fmt, int acmod);
|
||||
|
||||
/**
|
||||
* Tells whether libaften was configured to use floats or doubles
|
||||
*/
|
||||
AFTEN_API FloatType aften_get_float_type(void);
|
||||
|
||||
/** @} end utility functions */
|
||||
|
||||
#undef AFTEN_API
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* AFTEN_H */
|
Двоичный файл не отображается.
Двоичный файл не отображается.
Двоичный файл не отображается.
Двоичный файл не отображается.
Двоичный файл не отображается.
Двоичный файл не отображается.
Двоичный файл не отображается.
Двоичный файл не отображается.
Двоичный файл не отображается.
Двоичный файл не отображается.
Двоичный файл не отображается.
Двоичный файл не отображается.
Двоичный файл не отображается.
Двоичный файл не отображается.
Двоичный файл не отображается.
Двоичный файл не отображается.
Двоичный файл не отображается.
Двоичный файл не отображается.
Двоичный файл не отображается.
Двоичный файл не отображается.
Двоичный файл не отображается.
|
@ -0,0 +1,149 @@
|
|||
|
||||
Aften: A/52 audio encoder
|
||||
Version git
|
||||
(c) 2006-2009 Justin Ruggles, Prakash Punnoor, et al.
|
||||
|
||||
usage: aften [options] <input.wav> <output.ac3>
|
||||
options:
|
||||
[-h] Print out list of commandline options
|
||||
[-longhelp] Print out commandline option details
|
||||
[-version] Print out the build version
|
||||
[-v #] Verbosity (controls output to console)
|
||||
0 = quiet mode
|
||||
1 = show average stats (default)
|
||||
2 = show each frame's stats
|
||||
[-threads #] Number of parallel threads to use
|
||||
0 = detect number of CPUs (default)
|
||||
[-nosimd X] Comma-separated list of SIMD instruction sets not to use
|
||||
Available sets are mmx, sse, sse2, sse3 and altivec.
|
||||
No spaces are allowed between the sets and the commas.
|
||||
[-b #] CBR bitrate in kbps (default: about 96kbps per channel)
|
||||
[-q #] VBR quality [0 - 1023] (default: 240)
|
||||
[-fba #] Fast bit allocation (default: 0)
|
||||
0 = more accurate encoding
|
||||
1 = faster encoding
|
||||
[-exps #] Exponent strategy search size (default: 8)
|
||||
1 to 32 (lower is faster, higher is better quality)
|
||||
[-pad #] Start-of-stream padding
|
||||
0 = no padding
|
||||
1 = 256 samples of padding (default)
|
||||
[-w #] Bandwidth
|
||||
0 to 60 = fixed bandwidth (28%-99% of full bandwidth)
|
||||
-1 = fixed adaptive bandwidth (default)
|
||||
-2 = variable adaptive bandwidth
|
||||
[-wmin #] Minimum bandwidth [0 - 60] (default: 0)
|
||||
[-wmax #] Maximum bandwidth [0 - 60] (default: 60)
|
||||
[-m #] Stereo rematrixing
|
||||
0 = independent L+R channels
|
||||
1 = mid/side rematrixing (default)
|
||||
[-s #] Block switching
|
||||
0 = use only 512-point MDCT (default)
|
||||
1 = selectively use 256-point MDCT
|
||||
[-cmix #] Center mix level
|
||||
0 = -3.0 dB (default)
|
||||
1 = -4.5 dB
|
||||
2 = -6.0 dB
|
||||
[-smix #] Surround mix level
|
||||
0 = -3 dB (default)
|
||||
1 = -6 dB
|
||||
2 = 0
|
||||
[-dsur #] Dolby Surround mode
|
||||
0 = not indicated (default)
|
||||
1 = not Dolby surround encoded
|
||||
2 = Dolby surround encoded
|
||||
[-dnorm #] Dialog normalization [0 - 31] (default: 31)
|
||||
[-dynrng #] Dynamic Range Compression profile
|
||||
0 = Film Light
|
||||
1 = Film Standard
|
||||
2 = Music Light
|
||||
3 = Music Standard
|
||||
4 = Speech
|
||||
5 = None (default)
|
||||
[-acmod #] Audio coding mode (overrides wav header)
|
||||
0 = 1+1 (Ch1,Ch2)
|
||||
1 = 1/0 (C)
|
||||
2 = 2/0 (L,R)
|
||||
3 = 3/0 (L,R,C)
|
||||
4 = 2/1 (L,R,S)
|
||||
5 = 3/1 (L,R,C,S)
|
||||
6 = 2/2 (L,R,SL,SR)
|
||||
7 = 3/2 (L,R,C,SL,SR)
|
||||
[-lfe #] Specify use of LFE channel (overrides wav header)
|
||||
0 = LFE channel is not present
|
||||
1 = LFE channel is present
|
||||
[-chconfig X] Specify channel configuration (overrides wav header)
|
||||
1+1 = (Ch1,Ch2)
|
||||
1/0 = (C)
|
||||
2/0 = (L,R)
|
||||
3/0 = (L,R,C)
|
||||
2/1 = (L,R,S)
|
||||
3/1 = (L,R,C,S)
|
||||
2/2 = (L,R,SL,SR)
|
||||
3/2 = (L,R,C,SL,SR)
|
||||
adding "+LFE" indicates use of the LFE channel
|
||||
[-ch_X file] Add a mono file to the input list as the channel specified
|
||||
ch_fl = Front Left
|
||||
ch_fc = Front Center
|
||||
ch_fr = Front Right
|
||||
ch_sl = Surround Left
|
||||
ch_s = Surround
|
||||
ch_sr = Surround Right
|
||||
ch_m1 = Dual Mono Channel 1
|
||||
ch_m2 = Dual Mono Channel 2
|
||||
ch_lfe = LFE
|
||||
[-raw_fmt X] Raw audio input sample format (default: s16_le)
|
||||
One of the pre-defined sample formats:
|
||||
u8, s8, s16_le, s16_be, s20_le, s20_be, s24_le, s24_be,
|
||||
s32_le, s32_be, float_le, float_be, double_le, double_be
|
||||
[-raw_sr #] Raw audio input sample rate (default: 48000)
|
||||
[-raw_ch #] Raw audio input channels (default: 1)
|
||||
[-chmap #] Channel mapping order of input audio
|
||||
0 = WAVE mapping (default)
|
||||
1 = AC-3 mapping
|
||||
2 = MPEG mapping
|
||||
[-readtoeof #] Read input WAVE audio data until the end-of-file
|
||||
0 = use data size in header (default)
|
||||
1 = read data until end-of-file
|
||||
[-bwfilter #] Specify use of the bandwidth low-pass filter
|
||||
0 = do not apply filter (default)
|
||||
1 = apply filter
|
||||
[-dcfilter #] Specify use of the DC high-pass filter
|
||||
0 = do not apply filter (default)
|
||||
1 = apply filter
|
||||
[-lfefilter #] Specify use of the LFE low-pass filter
|
||||
0 = do not apply filter (default)
|
||||
1 = apply filter
|
||||
[-xbsi1 #] Specify use of extended bitstream info 1
|
||||
0 = do not write xbsi1
|
||||
1 = write xbsi1
|
||||
[-dmixmod #] Preferred stereo downmix mode
|
||||
0 = not indicated (default)
|
||||
1 = Lt/Rt downmix preferred
|
||||
2 = Lo/Ro downmix preferred
|
||||
[-ltrtcmix #] Lt/Rt center mix level
|
||||
[-ltrtsmix #] Lt/Rt surround mix level
|
||||
[-lorocmix #] Lo/Ro center mix level
|
||||
[-lorosmix #] Lo/Ro surround mix level
|
||||
0 = +3.0 dB
|
||||
1 = +1.5 dB
|
||||
2 = 0.0 dB
|
||||
3 = -1.5 dB
|
||||
4 = -3.0 dB (default)
|
||||
5 = -4.5 dB
|
||||
6 = -6.0 dB
|
||||
7 = -inf dB
|
||||
[-xbsi2 #] Specify use of extended bitstream info 2
|
||||
0 = do not write xbsi2
|
||||
1 = write xbsi2
|
||||
[-dsurexmod #] Dolby Surround EX mode
|
||||
0 = not indicated (default)
|
||||
1 = Not Dolby Surround EX encoded
|
||||
2 = Dolby Surround EX encoded
|
||||
[-dheadphon #] Dolby Headphone mode
|
||||
0 = not indicated (default)
|
||||
1 = Not Dolby Headphone encoded
|
||||
2 = Dolby Headphone encoded
|
||||
[-adconvtyp #] A/D converter type
|
||||
0 = Standard (default)
|
||||
1 = HDCD
|
||||
|
|
@ -0,0 +1,386 @@
|
|||
|
||||
Aften: A/52 audio encoder
|
||||
Version git
|
||||
(c) 2006-2009 Justin Ruggles, Prakash Punnoor, et al.
|
||||
|
||||
usage: aften [options] <input.wav> <output.ac3>
|
||||
options:
|
||||
|
||||
CONSOLE OUTPUT OPTIONS
|
||||
|
||||
[-h] Print out list of commandline options.
|
||||
|
||||
[-longhelp] Print out commandline option details.
|
||||
|
||||
[-version] Print out the build version.
|
||||
|
||||
[-v #] Verbosity
|
||||
This controls the level of console output to stderr.
|
||||
0 - Quiet Mode. No output to stderr.
|
||||
1 - Shows a running average of encoding statistics.
|
||||
This is the default setting.
|
||||
2 - Shows the statistics for each frame.
|
||||
|
||||
ENCODING OPTIONS
|
||||
|
||||
[-threads #] Number of threads
|
||||
Aften can use multiple threads to speed up encoding.
|
||||
By default, Aften uses one thread for each logical CPU
|
||||
your system has, but you can override this value. A
|
||||
value of 0 is the default and indicates that Aften
|
||||
should try to detect the number of CPUs.
|
||||
|
||||
[-nosimd X] Comma-separated list of SIMD instruction sets not to use
|
||||
Aften will auto-detect available SIMD instruction sets
|
||||
for your CPU, so you shouldn't need to disable sets
|
||||
explicitly - unless for speed or debugging reasons.
|
||||
Available sets are mmx, sse, sse2, sse3 and altivec.
|
||||
No spaces are allowed between the sets and the commas.
|
||||
Example: -nosimd sse2,sse3
|
||||
|
||||
[-b #] CBR bitrate in kbps
|
||||
CBR mode is selected by default. This option allows for
|
||||
setting the fixed bitrate. The default bitrate depends
|
||||
on the number of channels (not including LFE).
|
||||
mono = 96 kbps
|
||||
stereo = 192 kbps
|
||||
3-channel = 256 kbps
|
||||
4-channel = 384 kbps
|
||||
5-channel = 448 kbps
|
||||
|
||||
[-q #] VBR quality
|
||||
A value 0 to 1023 which corresponds to SNR offset, where
|
||||
q=240 equates to an SNR offset of 0. 240 is the default
|
||||
value. This scale will most likely be replaced in the
|
||||
future with a better quality measurement.
|
||||
|
||||
[-fba #] Fast bit allocation
|
||||
Fast bit allocation is a less-accurate search method
|
||||
for CBR bit allocation. It only narrows down the SNR
|
||||
value to within 16 of the optimal value. The result
|
||||
is lower overall quality, but faster encoding. This
|
||||
may not give the same results each time when using
|
||||
parallel encoding.
|
||||
|
||||
[-exps #] Exponent strategy search size
|
||||
The encoder determines the best combination of
|
||||
exponent strategies for a frame by searching through
|
||||
a list of pre-defined exponent strategies. This option
|
||||
controls the size of the list to be searched. The
|
||||
value can range from 1 (lower quality but faster) to
|
||||
32 (higher quality but slower). The default value is 8.
|
||||
|
||||
[-pad #] Start-of-stream padding
|
||||
The AC-3 format uses an overlap/add cycle for encoding
|
||||
each block. By default, Aften pads the delay buffer
|
||||
with a block of silence to avoid inaccurate encoding
|
||||
of the first frame of audio. If this behavior is not
|
||||
wanted, it can be disabled. The pad value can be a
|
||||
1 (default) to use padding or 0 to not use padding.
|
||||
|
||||
[-w #] Bandwidth
|
||||
The bandwidth setting corresponds to the high-frequency
|
||||
cutoff. Specifically, it sets the highest frequency bin
|
||||
which is encoded. The AC-3 format uses a 512-point MDCT
|
||||
which gives 256 frequency levels from 0 to 1/2 of the
|
||||
samplerate. The formula to give the number of coded
|
||||
frequency bins from bandwidth setting is:
|
||||
(w * 3) + 73, which gives a range of 73 to 253
|
||||
I hope to replace this setting with one where the user
|
||||
specifies the actual cutoff frequency rather than the
|
||||
bandwidth code.
|
||||
There are 2 special values, -1 and -2.
|
||||
When -1 is used, Aften automatically selects what
|
||||
it thinks is an appropriate bandwidth. This is the
|
||||
default setting.
|
||||
When -2 is used, a bandwidth is chosen for each frame
|
||||
based on CBR frame size and a target quality of 240.
|
||||
Variable bandwidth cannot be used with VBR mode.
|
||||
|
||||
[-wmin #] Minimum bandwidth
|
||||
For variable bandwidth mode (-2), this option sets the
|
||||
minimum value for the bandwidth code. This allows the
|
||||
user to avoid a harsh cutoff frequency by sacrificing
|
||||
general audio quality. The default value is 0.
|
||||
|
||||
[-wmax #] Maximum bandwidth
|
||||
For variable bandwidth mode (-2), this option sets the
|
||||
maximum value for the bandwidth code. This can be used
|
||||
to speed up encoding by using a lower value than 60,
|
||||
which is the default.
|
||||
|
||||
[-m #] Stereo rematrixing
|
||||
Using stereo rematrixing can increase quality by
|
||||
removing redundant information between the left and
|
||||
right channels. This technique is common in audio
|
||||
encoding, and is sometimes called mid/side encoding.
|
||||
When this setting is turned on, Aften adaptively turns
|
||||
rematrixing on or off for each of 4 frequency bands for
|
||||
each block. When this setting is turned off,
|
||||
rematrixing is not used for any blocks. The default
|
||||
value is 1.
|
||||
|
||||
[-s #] Block switching
|
||||
The AC-3 format allows for 2 different types of MDCT
|
||||
transformations to translate from time-domain to
|
||||
frequency-domain. The default is a 512-point transform,
|
||||
which gives better frequency resolution. There is also
|
||||
a 256-point transform, which gives better time
|
||||
resolution. The specification gives a suggested method
|
||||
for determining when to use the 256-point transform.
|
||||
When block switching is turned on, Aften uses the spec
|
||||
method for selecting the 256-point MDCT. When it is
|
||||
turned off, only the 512-point MDCT is used, which is
|
||||
faster. Block switching is turned off by default.
|
||||
|
||||
BITSTREAM INFO METADATA
|
||||
|
||||
[-cmix #] Center mix level
|
||||
When three front channels are in use, this code
|
||||
indicates the nominal down mix level of the center
|
||||
channel with respect to the left and right channels.
|
||||
0 = -3.0 dB (default)
|
||||
1 = -4.5 dB
|
||||
2 = -6.0 dB
|
||||
|
||||
[-smix #] Surround mix level
|
||||
If surround channels are in use, this code indicates
|
||||
the nominal down mix level of the surround channels.
|
||||
0 = -3 dB (default)
|
||||
1 = -6 dB
|
||||
2 = 0
|
||||
|
||||
[-dsur #] Dolby Surround mode
|
||||
When operating in the two channel mode, this code
|
||||
indicates whether or not the program has been encoded in
|
||||
Dolby Surround. This information is not used by the
|
||||
AC-3 decoder, but may be used by other portions of the
|
||||
audio reproduction equipment.
|
||||
0 = not indicated (default)
|
||||
1 = not Dolby surround encoded
|
||||
2 = Dolby surround encoded
|
||||
|
||||
DYNAMIC RANGE COMPRESSION AND DIALOG NORMALIZATION
|
||||
|
||||
[-dynrng #] Dynamic Range Compression profile
|
||||
Dynamic Range Compression allows for the final output
|
||||
dynamic range to be limited without sacrificing quality.
|
||||
The full dynamic range audio is still encoded, but a
|
||||
code is given for each block which tells the decoder to
|
||||
adjust the output volume for that block. The encoder
|
||||
must analyze the input audio to determine the best way
|
||||
to compress the dynamic range based on the loudness and
|
||||
type of input (film, music, speech).
|
||||
0 = Film Light
|
||||
1 = Film Standard
|
||||
2 = Music Light
|
||||
3 = Music Standard
|
||||
4 = Speech
|
||||
5 = None (default)
|
||||
|
||||
[-dnorm #] Dialog normalization [0 - 31] (default: 31)
|
||||
The dialog normalization value sets the average dialog
|
||||
level. The value is typically constant for a particular
|
||||
audio program. The decoder has a target output dialog
|
||||
level of -31dB, so if the dialog level is specified as
|
||||
being -31dB already (default), the output volume is not
|
||||
altered. Otherwise, the overall output volume is
|
||||
decreased so that the dialog level is adjusted down to
|
||||
-31dB.
|
||||
|
||||
INPUT OPTIONS
|
||||
|
||||
By default, information about the input file, such as the channel
|
||||
configuration and data size, is determined by the input file wav header.
|
||||
However, the basic WAVE format is limited in that it can only support
|
||||
up to 4 GB of data and cannot specify all channel layouts possible in the
|
||||
AC-3 format. The acmod, lfe, and chconfig options allow the user to
|
||||
explicitly select the desired channel layout. This only controls the
|
||||
interpretation of the input, so no downmixing or upmixing is done. The
|
||||
readtoeof option overrides the header and lets the user specify that Aften
|
||||
should keep reading data until the end-of-file.
|
||||
|
||||
[-acmod #] Audio coding mode (overrides wav header)
|
||||
0 = 1+1 (Ch1,Ch2)
|
||||
1 = 1/0 (C)
|
||||
2 = 2/0 (L,R)
|
||||
3 = 3/0 (L,R,C)
|
||||
4 = 2/1 (L,R,S)
|
||||
5 = 3/1 (L,R,C,S)
|
||||
6 = 2/2 (L,R,SL,SR)
|
||||
7 = 3/2 (L,R,C,SL,SR)
|
||||
|
||||
[-lfe #] Specify use of LFE channel (overrides wav header)
|
||||
0 = LFE channel is not present
|
||||
1 = LFE channel is present
|
||||
|
||||
[-chconfig X] Specify channel configuration (overrides wav header)
|
||||
1+1 = (Ch1,Ch2)
|
||||
1/0 = (C)
|
||||
2/0 = (L,R)
|
||||
3/0 = (L,R,C)
|
||||
2/1 = (L,R,S)
|
||||
3/1 = (L,R,C,S)
|
||||
2/2 = (L,R,SL,SR)
|
||||
3/2 = (L,R,C,SL,SR)
|
||||
adding "+LFE" indicates use of the LFE channel
|
||||
|
||||
[-ch_X file] Add a mono file to the input list as the channel specified
|
||||
These parameters are used to specify multiple mono
|
||||
source files instead of a single multi-channel source
|
||||
file. Only valid AC-3 combinations are allowed. The
|
||||
acmod, lfe, chconfig, and chmap parameters are all
|
||||
ignored if multi-mono inputs are used.
|
||||
ch_fl = Front Left
|
||||
ch_fc = Front Center
|
||||
ch_fr = Front Right
|
||||
ch_sl = Surround Left
|
||||
ch_s = Surround
|
||||
ch_sr = Surround Right
|
||||
ch_m1 = Dual Mono Channel 1
|
||||
ch_m2 = Dual Mono Channel 2
|
||||
ch_lfe = LFE
|
||||
|
||||
[-raw_fmt X] Raw audio input sample format (default: s16_le)
|
||||
This options specifies the sample format when using
|
||||
raw audio input. Using this option forces Aften to
|
||||
treat the input as raw audio. The choices for the
|
||||
pre-defined sample formats are:
|
||||
u8, s8, s16_le, s16_be, s20_le, s20_be, s24_le, s24_be,
|
||||
s32_le, s32_be, float_le, float_be, double_le, double_be
|
||||
|
||||
[-raw_sr #] Raw audio input sample rate (default: 48000)
|
||||
Using this option forces Aften to treat the input as
|
||||
raw audio.
|
||||
|
||||
[-raw_ch #] Raw audio input channels (default: 1)
|
||||
Using this option forces Aften to treat the input as
|
||||
raw audio.
|
||||
|
||||
[-chmap #] Channel mapping order of input audio
|
||||
Some programs create WAVE files which use a channel
|
||||
mapping other than the standard WAVE mapping. This
|
||||
option allows the user to specify if the input file
|
||||
uses WAVE, AC-3, or MPEG channel mapping. The MPEG
|
||||
channel mapping is used by DTS and by MPEG-2/4 formats
|
||||
such as MP2 and AAC.
|
||||
0 = WAVE mapping (default)
|
||||
1 = AC-3 mapping
|
||||
2 = MPEG mapping
|
||||
|
||||
[-readtoeof #] Read input WAVE audio data until the end-of-file.
|
||||
This overrides the data size in the WAVE header, and
|
||||
can be useful for streaming input or files larger than
|
||||
4 GB.
|
||||
0 = use data size in header (default)
|
||||
1 = read data until end-of-file
|
||||
|
||||
INPUT FILTERS
|
||||
|
||||
[-bwfilter #] Specify use of the bandwidth low-pass filter
|
||||
The bandwidth low-pass filter pre-filters the input
|
||||
audio before converting to frequency-domain. This
|
||||
smooths the cutoff frequency transition for slightly
|
||||
better quality. When used with variable bandwidth
|
||||
mode, the maximum bandwidth setting used as the cutoff
|
||||
frequency.
|
||||
0 = do not apply filter (default)
|
||||
1 = apply filter
|
||||
|
||||
[-dcfilter #] Specify use of the DC high-pass filter
|
||||
The DC high-pass filter is listed as optional by the
|
||||
AC-3 specification. The implementation, as suggested,
|
||||
is a single pole filter at 3 Hz.
|
||||
0 = do not apply filter (default)
|
||||
1 = apply filter
|
||||
|
||||
[-lfefilter #] Specify use of the LFE low-pass filter
|
||||
The LFE low-pass filter is recommended by the AC-3
|
||||
specification. The cutoff is 120 Hz. The specification
|
||||
recommends an 8th order elliptic filter, but instead,
|
||||
Aften uses a Butterworth 2nd order cascaded direct
|
||||
form II filter.
|
||||
0 = do not apply filter (default)
|
||||
1 = apply filter
|
||||
|
||||
ALTERNATE BIT STREAM SYNTAX
|
||||
|
||||
The alternate bit stream syntax allows for encoding additional metadata by
|
||||
adding 1 or 2 extended bitstream info sections to each frame.
|
||||
|
||||
[-xbsi1 #] Specify use of extended bitstream info 1
|
||||
Extended bitstream info 1 contains the dmixmod,
|
||||
ltrtcmix, ltrtsmix, lorocmix, and lorosmix fields. If
|
||||
this option is turned on, all these values are written
|
||||
to the output stream.
|
||||
0 = do not write xbsi1
|
||||
1 = write xbsi1
|
||||
|
||||
[-dmixmod #] Preferred stereo downmix mode
|
||||
This code indicates the type of stereo downmix preferred
|
||||
by the mastering engineer, and can be optionally used,
|
||||
overridden, or ignored by the decoder.
|
||||
0 = not indicated (default)
|
||||
1 = Lt/Rt downmix preferred
|
||||
2 = Lo/Ro downmix preferred
|
||||
|
||||
The 4 mix level options below all use the same code table:
|
||||
0 = +3.0 dB
|
||||
1 = +1.5 dB
|
||||
2 = 0.0 dB
|
||||
3 = -1.5 dB
|
||||
4 = -3.0 dB (default)
|
||||
5 = -4.5 dB
|
||||
6 = -6.0 dB
|
||||
7 = -inf dB
|
||||
|
||||
[-ltrtcmix #] Lt/Rt center mix level
|
||||
This code indicates the nominal down mix level of the
|
||||
center channel with respect to the left and right
|
||||
channels in an Lt/Rt downmix.
|
||||
|
||||
[-ltrtsmix #] Lt/Rt surround mix level
|
||||
This code indicates the nominal down mix level of the
|
||||
surround channels with respect to the left and right
|
||||
channels in an Lt/Rt downmix.
|
||||
|
||||
[-lorocmix #] Lo/Ro center mix level
|
||||
This code indicates the nominal down mix level of the
|
||||
center channel with respect to the left and right
|
||||
channels in an Lo/Ro downmix.
|
||||
|
||||
[-lorosmix #] Lo/Ro surround mix level
|
||||
This code indicates the nominal down mix level of the
|
||||
surround channels with respect to the left and right
|
||||
channels in an Lo/Ro downmix.
|
||||
|
||||
[-xbsi2 #] Specify use of extended bitstream info 2
|
||||
Extended bitstream info 2 contains the dsurexmod,
|
||||
dheadphon, and adconvtyp fields. If this option is
|
||||
turned on, all these values are written to the output
|
||||
stream. These options are not used by the AC-3 decoder,
|
||||
but may be used by other portions of the audio
|
||||
reproduction equipment.
|
||||
0 = do not write xbsi2
|
||||
1 = write xbsi2
|
||||
|
||||
[-dsurexmod #] Dolby Surround EX mode
|
||||
This code indicates whether or not the program has been
|
||||
encoded in Dolby Surround EX.
|
||||
0 = not indicated (default)
|
||||
1 = Not Dolby Surround EX encoded
|
||||
2 = Dolby Surround EX encoded
|
||||
|
||||
[-dheadphon #] Dolby Headphone mode
|
||||
This code indicates whether or not the program has been
|
||||
Dolby Headphone-encoded.
|
||||
0 = not indicated (default)
|
||||
1 = Not Dolby Headphone encoded
|
||||
2 = Dolby Headphone encoded
|
||||
|
||||
[-adconvtyp #] A/D converter type
|
||||
This code indicates the type of A/D converter technology
|
||||
used to capture the PCM audio.
|
||||
0 = Standard (default)
|
||||
1 = HDCD
|
||||
|
|
@ -0,0 +1 @@
|
|||
usage: wavfilter <lp | hp> <cutoff> <in.wav> <out.wav>
|
|
@ -0,0 +1 @@
|
|||
usage: wavinfo [test.wav]
|
|
@ -0,0 +1,6 @@
|
|||
WavRMS: utility program to calculate AC-3 dialnorm.
|
||||
(c) 2006-2007 Justin Ruggles, et al.
|
||||
|
||||
usage: wavrms <test.wav> [<start> [<end>]]
|
||||
use '-' to input from stdin.
|
||||
unit for start and end is seconds.
|
Двоичный файл не отображается.
Двоичный файл не отображается.
Двоичный файл не отображается.
Двоичный файл не отображается.
Двоичный файл не отображается.
Двоичный файл не отображается.
Двоичный файл не отображается.
Двоичный файл не отображается.
Двоичный файл не отображается.
Двоичный файл не отображается.
Двоичный файл не отображается.
Двоичный файл не отображается.
Двоичный файл не отображается.
Двоичный файл не отображается.
Двоичный файл не отображается.
Двоичный файл не отображается.
Двоичный файл не отображается.
Двоичный файл не отображается.
Двоичный файл не отображается.
Двоичный файл не отображается.
Двоичный файл не отображается.
Двоичный файл не отображается.
Двоичный файл не отображается.
Двоичный файл не отображается.
Двоичный файл не отображается.
Двоичный файл не отображается.
Двоичный файл не отображается.
Двоичный файл не отображается.
|
@ -0,0 +1,74 @@
|
|||
Aften Windows Win32 and Win64 builds by Wiesław Šoltés <wieslaw.soltes@gmail.com>
|
||||
|
||||
Win32 and Win64 builds website:
|
||||
|
||||
https://github.com/wieslawsoltes/wavtoac3encoder
|
||||
|
||||
What is Aften:
|
||||
|
||||
Aften is an audio encoder which generates compressed audio streams
|
||||
based on ATSC A/52 specification. This type of audio is also known
|
||||
as AC-3 or Dolby® Digital and is one of the audio codecs used in DVD-Video content.
|
||||
|
||||
Aften, Copyright (c) 2006-2007 Justin Ruggles <justinruggles@bellsouth.net>
|
||||
2006-2007 Prakash Punnoor <prakash@punnoor.de>
|
||||
|
||||
http://aften.sourceforge.net/
|
||||
|
||||
Win32 Builds (x86):
|
||||
|
||||
.\wavfilter_x86\wavfilter.exe - x86 ICL Build
|
||||
.\wavinfo_x86\wavinfo.exe - x86 ICL Build
|
||||
.\wavrms_x86\wavrms.exe - x86 ICL Build
|
||||
.\libaftendll_x86\libaften.dll - x86 ICL PGO Build with Parallelization Enabled
|
||||
.\libaftendll_x86_SSE\libaften.dll - x86 ICL PGO SSE Build with Parallelization Enabled
|
||||
.\libaftendll_x86_SSE2\libaften.dll - x86 ICL PGO SSE2 Build with Parallelization Enabled
|
||||
.\libaftendll_x86_SSE3\libaften.dll - x86 ICL PGO SSE3 Build with Parallelization Enabled
|
||||
.\aften_x86\aften.exe - x86 ICL PGO Build with Parallelization Enabled
|
||||
.\aften_x86_SSE\aften.exe - x86 ICL PGO SSE Build with Parallelization Enabled
|
||||
.\aften_x86_SSE2\aften.exe - x86 ICL PGO SSE2 Build with Parallelization Enabled
|
||||
.\aften_x86_SSE3\aften.exe - x86 ICL PGO SSE3 Build with Parallelization Enabled
|
||||
|
||||
Win64 Builds (AMD64):
|
||||
|
||||
.\wavfilter_AMD64\wavfilter.exe - AMD64 ICL Build
|
||||
.\wavinfo_AMD64\wavinfo.exe - AMD64 ICL Build
|
||||
.\wavrms_AMD64\wavrms.exe - AMD64 ICL Build
|
||||
.\libaftendll_AMD64\libaften.dll - AMD64 ICL PGO Build with Parallelization Enabled
|
||||
.\libaftendll_AMD64_SSE2\libaften.dll - AMD64 ICL PGO SSE2 Build with Parallelization Enabled
|
||||
.\libaftendll_AMD64_SSE3\libaften.dll - AMD64 ICL PGO SSE3 Build with Parallelization Enabled
|
||||
.\aften_AMD64\aften.exe - AMD64 ICL PGO Build with Parallelization Enabled
|
||||
.\aften_AMD64_SSE2\aften.exe - AMD64 ICL PGO SSE2 Build with Parallelization Enabled
|
||||
.\aften_AMD64_SSE3\aften.exe - AMD64 ICL PGO SSE3 Build with Parallelization Enabled
|
||||
|
||||
Glossary:
|
||||
|
||||
ICL - Intel C++ Compiler
|
||||
PGO - Profile-Guided Optimizations by Intel C++ Compiler (http://www.intel.com/)
|
||||
IPO - Interprocedural Optimization by Intel C++ Compiler (http://www.intel.com/)
|
||||
MMX - Assembly Opimizations for MMX (http://en.wikipedia.org/wiki/MMX)
|
||||
SSE - Assembly Opimizations for SSE (http://en.wikipedia.org/wiki/Streaming_SIMD_Extensions)
|
||||
SSE2 - Assembly Opimizations for SSE2 (http://en.wikipedia.org/wiki/SSE2)
|
||||
SSE3 - Assembly Opimizations for SSE2 (http://en.wikipedia.org/wiki/SSE3)
|
||||
x86 - Binaries for 32-bit microprocessor architecture (http://en.wikipedia.org/wiki/X86), and
|
||||
used under Miscorsoft Windows 32 bit operating systems.
|
||||
AMD64 - Binaries for 64-bit microprocessor architecture (http://en.wikipedia.org/wiki/AMD64),
|
||||
used under Miscorsoft Windows 64 bit operating systems.
|
||||
|
||||
Find more about Intel C++ Compiler: http://www.intel.com/cd/software/products/asmo-na/eng/compilers/cwin/279578.htm
|
||||
|
||||
Notes:
|
||||
|
||||
Win32 builds will run under Win64 operating systems but Win64 will not run under Win32 OS's.
|
||||
SSE, SSE2 and SSE3 builds require compatible CPU's. Use http://www.cpuid.com/cpuz.php
|
||||
program to check if your hardware is compatible with specific build.
|
||||
|
||||
SSE3 builds include SSE3, SSE2, SSE and MMX optimizations.
|
||||
SSE2 builds include SSE2, SSE and MMX optimizations.
|
||||
SSE builds include SSE, MMX optimizations.
|
||||
|
||||
For each libaften.dll build there is libaften.exp and libaften.lib available,
|
||||
to use it in your software.
|
||||
|
||||
Thanks,
|
||||
Wiesław Šoltés
|
Двоичный файл не отображается.
Двоичный файл не отображается.
Двоичный файл не отображается.
Двоичный файл не отображается.
Двоичный файл не отображается.
Двоичный файл не отображается.
|
@ -0,0 +1,14 @@
|
|||
@echo off
|
||||
setlocal
|
||||
|
||||
set PackageVersion=git-20091226-icl11_1_054
|
||||
set PackageSrc=aften-%PackageVersion%-src
|
||||
set PackageWin32=aften-%PackageVersion%-win32-bin
|
||||
set PackageWin64=aften-%PackageVersion%-win64-bin
|
||||
set Archiver_7Zip=C:\Program Files\7-Zip\7z.exe
|
||||
|
||||
FOR /D %%i IN (%PackageSrc%;%PackageWin32%;%PackageWin64%) DO (
|
||||
"%Archiver_7Zip%" a "%%i.zip" "%%i\*"
|
||||
)
|
||||
|
||||
endlocal
|
|
@ -0,0 +1,23 @@
|
|||
Windows (Win32 and Win64) build environment for aften and libaften.
|
||||
|
||||
Building aften and libaften using Intel C++ Compiler v11.1.054:
|
||||
|
||||
Configure paths in 'feedback.cmd' and 'build_intel.cmd' batch scripts to
|
||||
match your system configuration and available compilers.
|
||||
|
||||
Run 'build_win32_release.cmd' batch script to create Win32 Release binaries.
|
||||
Run 'build_win64_release.cmd' batch script to create Win64 Release binaries (req. Windows x64 version).
|
||||
|
||||
Run 'build_win32_debug.cmd' batch script to create Win32 Debug binaries.
|
||||
Run 'build_win64_debug.cmd' batch script to create Win64 Debug binaries (req. Windows x64 version).
|
||||
|
||||
Notes:
|
||||
|
||||
- Release binaries for windows are placed in 'output' sub-directories.
|
||||
|
||||
- Informations about each build can be found at 'help/readme.txt' file.
|
||||
|
||||
- Check 'build_intel.cmd' batch script to find more informations about the build system.
|
||||
|
||||
Thanks,
|
||||
Wiesław Šoltés <wieslaw.soltes@gmail.com>
|
|
@ -0,0 +1,232 @@
|
|||
// ISO C9x compliant stdint.h for Microsoft Visual Studio
|
||||
// Based on ISO/IEC 9899:TC2 Committee draft (May 6, 2005) WG14/N1124
|
||||
//
|
||||
// Copyright (c) 2006-2008 Alexander Chemeris
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are met:
|
||||
//
|
||||
// 1. Redistributions of source code must retain the above copyright notice,
|
||||
// this list of conditions and the following disclaimer.
|
||||
//
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
//
|
||||
// 3. The name of the author may be used to endorse or promote products
|
||||
// derived from this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
||||
// EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
||||
// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _MSC_VER // [
|
||||
#error "Use this header only with Microsoft Visual C++ compilers!"
|
||||
#endif // _MSC_VER ]
|
||||
|
||||
#ifndef _MSC_STDINT_H_ // [
|
||||
#define _MSC_STDINT_H_
|
||||
|
||||
#if _MSC_VER > 1000
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#include <limits.h>
|
||||
|
||||
// For Visual Studio 6 in C++ mode wrap <wchar.h> include with 'extern "C++" {}'
|
||||
// or compiler give many errors like this:
|
||||
// error C2733: second C linkage of overloaded function 'wmemchr' not allowed
|
||||
#if (_MSC_VER < 1300) && defined(__cplusplus)
|
||||
extern "C++" {
|
||||
#endif
|
||||
# include <wchar.h>
|
||||
#if (_MSC_VER < 1300) && defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
// Define _W64 macros to mark types changing their size, like intptr_t.
|
||||
#ifndef _W64
|
||||
# if !defined(__midl) && (defined(_X86_) || defined(_M_IX86)) && _MSC_VER >= 1300
|
||||
# define _W64 __w64
|
||||
# else
|
||||
# define _W64
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
// 7.18.1 Integer types
|
||||
|
||||
// 7.18.1.1 Exact-width integer types
|
||||
typedef __int8 int8_t;
|
||||
typedef __int16 int16_t;
|
||||
typedef __int32 int32_t;
|
||||
typedef __int64 int64_t;
|
||||
typedef unsigned __int8 uint8_t;
|
||||
typedef unsigned __int16 uint16_t;
|
||||
typedef unsigned __int32 uint32_t;
|
||||
typedef unsigned __int64 uint64_t;
|
||||
|
||||
// 7.18.1.2 Minimum-width integer types
|
||||
typedef int8_t int_least8_t;
|
||||
typedef int16_t int_least16_t;
|
||||
typedef int32_t int_least32_t;
|
||||
typedef int64_t int_least64_t;
|
||||
typedef uint8_t uint_least8_t;
|
||||
typedef uint16_t uint_least16_t;
|
||||
typedef uint32_t uint_least32_t;
|
||||
typedef uint64_t uint_least64_t;
|
||||
|
||||
// 7.18.1.3 Fastest minimum-width integer types
|
||||
typedef int8_t int_fast8_t;
|
||||
typedef int16_t int_fast16_t;
|
||||
typedef int32_t int_fast32_t;
|
||||
typedef int64_t int_fast64_t;
|
||||
typedef uint8_t uint_fast8_t;
|
||||
typedef uint16_t uint_fast16_t;
|
||||
typedef uint32_t uint_fast32_t;
|
||||
typedef uint64_t uint_fast64_t;
|
||||
|
||||
// 7.18.1.4 Integer types capable of holding object pointers
|
||||
#ifdef _WIN64 // [
|
||||
typedef __int64 intptr_t;
|
||||
typedef unsigned __int64 uintptr_t;
|
||||
#else // _WIN64 ][
|
||||
typedef _W64 int intptr_t;
|
||||
typedef _W64 unsigned int uintptr_t;
|
||||
#endif // _WIN64 ]
|
||||
|
||||
// 7.18.1.5 Greatest-width integer types
|
||||
typedef int64_t intmax_t;
|
||||
typedef uint64_t uintmax_t;
|
||||
|
||||
|
||||
// 7.18.2 Limits of specified-width integer types
|
||||
|
||||
#if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) // [ See footnote 220 at page 257 and footnote 221 at page 259
|
||||
|
||||
// 7.18.2.1 Limits of exact-width integer types
|
||||
#define INT8_MIN ((int8_t)_I8_MIN)
|
||||
#define INT8_MAX _I8_MAX
|
||||
#define INT16_MIN ((int16_t)_I16_MIN)
|
||||
#define INT16_MAX _I16_MAX
|
||||
#define INT32_MIN ((int32_t)_I32_MIN)
|
||||
#define INT32_MAX _I32_MAX
|
||||
#define INT64_MIN ((int64_t)_I64_MIN)
|
||||
#define INT64_MAX _I64_MAX
|
||||
#define UINT8_MAX _UI8_MAX
|
||||
#define UINT16_MAX _UI16_MAX
|
||||
#define UINT32_MAX _UI32_MAX
|
||||
#define UINT64_MAX _UI64_MAX
|
||||
|
||||
// 7.18.2.2 Limits of minimum-width integer types
|
||||
#define INT_LEAST8_MIN INT8_MIN
|
||||
#define INT_LEAST8_MAX INT8_MAX
|
||||
#define INT_LEAST16_MIN INT16_MIN
|
||||
#define INT_LEAST16_MAX INT16_MAX
|
||||
#define INT_LEAST32_MIN INT32_MIN
|
||||
#define INT_LEAST32_MAX INT32_MAX
|
||||
#define INT_LEAST64_MIN INT64_MIN
|
||||
#define INT_LEAST64_MAX INT64_MAX
|
||||
#define UINT_LEAST8_MAX UINT8_MAX
|
||||
#define UINT_LEAST16_MAX UINT16_MAX
|
||||
#define UINT_LEAST32_MAX UINT32_MAX
|
||||
#define UINT_LEAST64_MAX UINT64_MAX
|
||||
|
||||
// 7.18.2.3 Limits of fastest minimum-width integer types
|
||||
#define INT_FAST8_MIN INT8_MIN
|
||||
#define INT_FAST8_MAX INT8_MAX
|
||||
#define INT_FAST16_MIN INT16_MIN
|
||||
#define INT_FAST16_MAX INT16_MAX
|
||||
#define INT_FAST32_MIN INT32_MIN
|
||||
#define INT_FAST32_MAX INT32_MAX
|
||||
#define INT_FAST64_MIN INT64_MIN
|
||||
#define INT_FAST64_MAX INT64_MAX
|
||||
#define UINT_FAST8_MAX UINT8_MAX
|
||||
#define UINT_FAST16_MAX UINT16_MAX
|
||||
#define UINT_FAST32_MAX UINT32_MAX
|
||||
#define UINT_FAST64_MAX UINT64_MAX
|
||||
|
||||
// 7.18.2.4 Limits of integer types capable of holding object pointers
|
||||
#ifdef _WIN64 // [
|
||||
# define INTPTR_MIN INT64_MIN
|
||||
# define INTPTR_MAX INT64_MAX
|
||||
# define UINTPTR_MAX UINT64_MAX
|
||||
#else // _WIN64 ][
|
||||
# define INTPTR_MIN INT32_MIN
|
||||
# define INTPTR_MAX INT32_MAX
|
||||
# define UINTPTR_MAX UINT32_MAX
|
||||
#endif // _WIN64 ]
|
||||
|
||||
// 7.18.2.5 Limits of greatest-width integer types
|
||||
#define INTMAX_MIN INT64_MIN
|
||||
#define INTMAX_MAX INT64_MAX
|
||||
#define UINTMAX_MAX UINT64_MAX
|
||||
|
||||
// 7.18.3 Limits of other integer types
|
||||
|
||||
#ifdef _WIN64 // [
|
||||
# define PTRDIFF_MIN _I64_MIN
|
||||
# define PTRDIFF_MAX _I64_MAX
|
||||
#else // _WIN64 ][
|
||||
# define PTRDIFF_MIN _I32_MIN
|
||||
# define PTRDIFF_MAX _I32_MAX
|
||||
#endif // _WIN64 ]
|
||||
|
||||
#define SIG_ATOMIC_MIN INT_MIN
|
||||
#define SIG_ATOMIC_MAX INT_MAX
|
||||
|
||||
#ifndef SIZE_MAX // [
|
||||
# ifdef _WIN64 // [
|
||||
# define SIZE_MAX _UI64_MAX
|
||||
# else // _WIN64 ][
|
||||
# define SIZE_MAX _UI32_MAX
|
||||
# endif // _WIN64 ]
|
||||
#endif // SIZE_MAX ]
|
||||
|
||||
// WCHAR_MIN and WCHAR_MAX are also defined in <wchar.h>
|
||||
#ifndef WCHAR_MIN // [
|
||||
# define WCHAR_MIN 0
|
||||
#endif // WCHAR_MIN ]
|
||||
#ifndef WCHAR_MAX // [
|
||||
# define WCHAR_MAX _UI16_MAX
|
||||
#endif // WCHAR_MAX ]
|
||||
|
||||
#define WINT_MIN 0
|
||||
#define WINT_MAX _UI16_MAX
|
||||
|
||||
#endif // __STDC_LIMIT_MACROS ]
|
||||
|
||||
|
||||
// 7.18.4 Limits of other integer types
|
||||
|
||||
#if !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS) // [ See footnote 224 at page 260
|
||||
|
||||
// 7.18.4.1 Macros for minimum-width integer constants
|
||||
|
||||
#define INT8_C(val) val##i8
|
||||
#define INT16_C(val) val##i16
|
||||
#define INT32_C(val) val##i32
|
||||
#define INT64_C(val) val##i64
|
||||
|
||||
#define UINT8_C(val) val##ui8
|
||||
#define UINT16_C(val) val##ui16
|
||||
#define UINT32_C(val) val##ui32
|
||||
#define UINT64_C(val) val##ui64
|
||||
|
||||
// 7.18.4.2 Macros for greatest-width integer constants
|
||||
#define INTMAX_C INT64_C
|
||||
#define UINTMAX_C UINT64_C
|
||||
|
||||
#endif // __STDC_CONSTANT_MACROS ]
|
||||
|
||||
|
||||
#endif // _MSC_STDINT_H_ ]
|
Загрузка…
Ссылка в новой задаче