diff --git a/ArCueDotNet/ArCueDotNet.csproj b/ArCueDotNet/ArCueDotNet.csproj index cc009e0..4c2df87 100644 --- a/ArCueDotNet/ArCueDotNet.csproj +++ b/ArCueDotNet/ArCueDotNet.csproj @@ -22,7 +22,7 @@ pdbonly true - bin\Release\ + ..\bin\any\Release\ TRACE prompt 4 diff --git a/Bwg.Hardware/Bwg.Hardware.csproj b/Bwg.Hardware/Bwg.Hardware.csproj index fe3a896..281a43f 100644 --- a/Bwg.Hardware/Bwg.Hardware.csproj +++ b/Bwg.Hardware/Bwg.Hardware.csproj @@ -38,7 +38,7 @@ pdbonly true - bin\Release\ + ..\bin\any\Release\ TRACE prompt 4 diff --git a/Bwg.Logging/Bwg.Logging.csproj b/Bwg.Logging/Bwg.Logging.csproj index 13882ad..db344b4 100644 --- a/Bwg.Logging/Bwg.Logging.csproj +++ b/Bwg.Logging/Bwg.Logging.csproj @@ -38,11 +38,11 @@ pdbonly true - bin\Release\ + ..\bin\any\Release\ TRACE prompt 4 - bin\Release\Bwg.Logging.XML + ..\bin\any\Release\\Bwg.Logging.XML true diff --git a/Bwg.Scsi/Bwg.Scsi.csproj b/Bwg.Scsi/Bwg.Scsi.csproj index 789a3d1..19f690e 100644 --- a/Bwg.Scsi/Bwg.Scsi.csproj +++ b/Bwg.Scsi/Bwg.Scsi.csproj @@ -39,12 +39,12 @@ pdbonly true - bin\Release\ + ..\bin\any\Release\ TRACE prompt 4 true - bin\Release\Bwg.Scsi.XML + ..\bin\any\Release\Bwg.Scsi.XML true diff --git a/CUEControls/CUEControls.csproj b/CUEControls/CUEControls.csproj index 36919b6..f7c4f18 100644 --- a/CUEControls/CUEControls.csproj +++ b/CUEControls/CUEControls.csproj @@ -23,7 +23,7 @@ pdbonly true - bin\Release\ + ..\bin\any\Release\ TRACE prompt 4 diff --git a/CUERipper/CUERipper.csproj b/CUERipper/CUERipper.csproj index 48edf8c..d6988f0 100644 --- a/CUERipper/CUERipper.csproj +++ b/CUERipper/CUERipper.csproj @@ -22,7 +22,7 @@ pdbonly true - bin\Release\ + ..\bin\any\Release\ TRACE prompt 4 diff --git a/CUETools.ALACEnc/CUETools.ALACEnc.csproj b/CUETools.ALACEnc/CUETools.ALACEnc.csproj new file mode 100644 index 0000000..860ea83 --- /dev/null +++ b/CUETools.ALACEnc/CUETools.ALACEnc.csproj @@ -0,0 +1,57 @@ + + + Debug + AnyCPU + 8.0.50727 + 2.0 + {8E6E1763-39AE-491D-A10F-44C8844ABA5B} + Exe + Properties + CUETools.ALACEnc + CUETools.ALACEnc + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + ..\bin\any\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + {F2EC7193-D5E5-4252-9803-5CEB407E910F} + CUETools.Codecs.ALAC + + + {6458A13A-30EF-45A9-9D58-E5031B17BEE2} + CUETools.Codecs + + + + + \ No newline at end of file diff --git a/CUETools.ALACEnc/Program.cs b/CUETools.ALACEnc/Program.cs new file mode 100644 index 0000000..d30913d --- /dev/null +++ b/CUETools.ALACEnc/Program.cs @@ -0,0 +1,291 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.IO; +using CUETools.Codecs; +using CUETools.Codecs.ALAC; + +namespace CUETools.ALACEnc +{ + class Program + { + static void Usage() + { + Console.WriteLine("Usage : CUETools.ALACEnc.exe [options] "); + Console.WriteLine(); + Console.WriteLine("Options:"); + Console.WriteLine(); + Console.WriteLine(" -0 .. -10 Compression level, default 5."); + Console.WriteLine(" -o Output filename, or \"-\" for stdout, or nul."); + //Console.WriteLine(" -p # Padding bytes."); + Console.WriteLine(" -q --quiet Quiet mode."); + Console.WriteLine(" --verify Verify during encoding."); + //Console.WriteLine(" --no-seektable Don't generate a seektable."); + Console.WriteLine(); + Console.WriteLine("Advanced Options:"); + Console.WriteLine(); + Console.WriteLine(" -b # Block size."); + Console.WriteLine(" -s Stereo decorrelation (independent,estimate,evaluate,search)."); + Console.WriteLine(" --history-modifier # Rice history modifier {max} or {min},{max}, default 4,4."); + Console.WriteLine(); + Console.WriteLine("LPC options:"); + Console.WriteLine(); + Console.WriteLine(" -m Prediction order search (estimate,estsearch,logfast,search)."); + Console.WriteLine(" -e # Estimation depth (1..30)."); + Console.WriteLine(" -w [,] One or more window functions (welch,hann,flattop,tukey)."); + Console.WriteLine(" --window-method Window selection method (estimate,evaluate,search)."); + Console.WriteLine(" -l #[,#] Prediction order {max} or {min},{max} (1..30)."); + Console.WriteLine(); + } + + static int Main(string[] args) + { + TextWriter stdout = Console.Out; + Console.SetOut(Console.Error); + + DateTime start = DateTime.Now; + TimeSpan lastPrint = TimeSpan.FromMilliseconds(0); + bool debug = false, quiet = false; + string stereo_method = null; + string window_method = null; + string order_method = null; + string window_function = null; + string input_file = null; + string output_file = null; + int min_lpc_order = -1, max_lpc_order = -1, + blocksize = -1, estimation_depth = -1, + min_modifier = -1, max_modifier = -1; + int level = -1, padding = -1; + int initial_history = -1, history_mult = -1; + int adaptive_passes = -1; + bool do_seektable = true, do_verify = false; + bool buffered = false; + + for (int arg = 0; arg < args.Length; arg++) + { + bool ok = true; + if (args[arg].Length == 0) + ok = false; + else if (args[arg] == "--debug") + debug = true; + else if ((args[arg] == "-q" || args[arg] == "--quiet")) + quiet = true; + else if (args[arg] == "--verify") + do_verify = true; + else if (args[arg] == "--no-seektable") + do_seektable = false; + else if (args[arg] == "--buffered") + buffered = true; + else if ((args[arg] == "-o" || args[arg] == "--output") && ++arg < args.Length) + output_file = args[arg]; + else if ((args[arg] == "-s" || args[arg] == "--stereo") && ++arg < args.Length) + stereo_method = args[arg]; + else if ((args[arg] == "-m" || args[arg] == "--order-method") && ++arg < args.Length) + order_method = args[arg]; + else if ((args[arg] == "-w" || args[arg] == "--window") && ++arg < args.Length) + window_function = args[arg]; + else if (args[arg] == "--window-method" && ++arg < args.Length) + window_method = args[arg]; + else if ((args[arg] == "-l" || args[arg] == "--lpc-order") && ++arg < args.Length) + { + ok = (args[arg].Split(',').Length == 2 && + int.TryParse(args[arg].Split(',')[0], out min_lpc_order) && + int.TryParse(args[arg].Split(',')[1], out max_lpc_order)) || + int.TryParse(args[arg], out max_lpc_order); + } + else if ((args[arg] == "--history-modifier") && ++arg < args.Length) + { + ok = (args[arg].Split(',').Length == 2 && + int.TryParse(args[arg].Split(',')[0], out min_modifier) && + int.TryParse(args[arg].Split(',')[1], out max_modifier)) || + int.TryParse(args[arg], out max_modifier); + } + else if ((args[arg] == "--initial-history") && ++arg < args.Length) + ok = int.TryParse(args[arg], out initial_history); + else if ((args[arg] == "--adaptive-passes") && ++arg < args.Length) + ok = int.TryParse(args[arg], out adaptive_passes); + else if ((args[arg] == "--history-mult") && ++arg < args.Length) + ok = int.TryParse(args[arg], out history_mult); + else if ((args[arg] == "-e" || args[arg] == "--estimation-depth") && ++arg < args.Length) + ok = int.TryParse(args[arg], out estimation_depth); + else if ((args[arg] == "-b" || args[arg] == "--blocksize") && ++arg < args.Length) + ok = int.TryParse(args[arg], out blocksize); + else if ((args[arg] == "-p" || args[arg] == "--padding") && ++arg < args.Length) + ok = int.TryParse(args[arg], out padding); + else if (args[arg] != "-" && args[arg][0] == '-' && int.TryParse(args[arg].Substring(1), out level)) + ok = level >= 0 && level <= 11; + else if ((args[arg][0] != '-' || args[arg] == "-") && input_file == null) + input_file = args[arg]; + else + ok = false; + if (!ok) + { + Usage(); + return 1; + } + } + if (input_file == null || ((input_file == "-" || Path.GetExtension(input_file) == ".m4a") && output_file == null)) + { + Usage(); + return 2; + } + + if (!quiet) + { + Console.WriteLine("CUETools.ALACEnc, Copyright (C) 2009 Gregory S. Chudov."); + Console.WriteLine("Based on ffdshow ALAC audio encoder"); + Console.WriteLine("Copyright (c) 2008 Jaikrishnan Menon, "); + Console.WriteLine("This is free software under the GNU GPLv3+ license; There is NO WARRANTY, to"); + Console.WriteLine("the extent permitted by law. for details."); + } + + //byte [] b = new byte[0x10000]; + //int len = 0; + //Stream si = Console.OpenStandardInput(); + //Stream so = new FileStream(output_file, FileMode.Create); + //do + //{ + // len = si.Read(b, 0, 0x10000); + // so.Write(b, 0, len); + //} while (len > 0); + //return 0; + IAudioSource audioSource; + if (input_file == "-") + audioSource = new WAVReader("", Console.OpenStandardInput()); + else if (File.Exists(input_file) && Path.GetExtension(input_file) == ".wav") + audioSource = new WAVReader(input_file, null); + else if (File.Exists(input_file) && Path.GetExtension(input_file) == ".m4a") + audioSource = new ALACReader(input_file, null); + else + { + Usage(); + return 2; + } + if (buffered) + audioSource = new AudioPipe(audioSource, 0x10000); + if (output_file == null) + output_file = Path.ChangeExtension(input_file, "m4a"); + ALACWriter alac = new ALACWriter((output_file == "-" || output_file == "nul") ? "" : output_file, + output_file == "-" ? Console.OpenStandardOutput() : + output_file == "nul" ? new NullStream() : null, + audioSource.PCM); + alac.FinalSampleCount = (long)audioSource.Length; + IAudioDest audioDest = alac; + AudioBuffer buff = new AudioBuffer(audioSource, 0x10000); + + try + { + if (level >= 0) + alac.CompressionLevel = level; + if (stereo_method != null) + alac.StereoMethod = Alac.LookupStereoMethod(stereo_method); + if (order_method != null) + alac.OrderMethod = Alac.LookupOrderMethod(order_method); + if (window_function != null) + alac.WindowFunction = Alac.LookupWindowFunction(window_function); + if (window_method != null) + alac.WindowMethod = Alac.LookupWindowMethod(window_method); + if (max_lpc_order >= 0) + alac.MaxLPCOrder = max_lpc_order; + if (min_lpc_order >= 0) + alac.MinLPCOrder = min_lpc_order; + if (max_modifier >= 0) + alac.MaxHistoryModifier = max_modifier; + if (min_modifier >= 0) + alac.MinHistoryModifier = min_modifier; + if (history_mult >= 0) + alac.HistoryMult = history_mult; + if (initial_history >= 0) + alac.InitialHistory = initial_history; + if (blocksize >= 0) + alac.BlockSize = blocksize; + if (estimation_depth >= 0) + alac.EstimationDepth = estimation_depth; + if (padding >= 0) + alac.PaddingLength = padding; + if (adaptive_passes >= 0) + alac.AdaptivePasses = adaptive_passes; + alac.DoSeekTable = do_seektable; + alac.DoVerify = do_verify; + } + catch (Exception ex) + { + Usage(); + Console.WriteLine(""); + Console.WriteLine("Error: {0}.", ex.Message); + return 3; + } + + if (!quiet) + { + Console.WriteLine("Filename : {0}", input_file); + Console.WriteLine("File Info : {0}kHz; {1} channel; {2} bit; {3}", audioSource.PCM.SampleRate, audioSource.PCM.ChannelCount, audioSource.PCM.BitsPerSample, TimeSpan.FromSeconds(audioSource.Length * 1.0 / audioSource.PCM.SampleRate)); + } + +#if !DEBUG + try +#endif + { + while (audioSource.Read(buff, -1) != 0) + { + audioDest.Write(buff); + TimeSpan elapsed = DateTime.Now - start; + if (!quiet) + { + if ((elapsed - lastPrint).TotalMilliseconds > 60) + { + Console.Error.Write("\rProgress : {0:00}%; {1:0.00}x; {2}/{3}", + 100.0 * audioSource.Position / audioSource.Length, + audioSource.Position / elapsed.TotalSeconds / audioSource.PCM.SampleRate, + elapsed, + TimeSpan.FromMilliseconds(elapsed.TotalMilliseconds / audioSource.Position * audioSource.Length) + ); + lastPrint = elapsed; + } + } + } + audioDest.Close(); + } +#if !DEBUG + catch (Exception ex) + { + Console.Error.Write("\r \r"); + Console.WriteLine("Error : {0}", ex.Message); + audioDest.Delete(); + audioSource.Close(); + return 4; + } +#endif + + if (!quiet) + { + TimeSpan totalElapsed = DateTime.Now - start; + Console.Error.Write("\r \r"); + Console.WriteLine("Results : {0:0.00}x; {1}", + audioSource.Position / totalElapsed.TotalSeconds / audioSource.PCM.SampleRate, + totalElapsed + ); + } + audioSource.Close(); + + if (debug) + { + Console.SetOut(stdout); + Console.Out.WriteLine("{0}\t{1}\t{2}\t{3}\t{4}\t{5}..{6}\t{7}..{8}\t{9}", + alac.TotalSize, + alac.UserProcessorTime.TotalSeconds, + alac.StereoMethod.ToString().PadRight(15), + (alac.OrderMethod.ToString() + (alac.OrderMethod == OrderMethod.Estimate ? "(" + alac.EstimationDepth.ToString() + ")" : "")).PadRight(15), + alac.WindowFunction.ToString() + "(" + alac.AdaptivePasses.ToString() + ")", + alac.MinLPCOrder, + alac.MaxLPCOrder, + alac.MinHistoryModifier, + alac.MaxHistoryModifier, + alac.BlockSize + ); + } + //File.SetAttributes(output_file, FileAttributes.ReadOnly); + return 0; + } + } +} diff --git a/CUETools.ALACEnc/Properties/AssemblyInfo.cs b/CUETools.ALACEnc/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..5b7c58a --- /dev/null +++ b/CUETools.ALACEnc/Properties/AssemblyInfo.cs @@ -0,0 +1,33 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("CUETools.ALACEnc")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Microsoft")] +[assembly: AssemblyProduct("CUETools.ALACEnc")] +[assembly: AssemblyCopyright("Copyright © Microsoft 2009")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("24fa1fb9-e01a-48cf-b478-f560496d1ed3")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/CUETools.AccurateRip/AccurateRip.cs b/CUETools.AccurateRip/AccurateRip.cs index 4d687e7..07b9e17 100644 --- a/CUETools.AccurateRip/AccurateRip.cs +++ b/CUETools.AccurateRip/AccurateRip.cs @@ -41,7 +41,7 @@ For each range i calculate baseSum, which is an AR CRC of the current sample, us All the other CRC's in this offset range are calculated by consequently adding sampleValue to the previous sum. */ - unsafe private void CalculateAccurateRipCRCsSemifast(int* samples, uint count, int iTrack, uint currentOffset, uint previousOffset, uint trackLength) + unsafe private void CalculateAccurateRipCRCsSemifast(int* samples, int count, int iTrack, int currentOffset, int previousOffset, int trackLength) { fixed (uint* CRCsA = &_offsetedCRC[Math.Max(0, iTrack - 1), 0], CRCsB = &_offsetedCRC[iTrack, 0], @@ -51,7 +51,7 @@ All the other CRC's in this offset range are calculated by consequently adding s //CRC32C = &_offsetedCRC32[Math.Min(_toc.AudioTracks - 1, iTrack + 1), 0] ) { - for (uint si = 0; si < count; si++) + for (int si = 0; si < count; si++) { uint sampleValue = (uint)((samples[2 * si] & 0xffff) + (samples[2 * si + 1] << 16)); int i; @@ -84,7 +84,7 @@ All the other CRC's in this offset range are calculated by consequently adding s } } - unsafe private void CalculateAccurateRipCRCs(int* samples, uint count, int iTrack, uint currentOffset, uint previousOffset, uint trackLength) + unsafe private void CalculateAccurateRipCRCs(int* samples, int count, int iTrack, int currentOffset, int previousOffset, int trackLength) { for (int si = 0; si < count; si++) { @@ -123,10 +123,10 @@ All the other CRC's in this offset range are calculated by consequently adding s } } - unsafe private void CalculateAccurateRipCRCsFast(int* samples, uint count, int iTrack, uint currentOffset) + unsafe private void CalculateAccurateRipCRCsFast(int* samples, int count, int iTrack, int currentOffset) { - int s1 = (int)Math.Min(count, Math.Max(0, 450 * 588 - _arOffsetRange - (int)currentOffset)); - int s2 = (int)Math.Min(count, Math.Max(0, 451 * 588 + _arOffsetRange - (int)currentOffset)); + int s1 = Math.Min(count, Math.Max(0, 450 * 588 - _arOffsetRange - currentOffset)); + int s2 = Math.Min(count, Math.Max(0, 451 * 588 + _arOffsetRange - currentOffset)); if (s1 < s2) fixed (uint* FrameCRCs = &_offsetedFrame450CRC[iTrack, 0]) for (int sj = s1; sj < s2; sj++) @@ -141,15 +141,14 @@ All the other CRC's in this offset range are calculated by consequently adding s fixed (uint* CRCs = &_offsetedCRC[iTrack, 0]) { uint baseSum = 0, stepSum = 0; - int* s = samples, fin = samples + 2 * count; - uint mult = 0; - while (s < fin) + int* s = samples; + for (uint mult = 0; mult < count; mult++) { uint sampleValue = (uint)((*(s++) & 0xffff) + (*(s++) << 16)); stepSum += sampleValue; - baseSum += sampleValue * (mult++); + baseSum += sampleValue * mult; } - currentOffset += (uint)_arOffsetRange + 1; + currentOffset += _arOffsetRange + 1; baseSum += stepSum * (uint)currentOffset; for (int i = 2 * _arOffsetRange; i >= 0; i--) { @@ -274,39 +273,78 @@ All the other CRC's in this offset range are calculated by consequently adding s return _offsetedFrame450CRC[iTrack, _arOffsetRange - oi]; } - public void Write(int[,] sampleBuffer, int offset, int count) + public unsafe void CalculateCRCs(AudioBuffer buff, int pos, int count) { - uint sampleCount = (uint)count; - for (uint pos = (uint)offset; pos < sampleCount; ) + uint crc0 = _CRC32[0]; + uint crc1 = _CRC32[_currentTrack]; + uint crc2 = _CRCWONULL[0]; + uint crc3 = _CRCWONULL[_currentTrack]; + + fixed (int* pSampleBuff = &buff.Samples[pos, 0]) + fixed (uint* t = _crc32.table) { - uint copyCount = Math.Min(sampleCount - pos, (uint)_samplesRemTrack); + for (int i = 0; i < 2 * count; i++) + { + int s = pSampleBuff[i]; + byte s0 = (byte)s; + byte s1 = (byte)(s >> 8); + if (s != 0) + { + crc2 = (crc2 >> 8) ^ t[((byte)crc2) ^ s0]; + crc2 = (crc2 >> 8) ^ t[((byte)crc2) ^ s1]; + crc3 = (crc3 >> 8) ^ t[((byte)crc3) ^ s0]; + crc3 = (crc3 >> 8) ^ t[((byte)crc3) ^ s1]; + } + crc0 = (crc0 >> 8) ^ t[((byte)crc0) ^ s0]; + crc0 = (crc0 >> 8) ^ t[((byte)crc0) ^ s1]; + crc1 = (crc1 >> 8) ^ t[((byte)crc1) ^ s0]; + crc1 = (crc1 >> 8) ^ t[((byte)crc1) ^ s1]; + } + } + + _CRC32[0] = crc0; + _CRCWONULL[0] = crc2; + if (_currentTrack > 0) + { + _CRC32[_currentTrack] = crc1; + _CRCWONULL[_currentTrack] = crc3; + } + } + + public void Write(AudioBuffer sampleBuffer) + { + sampleBuffer.Prepare(this); + + int pos = 0; + while (pos < sampleBuffer.Length) + { + int copyCount = (int)Math.Min((long)sampleBuffer.Length - pos, _samplesRemTrack); + + CalculateCRCs(sampleBuffer, pos, copyCount); + unsafe { - fixed (int* pSampleBuff = &sampleBuffer[pos, 0]) + fixed (int* pSampleBuff = &sampleBuffer.Samples[pos, 0]) + //fixed (byte* pByteBuff = &sampleBuffer.Bytes[pos * sampleBuffer.BlockAlign]) { if (_currentTrack > 0) { - uint trackLength = _toc[_currentTrack + _toc.FirstAudio - 1].Length * 588; - uint currentOffset = (uint)_sampleCount - _toc[_currentTrack + _toc.FirstAudio - 1].Start * 588; - uint previousOffset = _currentTrack > 1 ? _toc[_currentTrack + _toc.FirstAudio - 2].Length * 588 : _toc[_toc.FirstAudio].Pregap * 588; - uint si1 = (uint)Math.Min(copyCount, Math.Max(0, 588 * (_currentTrack == 1 ? 10 : 5) - (int)currentOffset)); - uint si2 = (uint)Math.Min(copyCount, Math.Max(si1, trackLength - (int)currentOffset - 588 * (_currentTrack == _toc.AudioTracks ? 10 : 5))); + int trackLength = (int)_toc[_currentTrack + _toc.FirstAudio - 1].Length * 588; + int currentOffset = (int)_sampleCount - (int)_toc[_currentTrack + _toc.FirstAudio - 1].Start * 588; + int previousOffset = _currentTrack > 1 ? (int)_toc[_currentTrack + _toc.FirstAudio - 2].Length * 588 : (int)_toc[_toc.FirstAudio].Pregap * 588; + int si1 = Math.Min(copyCount, Math.Max(0, 588 * (_currentTrack == 1 ? 10 : 5) - currentOffset)); + int si2 = Math.Min(copyCount, Math.Max(si1, trackLength - currentOffset - 588 * (_currentTrack == _toc.AudioTracks ? 10 : 5))); if (_currentTrack == 1) CalculateAccurateRipCRCs(pSampleBuff, si1, _currentTrack - 1, currentOffset, previousOffset, trackLength); else CalculateAccurateRipCRCsSemifast(pSampleBuff, si1, _currentTrack - 1, currentOffset, previousOffset, trackLength); if (si2 > si1) - CalculateAccurateRipCRCsFast(pSampleBuff + si1 * 2, (uint)(si2 - si1), _currentTrack - 1, currentOffset + si1); + CalculateAccurateRipCRCsFast(pSampleBuff + si1 * 2, si2 - si1, _currentTrack - 1, currentOffset + si1); if (_currentTrack == _toc.AudioTracks) CalculateAccurateRipCRCs(pSampleBuff + si2 * 2, copyCount - si2, _currentTrack - 1, currentOffset + si2, previousOffset, trackLength); else CalculateAccurateRipCRCsSemifast(pSampleBuff + si2 * 2, copyCount - si2, _currentTrack - 1, currentOffset + si2, previousOffset, trackLength); - - _CRC32[_currentTrack] = _crc32.ComputeChecksum(_CRC32[_currentTrack], pSampleBuff, copyCount); - _CRCWONULL[_currentTrack] = _crc32.ComputeChecksumWONULL(_CRCWONULL[_currentTrack], pSampleBuff, copyCount); } - _CRC32[0] = _crc32.ComputeChecksum(_CRC32[0], pSampleBuff, copyCount); - _CRCWONULL[0] = _crc32.ComputeChecksumWONULL(_CRCWONULL[0], pSampleBuff, copyCount); } } pos += copyCount; @@ -455,14 +493,34 @@ All the other CRC's in this offset range are calculated by consequently adding s throw new Exception("unsupported"); } - public int BitsPerSample + public int CompressionLevel { - get { return 16; } + get { return 0; } + set { } + } + + public string Options + { + set + { + if (value == null || value == "") return; + throw new Exception("Unsupported options " + value); + } + } + + public AudioPCMConfig PCM + { + get { return AudioPCMConfig.RedBook; } } public long FinalSampleCount { - set { _finalSampleCount = value; } + set + { + if (value < 0) // != _toc.Length? + throw new Exception("invalid FinalSampleCount"); + _finalSampleCount = value; + } } public long BlockSize diff --git a/CUETools.AccurateRip/CUETools.AccurateRip.csproj b/CUETools.AccurateRip/CUETools.AccurateRip.csproj index 3299464..7deb6ce 100644 --- a/CUETools.AccurateRip/CUETools.AccurateRip.csproj +++ b/CUETools.AccurateRip/CUETools.AccurateRip.csproj @@ -23,7 +23,7 @@ pdbonly true - bin\Release\ + ..\bin\any\Release\ TRACE prompt 4 diff --git a/CUETools.CDImage/CDImage.cs b/CUETools.CDImage/CDImage.cs index 83c0e16..141e31d 100644 --- a/CUETools.CDImage/CDImage.cs +++ b/CUETools.CDImage/CDImage.cs @@ -355,7 +355,7 @@ namespace CUETools.CDImage { if (iIndex < _tracks[iTrack - 1].LastIndex) return _tracks[iTrack - 1][iIndex + 1].Start - _tracks[iTrack - 1][iIndex].Start; - if (iTrack < AudioTracks) + if (iTrack < TrackCount && _tracks[iTrack].IsAudio) return _tracks[iTrack][0].Start - _tracks[iTrack - 1][iIndex].Start; return _tracks[iTrack - 1].End + 1 - _tracks[iTrack - 1][iIndex].Start; } diff --git a/CUETools.CDImage/CUETools.CDImage.csproj b/CUETools.CDImage/CUETools.CDImage.csproj index dbdad51..422eb03 100644 --- a/CUETools.CDImage/CUETools.CDImage.csproj +++ b/CUETools.CDImage/CUETools.CDImage.csproj @@ -22,7 +22,7 @@ pdbonly true - bin\Release\ + ..\bin\any\Release\ TRACE prompt 4 diff --git a/CUETools.Codecs.ALAC/ALACDotNet.cs b/CUETools.Codecs.ALAC/ALACDotNet.cs index 8e84a3c..a17190d 100644 --- a/CUETools.Codecs.ALAC/ALACDotNet.cs +++ b/CUETools.Codecs.ALAC/ALACDotNet.cs @@ -27,6 +27,7 @@ using CUETools.Codecs; namespace CUETools.Codecs.ALAC { + [AudioDecoderClass("builtin alac", "m4a")] public class ALACReader : IAudioSource { public ALACReader(string path, Stream IO) @@ -36,19 +37,17 @@ namespace CUETools.Codecs.ALAC _buff = new byte[512]; _tags = new NameValueCollection(); qtmovie_read(); - if (!_formatRead || _bitsPerSample != 16 || _channelCount != 2 || _sampleRate != 44100) + if (!_formatRead || pcm.BitsPerSample != 16 || pcm.ChannelCount != 2 || pcm.SampleRate != 44100) throw new Exception("Invalid ALAC file."); _saved_mdat_pos = _IO.Position; calculate_length(); } - public ALACReader(int channels, int bps, int rice_historymult, int rice_initialhistory, int rice_kmodifier, int blocksize) + public ALACReader(AudioPCMConfig _pcm, int rice_historymult, int rice_initialhistory, int rice_kmodifier, int blocksize) { - _channelCount = channels; - _bitsPerSample = bps; - _sampleRate = 44100; + pcm = _pcm; - setinfo_max_samples_per_frame = (uint)blocksize; + setinfo_max_samples_per_frame = blocksize; setinfo_rice_historymult = (byte)rice_historymult; setinfo_rice_initialhistory = (byte)rice_initialhistory; setinfo_rice_kmodifier = (byte)rice_kmodifier; @@ -60,17 +59,12 @@ namespace CUETools.Codecs.ALAC _framesBuffer = new byte[65536]; } - public int[,] Read(int[,] buff) - { - return AudioSamples.Read(this, buff); - } - private void InitTables() { if (_predicterror_buffer_a != null) return; - setinfo_max_samples_per_frame = read_uint32(_codecData, 24); + setinfo_max_samples_per_frame = (int)read_uint32(_codecData, 24); byte setinfo_7a = read_uint8(_codecData, 28); byte setinfo_sample_size = read_uint8(_codecData, 29); setinfo_rice_historymult = read_uint8(_codecData, 30); @@ -91,29 +85,32 @@ namespace CUETools.Codecs.ALAC _framesBuffer = new byte[65536]; } - public uint Read(int[,] buff, uint sampleCount) + public int Read(AudioBuffer buff, int maxLength) { InitTables(); - uint offset = 0; + buff.Prepare(this, maxLength); + + int offset = 0; + int sampleCount = buff.Length; while (_samplesInBuffer < sampleCount) { if (_samplesInBuffer > 0) { - deinterlace(buff, offset, _samplesInBuffer); - sampleCount -= (uint) _samplesInBuffer; + deinterlace(buff.Samples, offset, _samplesInBuffer); + sampleCount -= _samplesInBuffer; offset += _samplesInBuffer; _samplesInBuffer = 0; _samplesBufferOffset = 0; } - uint sampleDuration; - uint sampleSize; - if ((int) _iSample >= _sample_byte_size.Length) - return (uint)offset; + int sampleDuration; + int sampleSize; + if (_iSample >= _sample_byte_size.Length) + return offset; get_sample_info(_iSample, out sampleDuration, out sampleSize); - _IO.Read(_framesBuffer, 0, (int) sampleSize); + _IO.Read(_framesBuffer, 0, sampleSize); decodeFrame(sampleSize); if (sampleDuration != _samplesInBuffer) throw new Exception("sample count mismatch"); @@ -122,12 +119,12 @@ namespace CUETools.Codecs.ALAC _iSample++; } - deinterlace(buff, offset, sampleCount); + deinterlace(buff.Samples, offset, sampleCount); _samplesInBuffer -= sampleCount; _samplesBufferOffset += sampleCount; if (_samplesInBuffer == 0) _samplesBufferOffset = 0; - return (uint) offset + sampleCount; + return offset + sampleCount; } public void Close() @@ -135,7 +132,7 @@ namespace CUETools.Codecs.ALAC _IO.Close(); } - public ulong Length + public long Length { get { @@ -143,7 +140,7 @@ namespace CUETools.Codecs.ALAC } } - public ulong Remaining + public long Remaining { get { @@ -151,7 +148,7 @@ namespace CUETools.Codecs.ALAC } } - public ulong Position + public long Position { get { @@ -164,10 +161,10 @@ namespace CUETools.Codecs.ALAC _samplesBufferOffset = 0; _iSample = 0; - ulong durOffs = 0; - uint sampleDuration; + long durOffs = 0; + int sampleDuration; long fileOffs = 0; - uint sampleSize; + int sampleSize; do { if (durOffs == value) @@ -183,51 +180,12 @@ namespace CUETools.Codecs.ALAC _iSample++; } while (durOffs <= value); _IO.Position = _saved_mdat_pos + fileOffs - sampleSize; - _samplesBufferOffset = (uint) (value + sampleDuration - durOffs); + _samplesBufferOffset = (int) (value + sampleDuration - durOffs); _iSample--; } } - public int BitsPerSample - { - get - { - return _bitsPerSample; - } - } - - public int ChannelCount - { - get - { - return _channelCount; - } - } - - public int SampleRate - { - get - { - return _sampleRate; - } - } - - public NameValueCollection Tags - { - get - { - return _tags; - } - set - { - _tags = value; - } - } - - public bool UpdateTags(bool preserveTime) - { - return false; - } + public AudioPCMConfig PCM { get { return pcm; } } public string Path { @@ -237,11 +195,11 @@ namespace CUETools.Codecs.ALAC } } - private void get_sample_info(ulong iSample, out uint sampleDuration, out uint sampleSize) + private void get_sample_info(long iSample, out int sampleDuration, out int sampleSize) { // if (iSample >= _sample_byte_size.Length) - uint duration_index_accum = 0; - uint duration_cur_index = 0; + int duration_index_accum = 0; + int duration_cur_index = 0; while (_time_to_sample_count[duration_cur_index] + duration_index_accum <= iSample) { duration_index_accum += _time_to_sample_count[duration_cur_index]; @@ -262,11 +220,11 @@ namespace CUETools.Codecs.ALAC // try a work around for ffdshow-generated buggy files if (_time_to_sample_count.Length == 1 && _IO.CanSeek) { - uint sample_count_0 = _time_to_sample_count[0] - 1; - uint sample_duration_0 = _time_to_sample_duration[0]; + int sample_count_0 = _time_to_sample_count[0] - 1; + int sample_duration_0 = _time_to_sample_duration[0]; Position = sample_count_0 * sample_duration_0; - uint sampleDuration; - uint sampleSize; + int sampleDuration; + int sampleSize; if ((int)_iSample < _sample_byte_size.Length) { get_sample_info(_iSample, out sampleDuration, out sampleSize); @@ -275,8 +233,8 @@ namespace CUETools.Codecs.ALAC decodeFrame(sampleSize); if (_samplesInBuffer < sampleDuration) { - _time_to_sample_duration = new uint[2] { sample_duration_0, _samplesInBuffer }; - _time_to_sample_count = new uint[2] { sample_count_0, 1 }; + _time_to_sample_duration = new int[2] { sample_duration_0, _samplesInBuffer }; + _time_to_sample_count = new int[2] { sample_count_0, 1 }; _sampleCount -= sampleDuration - _samplesInBuffer; } } @@ -485,7 +443,7 @@ namespace CUETools.Codecs.ALAC return x; } - private unsafe void basterdised_rice_decompress(uint output_size, ref int pos, ref predictor_t predictor_info, ref int[] predicterror_buffer, int readsamplesize) + private unsafe void basterdised_rice_decompress(int output_size, ref int pos, ref predictor_t predictor_info, ref int[] predicterror_buffer, int readsamplesize) { fixed (predictor_t* pr = &predictor_info) fixed (int* output_buffer = &predicterror_buffer[0]) @@ -540,7 +498,7 @@ namespace CUETools.Codecs.ALAC return (short)(1 - ((v >> 30) & 2)); } - private unsafe void predictor_decompress_fir_adapt(uint output_size, ref predictor_t predictor_info, ref int[] error_buffer, ref int[] buffer_out, int readsamplesize) + private unsafe void predictor_decompress_fir_adapt(int output_size, ref predictor_t predictor_info, ref int[] error_buffer, ref int[] buffer_out, int readsamplesize) { int i; @@ -623,7 +581,7 @@ namespace CUETools.Codecs.ALAC } } - internal unsafe void deinterlace(int[,] samplesBuffer, uint offset, uint sampleCount) + internal unsafe void deinterlace(int[,] samplesBuffer, int offset, int sampleCount) { if (sampleCount <= 0 || sampleCount > _samplesInBuffer) return; @@ -656,18 +614,18 @@ namespace CUETools.Codecs.ALAC } /* otherwise basic interlacing took place */ - AudioSamples.Interlace(buf_s, buf_a, buf_b, (int)sampleCount); + AudioSamples.Interlace(buf_s, buf_a, buf_b, sampleCount); } } internal int DecodeFrame(byte[] buffer, int pos, int len) { Array.Copy(buffer, pos, _framesBuffer, 0, len); - decodeFrame((uint)len); + decodeFrame(len); return len; // pos } - private void decodeFrame(uint sampleSize) + private void decodeFrame(int sampleSize) { _bitaccumulator = 0; int pos = 0; @@ -681,9 +639,9 @@ namespace CUETools.Codecs.ALAC bool hassize = 0 != readbits(_framesBuffer, ref pos, 1); /* the output sample size is stored soon */ int wasted_bytes = (int) readbits(_framesBuffer, ref pos, 2); /* unknown ? */ bool isnotcompressed = 0 != readbits(_framesBuffer, ref pos, 1); /* whether the frame is compressed */ - uint outputSamples = hassize ? readbits(_framesBuffer, ref pos, 32) : setinfo_max_samples_per_frame; + int outputSamples = hassize ? (int)readbits(_framesBuffer, ref pos, 32) : setinfo_max_samples_per_frame; - int readsamplesize = _bitsPerSample - (wasted_bytes * 8) + channels; + int readsamplesize = pcm.BitsPerSample - (wasted_bytes * 8) + pcm.ChannelCount; if (!isnotcompressed) { /* compressed */ @@ -710,10 +668,11 @@ namespace CUETools.Codecs.ALAC else { /* not compressed, easy case */ + int bps = pcm.BitsPerSample; for (int i = 0; i < outputSamples; i++) { - _outputsamples_buffer_a[i] = extend_sign32((int)readbits(_framesBuffer, ref pos, _bitsPerSample), _bitsPerSample); - _outputsamples_buffer_b[i] = extend_sign32((int)readbits(_framesBuffer, ref pos, _bitsPerSample), _bitsPerSample); + _outputsamples_buffer_a[i] = extend_sign32((int)readbits(_framesBuffer, ref pos, bps), bps); + _outputsamples_buffer_b[i] = extend_sign32((int)readbits(_framesBuffer, ref pos, bps), bps); } /* wasted_bytes = 0; */ _interlacing_shift = 0; @@ -828,9 +787,9 @@ namespace CUETools.Codecs.ALAC stream_read_uint16(); entry_remaining -= 2; - _channelCount = (int)stream_read_uint16(); + int _channelCount = (int)stream_read_uint16(); - _bitsPerSample = stream_read_uint16(); + int _bitsPerSample = stream_read_uint16(); entry_remaining -= 4; /* compression id */ @@ -840,13 +799,15 @@ namespace CUETools.Codecs.ALAC entry_remaining -= 4; /* sample rate - 32bit fixed point = 16bit?? */ - _sampleRate = stream_read_uint16(); + int _sampleRate = stream_read_uint16(); entry_remaining -= 2; /* skip 2 */ stream_skip(2); entry_remaining -= 2; + pcm = new AudioPCMConfig(_bitsPerSample, _channelCount, _sampleRate); + /* remaining is codec data */ //#if 0 @@ -904,13 +865,13 @@ namespace CUETools.Codecs.ALAC numentries = stream_read_uint32(); size_remaining -= 4; - _time_to_sample_count = new UInt32[numentries]; - _time_to_sample_duration = new UInt32[numentries]; + _time_to_sample_count = new int[numentries]; + _time_to_sample_duration = new int[numentries]; for (i = 0; i < numentries; i++) { - _time_to_sample_count[i] = stream_read_uint32(); - _time_to_sample_duration[i] = stream_read_uint32(); + _time_to_sample_count[i] = (int)stream_read_uint32(); + _time_to_sample_duration[i] = (int)stream_read_uint32(); size_remaining -= 8; } @@ -949,11 +910,11 @@ namespace CUETools.Codecs.ALAC numentries = stream_read_uint32(); size_remaining -= 4; - _sample_byte_size = new uint[numentries]; + _sample_byte_size = new int[numentries]; for (i = 0; i < numentries; i++) { - _sample_byte_size[i] = stream_read_uint32(); + _sample_byte_size[i] = (int)stream_read_uint32(); size_remaining -= 4; } @@ -1259,11 +1220,11 @@ namespace CUETools.Codecs.ALAC Stream _IO; byte[] _codecData; - uint[] _time_to_sample_count, _time_to_sample_duration, _sample_byte_size; + int[] _time_to_sample_count, _time_to_sample_duration, _sample_byte_size; long _saved_mdat_pos; bool _formatRead; int _bitaccumulator; - uint setinfo_max_samples_per_frame; + int setinfo_max_samples_per_frame; byte setinfo_rice_initialhistory; byte setinfo_rice_kmodifier; byte setinfo_rice_historymult; @@ -1276,17 +1237,15 @@ namespace CUETools.Codecs.ALAC predictor_t predictor_info_b; NameValueCollection _tags; - uint _samplesInBuffer, _samplesBufferOffset; + int _samplesInBuffer, _samplesBufferOffset; byte[] _framesBuffer; byte[] _buff; byte _interlacing_shift; byte _interlacing_leftweight; - int _sampleRate; - int _channelCount; - int _bitsPerSample; - ulong _sampleCount; - ulong _sampleOffset; - ulong _iSample; + AudioPCMConfig pcm; + long _sampleCount; + long _sampleOffset; + long _iSample; Dictionary _qtmovie_parsers; Dictionary _qtmovie_parser_params; diff --git a/CUETools.Codecs.ALAC/ALACWriter.cs b/CUETools.Codecs.ALAC/ALACWriter.cs index d036251..4b41fa2 100644 --- a/CUETools.Codecs.ALAC/ALACWriter.cs +++ b/CUETools.Codecs.ALAC/ALACWriter.cs @@ -32,26 +32,16 @@ using CUETools.Codecs; namespace CUETools.Codecs.ALAC { + [AudioEncoderClass("libALAC", "m4a", true, "0 1 2 3 4 5 6 7 8 9 10", "3", 1)] public class ALACWriter : IAudioDest { Stream _IO = null; string _path; long _position; - // number of audio channels - // valid values are 1 to 8 - int channels, ch_code; - - // audio sample rate in Hz - int sample_rate; - - // sample size in bits - // only 16-bit is currently supported - uint bits_per_sample; - // total stream samples - // if 0, stream length is unknown - int sample_count; + // if < 0, stream length is unknown + int sample_count = -1; ALACEncodeParams eparams; @@ -97,22 +87,22 @@ namespace CUETools.Codecs.ALAC List chunk_pos; - public ALACWriter(string path, int bitsPerSample, int channelCount, int sampleRate, Stream IO) - { - if (bitsPerSample != 16) - throw new Exception("Bits per sample must be 16."); - if (channelCount != 2) - throw new Exception("ChannelCount must be 2."); + AudioPCMConfig _pcm; - channels = channelCount; - sample_rate = sampleRate; - bits_per_sample = (uint) bitsPerSample; + public ALACWriter(string path, Stream IO, AudioPCMConfig pcm) + { + _pcm = pcm; + + if (_pcm.BitsPerSample != 16) + throw new Exception("Bits per sample must be 16."); + if (_pcm.ChannelCount != 2) + throw new Exception("ChannelCount must be 2."); _path = path; _IO = IO; - samplesBuffer = new int[Alac.MAX_BLOCKSIZE * (channels == 2 ? 5 : channels)]; - residualBuffer = new int[Alac.MAX_BLOCKSIZE * (channels == 2 ? 6 : channels + 1)]; + samplesBuffer = new int[Alac.MAX_BLOCKSIZE * (_pcm.ChannelCount == 2 ? 5 : _pcm.ChannelCount)]; + residualBuffer = new int[Alac.MAX_BLOCKSIZE * (_pcm.ChannelCount == 2 ? 6 : _pcm.ChannelCount + 1)]; windowBuffer = new float[Alac.MAX_BLOCKSIZE * 2 * Alac.MAX_LPC_WINDOWS]; eparams.set_defaults(_compressionLevel); @@ -120,10 +110,15 @@ namespace CUETools.Codecs.ALAC crc8 = new Crc8(); crc16 = new Crc16(); - frame = new ALACFrame(channels == 2 ? 5 : channels); + frame = new ALACFrame(_pcm.ChannelCount == 2 ? 5 : _pcm.ChannelCount); chunk_pos = new List(); } + public ALACWriter(string path, AudioPCMConfig pcm) + : this(path, null, pcm) + { + } + public int TotalSize { get @@ -159,6 +154,15 @@ namespace CUETools.Codecs.ALAC } } + public string Options + { + set + { + if (value == null || value == "") return; + throw new Exception("Unsupported options " + value); + } + } + #if INTEROP [DllImport("kernel32.dll")] static extern bool GetThreadTimes(IntPtr hThread, out long lpCreationTime, out long lpExitTime, out long lpKernelTime, out long lpUserTime); @@ -200,6 +204,9 @@ namespace CUETools.Codecs.ALAC bitwriter.flush(); _IO.Write(header, 0, 4); + if (sample_count <= 0 && _position != 0) + sample_count = (int)_position; + _IO.Position = _IO.Length; int trailer_len = write_trailers(); _IO.Write(header, 0, trailer_len); @@ -218,7 +225,7 @@ namespace CUETools.Codecs.ALAC public void Close() { DoClose(); - if (sample_count != 0 && _position != sample_count) + if (sample_count > 0 && _position != sample_count) throw new Exception("Samples written differs from the expected sample count."); } @@ -421,9 +428,9 @@ namespace CUETools.Codecs.ALAC } } - public int BitsPerSample + public AudioPCMConfig PCM { - get { return 16; } + get { return _pcm; } } /// @@ -436,12 +443,13 @@ namespace CUETools.Codecs.ALAC { fixed (int* fsamples = samplesBuffer, src = &samples[pos, 0]) { - if (channels == 2) + if (_pcm.ChannelCount == 2) AudioSamples.Deinterlace(fsamples + samplesInBuffer, fsamples + Alac.MAX_BLOCKSIZE + samplesInBuffer, src, block); else - for (int ch = 0; ch < channels; ch++) + for (int ch = 0; ch < _pcm.ChannelCount; ch++) { int* psamples = fsamples + ch * Alac.MAX_BLOCKSIZE + samplesInBuffer; + int channels = _pcm.ChannelCount; for (int i = 0; i < block; i++) psamples[i] = src[i * channels + ch]; } @@ -691,7 +699,7 @@ namespace CUETools.Codecs.ALAC frame.current.order = order; frame.current.window = iWindow; - int bps = (int)bits_per_sample + channels - 1; + int bps = _pcm.BitsPerSample + _pcm.ChannelCount - 1; int* coefs = stackalloc int[lpc.MAX_LPC_ORDER]; @@ -746,7 +754,7 @@ namespace CUETools.Codecs.ALAC { int* smp = frame.subframes[ch].samples; int i, n = frame.blocksize; - int bps = (int)bits_per_sample + channels - 1; + int bps = _pcm.BitsPerSample + _pcm.ChannelCount - 1; // FIXED //if (0 == (2 & frame.subframes[ch].done_fixed) && (pass != 1 || n < eparams.max_prediction_order)) @@ -793,7 +801,7 @@ namespace CUETools.Codecs.ALAC unsafe void output_frame_header(ALACFrame frame, BitWriter bitwriter) { - bitwriter.writebits(3, channels - 1); + bitwriter.writebits(3, _pcm.ChannelCount - 1); bitwriter.writebits(16, 0); bitwriter.writebits(1, frame.blocksize != eparams.block_size ? 1 : 0); // sample count is in the header bitwriter.writebits(2, 0); // wasted bytes @@ -804,7 +812,7 @@ namespace CUETools.Codecs.ALAC { bitwriter.writebits(8, frame.interlacing_shift); bitwriter.writebits(8, frame.interlacing_leftweight); - for (int ch = 0; ch < channels; ch++) + for (int ch = 0; ch < _pcm.ChannelCount; ch++) { bitwriter.writebits(4, 0); // prediction type bitwriter.writebits(4, frame.subframes[ch].best.shift); @@ -879,7 +887,7 @@ namespace CUETools.Codecs.ALAC unsafe void estimate_frame(ALACFrame frame, bool do_midside) { - int subframes = do_midside ? 5 : channels; + int subframes = do_midside ? 5 : _pcm.ChannelCount; switch (eparams.stereo_method) { @@ -938,7 +946,7 @@ namespace CUETools.Codecs.ALAC return total + bitsBest; } - for (int ch = 0; ch < channels; ch++) + for (int ch = 0; ch < _pcm.ChannelCount; ch++) total += frame.subframes[ch].best.size; return total; @@ -949,14 +957,14 @@ namespace CUETools.Codecs.ALAC switch (eparams.stereo_method) { case StereoMethod.Estimate: - for (int ch = 0; ch < channels; ch++) + for (int ch = 0; ch < _pcm.ChannelCount; ch++) { frame.subframes[ch].best.size = AudioSamples.UINT32_MAX; encode_residual_pass2(frame, ch); } break; case StereoMethod.Evaluate: - for (int ch = 0; ch < channels; ch++) + for (int ch = 0; ch < _pcm.ChannelCount; ch++) encode_residual_pass2(frame, ch); break; case StereoMethod.Search: @@ -1004,15 +1012,15 @@ namespace CUETools.Codecs.ALAC } frame.window_buffer = window; - int bps = (int)bits_per_sample + channels - 1; - if (channels != 2 || frame.blocksize <= 32 || eparams.stereo_method == StereoMethod.Independent) + int bps = _pcm.BitsPerSample + _pcm.ChannelCount - 1; + if (_pcm.ChannelCount != 2 || frame.blocksize <= 32 || eparams.stereo_method == StereoMethod.Independent) { - frame.current.residual = r + channels * Alac.MAX_BLOCKSIZE; + frame.current.residual = r + _pcm.ChannelCount * Alac.MAX_BLOCKSIZE; - for (int ch = 0; ch < channels; ch++) + for (int ch = 0; ch < _pcm.ChannelCount; ch++) frame.subframes[ch].Init(s + ch * Alac.MAX_BLOCKSIZE, r + ch * Alac.MAX_BLOCKSIZE); - for (int ch = 0; ch < channels; ch++) + for (int ch = 0; ch < _pcm.ChannelCount; ch++) encode_residual_pass2(frame, ch); } else @@ -1028,7 +1036,7 @@ namespace CUETools.Codecs.ALAC encode_estimated_frame(frame); } - for (int ch = 0; ch < channels; ch++) + for (int ch = 0; ch < _pcm.ChannelCount; ch++) { if (eparams.min_modifier == eparams.max_modifier) frame.subframes[ch].best.ricemodifier = eparams.max_modifier; @@ -1038,23 +1046,30 @@ namespace CUETools.Codecs.ALAC } uint fs = measure_frame_size(frame, false); - frame.type = ((int)fs > frame.blocksize * channels * bps) ? FrameType.Verbatim : FrameType.Compressed; + frame.type = ((int)fs > frame.blocksize * _pcm.ChannelCount * bps) ? FrameType.Verbatim : FrameType.Compressed; BitWriter bitwriter = new BitWriter(frame_buffer, 0, max_frame_size); output_frame_header(frame, bitwriter); if (frame.type == FrameType.Verbatim) { + int obps = _pcm.BitsPerSample; for (int i = 0; i < frame.blocksize; i++) - for (int ch = 0; ch < channels; ch++) - bitwriter.writebits_signed((int)bits_per_sample, frame.subframes[ch].samples[i]); + for (int ch = 0; ch < _pcm.ChannelCount; ch++) + bitwriter.writebits_signed(obps, frame.subframes[ch].samples[i]); } else if (frame.type == FrameType.Compressed) { - for (int ch = 0; ch < channels; ch++) + for (int ch = 0; ch < _pcm.ChannelCount; ch++) alac_entropy_coder(bitwriter, frame.subframes[ch].best.residual, frame.blocksize, bps, frame.subframes[ch].best.ricemodifier); } output_frame_footer(bitwriter); + if (_sample_byte_size.Length <= frame_count) + { + uint[] tmp = new uint[frame_count * 2]; + Array.Copy(_sample_byte_size, tmp, _sample_byte_size.Length); + _sample_byte_size = tmp; + } _sample_byte_size[frame_count++] = (uint)bitwriter.Length; size = frame.blocksize; @@ -1067,7 +1082,7 @@ namespace CUETools.Codecs.ALAC if (verify != null) { fixed (int* s = verifyBuffer, r = samplesBuffer) - for (int ch = 0; ch < channels; ch++) + for (int ch = 0; ch < _pcm.ChannelCount; ch++) AudioSamples.MemCpy(s + ch * Alac.MAX_BLOCKSIZE, r + ch * Alac.MAX_BLOCKSIZE, eparams.block_size); } @@ -1084,14 +1099,15 @@ namespace CUETools.Codecs.ALAC if (verify != null) { int decoded = verify.DecodeFrame(frame_buffer, 0, fs); - if (decoded != fs || verify.Remaining != (ulong)bs) + if (decoded != fs || verify.Remaining != bs) throw new Exception("validation failed!"); - int [,] deinterlaced = new int[bs,channels]; - verify.deinterlace(deinterlaced, 0, (uint)bs); + int[,] deinterlaced = new int[bs, _pcm.ChannelCount]; + verify.deinterlace(deinterlaced, 0, bs); fixed (int* s = verifyBuffer, r = deinterlaced) { + int channels = _pcm.ChannelCount; for (int i = 0; i < bs; i++) - for (int ch = 0; ch < channels; ch++) + for (int ch = 0; ch < _pcm.ChannelCount; ch++) if (r[i * channels + ch] != s[ch * Alac.MAX_BLOCKSIZE + i]) throw new Exception("validation failed!"); } @@ -1100,7 +1116,7 @@ namespace CUETools.Codecs.ALAC if (bs < blocksize) { fixed (int* s = samplesBuffer) - for (int ch = 0; ch < channels; ch++) + for (int ch = 0; ch < _pcm.ChannelCount; ch++) AudioSamples.MemCpy(s + ch * Alac.MAX_BLOCKSIZE, s + bs + ch * Alac.MAX_BLOCKSIZE, eparams.block_size - bs); } @@ -1109,7 +1125,7 @@ namespace CUETools.Codecs.ALAC return bs; } - public void Write(int[,] buff, int pos, int sampleCount) + public void Write(AudioBuffer buff) { if (!inited) { @@ -1122,12 +1138,15 @@ namespace CUETools.Codecs.ALAC inited = true; } - int len = sampleCount; + buff.Prepare(this); + + int pos = 0; + int len = buff.Length; while (len > 0) { int block = Math.Min(len, eparams.block_size - samplesInBuffer); - copy_samples(buff, pos, block); + copy_samples(buff.Samples, pos, block); len -= block; pos += block; @@ -1139,6 +1158,28 @@ namespace CUETools.Codecs.ALAC public string Path { get { return _path; } } + private DateTime? _creationTime = null; + + public DateTime CreationTime + { + set + { + _creationTime = value; + } + } + + public string Vendor + { + get + { + return vendor_string; + } + set + { + vendor_string = value; + } + } + string vendor_string = "CUETools.2.05"; int select_blocksize(int samplerate, int time_ms) @@ -1235,7 +1276,7 @@ namespace CUETools.Codecs.ALAC bitwriter.writebits(16, 16); // reserved bps bitwriter.writebits(16, 0); // reserved compression ID bitwriter.writebits(16, 0); // packet size - bitwriter.writebits(16, sample_rate); // time scale + bitwriter.writebits(16, _pcm.SampleRate); // time scale bitwriter.writebits(16, 0); // reserved chunk_start(bitwriter); { @@ -1243,15 +1284,15 @@ namespace CUETools.Codecs.ALAC bitwriter.writebits(32, 0); // reserved bitwriter.writebits(32, eparams.block_size); // max frame size bitwriter.writebits(8, 0); // reserved - bitwriter.writebits(8, bits_per_sample); + bitwriter.writebits(8, _pcm.BitsPerSample); bitwriter.writebits(8, history_mult); bitwriter.writebits(8, initial_history); bitwriter.writebits(8, k_modifier); - bitwriter.writebits(8, channels); // channels + bitwriter.writebits(8, _pcm.ChannelCount); // channels bitwriter.writebits(16, 0); // reserved bitwriter.writebits(32, max_frame_size); - bitwriter.writebits(32, sample_rate * channels * (int)bits_per_sample); // average bitrate - bitwriter.writebits(32, sample_rate); + bitwriter.writebits(32, _pcm.SampleRate * _pcm.ChannelCount * _pcm.BitsPerSample); // average bitrate + bitwriter.writebits(32, _pcm.SampleRate); } chunk_end(bitwriter); } @@ -1328,7 +1369,7 @@ namespace CUETools.Codecs.ALAC bitwriter.writebits(32, 0); // version & flags bitwriter.writebits(32, (int)UnixTime.TotalSeconds); bitwriter.writebits(32, (int)UnixTime.TotalSeconds); - bitwriter.writebits(32, sample_rate); + bitwriter.writebits(32, _pcm.SampleRate); bitwriter.writebits(32, sample_count); bitwriter.writebits(16, 0x55c4); // language bitwriter.writebits(16, 0); // quality @@ -1365,7 +1406,7 @@ namespace CUETools.Codecs.ALAC bitwriter.writebits(32, (int)UnixTime.TotalSeconds); bitwriter.writebits(32, 1); // track ID bitwriter.writebits(32, 0); // reserved - bitwriter.writebits(32, sample_count / sample_rate); + bitwriter.writebits(32, sample_count / _pcm.SampleRate); bitwriter.writebits(32, 0); // reserved bitwriter.writebits(32, 0); // reserved bitwriter.writebits(32, 0); // reserved (layer & alternate group) @@ -1436,8 +1477,8 @@ namespace CUETools.Codecs.ALAC int write_trailers() { - TimeSpan UnixTime = DateTime.Now - new DateTime(1970, 1, 1, 0, 0, 0, 0).ToLocalTime(); - header = new byte[0x1000 + frame_count * 8]; // FIXME!!! Possible buffer overrun + TimeSpan UnixTime = (_creationTime ?? DateTime.Now) - new DateTime(1970, 1, 1, 0, 0, 0, 0).ToLocalTime(); + header = new byte[0x1000 + frame_count * 8 + eparams.padding_size]; // FIXME!!! Possible buffer overrun BitWriter bitwriter = new BitWriter(header, 0, header.Length); chunk_start(bitwriter); { @@ -1447,6 +1488,12 @@ namespace CUETools.Codecs.ALAC write_chunk_udta(bitwriter); } chunk_end(bitwriter); + chunk_start(bitwriter); // padding + { + bitwriter.write('f', 'r', 'e', 'e'); + bitwriter.writebytes(eparams.padding_size, 0); + } + chunk_end(bitwriter); return bitwriter.Length; } @@ -1464,6 +1511,13 @@ namespace CUETools.Codecs.ALAC bitwriter.writebits(32, 0); chunk_end(bitwriter); + chunk_start(bitwriter); // padding + { + bitwriter.write('f', 'r', 'e', 'e'); + bitwriter.writebytes(eparams.padding_size, 0); + } + chunk_end(bitwriter); + chunk_start(bitwriter); // padding in case we need extended mdat len bitwriter.write('f', 'r', 'e', 'e'); chunk_end(bitwriter); @@ -1483,30 +1537,28 @@ namespace CUETools.Codecs.ALAC //if(flake_validate_params(s) < 0) - ch_code = channels - 1; - // FIXME: For now, only 44100 samplerate is supported - if (sample_rate != 44100) + if (_pcm.SampleRate != 44100) throw new Exception("non-standard samplerate"); // FIXME: For now, only 16-bit encoding is supported - if (bits_per_sample != 16) + if (_pcm.BitsPerSample != 16) throw new Exception("non-standard bps"); if (_blocksize == 0) { if (eparams.block_size == 0) - eparams.block_size = select_blocksize(sample_rate, eparams.block_time_ms); + eparams.block_size = select_blocksize(_pcm.SampleRate, eparams.block_time_ms); _blocksize = eparams.block_size; } else eparams.block_size = _blocksize; // set maximum encoded frame size (if larger, re-encodes in verbatim mode) - if (channels == 2) - max_frame_size = 16 + ((eparams.block_size * (int)(bits_per_sample + bits_per_sample + 1) + 7) >> 3); + if (_pcm.ChannelCount == 2) + max_frame_size = 16 + ((eparams.block_size * (_pcm.BitsPerSample + _pcm.BitsPerSample + 1) + 7) >> 3); else - max_frame_size = 16 + ((eparams.block_size * channels * (int)bits_per_sample + 7) >> 3); + max_frame_size = 16 + ((eparams.block_size * _pcm.ChannelCount * _pcm.BitsPerSample + 7) >> 3); //if (_IO.CanSeek && eparams.do_seektable) //{ @@ -1517,12 +1569,12 @@ namespace CUETools.Codecs.ALAC header_len = write_headers(); frame_buffer = new byte[max_frame_size]; - _sample_byte_size = new uint[sample_count / eparams.block_size + 1]; + _sample_byte_size = new uint[Math.Max(0x100, sample_count / eparams.block_size + 1)]; if (eparams.do_verify) { - verify = new ALACReader(channels, (int)bits_per_sample, history_mult, initial_history, k_modifier, eparams.block_size); - verifyBuffer = new int[Alac.MAX_BLOCKSIZE * channels]; + verify = new ALACReader(_pcm, history_mult, initial_history, k_modifier, eparams.block_size); + verifyBuffer = new int[Alac.MAX_BLOCKSIZE * _pcm.ChannelCount]; } return header_len; diff --git a/CUETools.Codecs.ALAC/CUETools.Codecs.ALAC.csproj b/CUETools.Codecs.ALAC/CUETools.Codecs.ALAC.csproj index 4c3d264..3e1fdc4 100644 --- a/CUETools.Codecs.ALAC/CUETools.Codecs.ALAC.csproj +++ b/CUETools.Codecs.ALAC/CUETools.Codecs.ALAC.csproj @@ -23,7 +23,7 @@ pdbonly true - ..\bin\x64\Release\ + ..\bin\any\Release\ TRACE prompt 4 diff --git a/CUETools.Codecs.APE/CUETools.Codecs.APE.cpp b/CUETools.Codecs.APE/CUETools.Codecs.APE.cpp index 17f2381..9d5606f 100644 --- a/CUETools.Codecs.APE/CUETools.Codecs.APE.cpp +++ b/CUETools.Codecs.APE/CUETools.Codecs.APE.cpp @@ -101,6 +101,7 @@ namespace CUETools { namespace Codecs { namespace APE { GCHandle _gchBuffer; }; + [AudioDecoderClass("MAC_SDK", "ape")] public ref class APEReader : public IAudioSource { public: @@ -124,9 +125,10 @@ namespace CUETools { namespace Codecs { namespace APE { throw gcnew Exception("Unable to open file."); } - _sampleRate = pAPEDecompress->GetInfo (APE_INFO_SAMPLE_RATE, 0, 0); - _bitsPerSample = pAPEDecompress->GetInfo (APE_INFO_BITS_PER_SAMPLE, 0, 0); - _channelCount = pAPEDecompress->GetInfo (APE_INFO_CHANNELS, 0, 0); + pcm = gcnew AudioPCMConfig( + pAPEDecompress->GetInfo (APE_INFO_BITS_PER_SAMPLE, 0, 0), + pAPEDecompress->GetInfo (APE_INFO_CHANNELS, 0, 0), + pAPEDecompress->GetInfo (APE_INFO_SAMPLE_RATE, 0, 0)); // make a buffer to hold 16384 blocks of audio data nBlockAlign = pAPEDecompress->GetInfo (APE_INFO_BLOCK_ALIGN, 0, 0); @@ -146,36 +148,24 @@ namespace CUETools { namespace Codecs { namespace APE { _gchReadBuffer.Free(); } - virtual property Int32 BitsPerSample { - Int32 get() { - return _bitsPerSample; + virtual property AudioPCMConfig^ PCM { + AudioPCMConfig^ get() { + return pcm; } } - virtual property Int32 ChannelCount { - Int32 get() { - return _channelCount; - } - } - - virtual property Int32 SampleRate { - Int32 get() { - return _sampleRate; - } - } - - virtual property UInt64 Length { - UInt64 get() { + virtual property Int64 Length { + Int64 get() { return _sampleCount; } } - virtual property UInt64 Position + virtual property Int64 Position { - UInt64 get() { + Int64 get() { return _sampleOffset - SamplesInBuffer; } - void set(UInt64 offset) { + void set(Int64 offset) { _sampleOffset = offset; _bufferOffset = 0; _bufferLength = 0; @@ -184,8 +174,8 @@ namespace CUETools { namespace Codecs { namespace APE { } } - virtual property UInt64 Remaining { - UInt64 get() { + virtual property Int64 Remaining { + Int64 get() { return _sampleCount - _sampleOffset + SamplesInBuffer; } } @@ -210,15 +200,13 @@ namespace CUETools { namespace Codecs { namespace APE { } } - virtual array^ Read(array^ buff) + virtual int Read(AudioBuffer^ buff, int maxLength) { - return AudioSamples::Read(this, buff); - } + buff->Prepare(this, maxLength); - virtual UInt32 Read([Out] array^ buff, UInt32 sampleCount) - { - UInt32 buffOffset = 0; - UInt32 samplesNeeded = sampleCount; + Int32 buffOffset = 0; + Int32 samplesNeeded = buff->Length; + Int32 _channelCount = pcm->ChannelCount; while (samplesNeeded != 0) { @@ -232,21 +220,21 @@ namespace CUETools { namespace Codecs { namespace APE { _bufferLength = nBlocksRetrieved; _sampleOffset += nBlocksRetrieved; } - UInt32 copyCount = Math::Min(samplesNeeded, SamplesInBuffer); - AudioSamples::BytesToFLACSamples_16(_samplesBuffer, _bufferOffset*nBlockAlign, buff, buffOffset, copyCount, _channelCount); + Int32 copyCount = Math::Min(samplesNeeded, SamplesInBuffer); + AudioBuffer::BytesToFLACSamples_16(_samplesBuffer, _bufferOffset*nBlockAlign, buff->Samples, buffOffset, copyCount, _channelCount); samplesNeeded -= copyCount; buffOffset += copyCount; _bufferOffset += copyCount; } - return sampleCount; + return buff->Length; } private: IAPEDecompress * pAPEDecompress; Int64 _sampleCount, _sampleOffset; - Int32 _bitsPerSample, _channelCount, _sampleRate; - UInt32 _bufferOffset, _bufferLength; + AudioPCMConfig^ pcm; + Int32 _bufferOffset, _bufferLength; int nBlockAlign; array^ _samplesBuffer; String^ _path; @@ -255,39 +243,37 @@ namespace CUETools { namespace Codecs { namespace APE { CWinFileIO* _winFileIO; GCHandle _gchIO, _gchReadBuffer; - property UInt32 SamplesInBuffer + property Int32 SamplesInBuffer { - UInt32 get () + Int32 get () { - return (UInt32) (_bufferLength - _bufferOffset); + return _bufferLength - _bufferOffset; } } }; + [AudioEncoderClass("MAC_SDK", "ape", true, "fast normal high extra insane", "high", 1)] public ref class APEWriter : IAudioDest { public: - APEWriter(String^ path, Int32 bitsPerSample, Int32 channelCount, Int32 sampleRate) + APEWriter(String^ path, AudioPCMConfig^ pcm) { - if (channelCount != 1 && channelCount != 2) + _pcm = pcm; + + if (_pcm->ChannelCount != 1 && _pcm->ChannelCount != 2) throw gcnew Exception("Only stereo and mono audio formats are allowed."); - if (bitsPerSample != 16 && bitsPerSample != 24) + if (_pcm->BitsPerSample != 16 && _pcm->BitsPerSample != 24) throw gcnew Exception("Monkey's Audio doesn't support selected bits per sample value."); - _path = path; - _winFileIO = NULL; + _path = path; + _winFileIO = NULL; - _compressionLevel = COMPRESSION_LEVEL_NORMAL; + _compressionLevel = COMPRESSION_LEVEL_NORMAL; - _bitsPerSample = bitsPerSample; - _channelCount = channelCount; - _sampleRate = sampleRate; - _blockAlign = _channelCount * ((_bitsPerSample + 7) / 8); - - int nRetVal; - pAPECompress = CreateIAPECompress (&nRetVal); - if (!pAPECompress) - throw gcnew Exception("Unable to open APE compressor."); + int nRetVal; + pAPECompress = CreateIAPECompress (&nRetVal); + if (!pAPECompress) + throw gcnew Exception("Unable to open APE compressor."); } ~APEWriter() @@ -349,21 +335,23 @@ namespace CUETools { namespace Codecs { namespace APE { } } - virtual property int BitsPerSample + virtual property AudioPCMConfig^ PCM { - int get() { return _bitsPerSample; } + AudioPCMConfig^ get() + { + return _pcm; + } } - virtual void Write(array^ buff, int offset, int sampleCount) + virtual void Write(AudioBuffer^ buff) { - if (_sampleBuffer == nullptr || _sampleBuffer.Length < sampleCount * _blockAlign) - _sampleBuffer = gcnew array(sampleCount * _blockAlign); - AudioSamples::FLACSamplesToBytes(buff, offset, _sampleBuffer, 0, sampleCount, _channelCount, _bitsPerSample); - if (!_initialized) Initialize(); - pin_ptr pSampleBuffer = &_sampleBuffer[0]; - if (pAPECompress->AddData (pSampleBuffer, sampleCount * _blockAlign)) + if (!_initialized) + Initialize(); + buff->Prepare(this); + pin_ptr pSampleBuffer = &buff->Bytes[0]; + if (pAPECompress->AddData (pSampleBuffer, buff->ByteLength)) throw gcnew Exception("An error occurred while encoding."); - _samplesWritten += sampleCount; + _samplesWritten += buff->Length; } virtual property String^ Path @@ -373,7 +361,7 @@ namespace CUETools { namespace Codecs { namespace APE { } } - property Int32 CompressionLevel { + virtual property Int32 CompressionLevel { Int32 get() { return _compressionLevel / 1000 - 1; } @@ -385,11 +373,20 @@ namespace CUETools { namespace Codecs { namespace APE { } } + virtual property String^ Options + { + void set(String^ value) + { + if (value == nullptr || value == "") return; + throw gcnew Exception(String::Format("Unsupported options: {0}", value)); + } + } + private: IAPECompress * pAPECompress; bool _initialized; Int32 _finalSampleCount, _samplesWritten; - Int32 _bitsPerSample, _channelCount, _sampleRate, _blockAlign; + AudioPCMConfig^ _pcm; Int32 _compressionLevel; String^ _path; Stream^ _IO; @@ -407,11 +404,11 @@ namespace CUETools { namespace Codecs { namespace APE { _winFileIO = new CWinFileIO(_gchIO, _gchBuffer); WAVEFORMATEX waveFormat; - FillWaveFormatEx (&waveFormat, _sampleRate, _bitsPerSample, _channelCount); + FillWaveFormatEx (&waveFormat, _pcm->SampleRate, _pcm->BitsPerSample, _pcm->ChannelCount); int res = pAPECompress->StartEx (_winFileIO, &waveFormat, - (_finalSampleCount == 0) ? MAX_AUDIO_BYTES_UNKNOWN : _finalSampleCount * _blockAlign, + (_finalSampleCount == 0) ? MAX_AUDIO_BYTES_UNKNOWN : _finalSampleCount * _pcm->BlockAlign, _compressionLevel, NULL, CREATE_WAV_HEADER_ON_DECOMPRESSION); diff --git a/CUETools.Codecs.APE/CUETools.Codecs.APE.vcproj b/CUETools.Codecs.APE/CUETools.Codecs.APE.vcproj index 8d657c2..799a4c2 100644 --- a/CUETools.Codecs.APE/CUETools.Codecs.APE.vcproj +++ b/CUETools.Codecs.APE/CUETools.Codecs.APE.vcproj @@ -20,7 +20,7 @@ diff --git a/CUETools.Codecs.FLAC/CUETools.Codecs.FLAC.cpp b/CUETools.Codecs.FLAC/CUETools.Codecs.FLAC.cpp index ee14b87..1dc7c83 100644 --- a/CUETools.Codecs.FLAC/CUETools.Codecs.FLAC.cpp +++ b/CUETools.Codecs.FLAC/CUETools.Codecs.FLAC.cpp @@ -67,10 +67,11 @@ namespace CUETools { namespace Codecs { namespace FLAC { [UnmanagedFunctionPointer(CallingConvention::Cdecl)] public delegate FLAC__bool DecoderEofDelegate (const FLAC__StreamDecoder *decoder, void *client_data); + [AudioDecoderClass("libFLAC", "flac")] public ref class FLACReader : public IAudioSource { public: - FLACReader(String^ path, Stream^ IO, bool disableAsm) + FLACReader(String^ path, Stream^ IO) { _writeDel = gcnew DecoderWriteDelegate(this, &FLACReader::WriteCallback); _metadataDel = gcnew DecoderMetadataDelegate(this, &FLACReader::MetadataCallback); @@ -96,8 +97,8 @@ namespace CUETools { namespace Codecs { namespace FLAC { if (!FLAC__stream_decoder_set_metadata_respond (_decoder, FLAC__METADATA_TYPE_VORBIS_COMMENT)) throw gcnew Exception("Unable to setup the decoder."); - if (!FLAC__stream_decoder_set_disable_asm(_decoder, disableAsm)) - throw gcnew Exception("Unable to setup the decoder."); + //if (!FLAC__stream_decoder_set_disable_asm(_decoder, disableAsm)) + // throw gcnew Exception("Unable to setup the decoder."); if (FLAC__stream_decoder_init_stream(_decoder, (FLAC__StreamDecoderReadCallback)Marshal::GetFunctionPointerForDelegate(_readDel).ToPointer(), @@ -126,36 +127,24 @@ namespace CUETools { namespace Codecs { namespace FLAC { Close (); } - virtual property Int32 BitsPerSample { - Int32 get() { - return _bitsPerSample; + virtual property AudioPCMConfig^ PCM { + AudioPCMConfig^ get() { + return pcm; } } - virtual property Int32 ChannelCount { - Int32 get() { - return _channelCount; - } - } - - virtual property Int32 SampleRate { - Int32 get() { - return _sampleRate; - } - } - - virtual property UInt64 Length { - UInt64 get() { + virtual property Int64 Length { + Int64 get() { return _sampleCount; } } - virtual property UInt64 Position { - UInt64 get() + virtual property Int64 Position { + Int64 get() { return _sampleOffset - SamplesInBuffer; } - void set(UInt64 offset) + void set(Int64 offset) { _sampleOffset = offset; _bufferOffset = 0; @@ -236,8 +225,8 @@ namespace CUETools { namespace Codecs { namespace FLAC { // return 0 != res; //} - virtual property UInt64 Remaining { - UInt64 get() { + virtual property Int64 Remaining { + Int64 get() { return _sampleCount - _sampleOffset + SamplesInBuffer; } } @@ -256,15 +245,12 @@ namespace CUETools { namespace Codecs { namespace FLAC { } } - virtual array^ Read(array^ buff) + virtual int Read(AudioBuffer^ buff, int maxLength) { - return AudioSamples::Read(this, buff); - } + buff->Prepare(this, maxLength); - virtual UInt32 Read([Out] array^ buff, UInt32 sampleCount) - { - UInt32 buffOffset = 0; - UInt32 samplesNeeded = sampleCount; + Int32 buffOffset = 0; + Int32 samplesNeeded = buff->Length; while (samplesNeeded != 0) { @@ -275,19 +261,19 @@ namespace CUETools { namespace Codecs { namespace FLAC { do { if (FLAC__stream_decoder_get_state(_decoder) == FLAC__STREAM_DECODER_END_OF_STREAM) - return sampleCount - samplesNeeded; + return buff->Length - samplesNeeded; if (!FLAC__stream_decoder_process_single(_decoder)) throw gcnew Exception("An error occurred while decoding."); } while (_bufferLength == 0); _sampleOffset += _bufferLength; } - UInt32 copyCount = Math::Min(samplesNeeded, SamplesInBuffer); - Array::Copy(_sampleBuffer, _bufferOffset * _channelCount, buff, buffOffset * _channelCount, copyCount * _channelCount); + Int32 copyCount = Math::Min(samplesNeeded, SamplesInBuffer); + Array::Copy(_sampleBuffer, _bufferOffset * pcm->ChannelCount, buff->Samples, buffOffset * pcm->ChannelCount, copyCount * pcm->ChannelCount); samplesNeeded -= copyCount; buffOffset += copyCount; _bufferOffset += copyCount; } - return sampleCount; + return buff->Length; } private: @@ -301,18 +287,18 @@ namespace CUETools { namespace Codecs { namespace FLAC { DecoderEofDelegate^ _eofDel; FLAC__StreamDecoder *_decoder; Int64 _sampleCount, _sampleOffset; - Int32 _bitsPerSample, _channelCount, _sampleRate; + AudioPCMConfig^ pcm; array^ _sampleBuffer; array^ _readBuffer; String^ _path; bool _decoderActive; Stream^ _IO; - UInt32 _bufferOffset, _bufferLength; + Int32 _bufferOffset, _bufferLength; - property UInt32 SamplesInBuffer { - UInt32 get () + property Int32 SamplesInBuffer { + Int32 get () { - return (UInt32) (_bufferLength - _bufferOffset); + return _bufferLength - _bufferOffset; } } @@ -325,17 +311,18 @@ namespace CUETools { namespace Codecs { namespace FLAC { throw gcnew Exception("Received unrequested samples."); } - if ((frame->header.bits_per_sample != _bitsPerSample) || - (frame->header.channels != _channelCount) || - (frame->header.sample_rate != _sampleRate)) + if ((frame->header.bits_per_sample != pcm->BitsPerSample) || + (frame->header.channels != pcm->ChannelCount) || + (frame->header.sample_rate != pcm->SampleRate)) { throw gcnew Exception("Format changes within a file are not allowed."); } if ((_sampleBuffer == nullptr) || (_sampleBuffer->GetLength(0) < sampleCount)) { - _sampleBuffer = gcnew array(sampleCount, _channelCount); + _sampleBuffer = gcnew array(sampleCount, pcm->ChannelCount); } + int _channelCount = pcm->ChannelCount; for (Int32 iChan = 0; iChan < _channelCount; iChan++) { interior_ptr pMyBuffer = &_sampleBuffer[0, iChan]; const FLAC__int32 *pFLACBuffer = buffer[iChan]; @@ -357,9 +344,10 @@ namespace CUETools { namespace Codecs { namespace FLAC { { if (metadata->type == FLAC__METADATA_TYPE_STREAMINFO) { - _bitsPerSample = metadata->data.stream_info.bits_per_sample; - _channelCount = metadata->data.stream_info.channels; - _sampleRate = metadata->data.stream_info.sample_rate; + pcm = gcnew AudioPCMConfig( + metadata->data.stream_info.bits_per_sample, + metadata->data.stream_info.channels, + metadata->data.stream_info.sample_rate); _sampleCount = metadata->data.stream_info.total_samples; } //if (metadata->type == FLAC__METADATA_TYPE_VORBIS_COMMENT) @@ -447,12 +435,15 @@ namespace CUETools { namespace Codecs { namespace FLAC { } }; + [AudioEncoderClass("libFLAC", "flac", true, "0 1 2 3 4 5 6 7 8", "5", 1)] public ref class FLACWriter : IAudioDest { public: - FLACWriter(String^ path, Int32 bitsPerSample, Int32 channelCount, Int32 sampleRate) + FLACWriter(String^ path, AudioPCMConfig^ pcm) { - if (bitsPerSample < 16 || bitsPerSample > 24) + _pcm = pcm; + + if (_pcm->BitsPerSample < 16 || _pcm->BitsPerSample > 24) throw gcnew Exception("Bits per sample must be 16..24."); _initialized = false; @@ -460,9 +451,6 @@ namespace CUETools { namespace Codecs { namespace FLAC { _path = path; _finalSampleCount = 0; _samplesWritten = 0; - _bitsPerSample = bitsPerSample; - _channelCount = channelCount; - _sampleRate = sampleRate; _compressionLevel = 5; _paddingLength = 8192; _verify = false; @@ -470,9 +458,9 @@ namespace CUETools { namespace Codecs { namespace FLAC { _encoder = FLAC__stream_encoder_new(); - FLAC__stream_encoder_set_bits_per_sample(_encoder, bitsPerSample); - FLAC__stream_encoder_set_channels(_encoder, channelCount); - FLAC__stream_encoder_set_sample_rate(_encoder, sampleRate); + FLAC__stream_encoder_set_bits_per_sample(_encoder, _pcm->BitsPerSample); + FLAC__stream_encoder_set_channels(_encoder, _pcm->ChannelCount); + FLAC__stream_encoder_set_sample_rate(_encoder, _pcm->SampleRate); } virtual void Close() { @@ -520,9 +508,10 @@ namespace CUETools { namespace Codecs { namespace FLAC { } } - virtual property int BitsPerSample - { - int get() { return _bitsPerSample; } + virtual property AudioPCMConfig^ PCM { + AudioPCMConfig^ get() { + return _pcm; + } } virtual property String^ Path { @@ -531,13 +520,15 @@ namespace CUETools { namespace Codecs { namespace FLAC { } } - virtual void Write(array^ sampleBuffer, int offset, int sampleCount) { + virtual void Write(AudioBuffer^ sampleBuffer) { if (!_initialized) Initialize(); - pin_ptr pSampleBuffer = &sampleBuffer[offset, 0]; + sampleBuffer->Prepare(this); + + pin_ptr pSampleBuffer = &sampleBuffer->Samples[0, 0]; if (!FLAC__stream_encoder_process_interleaved(_encoder, - (const FLAC__int32*)pSampleBuffer, sampleCount)) + (const FLAC__int32*)pSampleBuffer, sampleBuffer->Length)) { String^ state = gcnew String(FLAC__StreamEncoderStateString[FLAC__stream_encoder_get_state(_encoder)]); if (FLAC__stream_encoder_get_state(_encoder) == FLAC__STREAM_ENCODER_VERIFY_MISMATCH_IN_AUDIO_DATA) @@ -553,10 +544,10 @@ namespace CUETools { namespace Codecs { namespace FLAC { throw gcnew Exception("An error occurred while encoding: " + state); } - _samplesWritten += sampleCount; + _samplesWritten += sampleBuffer->Length; } - property Int32 CompressionLevel { + virtual property Int32 CompressionLevel { Int32 get() { return _compressionLevel; } @@ -568,6 +559,34 @@ namespace CUETools { namespace Codecs { namespace FLAC { } } + virtual property String^ Options + { + void set(String^ value) + { + if (value == nullptr || value == "") return; + cli::array^ args = value->Split(); + for (int i = 0; i < args->Length; i++) + { + if (args[i] == "--padding-length" && (++i) < args->Length) + { + PaddingLength = Int32::Parse(args[i]); + continue; + } + if (args[i] == "--disable-asm") + { + DisableAsm = true; + continue; + } + if (args[i] == "--verify") + { + Verify = true; + continue; + } + throw gcnew Exception(String::Format("Unsupported options: {0}", value)); + } + } + } + property Boolean Verify { Boolean get() { return _verify; @@ -603,7 +622,7 @@ namespace CUETools { namespace Codecs { namespace FLAC { bool _initialized; String^ _path; Int64 _finalSampleCount, _samplesWritten, _blockSize; - Int32 _bitsPerSample, _channelCount, _sampleRate; + AudioPCMConfig^ _pcm; Int32 _compressionLevel; Int32 _paddingLength; Boolean _verify; @@ -622,7 +641,7 @@ namespace CUETools { namespace Codecs { namespace FLAC { if (_finalSampleCount != 0) { seektable = FLAC__metadata_object_new(FLAC__METADATA_TYPE_SEEKTABLE); FLAC__metadata_object_seektable_template_append_spaced_points_by_samples( - seektable, _sampleRate * 10, _finalSampleCount); + seektable, _pcm->SampleRate * 10, _finalSampleCount); FLAC__metadata_object_seektable_template_sort(seektable, true); _metadataList[_metadataCount++] = seektable; } diff --git a/CUETools.Codecs.FLAC/CUETools.Codecs.FLAC.vcproj b/CUETools.Codecs.FLAC/CUETools.Codecs.FLAC.vcproj index 4bafacb..0447aff 100644 --- a/CUETools.Codecs.FLAC/CUETools.Codecs.FLAC.vcproj +++ b/CUETools.Codecs.FLAC/CUETools.Codecs.FLAC.vcproj @@ -20,7 +20,7 @@ diff --git a/CUETools.Codecs.FLAKE/CUETools.Codecs.FLAKE.csproj b/CUETools.Codecs.FLAKE/CUETools.Codecs.FLAKE.csproj index cdb17e7..3a049e9 100644 --- a/CUETools.Codecs.FLAKE/CUETools.Codecs.FLAKE.csproj +++ b/CUETools.Codecs.FLAKE/CUETools.Codecs.FLAKE.csproj @@ -23,7 +23,7 @@ pdbonly true - bin\Release\ + ..\bin\any\Release\ TRACE prompt 4 diff --git a/CUETools.Codecs.FLAKE/Flake.cs b/CUETools.Codecs.FLAKE/Flake.cs index 38db01c..ab474f9 100644 --- a/CUETools.Codecs.FLAKE/Flake.cs +++ b/CUETools.Codecs.FLAKE/Flake.cs @@ -123,7 +123,7 @@ namespace CUETools.Codecs.FLAKE lpc_ctx[i] = new LpcContext(); } - public void Init(int* s, int* r, uint bps, uint w) + public void Init(int* s, int* r, int bps, int w) { if (w > bps) throw new Exception("internal error"); @@ -139,8 +139,8 @@ namespace CUETools.Codecs.FLAKE } public FlacSubframe best; - public uint obits; - public uint wbits; + public int obits; + public int wbits; public int* samples; public uint done_fixed; public LpcContext[] lpc_ctx; @@ -314,9 +314,9 @@ namespace CUETools.Codecs.FLAKE public struct SeekPoint { - public ulong number; - public ulong offset; - public uint framesize; + public long number; + public long offset; + public int framesize; } public enum MetadataType diff --git a/CUETools.Codecs.FLAKE/FlakeReader.cs b/CUETools.Codecs.FLAKE/FlakeReader.cs index ee61090..da7fef0 100644 --- a/CUETools.Codecs.FLAKE/FlakeReader.cs +++ b/CUETools.Codecs.FLAKE/FlakeReader.cs @@ -26,6 +26,7 @@ using System.IO; namespace CUETools.Codecs.FLAKE { + [AudioDecoderClass("libFlake", "flac")] public class FlakeReader: IAudioSource { int[] samplesBuffer; @@ -41,18 +42,15 @@ namespace CUETools.Codecs.FLAKE Crc16 crc16; FlacFrame frame; BitReader framereader; - int channels; - uint bits_per_sample; - int sample_rate = 44100; + AudioPCMConfig pcm; uint min_block_size = 0; uint max_block_size = 0; uint min_frame_size = 0; uint max_frame_size = 0; - uint _samplesInBuffer, _samplesBufferOffset; - ulong _sampleCount = 0; - ulong _sampleOffset = 0; + int _samplesInBuffer, _samplesBufferOffset; + long _sampleCount = 0, _sampleOffset = 0; bool do_crc = true; @@ -90,37 +88,36 @@ namespace CUETools.Codecs.FLAKE _framesBuffer = new byte[0x20000]; decode_metadata(); - frame = new FlacFrame(channels); + frame = new FlacFrame(PCM.ChannelCount); framereader = new BitReader(); - //max_frame_size = 16 + ((Flake.MAX_BLOCKSIZE * (int)(bits_per_sample * channels + 1) + 7) >> 3); - if (((int)max_frame_size * (int)bits_per_sample * channels * 2 >> 3) > _framesBuffer.Length) + //max_frame_size = 16 + ((Flake.MAX_BLOCKSIZE * PCM.BitsPerSample * PCM.ChannelCount + 1) + 7) >> 3); + if (((int)max_frame_size * PCM.BitsPerSample * PCM.ChannelCount * 2 >> 3) > _framesBuffer.Length) { byte[] temp = _framesBuffer; - _framesBuffer = new byte[((int)max_frame_size * (int)bits_per_sample * channels * 2 >> 3)]; + _framesBuffer = new byte[((int)max_frame_size * PCM.BitsPerSample * PCM.ChannelCount * 2 >> 3)]; if (_framesBufferLength > 0) Array.Copy(temp, _framesBufferOffset, _framesBuffer, 0, _framesBufferLength); _framesBufferOffset = 0; } _samplesInBuffer = 0; - if (bits_per_sample != 16 || channels != 2 || sample_rate != 44100) + if (PCM.BitsPerSample != 16 || PCM.ChannelCount != 2 || PCM.SampleRate != 44100) throw new Exception("invalid flac file"); - samplesBuffer = new int[Flake.MAX_BLOCKSIZE * channels]; - residualBuffer = new int[Flake.MAX_BLOCKSIZE * channels]; + samplesBuffer = new int[Flake.MAX_BLOCKSIZE * PCM.ChannelCount]; + residualBuffer = new int[Flake.MAX_BLOCKSIZE * PCM.ChannelCount]; } - public FlakeReader(int _channels, uint _bits_per_sample) + public FlakeReader(AudioPCMConfig _pcm) { + pcm = _pcm; crc8 = new Crc8(); crc16 = new Crc16(); - channels = _channels; - bits_per_sample = _bits_per_sample; - samplesBuffer = new int[Flake.MAX_BLOCKSIZE * channels]; - residualBuffer = new int[Flake.MAX_BLOCKSIZE * channels]; - frame = new FlacFrame(channels); + samplesBuffer = new int[Flake.MAX_BLOCKSIZE * PCM.ChannelCount]; + residualBuffer = new int[Flake.MAX_BLOCKSIZE * PCM.ChannelCount]; + frame = new FlacFrame(PCM.ChannelCount); framereader = new BitReader(); } @@ -129,12 +126,7 @@ namespace CUETools.Codecs.FLAKE _IO.Close(); } - public int[,] Read(int[,] buff) - { - return AudioSamples.Read(this, buff); - } - - public ulong Length + public long Length { get { @@ -142,7 +134,7 @@ namespace CUETools.Codecs.FLAKE } } - public ulong Remaining + public long Remaining { get { @@ -150,7 +142,7 @@ namespace CUETools.Codecs.FLAKE } } - public ulong Position + public long Position { get { @@ -197,33 +189,17 @@ namespace CUETools.Codecs.FLAKE _sampleOffset += _samplesInBuffer; }; - uint diff = _samplesInBuffer - (uint)(_sampleOffset - value); + int diff = _samplesInBuffer - (int)(_sampleOffset - value); _samplesInBuffer -= diff; _samplesBufferOffset += diff; } } - public int BitsPerSample + public AudioPCMConfig PCM { get { - return (int)bits_per_sample; - } - } - - public int ChannelCount - { - get - { - return channels; - } - } - - public int SampleRate - { - get - { - return sample_rate; + return pcm; } } @@ -237,14 +213,14 @@ namespace CUETools.Codecs.FLAKE unsafe void interlace(int [,] buff, int offset, int count) { - if (channels == 2) + if (PCM.ChannelCount == 2) { fixed (int* res = &buff[offset, 0], src = &samplesBuffer[_samplesBufferOffset]) AudioSamples.Interlace(res, src, src + Flake.MAX_BLOCKSIZE, count); } else { - for (int ch = 0; ch < channels; ch++) + for (int ch = 0; ch < PCM.ChannelCount; ch++) fixed (int* res = &buff[offset, ch], src = &samplesBuffer[_samplesBufferOffset + ch * Flake.MAX_BLOCKSIZE]) { int* psrc = src; @@ -254,16 +230,19 @@ namespace CUETools.Codecs.FLAKE } } - public uint Read(int[,] buff, uint sampleCount) + public int Read(AudioBuffer buff, int maxLength) { - uint offset = 0; + buff.Prepare(this, maxLength); + + int offset = 0; + int sampleCount = buff.Length; while (_samplesInBuffer < sampleCount) { if (_samplesInBuffer > 0) { - interlace(buff, (int)offset, (int)_samplesInBuffer); - sampleCount -= (uint)_samplesInBuffer; + interlace(buff.Samples, offset, _samplesInBuffer); + sampleCount -= _samplesInBuffer; offset += _samplesInBuffer; _samplesInBuffer = 0; _samplesBufferOffset = 0; @@ -282,12 +261,12 @@ namespace CUETools.Codecs.FLAKE _sampleOffset += _samplesInBuffer; } - interlace(buff, (int)offset, (int)sampleCount); + interlace(buff.Samples, offset, sampleCount); _samplesInBuffer -= sampleCount; _samplesBufferOffset += sampleCount; if (_samplesInBuffer == 0) _samplesBufferOffset = 0; - return (uint)offset + sampleCount; + return offset + sampleCount; } unsafe void fill_frames_buffer() @@ -320,7 +299,7 @@ namespace CUETools.Codecs.FLAKE uint sr_code0 = bitreader.readbits(4); frame.ch_mode = (ChannelMode)bitreader.readbits(4); uint bps_code = bitreader.readbits(3); - if (Flake.flac_bitdepths[bps_code] != bits_per_sample) + if (Flake.flac_bitdepths[bps_code] != PCM.BitsPerSample) throw new Exception("unsupported bps coding"); uint t1 = bitreader.readbit(); // == 0????? if (t1 != 0) @@ -357,7 +336,7 @@ namespace CUETools.Codecs.FLAKE frame_channels = 2; else frame.ch_mode = ChannelMode.NotStereo; - if (frame_channels != channels) + if (frame_channels != PCM.ChannelCount) throw new Exception("invalid channel mode"); // CRC-8 of frame header @@ -369,13 +348,13 @@ namespace CUETools.Codecs.FLAKE unsafe void decode_subframe_constant(BitReader bitreader, FlacFrame frame, int ch) { - int obits = (int)frame.subframes[ch].obits; + int obits = frame.subframes[ch].obits; frame.subframes[ch].best.residual[0] = bitreader.readbits_signed(obits); } unsafe void decode_subframe_verbatim(BitReader bitreader, FlacFrame frame, int ch) { - int obits = (int)frame.subframes[ch].obits; + int obits = frame.subframes[ch].obits; for (int i = 0; i < frame.blocksize; i++) frame.subframes[ch].best.residual[i] = bitreader.readbits_signed(obits); } @@ -421,7 +400,7 @@ namespace CUETools.Codecs.FLAKE unsafe void decode_subframe_fixed(BitReader bitreader, FlacFrame frame, int ch) { // warm-up samples - int obits = (int)frame.subframes[ch].obits; + int obits = frame.subframes[ch].obits; for (int i = 0; i < frame.subframes[ch].best.order; i++) frame.subframes[ch].best.residual[i] = bitreader.readbits_signed(obits); @@ -432,7 +411,7 @@ namespace CUETools.Codecs.FLAKE unsafe void decode_subframe_lpc(BitReader bitreader, FlacFrame frame, int ch) { // warm-up samples - int obits = (int)frame.subframes[ch].obits; + int obits = frame.subframes[ch].obits; for (int i = 0; i < frame.subframes[ch].best.order; i++) frame.subframes[ch].best.residual[i] = bitreader.readbits_signed(obits); @@ -451,23 +430,23 @@ namespace CUETools.Codecs.FLAKE unsafe void decode_subframes(BitReader bitreader, FlacFrame frame) { fixed (int *r = residualBuffer, s = samplesBuffer) - for (int ch = 0; ch < channels; ch++) + for (int ch = 0; ch < PCM.ChannelCount; ch++) { // subframe header uint t1 = bitreader.readbit(); // ?????? == 0 if (t1 != 0) throw new Exception("unsupported subframe coding"); int type_code = (int)bitreader.readbits(6); - frame.subframes[ch].wbits = bitreader.readbit(); + frame.subframes[ch].wbits = (int)bitreader.readbit(); if (frame.subframes[ch].wbits != 0) - frame.subframes[ch].wbits += bitreader.read_unary(); + frame.subframes[ch].wbits += (int)bitreader.read_unary(); - frame.subframes[ch].obits = bits_per_sample - frame.subframes[ch].wbits; + frame.subframes[ch].obits = PCM.BitsPerSample - frame.subframes[ch].wbits; switch (frame.ch_mode) { - case ChannelMode.MidSide: frame.subframes[ch].obits += (uint)ch; break; - case ChannelMode.LeftSide: frame.subframes[ch].obits += (uint)ch; break; - case ChannelMode.RightSide: frame.subframes[ch].obits += 1 - (uint)ch; break; + case ChannelMode.MidSide: frame.subframes[ch].obits += ch; break; + case ChannelMode.LeftSide: frame.subframes[ch].obits += ch; break; + case ChannelMode.RightSide: frame.subframes[ch].obits += 1 - ch; break; } frame.subframes[ch].best.type = (SubframeType)type_code; @@ -562,7 +541,7 @@ namespace CUETools.Codecs.FLAKE { for (int i = sub.best.order; i > 0; i--) csum += (ulong)Math.Abs(coefs[i - 1]); - if ((csum << (int)sub.obits) >= 1UL << 32) + if ((csum << sub.obits) >= 1UL << 32) lpc.decode_residual_long(sub.best.residual, sub.samples, frame.blocksize, sub.best.order, coefs, sub.best.shift); else lpc.decode_residual(sub.best.residual, sub.samples, frame.blocksize, sub.best.order, coefs, sub.best.shift); @@ -571,7 +550,7 @@ namespace CUETools.Codecs.FLAKE unsafe void restore_samples(FlacFrame frame) { - for (int ch = 0; ch < channels; ch++) + for (int ch = 0; ch < PCM.ChannelCount; ch++) { switch (frame.subframes[ch].best.type) { @@ -643,7 +622,7 @@ namespace CUETools.Codecs.FLAKE if (do_crc && crc_1 != crc_2) throw new Exception("frame crc mismatch"); restore_samples(frame); - _samplesInBuffer = (uint)frame.blocksize; + _samplesInBuffer = frame.blocksize; return framereader.Position - pos; } } @@ -743,10 +722,11 @@ namespace CUETools.Codecs.FLAKE max_block_size = bitreader.readbits(FLAC__STREAM_METADATA_STREAMINFO_MAX_BLOCK_SIZE_LEN); min_frame_size = bitreader.readbits(FLAC__STREAM_METADATA_STREAMINFO_MIN_FRAME_SIZE_LEN); max_frame_size = bitreader.readbits(FLAC__STREAM_METADATA_STREAMINFO_MAX_FRAME_SIZE_LEN); - sample_rate = (int)bitreader.readbits(FLAC__STREAM_METADATA_STREAMINFO_SAMPLE_RATE_LEN); - channels = 1 + (int)bitreader.readbits(FLAC__STREAM_METADATA_STREAMINFO_CHANNELS_LEN); - bits_per_sample = 1 + bitreader.readbits(FLAC__STREAM_METADATA_STREAMINFO_BITS_PER_SAMPLE_LEN); - _sampleCount = bitreader.readbits64(FLAC__STREAM_METADATA_STREAMINFO_TOTAL_SAMPLES_LEN); + int sample_rate = (int)bitreader.readbits(FLAC__STREAM_METADATA_STREAMINFO_SAMPLE_RATE_LEN); + int channels = 1 + (int)bitreader.readbits(FLAC__STREAM_METADATA_STREAMINFO_CHANNELS_LEN); + int bits_per_sample = 1 + (int)bitreader.readbits(FLAC__STREAM_METADATA_STREAMINFO_BITS_PER_SAMPLE_LEN); + pcm = new AudioPCMConfig(bits_per_sample, channels, sample_rate); + _sampleCount = (long)bitreader.readbits64(FLAC__STREAM_METADATA_STREAMINFO_TOTAL_SAMPLES_LEN); bitreader.skipbits(FLAC__STREAM_METADATA_STREAMINFO_MD5SUM_LEN); } else if (type == MetadataType.Seektable) @@ -755,9 +735,9 @@ namespace CUETools.Codecs.FLAKE seek_table = new SeekPoint[num_entries]; for (int e = 0; e < num_entries; e++) { - seek_table[e].number = bitreader.readbits64(Flake.FLAC__STREAM_METADATA_SEEKPOINT_SAMPLE_NUMBER_LEN); - seek_table[e].offset = bitreader.readbits64(Flake.FLAC__STREAM_METADATA_SEEKPOINT_STREAM_OFFSET_LEN); - seek_table[e].framesize = bitreader.readbits24(Flake.FLAC__STREAM_METADATA_SEEKPOINT_FRAME_SAMPLES_LEN); + seek_table[e].number = (long)bitreader.readbits64(Flake.FLAC__STREAM_METADATA_SEEKPOINT_SAMPLE_NUMBER_LEN); + seek_table[e].offset = (long)bitreader.readbits64(Flake.FLAC__STREAM_METADATA_SEEKPOINT_STREAM_OFFSET_LEN); + seek_table[e].framesize = (int)bitreader.readbits24(Flake.FLAC__STREAM_METADATA_SEEKPOINT_FRAME_SAMPLES_LEN); } } if (_framesBufferLength < 4 + len) diff --git a/CUETools.Codecs.FLAKE/FlakeWriter.cs b/CUETools.Codecs.FLAKE/FlakeWriter.cs index c497e0a..6e025ff 100644 --- a/CUETools.Codecs.FLAKE/FlakeWriter.cs +++ b/CUETools.Codecs.FLAKE/FlakeWriter.cs @@ -25,7 +25,6 @@ using System; using System.Text; using System.IO; using System.Collections.Generic; -using System.Collections.Specialized; using System.Security.Cryptography; #if INTEROP using System.Runtime.InteropServices; @@ -34,6 +33,7 @@ using CUETools.Codecs; namespace CUETools.Codecs.FLAKE { + [AudioEncoderClass("libFlake", "flac", true, "0 1 2 3 4 5 6 7 8 9 10 11", "7", 2)] public class FlakeWriter : IAudioDest { Stream _IO = null; @@ -47,18 +47,17 @@ namespace CUETools.Codecs.FLAKE // audio sample rate in Hz // set by user prior to calling flake_encode_init - int sample_rate, sr_code0, sr_code1; + int sr_code0, sr_code1; // sample size in bits // set by user prior to calling flake_encode_init // only 16-bit is currently supported - uint bits_per_sample; int bps_code; // total stream samples // set by user prior to calling flake_encode_init // if 0, stream length is unknown - int sample_count; + int sample_count = -1; FlakeEncodeParams eparams; @@ -104,17 +103,18 @@ namespace CUETools.Codecs.FLAKE int seek_table_offset = -1; bool inited = false; + AudioPCMConfig _pcm; - public FlakeWriter(string path, int bitsPerSample, int channelCount, int sampleRate, Stream IO) + public FlakeWriter(string path, Stream IO, AudioPCMConfig pcm) { - if (bitsPerSample != 16) + _pcm = pcm; + + if (_pcm.BitsPerSample != 16) throw new Exception("Bits per sample must be 16."); - if (channelCount != 2) + if (_pcm.ChannelCount != 2) throw new Exception("ChannelCount must be 2."); - channels = channelCount; - sample_rate = sampleRate; - bits_per_sample = (uint) bitsPerSample; + channels = pcm.ChannelCount; // flake_validate_params @@ -134,6 +134,11 @@ namespace CUETools.Codecs.FLAKE frame = new FlacFrame(channels * 2); } + public FlakeWriter(string path, AudioPCMConfig pcm) + : this(path, null, pcm) + { + } + public int TotalSize { get @@ -169,6 +174,15 @@ namespace CUETools.Codecs.FLAKE } } + public string Options + { + set + { + if (value == null || value == "") return; + throw new Exception("Unsupported options " + value); + } + } + #if INTEROP [DllImport("kernel32.dll")] static extern bool GetThreadTimes(IntPtr hThread, out long lpCreationTime, out long lpExitTime, out long lpKernelTime, out long lpUserTime); @@ -188,6 +202,15 @@ namespace CUETools.Codecs.FLAKE if (_IO.CanSeek) { + if (sample_count <= 0 && _position != 0) + { + BitWriter bitwriter = new BitWriter(header, 0, 4); + bitwriter.writebits(32, (int)_position); + bitwriter.flush(); + _IO.Position = 22; + _IO.Write(header, 0, 4); + } + if (md5 != null) { md5.TransformFinalBlock(frame_buffer, 0, 0); @@ -216,7 +239,7 @@ namespace CUETools.Codecs.FLAKE public void Close() { DoClose(); - if (sample_count != 0 && _position != sample_count) + if (sample_count > 0 && _position != sample_count) throw new Exception("Samples written differs from the expected sample count."); } @@ -463,12 +486,12 @@ namespace CUETools.Codecs.FLAKE } } - public int BitsPerSample + public AudioPCMConfig PCM { - get { return 16; } + get { return _pcm; } } - unsafe uint get_wasted_bits(int* signal, int samples) + unsafe int get_wasted_bits(int* signal, int samples) { int i, shift; int x = 0; @@ -492,7 +515,7 @@ namespace CUETools.Codecs.FLAKE signal[i] >>= shift; } - return (uint)shift; + return shift; } /// @@ -506,7 +529,26 @@ namespace CUETools.Codecs.FLAKE fixed (int* fsamples = samplesBuffer, src = &samples[pos, 0]) { if (channels == 2) - AudioSamples.Deinterlace(fsamples + samplesInBuffer, fsamples + Flake.MAX_BLOCKSIZE + samplesInBuffer, src, block); + { + if (eparams.stereo_method == StereoMethod.Independent) + AudioSamples.Deinterlace(fsamples + samplesInBuffer, fsamples + Flake.MAX_BLOCKSIZE + samplesInBuffer, src, block); + else + { + int* left = fsamples + samplesInBuffer; + int* right = left + Flake.MAX_BLOCKSIZE; + int* leftM = right + Flake.MAX_BLOCKSIZE; + int* rightM = leftM + Flake.MAX_BLOCKSIZE; + for (int i = 0; i < block; i++) + { + int l = src[2 * i]; + int r = src[2 * i + 1]; + left[i] = l; + right[i] = r; + leftM[i] = (l + r) >> 1; + rightM[i] = l - r; + } + } + } else for (int ch = 0; ch < channels; ch++) { @@ -780,7 +822,7 @@ namespace CUETools.Codecs.FLAKE for (int i = frame.current.order; i > 0; i--) csum += (ulong)Math.Abs(coefs[i - 1]); - if ((csum << (int)frame.subframes[ch].obits) >= 1UL << 32) + if ((csum << frame.subframes[ch].obits) >= 1UL << 32) lpc.encode_residual_long(frame.current.residual, frame.subframes[ch].samples, frame.blocksize, frame.current.order, coefs, frame.current.shift); else lpc.encode_residual(frame.current.residual, frame.subframes[ch].samples, frame.blocksize, frame.current.order, coefs, frame.current.shift); @@ -806,7 +848,7 @@ namespace CUETools.Codecs.FLAKE // } // } //} - frame.current.size = (uint)frame.current.order * frame.subframes[ch].obits + 4 + 5 + (uint)frame.current.order * cbits + 6 + best_size; + frame.current.size = (uint)(frame.current.order * frame.subframes[ch].obits + 4 + 5 + frame.current.order * (int)cbits + 6 + (int)best_size); frame.ChooseBestSubframe(ch); } } @@ -823,7 +865,7 @@ namespace CUETools.Codecs.FLAKE int pmax = get_max_p_order(eparams.max_partition_order, frame.blocksize, frame.current.order); int pmin = Math.Min(eparams.min_partition_order, pmax); - frame.current.size = (uint)frame.current.order * frame.subframes[ch].obits + 6 + frame.current.size = (uint)(frame.current.order * frame.subframes[ch].obits) + 6 + calc_rice_params(frame.current.rc, pmin, pmax, frame.current.residual, (uint)frame.blocksize, (uint)frame.current.order); frame.subframes[ch].done_fixed |= (1U << order); @@ -846,13 +888,13 @@ namespace CUETools.Codecs.FLAKE { frame.subframes[ch].best.type = SubframeType.Constant; frame.subframes[ch].best.residual[0] = smp[0]; - frame.subframes[ch].best.size = frame.subframes[ch].obits; + frame.subframes[ch].best.size = (uint)frame.subframes[ch].obits; return; } // VERBATIM frame.current.type = SubframeType.Verbatim; - frame.current.size = frame.subframes[ch].obits * (uint)frame.blocksize; + frame.current.size = (uint)(frame.subframes[ch].obits * frame.blocksize); frame.ChooseBestSubframe(ch); if (n < 5 || predict == PredictionType.None) @@ -1313,19 +1355,19 @@ namespace CUETools.Codecs.FLAKE frame.ch_mode = channels != 2 ? ChannelMode.NotStereo : ChannelMode.LeftRight; for (int ch = 0; ch < channels; ch++) frame.subframes[ch].Init(s + ch * Flake.MAX_BLOCKSIZE, r + ch * Flake.MAX_BLOCKSIZE, - bits_per_sample, get_wasted_bits(s + ch * Flake.MAX_BLOCKSIZE, frame.blocksize)); + _pcm.BitsPerSample, get_wasted_bits(s + ch * Flake.MAX_BLOCKSIZE, frame.blocksize)); for (int ch = 0; ch < channels; ch++) encode_residual_pass2(frame, ch); } else { - channel_decorrelation(s, s + Flake.MAX_BLOCKSIZE, s + 2 * Flake.MAX_BLOCKSIZE, s + 3 * Flake.MAX_BLOCKSIZE, frame.blocksize); + //channel_decorrelation(s, s + Flake.MAX_BLOCKSIZE, s + 2 * Flake.MAX_BLOCKSIZE, s + 3 * Flake.MAX_BLOCKSIZE, frame.blocksize); frame.window_buffer = window; frame.current.residual = r + 4 * Flake.MAX_BLOCKSIZE; for (int ch = 0; ch < 4; ch++) - frame.subframes[ch].Init(s + ch * Flake.MAX_BLOCKSIZE, r + ch * Flake.MAX_BLOCKSIZE, - bits_per_sample + (ch == 3 ? 1U : 0U), get_wasted_bits(s + ch * Flake.MAX_BLOCKSIZE, frame.blocksize)); + frame.subframes[ch].Init(s + ch * Flake.MAX_BLOCKSIZE, r + ch * Flake.MAX_BLOCKSIZE, + _pcm.BitsPerSample + (ch == 3 ? 1 : 0), get_wasted_bits(s + ch * Flake.MAX_BLOCKSIZE, frame.blocksize)); //for (int ch = 0; ch < 4; ch++) // for (int iWindow = 0; iWindow < _windowcount; iWindow++) @@ -1416,13 +1458,13 @@ namespace CUETools.Codecs.FLAKE { if (seek_table[sp].framesize != 0) continue; - if (seek_table[sp].number > (ulong)_position + (ulong)bs) + if (seek_table[sp].number > _position + bs) break; - if (seek_table[sp].number >= (ulong)_position) + if (seek_table[sp].number >= _position) { - seek_table[sp].number = (ulong)_position; - seek_table[sp].offset = (ulong)(_IO.Position - first_frame_offset); - seek_table[sp].framesize = (uint)bs; + seek_table[sp].number = _position; + seek_table[sp].offset = _IO.Position - first_frame_offset; + seek_table[sp].framesize = bs; } } } @@ -1434,7 +1476,7 @@ namespace CUETools.Codecs.FLAKE if (verify != null) { int decoded = verify.DecodeFrame(frame_buffer, 0, fs); - if (decoded != fs || verify.Remaining != (ulong)bs) + if (decoded != fs || verify.Remaining != bs) throw new Exception("validation failed!"); fixed (int* s = verifyBuffer, r = verify.Samples) { @@ -1456,7 +1498,7 @@ namespace CUETools.Codecs.FLAKE return bs; } - public void Write(int[,] buff, int pos, int sampleCount) + public void Write(AudioBuffer buff) { if (!inited) { @@ -1469,25 +1511,23 @@ namespace CUETools.Codecs.FLAKE inited = true; } - int len = sampleCount; - while (len > 0) + buff.Prepare(this); + + int pos = 0; + while (pos < buff.Length) { - int block = Math.Min(len, eparams.block_size - samplesInBuffer); + int block = Math.Min(buff.Length - pos, eparams.block_size - samplesInBuffer); - copy_samples(buff, pos, block); + copy_samples(buff.Samples, pos, block); - if (md5 != null) - { - AudioSamples.FLACSamplesToBytes(buff, pos, frame_buffer, 0, block, channels, (int)bits_per_sample); - md5.TransformBlock(frame_buffer, 0, block * channels * ((int)bits_per_sample >> 3), null, 0); - } - - len -= block; pos += block; while (samplesInBuffer >= eparams.block_size) output_frame(); } + + if (md5 != null) + md5.TransformBlock(buff.Bytes, 0, buff.ByteLength, null, 0); } public string Path { get { return _path; } } @@ -1532,9 +1572,9 @@ namespace CUETools.Codecs.FLAKE bitwriter.writebits(16, eparams.block_size); bitwriter.writebits(24, 0); bitwriter.writebits(24, max_frame_size); - bitwriter.writebits(20, sample_rate); + bitwriter.writebits(20, _pcm.SampleRate); bitwriter.writebits(3, channels - 1); - bitwriter.writebits(5, bits_per_sample - 1); + bitwriter.writebits(5, _pcm.BitsPerSample - 1); // total samples if (sample_count > 0) @@ -1589,8 +1629,8 @@ namespace CUETools.Codecs.FLAKE bitwriter.writebits(24, 18 * seek_table.Length); for (int i = 0; i < seek_table.Length; i++) { - bitwriter.writebits64(Flake.FLAC__STREAM_METADATA_SEEKPOINT_SAMPLE_NUMBER_LEN, seek_table[i].number); - bitwriter.writebits64(Flake.FLAC__STREAM_METADATA_SEEKPOINT_STREAM_OFFSET_LEN, seek_table[i].offset); + bitwriter.writebits64(Flake.FLAC__STREAM_METADATA_SEEKPOINT_SAMPLE_NUMBER_LEN, (ulong)seek_table[i].number); + bitwriter.writebits64(Flake.FLAC__STREAM_METADATA_SEEKPOINT_STREAM_OFFSET_LEN, (ulong)seek_table[i].offset); bitwriter.writebits(Flake.FLAC__STREAM_METADATA_SEEKPOINT_FRAME_SAMPLES_LEN, seek_table[i].framesize); } bitwriter.flush(); @@ -1658,7 +1698,7 @@ namespace CUETools.Codecs.FLAKE // find samplerate in table for (i = 4; i < 12; i++) { - if (sample_rate == Flake.flac_samplerates[i]) + if (_pcm.SampleRate == Flake.flac_samplerates[i]) { sr_code0 = i; break; @@ -1671,7 +1711,7 @@ namespace CUETools.Codecs.FLAKE for (i = 1; i < 8; i++) { - if (bits_per_sample == Flake.flac_bitdepths[i]) + if (_pcm.BitsPerSample == Flake.flac_bitdepths[i]) { bps_code = i; break; @@ -1680,13 +1720,13 @@ namespace CUETools.Codecs.FLAKE if (i == 8) throw new Exception("non-standard bps"); // FIXME: For now, only 16-bit encoding is supported - if (bits_per_sample != 16) + if (_pcm.BitsPerSample != 16) throw new Exception("non-standard bps"); if (_blocksize == 0) { if (eparams.block_size == 0) - eparams.block_size = select_blocksize(sample_rate, eparams.block_time_ms); + eparams.block_size = select_blocksize(_pcm.SampleRate, eparams.block_time_ms); _blocksize = eparams.block_size; } else @@ -1694,13 +1734,13 @@ namespace CUETools.Codecs.FLAKE // set maximum encoded frame size (if larger, re-encodes in verbatim mode) if (channels == 2) - max_frame_size = 16 + ((eparams.block_size * (int)(bits_per_sample + bits_per_sample + 1) + 7) >> 3); + max_frame_size = 16 + ((eparams.block_size * (_pcm.BitsPerSample + _pcm.BitsPerSample + 1) + 7) >> 3); else - max_frame_size = 16 + ((eparams.block_size * channels * (int)bits_per_sample + 7) >> 3); + max_frame_size = 16 + ((eparams.block_size * channels * _pcm.BitsPerSample + 7) >> 3); - if (_IO.CanSeek && eparams.do_seektable) + if (_IO.CanSeek && eparams.do_seektable && sample_count > 0) { - int seek_points_distance = sample_rate * 10; + int seek_points_distance = _pcm.SampleRate * 10; int num_seek_points = 1 + sample_count / seek_points_distance; // 1 seek point per 10 seconds if (sample_count % seek_points_distance == 0) num_seek_points--; @@ -1709,7 +1749,7 @@ namespace CUETools.Codecs.FLAKE { seek_table[sp].framesize = 0; seek_table[sp].offset = 0; - seek_table[sp].number = (ulong)(sp * seek_points_distance); + seek_table[sp].number = sp * seek_points_distance; } } @@ -1723,7 +1763,7 @@ namespace CUETools.Codecs.FLAKE if (eparams.do_verify) { - verify = new FlakeReader(channels, bits_per_sample); + verify = new FlakeReader(_pcm); verifyBuffer = new int[Flake.MAX_BLOCKSIZE * channels]; } diff --git a/CUETools.Codecs.LossyWAV/CUETools.Codecs.LossyWAV.csproj b/CUETools.Codecs.LossyWAV/CUETools.Codecs.LossyWAV.csproj index e273d25..fab3417 100644 --- a/CUETools.Codecs.LossyWAV/CUETools.Codecs.LossyWAV.csproj +++ b/CUETools.Codecs.LossyWAV/CUETools.Codecs.LossyWAV.csproj @@ -18,11 +18,12 @@ DEBUG;TRACE prompt 4 + true pdbonly true - ..\bin\Win32\Release\ + ..\bin\any\Release\ TRACE prompt 4 diff --git a/CUETools.Codecs.LossyWAV/LossyWAV.cs b/CUETools.Codecs.LossyWAV/LossyWAV.cs index 24b50aa..a443a6a 100644 --- a/CUETools.Codecs.LossyWAV/LossyWAV.cs +++ b/CUETools.Codecs.LossyWAV/LossyWAV.cs @@ -34,17 +34,15 @@ namespace CUETools.Codecs.LossyWAV public const string version_string = "1.1.1#"; - public LossyWAVWriter(IAudioDest audioDest, IAudioDest lwcdfDest, int bitsPerSample, int channelCount, int sampleRate, double quality) + public LossyWAVWriter(IAudioDest audioDest, IAudioDest lwcdfDest, double quality, AudioPCMConfig pcm) { _audioDest = audioDest; _lwcdfDest = lwcdfDest; - channels = channelCount; - samplerate = sampleRate; - bitspersample = bitsPerSample; + _pcm = pcm; - if (_audioDest != null && _audioDest.BitsPerSample > bitsPerSample) + if (_audioDest != null && _audioDest.PCM.BitsPerSample > _pcm.BitsPerSample) throw new Exception("audio parameters mismatch"); - if (_lwcdfDest != null && _lwcdfDest.BitsPerSample != bitsPerSample) + if (_lwcdfDest != null && _lwcdfDest.PCM.BitsPerSample != _pcm.BitsPerSample) throw new Exception("audio parameters mismatch"); int quality_integer = (int)Math.Floor(quality); @@ -66,6 +64,8 @@ namespace CUETools.Codecs.LossyWAV scaling_factor = 1.0; shaping_factor = Math.Min(1, quality / 10); shaping_is_on = shaping_factor > 0; + + _audioBuffer = new AudioBuffer(_pcm, 256); } public void Close() @@ -74,7 +74,7 @@ namespace CUETools.Codecs.LossyWAV { shift_codec_blocks(); if (samplesInBuffer > 0) - Array.Copy(sampleBuffer, 0, rotating_blocks_ptr[3], 0, samplesInBuffer * channels); + Array.Copy(sampleBuffer, 0, rotating_blocks_ptr[3], 0, samplesInBuffer * _pcm.ChannelCount); next_codec_block_size = samplesInBuffer; process_this_codec_block(); if (next_codec_block_size > 0) @@ -90,17 +90,21 @@ namespace CUETools.Codecs.LossyWAV if (_audioDest != null) _audioDest.Close(); } - public void Write(int[,] buff, int pos, int sampleCount) + public void Write(AudioBuffer buff) { if (!initialized) Initialize(); + buff.Prepare(this); + + int pos = 0; + int sampleCount = buff.Length; while (sampleCount + samplesInBuffer > codec_block_size) { shift_codec_blocks(); // next_codec_block_size is now zero if (samplesInBuffer > 0) - Array.Copy(sampleBuffer, 0, rotating_blocks_ptr[3], 0, samplesInBuffer * channels); - Array.Copy(buff, pos * channels, rotating_blocks_ptr[3], samplesInBuffer * channels, (codec_block_size - samplesInBuffer) * channels); + Array.Copy(sampleBuffer, 0, rotating_blocks_ptr[3], 0, samplesInBuffer * _pcm.ChannelCount); + Array.Copy(buff.Samples, pos * _pcm.ChannelCount, rotating_blocks_ptr[3], samplesInBuffer * _pcm.ChannelCount, (codec_block_size - samplesInBuffer) * _pcm.ChannelCount); next_codec_block_size = codec_block_size; pos += codec_block_size - samplesInBuffer; sampleCount -= codec_block_size - samplesInBuffer; @@ -111,8 +115,8 @@ namespace CUETools.Codecs.LossyWAV } if (sampleCount > 0) { - Array.Copy(buff, pos * channels, sampleBuffer, samplesInBuffer * channels, sampleCount * channels); - samplesInBuffer += (int) sampleCount; + Array.Copy(buff.Samples, pos * _pcm.ChannelCount, sampleBuffer, samplesInBuffer * _pcm.ChannelCount, sampleCount * _pcm.ChannelCount); + samplesInBuffer += sampleCount; } } @@ -138,9 +142,24 @@ namespace CUETools.Codecs.LossyWAV set { } } - public int BitsPerSample + public int CompressionLevel { - get { return bitspersample; } + get { return 0; } + set { } + } + + public string Options + { + set + { + if (value == null || value == "") return; + throw new Exception("Unsupported options " + value); + } + } + + public AudioPCMConfig PCM + { + get { return _pcm; } } public int OverallBitsRemoved @@ -272,7 +291,7 @@ namespace CUETools.Codecs.LossyWAV { 4.876022F,5.668487F,6.605748F,7.589148F,8.584943F,9.583902F,10.583678F,11.583589F,12.583571F,13.583568F,14.583551F,15.583574F,16.583541F,17.583544F,18.583555F,19.583554F,20.583574F,21.583577F,22.583531F,23.583560F,24.583548F,25.583570F,26.583561F,27.583581F,28.583552F,29.583540F,30.583564F,31.583530F,32.583546F,33.583585F,34.583557F,35.583567F} }; - if (samplerate > 46050) + if (_pcm.SampleRate > 46050) { shaping_a = /* order_4_48000_a */ new double[4] { +0.90300, +0.01160, -0.58530, -0.25710 }; shaping_b = /* order_4_48000_b */ new double[4] { -2.23740, +0.73390, +0.12510, +0.60330 }; @@ -289,8 +308,8 @@ namespace CUETools.Codecs.LossyWAV short bits_in_block_size = (short)Math.Floor(fastlog2(codec_block_size)); for (int i = 0; i < precalc_analyses; i++) fft_bit_length[i] += (short)(bits_in_block_size - 9); - if (frequency_limits[spread_freqs] > samplerate / 2) - frequency_limits[spread_freqs] = samplerate / 2; + if (frequency_limits[spread_freqs] > _pcm.SampleRate / 2) + frequency_limits[spread_freqs] = _pcm.SampleRate / 2; fill_fft_lookup_block = new int[maxblocksize * 4]; fill_fft_lookup_offset = new int[maxblocksize * 4]; for (int i = 0; i < codec_block_size * 4; i++) @@ -303,8 +322,8 @@ namespace CUETools.Codecs.LossyWAV for (int j = 0; j < precalc_analyses; j++) saved_fft_results[i, j].start = -1; clipped_samples = 0; - this_max_sample = (1 << (bitspersample - 1)) - 1; - this_min_sample = 0 - (1 << (bitspersample - 1)); + this_max_sample = (1 << (_pcm.BitsPerSample - 1)) - 1; + this_min_sample = 0 - (1 << (_pcm.BitsPerSample - 1)); for (int this_fft_bit_length = 1; this_fft_bit_length <= MaxFFTBitLength; this_fft_bit_length++) { int this_fft_length = 1 << this_fft_bit_length; @@ -321,7 +340,7 @@ namespace CUETools.Codecs.LossyWAV shaping_a[i] *= sf; shaping_b[i] *= sf; } - static_maximum_bits_to_remove = (short)(bitspersample - static_minimum_bits_to_keep); + static_maximum_bits_to_remove = (short)(_pcm.BitsPerSample - static_minimum_bits_to_keep); double lfb = Math.Log10(frequency_limits[0]); // 20Hz lower limit for skewing; double mfb = Math.Log10(frequency_limits[2]); // 3445.3125Hz upper limit for skewing; double dfb = mfb - lfb; // skewing range; @@ -347,8 +366,8 @@ namespace CUETools.Codecs.LossyWAV fft_array = new double[1 << (MaxFFTBitLength + 1)]; fft_result = new double[1 << MaxFFTBitLength]; rotating_blocks_ptr = new int[4][,]; - sampleBuffer = new int[codec_block_size, channels]; - channel_recs = new channel_rec[channels]; + sampleBuffer = new int[codec_block_size, _pcm.ChannelCount]; + channel_recs = new channel_rec[_pcm.ChannelCount]; analysis_recs = new analyzis_rec[precalc_analyses]; for (int analysis_number = 0; analysis_number < precalc_analyses; analysis_number++) @@ -371,7 +390,7 @@ namespace CUETools.Codecs.LossyWAV analysis_recs[analysis_number].fft_underlap_length = total_overlap_length * 1.0 / Math.Max(1, analysis_recs[analysis_number].analysis_blocks); // Calculate actual analysis_time values for fft_lengths - analysis_recs[analysis_number].bin_width = samplerate * 1.0 / (1 << this_fft_bit_length); + analysis_recs[analysis_number].bin_width = _pcm.SampleRate * 1.0 / (1 << this_fft_bit_length); analysis_recs[analysis_number].bin_time = 1.0 / analysis_recs[analysis_number].bin_width; // Calculate which FFT bin corresponds to the low frequency limit @@ -417,9 +436,9 @@ namespace CUETools.Codecs.LossyWAV analysis_recs[analysis_number].threshold_index[last_filled++] = 32; // ?? 31? } // calculating for each analysis_number for (int i = 0; i < 4; i++) - rotating_blocks_ptr[i] = new int[codec_block_size, channels]; - btrd_codec_block = new int[codec_block_size, channels]; - corr_codec_block = new int[codec_block_size, channels]; + rotating_blocks_ptr[i] = new int[codec_block_size, _pcm.ChannelCount]; + btrd_codec_block = new int[codec_block_size, _pcm.ChannelCount]; + corr_codec_block = new int[codec_block_size, _pcm.ChannelCount]; blocks_processed = 0; overall_bits_removed = 0; overall_bits_lost = 0; @@ -483,8 +502,8 @@ namespace CUETools.Codecs.LossyWAV void remove_bits(int channel, short bits_to_remove_from_this_channel) { short min_bits_to_remove = 0; - if (_audioDest != null && _audioDest.BitsPerSample < bitspersample) - min_bits_to_remove = (short) (bitspersample - _audioDest.BitsPerSample); + if (_audioDest != null && _audioDest.PCM.BitsPerSample < _pcm.BitsPerSample) + min_bits_to_remove = (short) (_pcm.BitsPerSample - _audioDest.PCM.BitsPerSample); if (bits_to_remove_from_this_channel < min_bits_to_remove) bits_to_remove_from_this_channel = min_bits_to_remove; @@ -563,18 +582,18 @@ namespace CUETools.Codecs.LossyWAV void process_this_codec_block() { - short codec_block_dependent_bits_to_remove = (short)bitspersample; + short codec_block_dependent_bits_to_remove = (short)_pcm.BitsPerSample; double min_codec_block_channel_rms = channel_recs[0].this_codec_block_rms; - for (int channel = 0; channel < channels; channel++) + for (int channel = 0; channel < _pcm.ChannelCount; channel++) min_codec_block_channel_rms = Math.Min(min_codec_block_channel_rms, channel_recs[channel].this_codec_block_rms); - for (int channel = 0; channel < channels; channel++) + for (int channel = 0; channel < _pcm.ChannelCount; channel++) { // if (linkchannels)... channel_recs[channel].this_codec_block_bits = channel_recs[channel].this_codec_block_rms; } - for (int channel = 0; channel < channels; channel++) + for (int channel = 0; channel < _pcm.ChannelCount; channel++) { fft_results_rec min_fft_result; @@ -665,7 +684,7 @@ namespace CUETools.Codecs.LossyWAV codec_block_dependent_bits_to_remove = Math.Min(codec_block_dependent_bits_to_remove, channel_recs[channel].bits_to_remove); } - for (int channel = 0; channel < channels; channel++) + for (int channel = 0; channel < _pcm.ChannelCount; channel++) { // if (linkchannels) overall_bits_removed += channel_recs[channel].bits_to_remove; @@ -675,16 +694,21 @@ namespace CUETools.Codecs.LossyWAV if (_audioDest != null) { - if (_audioDest.BitsPerSample < bitspersample) + if (_audioDest.PCM.BitsPerSample < _pcm.BitsPerSample) { - int sh = bitspersample - _audioDest.BitsPerSample; + int sh = _pcm.BitsPerSample - _audioDest.PCM.BitsPerSample; for (int i = 0; i < this_codec_block_size; i++) - for (int c = 0; c < channels; c++) + for (int c = 0; c < _pcm.ChannelCount; c++) btrd_codec_block[i, c] >>= sh; } - _audioDest.Write(btrd_codec_block, 0, this_codec_block_size); + _audioBuffer.Prepare(btrd_codec_block, this_codec_block_size); + _audioDest.Write(_audioBuffer); + } + if (_lwcdfDest != null) + { + _audioBuffer.Prepare(corr_codec_block, this_codec_block_size); + _lwcdfDest.Write(_audioBuffer); } - if (_lwcdfDest != null) _lwcdfDest.Write(corr_codec_block, 0, this_codec_block_size); } void shift_codec_blocks() @@ -703,7 +727,7 @@ namespace CUETools.Codecs.LossyWAV if (this_codec_block_size > 0) { blocks_processed++; - for (int channel = 0; channel < channels; channel++) + for (int channel = 0; channel < _pcm.ChannelCount; channel++) { double x = 0; for (int i = 0; i < this_codec_block_size; i++) @@ -798,7 +822,8 @@ namespace CUETools.Codecs.LossyWAV #region Private fields IAudioDest _audioDest, _lwcdfDest; - int channels, samplerate, bitspersample; + AudioPCMConfig _pcm; + private AudioBuffer _audioBuffer; short[] fft_bit_length; float[] frequency_limits; int[] fill_fft_lookup_block; @@ -884,33 +909,28 @@ namespace CUETools.Codecs.LossyWAV if (_audioSource.Length != _lwcdfSource.Length) throw new Exception("Data not same length"); - if (_audioSource.BitsPerSample != _lwcdfSource.BitsPerSample - || _audioSource.ChannelCount != _lwcdfSource.ChannelCount - || _audioSource.SampleRate != _lwcdfSource.SampleRate) + if (_audioSource.PCM.BitsPerSample != _lwcdfSource.PCM.BitsPerSample + || _audioSource.PCM.ChannelCount != _lwcdfSource.PCM.ChannelCount + || _audioSource.PCM.SampleRate != _lwcdfSource.PCM.SampleRate) throw new Exception("FMT Data mismatch"); scaling_factor = 1.0; // !!!! Need to read 'fact' chunks or tags here } - public int[,] Read(int[,] buff) + public int Read(AudioBuffer buff, int maxLength) { - return AudioSamples.Read(this, buff); - } - - public uint Read(int[,] buff, uint sampleCount) - { - if (sampleBuffer == null || sampleBuffer.Length < sampleCount) - sampleBuffer = new int[sampleCount, _audioSource.ChannelCount]; - sampleCount = _audioSource.Read(buff, sampleCount); - if (sampleCount != _lwcdfSource.Read(sampleBuffer, sampleCount)) - throw new Exception("size mismatch"); + if (lwcdfBuffer == null || lwcdfBuffer.Size < buff.Size) + lwcdfBuffer = new AudioBuffer(_lwcdfSource, buff.Size); + int sampleCount = _audioSource.Read(buff, maxLength); + if (sampleCount != _lwcdfSource.Read(lwcdfBuffer, maxLength)) + throw new Exception("size mismatch"); // Very likely to happen (depending on lwcdfSource implementation) for (uint i = 0; i < sampleCount; i++) - for (int c = 0; c < _audioSource.ChannelCount; c++) - buff[i,c] = (int)Math.Round(buff[i, c] / scaling_factor + sampleBuffer[i, c]); + for (int c = 0; c < buff.PCM.ChannelCount; c++) + buff.Samples[i, c] = (int)Math.Round(buff.Samples[i, c] / scaling_factor + lwcdfBuffer.Samples[i, c]); return sampleCount; } - public ulong Length + public long Length { get { @@ -918,7 +938,7 @@ namespace CUETools.Codecs.LossyWAV } } - public ulong Position + public long Position { get { @@ -931,7 +951,7 @@ namespace CUETools.Codecs.LossyWAV } } - public ulong Remaining + public long Remaining { get { @@ -939,27 +959,11 @@ namespace CUETools.Codecs.LossyWAV } } - public int BitsPerSample + public AudioPCMConfig PCM { get { - return _audioSource.BitsPerSample; - } - } - - public int ChannelCount - { - get - { - return _audioSource.ChannelCount; - } - } - - public int SampleRate - { - get - { - return _audioSource.SampleRate; + return _audioSource.PCM; } } @@ -979,8 +983,8 @@ namespace CUETools.Codecs.LossyWAV } IAudioSource _audioSource, _lwcdfSource; + AudioBuffer lwcdfBuffer; double scaling_factor; - int[,] sampleBuffer; } #endregion diff --git a/CUETools.Codecs.TTA/CUETools.Codecs.TTA.cpp b/CUETools.Codecs.TTA/CUETools.Codecs.TTA.cpp index 6f8c430..d7c970f 100644 --- a/CUETools.Codecs.TTA/CUETools.Codecs.TTA.cpp +++ b/CUETools.Codecs.TTA/CUETools.Codecs.TTA.cpp @@ -27,6 +27,7 @@ namespace TTA { "operation canceled" }; + [AudioDecoderClass("ttalib", "tta")] public ref class TTAReader : public IAudioSource { public: @@ -70,9 +71,8 @@ namespace TTA { } if (WAVE_FORMAT_PCM != _ttaReader->ttahdr.AudioFormat) throw gcnew Exception("floating point format not supported."); - _channelCount = _ttaReader->ttahdr.NumChannels; - _bitsPerSample = _ttaReader->ttahdr.BitsPerSample; - _sampleRate = _ttaReader->ttahdr.SampleRate; + + pcm = gcnew AudioPCMConfig((int)_ttaReader->ttahdr.BitsPerSample, (int)_ttaReader->ttahdr.NumChannels, (int)_ttaReader->ttahdr.SampleRate); _sampleCount = _ttaReader->ttahdr.DataLength; } @@ -81,36 +81,24 @@ namespace TTA { Close (); } - virtual property Int32 BitsPerSample { - Int32 get() { - return _bitsPerSample; + virtual property AudioPCMConfig^ PCM { + AudioPCMConfig^ get() { + return pcm; } } - virtual property Int32 ChannelCount { - Int32 get() { - return _channelCount; - } - } - - virtual property Int32 SampleRate { - Int32 get() { - return _sampleRate; - } - } - - virtual property UInt64 Length { - UInt64 get() { + virtual property Int64 Length { + Int64 get() { return _sampleCount; } } - virtual property UInt64 Position { - UInt64 get() + virtual property Int64 Position { + Int64 get() { return _sampleOffset - SamplesInBuffer; } - void set(UInt64 offset) + void set(Int64 offset) { _sampleOffset = offset; _bufferOffset = 0; @@ -125,8 +113,8 @@ namespace TTA { } } - virtual property UInt64 Remaining { - UInt64 get() { + virtual property Int64 Remaining { + Int64 get() { return _sampleCount - _sampleOffset + SamplesInBuffer; } } @@ -144,31 +132,28 @@ namespace TTA { } } - virtual array^ Read(array^ buff) - { - return AudioSamples::Read(this, buff); - } - void processBlock (long * buffer, int sampleCount) { if (_bufferLength > 0) throw gcnew Exception("Received unrequested samples."); if ((_sampleBuffer == nullptr) || (_sampleBuffer->GetLength(0) < sampleCount)) - _sampleBuffer = gcnew array(sampleCount, _channelCount); + _sampleBuffer = gcnew array(sampleCount, pcm->ChannelCount); interior_ptr pMyBuffer = &_sampleBuffer[0, 0]; const long *pTTABuffer = buffer; - const long *pTTABufferEnd = pTTABuffer + sampleCount * _channelCount; + const long *pTTABufferEnd = pTTABuffer + sampleCount * pcm->ChannelCount; while (pTTABuffer < pTTABufferEnd) *(pMyBuffer++) = *(pTTABuffer++); _bufferLength = sampleCount; } - virtual UInt32 Read([Out] array^ buff, UInt32 sampleCount) + virtual int Read(AudioBuffer^ buff, int maxLength) { - UInt32 buffOffset = 0; - UInt32 samplesNeeded = sampleCount; + buff->Prepare(this, maxLength); + + Int32 buffOffset = 0; + Int32 samplesNeeded = buff->Length; while (samplesNeeded != 0) { @@ -193,51 +178,51 @@ namespace TTA { } while (_bufferLength == 0); _sampleOffset += _bufferLength; } - UInt32 copyCount = Math::Min(samplesNeeded, SamplesInBuffer); - Array::Copy(_sampleBuffer, _bufferOffset * _channelCount, buff, buffOffset * _channelCount, copyCount * _channelCount); + Int32 copyCount = Math::Min(samplesNeeded, SamplesInBuffer); + Array::Copy(_sampleBuffer, _bufferOffset * pcm->ChannelCount, buff->Samples, buffOffset * pcm->ChannelCount, copyCount * pcm->ChannelCount); samplesNeeded -= copyCount; buffOffset += copyCount; _bufferOffset += copyCount; } - return sampleCount; + return buff->Length; } private: Int64 _sampleCount, _sampleOffset; - Int32 _bitsPerSample, _channelCount, _sampleRate; + AudioPCMConfig^ pcm; array^ _sampleBuffer; array^ _readBuffer; String^ _path; Stream^ _IO; - UInt32 _bufferOffset, _bufferLength; + Int32 _bufferOffset, _bufferLength; TTALib::TTAReader * _ttaReader; - property UInt32 SamplesInBuffer { - UInt32 get () + property Int32 SamplesInBuffer { + Int32 get () { - return (UInt32) (_bufferLength - _bufferOffset); + return _bufferLength - _bufferOffset; } } }; - public ref class TTAWriter : IAudioDest + [AudioEncoderClass("ttalib", "tta", true, "", "", 1)] + public ref class TTAWriter : public IAudioDest { public: - TTAWriter(String^ path, Int32 bitsPerSample, Int32 channelCount, Int32 sampleRate) + TTAWriter(String^ path, AudioPCMConfig^ pcm) { - if (bitsPerSample < 16 || bitsPerSample > 24) - throw gcnew Exception("Bits per sample must be 16..24."); + _pcm = pcm; - _initialized = false; - _sampleBuffer = nullptr; - _path = path; - _finalSampleCount = 0; - _samplesWritten = 0; - _bitsPerSample = bitsPerSample; - _channelCount = channelCount; - _sampleRate = sampleRate; - _compressionLevel = 5; - _blockSize = 0; + if (_pcm->BitsPerSample < 16 || _pcm->BitsPerSample > 24) + throw gcnew Exception("Bits per sample must be 16..24."); + + _initialized = false; + _sampleBuffer = nullptr; + _path = path; + _finalSampleCount = 0; + _samplesWritten = 0; + _compressionLevel = 5; + _blockSize = 0; } virtual void Close() { @@ -295,9 +280,9 @@ namespace TTA { } } - virtual property int BitsPerSample + virtual property AudioPCMConfig^ PCM { - int get() { return _bitsPerSample; } + AudioPCMConfig^ get() { return _pcm; } } virtual property String^ Path { @@ -306,41 +291,51 @@ namespace TTA { } } - virtual void Write(array^ sampleBuffer, int offset, int sampleCount) { + virtual void Write(AudioBuffer^ sampleBuffer) { if (!_initialized) Initialize(); - if ((_sampleBuffer == nullptr) || (_sampleBuffer->Length < sampleCount * _channelCount)) - _sampleBuffer = gcnew array (sampleCount * _channelCount); + sampleBuffer->Prepare(this); - interior_ptr pSampleBuffer = &sampleBuffer[offset, 0]; + if ((_sampleBuffer == nullptr) || (_sampleBuffer->Length < sampleBuffer->Length * _pcm->ChannelCount)) + _sampleBuffer = gcnew array (sampleBuffer->Length * _pcm->ChannelCount); + + interior_ptr pSampleBuffer = &sampleBuffer->Samples[0, 0]; interior_ptr pTTABuffer = &_sampleBuffer[0]; - for (int i = 0; i < sampleCount * _channelCount; i++) + for (int i = 0; i < sampleBuffer->Length * _pcm->ChannelCount; i++) pTTABuffer[i] = pSampleBuffer[i]; pin_ptr buffer = &_sampleBuffer[0]; try { - _ttaWriter->CompressBlock(buffer, sampleCount); + _ttaWriter->CompressBlock(buffer, sampleBuffer->Length); } catch (TTALib::TTAException ex) { throw gcnew Exception(String::Format("TTA encoder: {0}", gcnew String(TTAErrorsStr[ex.GetErrNo()]))); } - _samplesWritten += sampleCount; + _samplesWritten += sampleBuffer->Length; } - property Int32 CompressionLevel { + virtual property Int32 CompressionLevel { Int32 get() { return _compressionLevel; } void set(Int32 value) { - if ((value < 0) || (value > 8)) { + if (value > 0) throw gcnew Exception("Invalid compression level."); - } _compressionLevel = value; } } + virtual property String^ Options + { + void set(String^ value) + { + if (value == nullptr || value == "") return; + throw gcnew Exception(String::Format("Unsupported options: {0}", value)); + } + } + private: TTALib::TTAWriter* _ttaWriter; FileStream^ _IO; @@ -348,7 +343,7 @@ namespace TTA { bool _initialized; String^ _path; Int64 _finalSampleCount, _samplesWritten, _blockSize; - Int32 _bitsPerSample, _channelCount, _sampleRate; + AudioPCMConfig^ _pcm; Int32 _compressionLevel; void Initialize() @@ -433,7 +428,7 @@ namespace TTA { _IO = gcnew FileStream (_path, FileMode::Create, FileAccess::Write, FileShare::Read); try { - _ttaWriter = new TTALib::TTAWriter((HANDLE)_IO->Handle, 0, WAVE_FORMAT_PCM, _channelCount, _bitsPerSample, _sampleRate, _finalSampleCount); + _ttaWriter = new TTALib::TTAWriter((HANDLE)_IO->Handle, 0, WAVE_FORMAT_PCM, _pcm->ChannelCount, _pcm->BitsPerSample, _pcm->SampleRate, _finalSampleCount); } catch (TTALib::TTAException ex) { throw gcnew Exception(String::Format("TTA encoder: {0}", gcnew String(TTAErrorsStr[ex.GetErrNo()]))); diff --git a/CUETools.Codecs.TTA/CUETools.Codecs.TTA.vcproj b/CUETools.Codecs.TTA/CUETools.Codecs.TTA.vcproj index 3078298..7fd6863 100644 --- a/CUETools.Codecs.TTA/CUETools.Codecs.TTA.vcproj +++ b/CUETools.Codecs.TTA/CUETools.Codecs.TTA.vcproj @@ -20,8 +20,8 @@ @@ -416,10 +417,6 @@ > - - diff --git a/CUETools.Codecs.WavPack/CUETools.Codecs.WavPack.cpp b/CUETools.Codecs.WavPack/CUETools.Codecs.WavPack.cpp index 71a59fa..5943e99 100644 --- a/CUETools.Codecs.WavPack/CUETools.Codecs.WavPack.cpp +++ b/CUETools.Codecs.WavPack/CUETools.Codecs.WavPack.cpp @@ -58,10 +58,21 @@ namespace CUETools { namespace Codecs { namespace WavPack { [UnmanagedFunctionPointer(CallingConvention::Cdecl)] public delegate int DecoderCanSeekDelegate(void *id); + [AudioDecoderClass("libwavpack", "wv")] public ref class WavPackReader : public IAudioSource { public: WavPackReader(String^ path, Stream^ IO, Stream^ IO_WVC) + { + Initialize (path, IO, IO_WVC); + } + + WavPackReader(String^ path, Stream^ IO) + { + Initialize (path, IO, nullptr); + } + + void Initialize(String^ path, Stream^ IO, Stream^ IO_WVC) { char errorMessage[256]; @@ -95,9 +106,10 @@ namespace CUETools { namespace Codecs { namespace WavPack { throw gcnew Exception("Unable to initialize the decoder."); } - _bitsPerSample = WavpackGetBitsPerSample(_wpc); - _channelCount = WavpackGetNumChannels(_wpc); - _sampleRate = WavpackGetSampleRate(_wpc); + pcm = gcnew AudioPCMConfig( + WavpackGetBitsPerSample(_wpc), + WavpackGetNumChannels(_wpc), + (int)WavpackGetSampleRate(_wpc)); _sampleCount = WavpackGetNumSamples(_wpc); _sampleOffset = 0; } @@ -107,35 +119,23 @@ namespace CUETools { namespace Codecs { namespace WavPack { delete ioReader; } - virtual property Int32 BitsPerSample { - Int32 get() { - return _bitsPerSample; + virtual property AudioPCMConfig^ PCM { + AudioPCMConfig^ get() { + return pcm; } } - virtual property Int32 ChannelCount { - Int32 get() { - return _channelCount; - } - } - - virtual property Int32 SampleRate { - Int32 get() { - return _sampleRate; - } - } - - virtual property UInt64 Length { - UInt64 get() { + virtual property Int64 Length { + Int64 get() { return _sampleCount; } } - virtual property UInt64 Position { - UInt64 get() { + virtual property Int64 Position { + Int64 get() { return _sampleOffset; } - void set(UInt64 offset) { + void set(Int64 offset) { _sampleOffset = offset; if (!WavpackSeekSample(_wpc, offset)) { throw gcnew Exception("Unable to seek."); @@ -143,8 +143,8 @@ namespace CUETools { namespace Codecs { namespace WavPack { } } - virtual property UInt64 Remaining { - UInt64 get() { + virtual property Int64 Remaining { + Int64 get() { return _sampleCount - _sampleOffset; } } @@ -171,25 +171,22 @@ namespace CUETools { namespace Codecs { namespace WavPack { } } - virtual array^ Read(array^ buff) + virtual int Read(AudioBuffer^ sampleBuffer, int maxLength) { - return AudioSamples::Read(this, buff); - } + sampleBuffer->Prepare(this, maxLength); - virtual UInt32 Read(array^ sampleBuffer, UInt32 sampleCount) - { - pin_ptr pSampleBuffer = &sampleBuffer[0, 0]; - int samplesRead = WavpackUnpackSamples(_wpc, pSampleBuffer, sampleCount); + pin_ptr pSampleBuffer = &sampleBuffer->Samples[0, 0]; + int samplesRead = WavpackUnpackSamples(_wpc, pSampleBuffer, sampleBuffer->Length); _sampleOffset += samplesRead; - if (samplesRead != sampleCount) + if (samplesRead != sampleBuffer->Length) throw gcnew Exception("Decoder returned a different number of samples than requested."); - return sampleCount; + return sampleBuffer->Length; } private: WavpackContext *_wpc; Int32 _sampleCount, _sampleOffset; - Int32 _bitsPerSample, _channelCount, _sampleRate; + AudioPCMConfig^ pcm; String^ _path; Stream^ _IO; Stream^ _IO_WVC; @@ -293,16 +290,17 @@ namespace CUETools { namespace Codecs { namespace WavPack { } }; + [AudioEncoderClass("libwavpack", "wv", true, "fast normal high high+", "normal", 1)] public ref class WavPackWriter : IAudioDest { public: - WavPackWriter(String^ path, Int32 bitsPerSample, Int32 channelCount, Int32 sampleRate) + WavPackWriter(String^ path, AudioPCMConfig^ pcm) { - IntPtr pathChars; + _pcm = pcm; - if (channelCount != 1 && channelCount != 2) + if (_pcm->ChannelCount != 1 && _pcm->ChannelCount != 2) throw gcnew Exception("Only stereo and mono audio formats are allowed."); - if (bitsPerSample < 16 || bitsPerSample > 24) + if (_pcm->BitsPerSample < 16 || _pcm->BitsPerSample > 24) throw gcnew Exception("Bits per sample must be 16..24."); _path = path; @@ -311,12 +309,7 @@ namespace CUETools { namespace Codecs { namespace WavPack { _extraMode = 0; _blockSize = 0; - _bitsPerSample = bitsPerSample; - _channelCount = channelCount; - _sampleRate = sampleRate; - _blockAlign = _channelCount * ((_bitsPerSample + 7) / 8); - - pathChars = Marshal::StringToHGlobalUni(path); + IntPtr pathChars = Marshal::StringToHGlobalUni(path); _hFile = _wfopen((const wchar_t*)pathChars.ToPointer(), L"w+b"); Marshal::FreeHGlobal(pathChars); if (!_hFile) { @@ -371,42 +364,41 @@ namespace CUETools { namespace Codecs { namespace WavPack { } } - virtual property int BitsPerSample + virtual property AudioPCMConfig^ PCM { - int get() { return _bitsPerSample; } + AudioPCMConfig^ get() { return _pcm; } } - virtual void Write(array^ sampleBuffer, int offset, int sampleCount) + virtual void Write(AudioBuffer^ sampleBuffer) { if (!_initialized) Initialize(); - if (MD5Sum) - { - if (_sampleBuffer == nullptr || _sampleBuffer.Length < sampleCount * _blockAlign) - _sampleBuffer = gcnew array(sampleCount * _blockAlign); - AudioSamples::FLACSamplesToBytes(sampleBuffer, offset, _sampleBuffer, 0, sampleCount, _channelCount, _bitsPerSample); - UpdateHash(_sampleBuffer, sampleCount * _blockAlign); - } + sampleBuffer->Prepare(this); - if ((_bitsPerSample & 7) != 0) + if (MD5Sum) + UpdateHash(sampleBuffer->Bytes, sampleBuffer->ByteLength); + + if ((_pcm->BitsPerSample & 7) != 0) { - if (_shiftedSampleBuffer == nullptr || _shiftedSampleBuffer.GetLength(0) < sampleCount) - _shiftedSampleBuffer = gcnew array(sampleCount, _channelCount); - for (int i = 0; i < sampleCount; i++) - for (int c = 0; c < _channelCount; c++) - _shiftedSampleBuffer[i,c] = sampleBuffer[i+offset,c] << 8 - (_bitsPerSample & 7); + if (_shiftedSampleBuffer == nullptr || _shiftedSampleBuffer.GetLength(0) < sampleBuffer->Length) + _shiftedSampleBuffer = gcnew array(sampleBuffer->Length, _pcm->ChannelCount); + int shift = 8 - (_pcm->BitsPerSample & 7); + int ch = _pcm->ChannelCount; + for (int i = 0; i < sampleBuffer->Length; i++) + for (int c = 0; c < ch; c++) + _shiftedSampleBuffer[i,c] = sampleBuffer->Samples[i,c] << shift; pin_ptr pSampleBuffer = &_shiftedSampleBuffer[0, 0]; - if (!WavpackPackSamples(_wpc, (int32_t*)pSampleBuffer, sampleCount)) + if (!WavpackPackSamples(_wpc, (int32_t*)pSampleBuffer, sampleBuffer->Length)) throw gcnew Exception("An error occurred while encoding."); } else { - pin_ptr pSampleBuffer = &sampleBuffer[offset, 0]; - if (!WavpackPackSamples(_wpc, (int32_t*)pSampleBuffer, sampleCount)) + pin_ptr pSampleBuffer = &sampleBuffer->Samples[0, 0]; + if (!WavpackPackSamples(_wpc, (int32_t*)pSampleBuffer, sampleBuffer->Length)) throw gcnew Exception("An error occurred while encoding."); } - _samplesWritten += sampleCount; + _samplesWritten += sampleBuffer->Length; } virtual property String^ Path @@ -416,11 +408,11 @@ namespace CUETools { namespace Codecs { namespace WavPack { } } - property Int32 CompressionMode { - Int32 get() { + virtual property int CompressionLevel { + int get() { return _compressionMode; } - void set(Int32 value) { + void set(int value) { if ((value < 0) || (value > 3)) { throw gcnew Exception("Invalid compression mode."); } @@ -428,6 +420,29 @@ namespace CUETools { namespace Codecs { namespace WavPack { } } + virtual property String^ Options + { + void set(String^ value) + { + if (value == nullptr || value == "") return; + cli::array^ args = value->Split(); + for (int i = 0; i < args->Length; i++) + { + if (args[i] == "--extra-mode" && (++i) < args->Length) + { + ExtraMode = Int32::Parse(args[i]); + continue; + } + if (args[i] == "--md5") + { + MD5Sum = true; + continue; + } + throw gcnew Exception(String::Format("Unsupported options: {0}", value)); + } + } + } + property Int32 ExtraMode { Int32 get() { return _extraMode; @@ -463,13 +478,12 @@ namespace CUETools { namespace Codecs { namespace WavPack { bool _initialized; WavpackContext *_wpc; Int32 _finalSampleCount, _samplesWritten; - Int32 _bitsPerSample, _channelCount, _sampleRate, _blockAlign; Int32 _compressionMode, _extraMode, _blockSize; String^ _path; bool _md5Sum; MD5^ _md5hasher; - array^ _sampleBuffer; array^ _shiftedSampleBuffer; + AudioPCMConfig^ _pcm; void Initialize() { WavpackConfig config; @@ -480,11 +494,11 @@ namespace CUETools { namespace Codecs { namespace WavPack { } memset(&config, 0, sizeof(WavpackConfig)); - config.bits_per_sample = _bitsPerSample; - config.bytes_per_sample = (_bitsPerSample + 7) / 8; - config.num_channels = _channelCount; - config.channel_mask = 5 - _channelCount; - config.sample_rate = _sampleRate; + config.bits_per_sample = _pcm->BitsPerSample; + config.bytes_per_sample = (_pcm->BitsPerSample + 7) / 8; + config.num_channels = _pcm->ChannelCount; + config.channel_mask = 5 - _pcm->ChannelCount; + config.sample_rate = _pcm->SampleRate; if (_compressionMode == 0) config.flags |= CONFIG_FAST_FLAG; if (_compressionMode == 2) config.flags |= CONFIG_HIGH_FLAG; if (_compressionMode == 3) config.flags |= CONFIG_HIGH_FLAG | CONFIG_VERY_HIGH_FLAG; diff --git a/CUETools.Codecs.WavPack/CUETools.Codecs.WavPack.vcproj b/CUETools.Codecs.WavPack/CUETools.Codecs.WavPack.vcproj index f1a9950..907f7b1 100644 --- a/CUETools.Codecs.WavPack/CUETools.Codecs.WavPack.vcproj +++ b/CUETools.Codecs.WavPack/CUETools.Codecs.WavPack.vcproj @@ -20,7 +20,7 @@ diff --git a/CUETools.Codecs/CRCs/CRC32.cs b/CUETools.Codecs/CRCs/CRC32.cs index 99161f8..7e68443 100644 --- a/CUETools.Codecs/CRCs/CRC32.cs +++ b/CUETools.Codecs/CRCs/CRC32.cs @@ -6,29 +6,36 @@ namespace CUETools.Codecs { public class Crc32 { - uint[] table = new uint[256]; + public uint[] table = new uint[256]; public uint ComputeChecksum(uint crc, byte val) { return (crc >> 8) ^ table[(crc & 0xff) ^ val]; } - public uint ComputeChecksum(uint crc, byte[] bytes, int pos, int count) + public unsafe uint ComputeChecksum(uint crc, byte* bytes, int count) { - for (int i = pos; i < pos + count; i++) - crc = ComputeChecksum(crc, bytes[i]); + fixed (uint *t = table) + for (int i = 0; i < count; i++) + crc = (crc >> 8) ^ t[(crc ^ bytes[i]) & 0xff]; return crc; } + public unsafe uint ComputeChecksum(uint crc, byte[] bytes, int pos, int count) + { + fixed (byte* pbytes = &bytes[pos]) + return ComputeChecksum(crc, pbytes, count); + } + public uint ComputeChecksum(uint crc, uint s) { return ComputeChecksum(ComputeChecksum(ComputeChecksum(ComputeChecksum( crc, (byte)s), (byte)(s >> 8)), (byte)(s >> 16)), (byte)(s >> 24)); } - public unsafe uint ComputeChecksum(uint crc, int * samples, uint count) + public unsafe uint ComputeChecksum(uint crc, int * samples, int count) { - for (uint i = 0; i < count; i++) + for (int i = 0; i < count; i++) { int s1 = samples[2 * i], s2 = samples[2 * i + 1]; crc = ComputeChecksum(ComputeChecksum(ComputeChecksum(ComputeChecksum( @@ -37,9 +44,24 @@ namespace CUETools.Codecs return crc; } - public unsafe uint ComputeChecksumWONULL(uint crc, int* samples, uint count) + public unsafe uint ComputeChecksumWONULL(uint crc, short* samples, int count) { - for (uint i = 0; i < count; i++) + fixed (uint* t = table) + for (int i = 0; i < count; i++) + { + short s1 = samples[i]; + if (s1 != 0) + { + crc = (crc >> 8) ^ t[(crc ^ s1) & 0xff]; + crc = (crc >> 8) ^ t[(crc ^ (s1 >> 8)) & 0xff]; + } + } + return crc; + } + + public unsafe uint ComputeChecksumWONULL(uint crc, int* samples, int count) + { + for (int i = 0; i < count; i++) { int s1 = samples[2 * i], s2 = samples[2 * i + 1]; if (s1 != 0) diff --git a/CUETools.Codecs/CUETools.Codecs.csproj b/CUETools.Codecs/CUETools.Codecs.csproj index be64207..8610bc6 100644 --- a/CUETools.Codecs/CUETools.Codecs.csproj +++ b/CUETools.Codecs/CUETools.Codecs.csproj @@ -23,7 +23,7 @@ pdbonly true - bin\Release\ + ..\bin\any\Release\ TRACE prompt 4 diff --git a/CUETools.Codecs/Codecs.cs b/CUETools.Codecs/Codecs.cs index b3bfd15..68768b3 100644 --- a/CUETools.Codecs/Codecs.cs +++ b/CUETools.Codecs/Codecs.cs @@ -28,31 +28,339 @@ namespace CUETools.Codecs { public interface IAudioSource { - uint Read(int[,] buff, uint sampleCount); - int[,] Read(int[,] buff); - ulong Length { get; } - ulong Position { get; set; } - ulong Remaining { get; } + int Read(AudioBuffer buffer, int maxLength); void Close(); - int BitsPerSample { get; } - int ChannelCount { get; } - int SampleRate { get; } + + AudioPCMConfig PCM { get; } string Path { get; } + + long Length { get; } + long Position { get; set; } + long Remaining { get; } } public interface IAudioDest { - void Write(int[,] buff, int pos, int sampleCount); + void Write(AudioBuffer buffer); void Close(); void Delete(); - int BitsPerSample { get; } + + AudioPCMConfig PCM { get; } + string Path { get; } + + int CompressionLevel { get; set; } + string Options { set; } long FinalSampleCount { set; } long BlockSize { set; } - string Path { get; } } - public class AudioSamples + /// + /// This class provides an attribute for marking + /// classes that provide . + /// + /// + /// When plugins with classes that provide are + /// registered, their attributes are read. + /// + /// + /// using CUETools.Codecs; + /// + ///[AudioEncoderClass("libFLAC", "flac", true, "0 1 2 3 4 5 6 7 8", "5", 1)] + ///public class MyEncoder : IAudioDest { + /// ... + ///} + /// + [AttributeUsage(AttributeTargets.Class, AllowMultiple = false)] + public sealed class AudioEncoderClass : Attribute { + private string _encoderName, _extension, _supportedModes, _defaultMode; + bool _lossless; + int _priority; + + public AudioEncoderClass(string encoderName, string extension, bool lossless, string supportedModes, string defaultMode, int priority) + { + _encoderName = encoderName; + _extension = extension; + _supportedModes = supportedModes; + _defaultMode = defaultMode; + _lossless = lossless; + _priority = priority; + } + + public string EncoderName + { + get { return _encoderName; } + } + + public string Extension + { + get { return _extension; } + } + + public string SupportedModes + { + get { return _supportedModes; } + } + + public string DefaultMode + { + get { return _defaultMode; } + } + + public bool Lossless + { + get { return _lossless; } + } + + public int Priority + { + get { return _priority; } + } + } + + /// + /// This class provides an attribute for marking + /// classes that provide . + /// + /// + /// When plugins with classes that provide are + /// registered, their attributes are read. + /// + /// + /// using CUETools.Codecs; + /// + ///[AudioDecoderClass("libFLAC", "flac")] + ///public class MyDecoder : IAudioSource { + /// ... + ///} + /// + [AttributeUsage(AttributeTargets.Class, AllowMultiple = false)] + public sealed class AudioDecoderClass : Attribute + { + private string _decoderName, _extension; + + public AudioDecoderClass(string decoderName, string extension) + { + _decoderName = decoderName; + _extension = extension; + } + + public string DecoderName + { + get { return _decoderName; } + } + + public string Extension + { + get { return _extension; } + } + } + + public class AudioPCMConfig + { + private int _bitsPerSample; + private int _channelCount; + private int _sampleRate; + + public AudioPCMConfig(int bitsPerSample, int channelCount, int sampleRate) + { + _bitsPerSample = bitsPerSample; + _channelCount = channelCount; + _sampleRate = sampleRate; + } + + public static readonly AudioPCMConfig RedBook = new AudioPCMConfig(16, 2, 44100); + + public int BitsPerSample { get { return _bitsPerSample; } } + public int ChannelCount { get { return _channelCount; } } + public int SampleRate { get { return _sampleRate; } } + public int BlockAlign { get { return _channelCount * ((_bitsPerSample + 7) / 8); } } + public bool IsRedBook { get { return _bitsPerSample == 16 && _channelCount == 2 && _sampleRate == 44100; } } + } + + public class AudioBuffer + { + private int[,] samples; + private byte[] bytes; + private int length; + private int size; + private AudioPCMConfig pcm; + private bool dataInSamples = false; + private bool dataInBytes = false; + + public int Length + { + get + { + return length; + } + set + { + length = value; + } + } + + public int Size + { + get + { + return size; + } + } + + public AudioPCMConfig PCM { get { return pcm; } } + + public int ByteLength + { + get + { + return length * pcm.BlockAlign; + } + } + + public int[,] Samples + { + get + { + if (samples == null || samples.GetLength(0) < length) + samples = new int[size, pcm.ChannelCount]; + if (!dataInSamples && dataInBytes && length != 0) + BytesToFLACSamples(bytes, 0, samples, 0, length, pcm.ChannelCount, pcm.BitsPerSample); + dataInSamples = true; + return samples; + } + } + + public byte[] Bytes + { + get + { + if (bytes == null || bytes.Length < length * pcm.BlockAlign) + bytes = new byte[size * pcm.BlockAlign]; + if (!dataInBytes && dataInSamples && length != 0) + FLACSamplesToBytes(samples, 0, bytes, 0, length, pcm.ChannelCount, pcm.BitsPerSample); + dataInBytes = true; + return bytes; + } + } + + public AudioBuffer(AudioPCMConfig _pcm, int _size) + { + pcm = _pcm; + size = _size; + } + + public AudioBuffer(AudioPCMConfig _pcm, int[,] _samples, int _length) + { + pcm = _pcm; + // assert _samples.GetLength(1) == pcm.ChannelCount + Prepare(_samples, _length); + } + + public AudioBuffer(AudioPCMConfig _pcm, byte[] _bytes, int _length) + { + pcm = _pcm; + Prepare(_bytes, _length); + } + + public AudioBuffer(IAudioSource source, int _size) + { + pcm = source.PCM; + size = _size; + } + + public void Prepare(IAudioDest dest) + { + if (dest.PCM.ChannelCount != pcm.ChannelCount || dest.PCM.BitsPerSample != pcm.BitsPerSample) + throw new Exception("AudioBuffer format mismatch"); + } + + public void Prepare(IAudioSource source, int maxLength) + { + if (source.PCM.ChannelCount != pcm.ChannelCount || source.PCM.BitsPerSample != pcm.BitsPerSample) + throw new Exception("AudioBuffer format mismatch"); + length = size; + if (maxLength >= 0) + length = Math.Min(length, maxLength); + if (source.Remaining >= 0) + length = (int)Math.Min((long)length, source.Remaining); + dataInBytes = false; + dataInSamples = false; + } + + public void Prepare(int[,] _samples, int _length) + { + length = _length; + size = _samples.GetLength(0); + samples = _samples; + dataInSamples = true; + dataInBytes = false; + } + + public void Prepare(byte[] _bytes, int _length) + { + length = _length; + size = _bytes.Length / PCM.BlockAlign; + bytes = _bytes; + dataInSamples = false; + dataInBytes = true; + } + + public unsafe void Prepare(AudioBuffer _src, int _offset, int _length) + { + length = Math.Min(size, _src.Length - _offset); + if (_length >= 0) + length = Math.Min(length, _length); + dataInBytes = false; + dataInSamples = true; + fixed (int* dest = Samples, src = &_src.Samples[_offset, 0]) + AudioSamples.MemCpy(dest, src, Length * pcm.ChannelCount); + } + + public void Swap(AudioBuffer buffer) + { + if (pcm.BitsPerSample != buffer.PCM.BitsPerSample || pcm.ChannelCount != buffer.PCM.ChannelCount) + throw new Exception("AudioBuffer format mismatch"); + + int[,] samplesTmp = samples; + byte[] bytesTmp = bytes; + + samples = buffer.samples; + bytes = buffer.bytes; + length = buffer.length; + size = buffer.size; + dataInSamples = buffer.dataInSamples; + dataInBytes = buffer.dataInBytes; + + buffer.samples = samplesTmp; + buffer.bytes = bytesTmp; + buffer.length = 0; + buffer.dataInSamples = false; + buffer.dataInBytes = false; + } + + //public void Clear() + //{ + // length = 0; + //} + + public static unsafe void FLACSamplesToBytes_16(int[,] inSamples, int inSampleOffset, + byte* outSamples, int sampleCount, int channelCount) + { + int loopCount = sampleCount * channelCount; + + if (inSamples.GetLength(0) - inSampleOffset < sampleCount) + throw new IndexOutOfRangeException(); + + fixed (int* pInSamplesFixed = &inSamples[inSampleOffset, 0]) + { + int* pInSamples = pInSamplesFixed; + short* pOutSamples = (short*)outSamples; + for (int i = 0; i < loopCount; i++) + pOutSamples[i] = (short)pInSamples[i]; + } + } + public static unsafe void FLACSamplesToBytes_16(int[,] inSamples, int inSampleOffset, byte[] outSamples, int outByteOffset, int sampleCount, int channelCount) { @@ -78,7 +386,7 @@ namespace CUETools.Codecs } } } - + public static unsafe void FLACSamplesToBytes_24(int[,] inSamples, int inSampleOffset, byte[] outSamples, int outByteOffset, int sampleCount, int channelCount, int wastedBits) { @@ -114,17 +422,26 @@ namespace CUETools.Codecs byte[] outSamples, int outByteOffset, int sampleCount, int channelCount, int bitsPerSample) { if (bitsPerSample == 16) - AudioSamples.FLACSamplesToBytes_16(inSamples, inSampleOffset, outSamples, outByteOffset, sampleCount, channelCount); + FLACSamplesToBytes_16(inSamples, inSampleOffset, outSamples, outByteOffset, sampleCount, channelCount); else if (bitsPerSample > 16 && bitsPerSample <= 24) - AudioSamples.FLACSamplesToBytes_24(inSamples, inSampleOffset, outSamples, outByteOffset, sampleCount, channelCount, 24 - bitsPerSample); + FLACSamplesToBytes_24(inSamples, inSampleOffset, outSamples, outByteOffset, sampleCount, channelCount, 24 - bitsPerSample); + else + throw new Exception("Unsupported bitsPerSample value"); + } + + public static unsafe void FLACSamplesToBytes(int[,] inSamples, int inSampleOffset, + byte* outSamples, int sampleCount, int channelCount, int bitsPerSample) + { + if (bitsPerSample == 16) + FLACSamplesToBytes_16(inSamples, inSampleOffset, outSamples, sampleCount, channelCount); else throw new Exception("Unsupported bitsPerSample value"); } public static unsafe void BytesToFLACSamples_16(byte[] inSamples, int inByteOffset, - int[,] outSamples, int outSampleOffset, uint sampleCount, int channelCount) + int[,] outSamples, int outSampleOffset, int sampleCount, int channelCount) { - uint loopCount = sampleCount * (uint)channelCount; + int loopCount = sampleCount * channelCount; if ((inSamples.Length - inByteOffset < loopCount * 2) || (outSamples.GetLength(0) - outSampleOffset < sampleCount)) @@ -148,9 +465,9 @@ namespace CUETools.Codecs } public static unsafe void BytesToFLACSamples_24(byte[] inSamples, int inByteOffset, - int[,] outSamples, int outSampleOffset, uint sampleCount, int channelCount, int wastedBits) + int[,] outSamples, int outSampleOffset, int sampleCount, int channelCount, int wastedBits) { - uint loopCount = sampleCount * (uint)channelCount; + int loopCount = sampleCount * channelCount; if ((inSamples.Length - inByteOffset < loopCount * 3) || (outSamples.GetLength(0) - outSampleOffset < sampleCount)) @@ -174,29 +491,19 @@ namespace CUETools.Codecs } public static unsafe void BytesToFLACSamples(byte[] inSamples, int inByteOffset, - int[,] outSamples, int outSampleOffset, uint sampleCount, int channelCount, int bitsPerSample) + int[,] outSamples, int outSampleOffset, int sampleCount, int channelCount, int bitsPerSample) { if (bitsPerSample == 16) - AudioSamples.BytesToFLACSamples_16(inSamples, inByteOffset, outSamples, outSampleOffset, sampleCount, channelCount); + BytesToFLACSamples_16(inSamples, inByteOffset, outSamples, outSampleOffset, sampleCount, channelCount); else if (bitsPerSample > 16 && bitsPerSample <= 24) - AudioSamples.BytesToFLACSamples_24(inSamples, inByteOffset, outSamples, outSampleOffset, sampleCount, channelCount, 24 - bitsPerSample); + BytesToFLACSamples_24(inSamples, inByteOffset, outSamples, outSampleOffset, sampleCount, channelCount, 24 - bitsPerSample); else throw new Exception("Unsupported bitsPerSample value"); } + } - public static int[,] Read(IAudioSource source, int[,] buff) - { - if (source.Remaining == 0) return null; - uint toRead = Math.Min(65536U, (uint)source.Remaining); - if (buff == null || (ulong)buff.GetLength(0) > source.Remaining) - buff = new int[toRead, source.ChannelCount]; - else - toRead = (uint)buff.GetLength(0); - uint samplesRead = source.Read(buff, toRead); - if (samplesRead != toRead) throw new Exception("samples read != requested"); - return buff; - } - + public class AudioSamples + { unsafe public static void Interlace(int* res, int* src1, int* src2, int n) { for (int i = n; i > 0; i--) @@ -243,6 +550,14 @@ namespace CUETools.Codecs unsafe public static void MemCpy(byte* res, byte* smp, int n) { + if ((((IntPtr)smp).ToInt64() & 4) == 0 && (((IntPtr)res).ToInt64() & 4) == 0 && n > 4) + { + MemCpy((int*)res, (int*)smp, n >> 2); + int n4 = (n >> 2) << 2; + n -= n4; + smp += n4; + res += n4; + } for (int i = n; i > 0; i--) *(res++) = *(smp++); } @@ -258,9 +573,11 @@ namespace CUETools.Codecs public class DummyWriter : IAudioDest { - public DummyWriter(string path, int bitsPerSample, int channelCount, int sampleRate) + AudioPCMConfig _pcm; + + public DummyWriter(string path, AudioPCMConfig pcm) { - _bitsPerSample = bitsPerSample; + _pcm = pcm; } public void Close() @@ -276,36 +593,51 @@ namespace CUETools.Codecs set { } } + public int CompressionLevel + { + get { return 0; } + set { } + } + + public string Options + { + set + { + if (value == null || value == "") return; + throw new Exception("Unsupported options " + value); + } + } + public long BlockSize { set { } } - public int BitsPerSample + public AudioPCMConfig PCM { - get { return _bitsPerSample; } + get { return _pcm; } } - public void Write(int[,] buff, int pos, int sampleCount) + public void Write(AudioBuffer buff) { } public string Path { get { return null; } } - - int _bitsPerSample; } public class SilenceGenerator : IAudioSource { - private ulong _sampleOffset, _sampleCount; + private long _sampleOffset, _sampleCount; + private AudioPCMConfig pcm; - public SilenceGenerator(uint sampleCount) + public SilenceGenerator(long sampleCount) { _sampleOffset = 0; _sampleCount = sampleCount; + pcm = AudioPCMConfig.RedBook; } - public ulong Length + public long Length { get { @@ -313,7 +645,7 @@ namespace CUETools.Codecs } } - public ulong Remaining + public long Remaining { get { @@ -321,7 +653,7 @@ namespace CUETools.Codecs } } - public ulong Position + public long Position { get { @@ -333,55 +665,19 @@ namespace CUETools.Codecs } } - public int BitsPerSample + public AudioPCMConfig PCM { get { return pcm; } } + + public int Read(AudioBuffer buff, int maxLength) { - get - { - return 16; - } - } + buff.Prepare(this, maxLength); - public int ChannelCount - { - get - { - return 2; - } - } + int[,] samples = buff.Samples; + for (int i = 0; i < buff.Length; i++) + for (int j = 0; j < PCM.ChannelCount; j++) + samples[i, j] = 0; - public int SampleRate - { - get - { - return 44100; - } - } - - public uint Read(int [,] buff, uint sampleCount) - { - uint samplesRemaining = (uint)(_sampleCount - _sampleOffset); - if (sampleCount > samplesRemaining) - sampleCount = samplesRemaining; - - for (uint i = 0; i < sampleCount; i++) - for (int j = 0; j < buff.GetLength(1); j++) - buff[i,j] = 0; - - _sampleOffset += sampleCount; - return sampleCount; - } - - public int[,] Read(int[,] buff) - { - if (buff != null && buff.GetLength(0) <= (int)Remaining) - { - _sampleOffset += (ulong) buff.GetLength(0); - Array.Clear(buff, 0, buff.Length); - return buff; - } - ulong samples = Math.Min(Remaining, (ulong)4096); - _sampleCount += samples; - return new int[samples, ChannelCount]; + _sampleOffset += buff.Length; + return buff.Length; } public void Close() @@ -391,16 +687,16 @@ namespace CUETools.Codecs public string Path { get { return null; } } } + [AudioDecoderClass("builtin wav", "wav")] public class WAVReader : IAudioSource { Stream _IO; BinaryReader _br; - ulong _dataOffset, _samplePos, _sampleLen; + long _dataOffset, _samplePos, _sampleLen; + private AudioPCMConfig pcm; long _dataLen; - int _bitsPerSample, _channelCount, _sampleRate, _blockAlign; bool _largeFile; string _path; - private byte[] _sampleBuffer; public WAVReader(string path, Stream IO) { @@ -411,22 +707,41 @@ namespace CUETools.Codecs ParseHeaders(); if (_dataLen < 0) - //_sampleLen = 0; - throw new Exception("WAVE stream length unknown"); + _sampleLen = -1; else - _sampleLen = (ulong)(_dataLen / _blockAlign); + _sampleLen = _dataLen / pcm.BlockAlign; } - public WAVReader(Stream IO) + public WAVReader(string path, Stream IO, AudioPCMConfig _pcm) { - _path = ""; - _IO = IO; + _path = path; + _IO = IO != null ? IO : new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.Read, 0x10000, FileOptions.SequentialScan); _br = new BinaryReader(_IO); - ParseHeaders(); + + _largeFile = false; + _dataOffset = 0; + _samplePos = 0; + pcm = _pcm; + _dataLen = _IO.CanSeek ? _IO.Length : -1; if (_dataLen < 0) - _sampleLen = 0; + _sampleLen = -1; else - _sampleLen = (ulong)(_dataLen / _blockAlign); + { + _sampleLen = _dataLen / pcm.BlockAlign; + if ((_dataLen % pcm.BlockAlign) != 0) + throw new Exception("odd file size"); + } + } + + public static AudioBuffer ReadAllSamples(string path, Stream IO) + { + WAVReader reader = new WAVReader(path, IO); + AudioBuffer buff = new AudioBuffer(reader, (int)reader.Length); + reader.Read(buff, -1); + if (reader.Remaining != 0) + throw new Exception("couldn't read the whole file"); + reader.Close(); + return buff; } public void Close() @@ -487,18 +802,21 @@ namespace CUETools.Codecs { throw new Exception("WAVE must be PCM format."); } - _channelCount = _br.ReadInt16(); - _sampleRate = _br.ReadInt32(); + int _channelCount = _br.ReadInt16(); + int _sampleRate = _br.ReadInt32(); _br.ReadInt32(); - _blockAlign = _br.ReadInt16(); - _bitsPerSample = _br.ReadInt16(); + int _blockAlign = _br.ReadInt16(); + int _bitsPerSample = _br.ReadInt16(); + pcm = new AudioPCMConfig(_bitsPerSample, _channelCount, _sampleRate); + if (pcm.BlockAlign != _blockAlign) + throw new Exception("WAVE has strange BlockAlign"); pos += 16; } else if (ckID == fccData) { foundData = true; - _dataOffset = (ulong)pos; + _dataOffset = pos; if (!_IO.CanSeek || _IO.Length <= maxFileSize) { if (ckSize >= 0x7fffffff) @@ -522,21 +840,19 @@ namespace CUETools.Codecs pos = ckEnd; } while (true); - if ((foundFormat & foundData) == false) + if ((foundFormat & foundData) == false || pcm == null) throw new Exception("Format or data chunk not found."); - if (_channelCount <= 0) + if (pcm.ChannelCount <= 0) throw new Exception("Channel count is invalid."); - if (_sampleRate <= 0) + if (pcm.SampleRate <= 0) throw new Exception("Sample rate is invalid."); - if (_blockAlign != (_channelCount * ((_bitsPerSample + 7) / 8))) - throw new Exception("Block align is invalid."); - if ((_bitsPerSample <= 0) || (_bitsPerSample > 32)) + if ((pcm.BitsPerSample <= 0) || (pcm.BitsPerSample > 32)) throw new Exception("Bits per sample is invalid."); - if (pos != (long)_dataOffset) + if (pos != _dataOffset) Position = 0; } - public ulong Position + public long Position { get { @@ -544,19 +860,19 @@ namespace CUETools.Codecs } set { - ulong seekPos; + long seekPos; - if (_sampleLen != 0 && value > _sampleLen) + if (_sampleLen >= 0 && value > _sampleLen) _samplePos = _sampleLen; else _samplePos = value; - seekPos = _dataOffset + (_samplePos * (uint)_blockAlign); - _IO.Seek((long)seekPos, SeekOrigin.Begin); + seekPos = _dataOffset + _samplePos * PCM.BlockAlign; + _IO.Seek(seekPos, SeekOrigin.Begin); } } - public ulong Length + public long Length { get { @@ -564,7 +880,7 @@ namespace CUETools.Codecs } } - public ulong Remaining + public long Remaining { get { @@ -572,102 +888,64 @@ namespace CUETools.Codecs } } - public int ChannelCount - { - get - { - return _channelCount; - } - } + public AudioPCMConfig PCM { get { return pcm; } } - public int SampleRate + public int Read(AudioBuffer buff, int maxLength) { - get - { - return _sampleRate; - } - } + buff.Prepare(this, maxLength); - public int BitsPerSample - { - get - { - return _bitsPerSample; - } - } - - public int BlockAlign - { - get - { - return _blockAlign; - } - } - - public uint Read(int[,] buff, uint sampleCount) - { - if (_sampleLen > 0 && sampleCount > Remaining) - sampleCount = (uint)Remaining; - - if (sampleCount == 0) - return 0; - int byteCount = (int) sampleCount * _blockAlign; - if (_sampleBuffer == null || _sampleBuffer.Length < byteCount) - _sampleBuffer = new byte[byteCount]; + byte[] bytes = buff.Bytes; + int byteCount = (int)buff.ByteLength; int pos = 0; - do + + while (pos < byteCount) { - int len = _IO.Read(_sampleBuffer, pos, (int)byteCount - pos); + int len = _IO.Read(bytes, pos, byteCount - pos); if (len <= 0) { - if ((pos % BlockAlign) != 0 || _sampleLen > 0) + if ((pos % PCM.BlockAlign) != 0 || _sampleLen >= 0) throw new Exception("Incomplete file read."); - sampleCount = (uint)(pos / BlockAlign); - _sampleLen = _samplePos + sampleCount; - break; + buff.Length = pos / PCM.BlockAlign; + _samplePos += buff.Length; + _sampleLen = _samplePos; + return buff.Length; } pos += len; - } while (pos < byteCount); - AudioSamples.BytesToFLACSamples(_sampleBuffer, 0, buff, 0, - sampleCount, _channelCount, _bitsPerSample); - _samplePos += sampleCount; - return sampleCount; - } - - public int[,] Read(int[,] buff) - { - return AudioSamples.Read(this, buff); + } + _samplePos += buff.Length; + return buff.Length; } public string Path { get { return _path; } } } + [AudioEncoderClass("builtin wav", "wav", true, "", "", 10)] public class WAVWriter : IAudioDest { Stream _IO; BinaryWriter _bw; - int _bitsPerSample, _channelCount, _sampleRate, _blockAlign; + AudioPCMConfig _pcm; long _sampleLen; string _path; - private byte[] _sampleBuffer; long hdrLen = 0; bool _headersWritten = false; - long _finalSampleCount; + long _finalSampleCount = -1; List _chunks = null; List _chunkFCCs = null; - public WAVWriter(string path, int bitsPerSample, int channelCount, int sampleRate, Stream IO) + public WAVWriter(string path, Stream IO, AudioPCMConfig pcm) { + _pcm = pcm; _path = path; - _bitsPerSample = bitsPerSample; - _channelCount = channelCount; - _sampleRate = sampleRate; - _blockAlign = _channelCount * ((_bitsPerSample + 7) / 8); - _IO = IO != null ? IO : new FileStream(path, FileMode.Create, FileAccess.Write, FileShare.Read); _bw = new BinaryWriter(_IO); } + public WAVWriter(string path, AudioPCMConfig pcm) + : this(path, null, pcm) + { + } + public void WriteChunk(uint fcc, byte[] data) { if (_sampleLen > 0) @@ -689,11 +967,11 @@ namespace CUETools.Codecs const uint fccFormat = 0x20746D66; const uint fccData = 0x61746164; - bool wavex = _bitsPerSample != 16 && _bitsPerSample != 24; + bool wavex = _pcm.BitsPerSample != 16 && _pcm.BitsPerSample != 24; hdrLen += 36 + (wavex ? 24 : 0) + 8; - uint dataLen = (uint) (_finalSampleCount * _blockAlign); + uint dataLen = (uint)(_finalSampleCount * _pcm.BlockAlign); uint dataLenPadded = dataLen + (dataLen & 1); _bw.Write(fccRIFF); @@ -710,15 +988,15 @@ namespace CUETools.Codecs _bw.Write((uint)16); _bw.Write((ushort)1); // PCM } - _bw.Write((ushort)_channelCount); - _bw.Write((uint)_sampleRate); - _bw.Write((uint)(_sampleRate * _blockAlign)); - _bw.Write((ushort)_blockAlign); - _bw.Write((ushort)((_bitsPerSample+7)/8*8)); + _bw.Write((ushort)_pcm.ChannelCount); + _bw.Write((uint)_pcm.SampleRate); + _bw.Write((uint)(_pcm.SampleRate * _pcm.BlockAlign)); + _bw.Write((ushort)_pcm.BlockAlign); + _bw.Write((ushort)((_pcm.BitsPerSample+7)/8*8)); if (wavex) { _bw.Write((ushort)22); // length of WAVEX structure - _bw.Write((ushort)_bitsPerSample); + _bw.Write((ushort)_pcm.BitsPerSample); _bw.Write((uint)3); // speaker positions (3 == stereo) _bw.Write((ushort)1); // PCM _bw.Write((ushort)0); @@ -751,14 +1029,14 @@ namespace CUETools.Codecs public void Close() { - if (_finalSampleCount == 0) + if (_finalSampleCount <= 0) { const long maxFileSize = 0x7FFFFFFEL; - long dataLen = _sampleLen * _blockAlign; + long dataLen = _sampleLen * _pcm.BlockAlign; if ((dataLen & 1) == 1) _bw.Write((byte)0); if (dataLen + hdrLen > maxFileSize) - dataLen = ((maxFileSize - hdrLen) / _blockAlign) * _blockAlign; + dataLen = ((maxFileSize - hdrLen) / _pcm.BlockAlign) * _pcm.BlockAlign; long dataLenPadded = dataLen + (dataLen & 1); _bw.Seek(4, SeekOrigin.Begin); @@ -773,7 +1051,7 @@ namespace CUETools.Codecs _bw = null; _IO = null; - if (_finalSampleCount != 0 && _sampleLen != _finalSampleCount) + if (_finalSampleCount > 0 && _sampleLen != _finalSampleCount) throw new Exception("Samples written differs from the expected sample count."); } @@ -803,23 +1081,35 @@ namespace CUETools.Codecs set { } } - public int BitsPerSample + public int CompressionLevel { - get { return _bitsPerSample; } + get { return 0; } + set { } } - public void Write(int[,] buff, int pos, int sampleCount) + public string Options { - if (sampleCount == 0) + set + { + if (value == null || value == "") return; + throw new Exception("Unsupported options " + value); + } + } + + public AudioPCMConfig PCM + { + get { return _pcm; } + } + + public void Write(AudioBuffer buff) + { + if (buff.Length == 0) return; + buff.Prepare(this); if (!_headersWritten) WriteHeaders(); - if (_sampleBuffer == null || _sampleBuffer.Length < sampleCount * _blockAlign) - _sampleBuffer = new byte[sampleCount * _blockAlign]; - AudioSamples.FLACSamplesToBytes(buff, pos, _sampleBuffer, 0, - sampleCount, _channelCount, _bitsPerSample); - _IO.Write(_sampleBuffer, 0, (int)sampleCount * _blockAlign); - _sampleLen += sampleCount; + _IO.Write(buff.Bytes, 0, buff.ByteLength); + _sampleLen += buff.Length; } public string Path { get { return _path; } } @@ -836,6 +1126,7 @@ namespace CUETools.Codecs private int _end = 0; // moved only by Read private bool _eof = false; private Thread _readThread = null, _writeThread = null; + private Exception _ex = null; public event FlushOutput flushOutput; public event CloseOutput closeOutput; @@ -941,8 +1232,10 @@ namespace CUETools.Codecs int pos, chunk; lock (this) { - while (FreeSpace == 0) + while (FreeSpace == 0 && _ex == null) Monitor.Wait(this); + if (_ex != null) + throw _ex; pos = _end % _size; chunk = Math.Min(FreeSpace, _size - pos); } @@ -964,8 +1257,10 @@ namespace CUETools.Codecs { lock (this) { - while (FreeSpace == 0) + while (FreeSpace == 0 && _ex == null) Monitor.Wait(this); + if (_ex != null) + throw _ex; pos = _end % _size; chunk = Math.Min(FreeSpace, _size - pos); chunk = Math.Min(chunk, count); @@ -996,7 +1291,19 @@ namespace CUETools.Codecs chunk = Math.Min(DataAvailable, _size - pos); } if (flushOutput != null) - flushOutput(_buffer, pos, chunk, to); + try + { + flushOutput(_buffer, pos, chunk, to); + } + catch (Exception ex) + { + lock (this) + { + _ex = ex; + Monitor.Pulse(this); + return; + } + } lock (this) { _start += chunk; @@ -1090,7 +1397,7 @@ namespace CUETools.Codecs WAVWriter wrt; CyclicBuffer outputBuffer = null; - public UserDefinedWriter(string path, int bitsPerSample, int channelCount, int sampleRate, Stream IO, string encoder, string encoderParams, string encoderMode, int padding) + public UserDefinedWriter(string path, Stream IO, AudioPCMConfig pcm, string encoder, string encoderParams, string encoderMode, int padding) { _path = path; _encoder = encoder; @@ -1125,7 +1432,7 @@ namespace CUETools.Codecs outputBuffer = new CyclicBuffer(2 * 1024 * 1024, _encoderProcess.StandardOutput.BaseStream, outputStream); } Stream inputStream = new CycilcBufferOutputStream(_encoderProcess.StandardInput.BaseStream, 128 * 1024); - wrt = new WAVWriter(path, bitsPerSample, channelCount, sampleRate, inputStream); + wrt = new WAVWriter(path, inputStream, pcm); } public void Close() @@ -1163,14 +1470,39 @@ namespace CUETools.Codecs set { } } - public int BitsPerSample + public int CompressionLevel { - get { return wrt.BitsPerSample; } + get { return 0; } + set { } // !!!! Must not start the process in constructor, so that we can set CompressionLevel! } - public void Write(int[,] buff, int pos, int sampleCount) + public string Options { - wrt.Write(buff, pos, sampleCount); + set + { + if (value == null || value == "") return; + throw new Exception("Unsupported options " + value); + } + } + + public AudioPCMConfig PCM + { + get { return wrt.PCM; } + } + + public void Write(AudioBuffer buff) + { + try + { + wrt.Write(buff); + } + catch (IOException ex) + { + if (_encoderProcess.HasExited) + throw new IOException(string.Format("{0} has exited prematurely with code {1}", _encoder, _encoderProcess.ExitCode), ex); + else + throw ex; + } //_sampleLen += sampleCount; } @@ -1180,6 +1512,7 @@ namespace CUETools.Codecs public class UserDefinedReader : IAudioSource { string _path, _decoder, _decoderParams; + private AudioPCMConfig pcm; Process _decoderProcess; WAVReader rdr; @@ -1228,7 +1561,7 @@ namespace CUETools.Codecs catch { } } - public ulong Position + public long Position { get { @@ -1242,7 +1575,7 @@ namespace CUETools.Codecs } } - public ulong Length + public long Length { get { @@ -1251,7 +1584,7 @@ namespace CUETools.Codecs } } - public ulong Remaining + public long Remaining { get { @@ -1260,51 +1593,19 @@ namespace CUETools.Codecs } } - public int ChannelCount + public AudioPCMConfig PCM { get { Initialize(); - return rdr.ChannelCount; + return pcm; } } - public int SampleRate - { - get - { - Initialize(); - return rdr.SampleRate; - } - } - - public int BitsPerSample - { - get - { - Initialize(); - return rdr.BitsPerSample; - } - } - - public int BlockAlign - { - get - { - Initialize(); - return rdr.BlockAlign; - } - } - - public uint Read(int[,] buff, uint sampleCount) + public int Read(AudioBuffer buff, int maxLength) { Initialize(); - return rdr.Read(buff, sampleCount); - } - - public int[,] Read(int[,] buff) - { - return AudioSamples.Read(this, buff); + return rdr.Read(buff, maxLength); } public string Path { get { return _path; } } @@ -1312,52 +1613,54 @@ namespace CUETools.Codecs public class AudioPipe : IAudioSource//, IDisposable { - private readonly Queue _buffer = new Queue(); - int _bitsPerSample, _channelCount, _sampleRate, _bufferPos; - ulong _sampleLen, _samplePos; + private AudioBuffer _readBuffer, _writeBuffer; + long _sampleLen, _samplePos; private int _maxLength; private Thread _workThread; IAudioSource _source; bool _close = false; + bool _haveData = false; + int _bufferPos = 0; Exception _ex = null; - public AudioPipe(IAudioSource source, int maxLength) + public AudioPipe(IAudioSource source, int size) { _source = source; - _maxLength = maxLength; - _bitsPerSample = _source.BitsPerSample; - _channelCount = _source.ChannelCount; - _sampleRate = _source.SampleRate; + _readBuffer = new AudioBuffer(source, size); + _writeBuffer = new AudioBuffer(source, size); + _maxLength = size; _sampleLen = _source.Length; - _samplePos = 0; - _bufferPos = 0; + _samplePos = _source.Position; } private void Decompress(object o) { - // catch try { + bool done = false; do { - //int[,] buff = new int[65536, 2]; - //uint toRead = Math.Min((uint)buff.GetLength(0), (uint)_source.Remaining); - //uint samplesRead = _source.Read(buff, toRead); - int[,] buff = _source.Read(null); - if (buff == null) break; - //uint samplesRead = buff.GetLength(0); - //if (samplesRead == 0) break; - //if (samplesRead != toRead) - // throw new Exception("samples read != samples requested"); - Write(buff); - } while (true); + done = _source.Read(_writeBuffer, -1) == 0; + lock (this) + { + while (_haveData && !_close) + Monitor.Wait(this); + if (_close) + throw new Exception("Decompression aborted"); + AudioBuffer temp = _writeBuffer; + _writeBuffer = _readBuffer; + _readBuffer = temp; + _haveData = true; + Monitor.Pulse(this); + } + } while (!done); } catch (Exception ex) { - lock (_buffer) + lock (this) { _ex = ex; - Monitor.Pulse(_buffer); + Monitor.Pulse(this); } } } @@ -1378,20 +1681,29 @@ namespace CUETools.Codecs public void Close() { - lock (_buffer) + lock (this) { _close = true; - Monitor.Pulse(_buffer); + Monitor.Pulse(this); } if (_workThread != null) { _workThread.Join(); _workThread = null; } - _buffer.Clear(); + if (_readBuffer != null) + { + //_readBuffer.Clear(); + _readBuffer = null; + } + if (_writeBuffer != null) + { + //_writeBuffer.Clear(); + _writeBuffer = null; + } } - public ulong Position + public long Position { get { @@ -1403,7 +1715,7 @@ namespace CUETools.Codecs } } - public ulong Length + public long Length { get { @@ -1411,7 +1723,7 @@ namespace CUETools.Codecs } } - public ulong Remaining + public long Remaining { get { @@ -1419,275 +1731,58 @@ namespace CUETools.Codecs } } - public int ChannelCount + public AudioPCMConfig PCM { get { - return _channelCount; + return _source.PCM; } } - public int SampleRate - { - get - { - return _sampleRate; - } - } - - public int BitsPerSample - { - get - { - return _bitsPerSample; - } - } - - - public int[,] Read(int[,] buff) + public int Read(AudioBuffer buff, int maxLength) { Go(); - if (Remaining == 0) - return null; + + bool needToCopy = false; if (_bufferPos != 0) - throw new Exception("Mixed Read usage not yet suppoted"); - lock (_buffer) - { - while (_buffer.Count == 0 && _ex == null) - Monitor.Wait(_buffer); - if (_ex != null) - throw _ex; - buff = _buffer.Dequeue(); - Monitor.Pulse(_buffer); - } - return buff; - } - - public uint Read(int[,] buff, uint sampleCount) - { - Go(); - if (sampleCount > Remaining) - sampleCount = (uint)Remaining; - int pos = 0; - while (sampleCount > 0) - { - lock (_buffer) + needToCopy = true; + else + lock (this) { - while (_buffer.Count == 0 && _ex == null) - Monitor.Wait(_buffer); + while (!_haveData && _ex == null) + Monitor.Wait(this); if (_ex != null) throw _ex; - int[,] chunk = _buffer.Peek(); - int copyCount = Math.Min((int)sampleCount, chunk.GetLength(0) - _bufferPos); - Array.Copy(chunk, _bufferPos * _channelCount, buff, pos * _channelCount, copyCount * _channelCount); - pos += copyCount; - sampleCount -= (uint) copyCount; - _samplePos += (ulong) copyCount; - _bufferPos += copyCount; - if (_bufferPos == chunk.GetLength(0)) + if (_bufferPos == 0 && (maxLength < 0 || _readBuffer.Length <= maxLength)) { - _buffer.Dequeue(); // .Finalize? - _bufferPos = 0; - Monitor.Pulse(_buffer); + buff.Swap(_readBuffer); + _haveData = false; + Monitor.Pulse(this); + } + else + needToCopy = true; + } + if (needToCopy) + { + buff.Prepare(_readBuffer, _bufferPos, maxLength); + _bufferPos += buff.Length; + if (_bufferPos == _readBuffer.Length) + { + _bufferPos = 0; + lock (this) + { + _haveData = false; + Monitor.Pulse(this); } } } - return (uint) pos; - } - - public void Write(int[,] buff) - { - lock (_buffer) - { - while (_buffer.Count >= _maxLength && !_close) - Monitor.Wait(_buffer); - if (_close) - throw new Exception("Decompression aborted"); - //_flushed = false; - _buffer.Enqueue(buff); - Monitor.Pulse(_buffer); - } + _samplePos += buff.Length; + return buff.Length; } public string Path { get { return _source.Path; } } } - public class BufferedWriter: IAudioDest - { - IAudioDest _writer; - Thread _flushThread = null; - private int[,] _buffer; - private int _size; - private int _channels = 2; - private int _start = 0; // moved only by Write - private int _end = 0; // moved only by Read - private bool _eof = false, _delete = false; - Exception exceptionOnFlush = null; - - public long FinalSampleCount - { - //get { return _writer.FinalSampleCount; } - set { _writer.FinalSampleCount = value; } - } - - public long BlockSize - { - set { _writer.BlockSize = value; } - } - - public int BitsPerSample - { - get { return _writer.BitsPerSample; } - } - - public int Channels - { - get { return _channels; } // !!!! writer.Channels - } - - // public bool ReadSource(IAudioSource input) - - public unsafe void Write(int[,] samples, int offset, int count) - { - int pos, chunk; - while (count > 0) - { - lock (this) - { - while (FreeSpace == 0 && exceptionOnFlush == null) - Monitor.Wait(this); - if (exceptionOnFlush != null) - { - Exception ex = exceptionOnFlush; - exceptionOnFlush = null; - throw ex; - } - pos = _end % _size; - chunk = Math.Min(FreeSpace, _size - pos); - chunk = Math.Min(chunk, count); - } - fixed (int* src = &samples[offset, 0], dst = &_buffer[pos, 0]) - AudioSamples.MemCpy(dst, src, chunk * Channels); - //Array.Copy(samples, offset * Channels, _buffer, pos * Channels, chunk * Channels); - lock (this) - { - _end += chunk; - Monitor.Pulse(this); - } - count -= chunk; - offset += chunk; - } - } - - public string Path { get { return _writer.Path; } } - - public BufferedWriter(IAudioDest writer, int size) - { - _writer = writer; - _size = size; - _buffer = new int[_size, Channels]; - _flushThread = new Thread(Flush); - //_writeThread.Priority = ThreadPriority.Normal; - _flushThread.IsBackground = true; - _flushThread.Start(_writer); - } - - int DataAvailable - { - get - { - return _end - _start; - } - } - - int FreeSpace - { - get - { - return _size - DataAvailable; - } - } - - public void Delete() - { - SetEOF(true); - if (_flushThread != null) - { - _flushThread.Join(); - _flushThread = null; - } - } - - public void Close() - { - SetEOF(false); - if (_flushThread != null) - { - _flushThread.Join(); - _flushThread = null; - } - if (exceptionOnFlush != null) - { - Exception ex = exceptionOnFlush; - exceptionOnFlush = null; - throw ex; - } - } - - public void SetEOF(bool delete) - { - lock (this) - { - _eof = true; - _delete = delete; - Monitor.Pulse(this); - } - } - - public void Flush(object o) - { - IAudioDest dest = (IAudioDest)o; - try - { - do - { - int pos, chunk; - lock (this) - { - while (DataAvailable == 0 && !_eof) - Monitor.Wait(this); - if (DataAvailable == 0) - { - if (_delete) - dest.Delete(); - else - dest.Close(); - return; - } - pos = _start % _size; - chunk = Math.Min(DataAvailable, _size - pos); - } - dest.Write(_buffer, pos, chunk); - lock (this) - { - _start += chunk; - Monitor.Pulse(this); - } - } - while (true); - } - catch (Exception ex) - { - lock (this) - { - exceptionOnFlush = ex; - Monitor.Pulse(this); - dest.Delete(); - } - } - } - } - public class NullStream : Stream { public NullStream() diff --git a/CUETools.Converter/CUETools.Converter.csproj b/CUETools.Converter/CUETools.Converter.csproj index ffe0a1e..d784726 100644 --- a/CUETools.Converter/CUETools.Converter.csproj +++ b/CUETools.Converter/CUETools.Converter.csproj @@ -22,7 +22,7 @@ pdbonly true - ..\bin\win32\Release\ + ..\bin\any\Release\ TRACE prompt 4 diff --git a/CUETools.Converter/Program.cs b/CUETools.Converter/Program.cs index e688de6..b36dc49 100644 --- a/CUETools.Converter/Program.cs +++ b/CUETools.Converter/Program.cs @@ -45,34 +45,32 @@ namespace CUETools.Converter #endif { IAudioSource audioSource = AudioReadWrite.GetAudioSource(sourceFile, null, config); - IAudioDest audioDest = AudioReadWrite.GetAudioDest(AudioEncoderType.Lossless, destFile, (long)audioSource.Length, audioSource.BitsPerSample, audioSource.SampleRate, 8192, config); - int[,] buff = new int[0x4000, audioSource.ChannelCount]; + IAudioDest audioDest = AudioReadWrite.GetAudioDest(AudioEncoderType.Lossless, destFile, (long)audioSource.Length, audioSource.PCM.BitsPerSample, audioSource.PCM.SampleRate, 8192, config); + AudioBuffer buff = new AudioBuffer(audioSource, 0x10000); Console.WriteLine("Filename : {0}", sourceFile); - Console.WriteLine("File Info : {0}kHz; {1} channel; {2} bit; {3}", audioSource.SampleRate, audioSource.ChannelCount, audioSource.BitsPerSample, TimeSpan.FromSeconds(audioSource.Length * 1.0 / audioSource.SampleRate)); + Console.WriteLine("File Info : {0}kHz; {1} channel; {2} bit; {3}", audioSource.PCM.SampleRate, audioSource.PCM.ChannelCount, audioSource.PCM.BitsPerSample, TimeSpan.FromSeconds(audioSource.Length * 1.0 / audioSource.PCM.SampleRate)); - do + while (audioSource.Read(buff, -1) != 0) { - uint samplesRead = audioSource.Read(buff, Math.Min((uint)buff.GetLength(0), (uint)audioSource.Remaining)); - if (samplesRead == 0) break; - audioDest.Write(buff, 0, (int)samplesRead); + audioDest.Write(buff); TimeSpan elapsed = DateTime.Now - start; if ((elapsed - lastPrint).TotalMilliseconds > 60) { Console.Error.Write("\rProgress : {0:00}%; {1:0.00}x; {2}/{3}", 100.0 * audioSource.Position / audioSource.Length, - audioSource.Position / elapsed.TotalSeconds / audioSource.SampleRate, + audioSource.Position / elapsed.TotalSeconds / audioSource.PCM.SampleRate, elapsed, TimeSpan.FromMilliseconds(elapsed.TotalMilliseconds / audioSource.Position * audioSource.Length) ); lastPrint = elapsed; } - } while (true); + } TimeSpan totalElapsed = DateTime.Now - start; Console.Error.Write("\r \r"); Console.WriteLine("Results : {0:0.00}x; {1}", - audioSource.Position / totalElapsed.TotalSeconds / audioSource.SampleRate, + audioSource.Position / totalElapsed.TotalSeconds / audioSource.PCM.SampleRate, totalElapsed ); audioSource.Close(); diff --git a/CUETools.FlaCuda/CUETools.Codecs.FlaCuda.csproj b/CUETools.FlaCuda/CUETools.Codecs.FlaCuda.csproj index c5ddfde..1dbe623 100644 --- a/CUETools.FlaCuda/CUETools.Codecs.FlaCuda.csproj +++ b/CUETools.FlaCuda/CUETools.Codecs.FlaCuda.csproj @@ -23,7 +23,7 @@ pdbonly true - bin\Release\ + ..\bin\any\Release\ TRACE prompt 4 @@ -69,6 +69,6 @@ - nvcc $(ProjectDir)flacuda.cu -o $(ProjectDir)\flacuda.cubin --machine 32 --cubin --compiler-bindir "C:\Program Files (x86)\Microsoft Visual Studio 8\VC\bin" --system-include "C:\Program Files (x86)\Microsoft Visual Studio 8\VC\include" + C:\work\cuda\bin\nvcc $(ProjectDir)flacuda.cu -o $(ProjectDir)\flacuda.cubin --machine 32 --cubin --compiler-bindir "C:\Program Files (x86)\Microsoft Visual Studio 8\VC\bin" --system-include "C:\Program Files (x86)\Microsoft Visual Studio 8\VC\include" \ No newline at end of file diff --git a/CUETools.FlaCuda/FlaCudaWriter.cs b/CUETools.FlaCuda/FlaCudaWriter.cs index e1e934e..a45975a 100644 --- a/CUETools.FlaCuda/FlaCudaWriter.cs +++ b/CUETools.FlaCuda/FlaCudaWriter.cs @@ -30,6 +30,7 @@ using GASS.CUDA.Types; namespace CUETools.Codecs.FlaCuda { + [AudioEncoderClass("FlaCuda", "flac", true, "0 1 2 3 4 5 6 7 8 9 10 11", "8", 1)] public class FlaCudaWriter : IAudioDest { Stream _IO = null; @@ -50,7 +51,7 @@ namespace CUETools.Codecs.FlaCuda // total stream samples // if 0, stream length is unknown - int sample_count; + int sample_count = -1; FlakeEncodeParams eparams; @@ -70,11 +71,10 @@ namespace CUETools.Codecs.FlaCuda byte[] header; float[] windowBuffer; - byte[] md5_buffer; int samplesInBuffer = 0; int max_frames = 0; - int _compressionLevel = 5; + int _compressionLevel = 7; int _blocksize = 0; int _totalSize = 0; int _windowsize = 0, _windowcount = 0; @@ -102,21 +102,25 @@ namespace CUETools.Codecs.FlaCuda bool do_lattice = false; + AudioPCMConfig _pcm; + public const int MAX_BLOCKSIZE = 4096 * 16; internal const int maxFrames = 128; internal const int maxResidualParts = 64; // not (MAX_BLOCKSIZE + 255) / 256!! 64 is hardcoded in cudaEstimateResidual. It's per block. internal const int maxAutocorParts = (MAX_BLOCKSIZE + 255) / 256; - public FlaCudaWriter(string path, int bitsPerSample, int channelCount, int sampleRate, Stream IO) + public FlaCudaWriter(string path, Stream IO, AudioPCMConfig pcm) { - if (bitsPerSample != 16) + _pcm = pcm; + + if (pcm.BitsPerSample != 16) throw new Exception("Bits per sample must be 16."); - if (channelCount != 2) + if (pcm.ChannelCount != 2) throw new Exception("ChannelCount must be 2."); - channels = channelCount; - sample_rate = sampleRate; - bits_per_sample = (uint) bitsPerSample; + channels = pcm.ChannelCount; + sample_rate = pcm.SampleRate; + bits_per_sample = (uint) pcm.BitsPerSample; // flake_validate_params @@ -124,7 +128,6 @@ namespace CUETools.Codecs.FlaCuda _IO = IO; windowBuffer = new float[FlaCudaWriter.MAX_BLOCKSIZE * lpc.MAX_LPC_WINDOWS]; - md5_buffer = new byte[FlaCudaWriter.MAX_BLOCKSIZE * channels * bits_per_sample / 8]; eparams.flake_set_defaults(_compressionLevel, encode_on_cpu); eparams.padding_size = 8192; @@ -133,6 +136,11 @@ namespace CUETools.Codecs.FlaCuda crc16 = new Crc16(); } + public FlaCudaWriter(string path, AudioPCMConfig pcm) + : this(path, null, pcm) + { + } + public int TotalSize { get @@ -168,6 +176,15 @@ namespace CUETools.Codecs.FlaCuda } } + public string Options + { + set + { + if (value == null || value == "") return; + throw new Exception("Unsupported options " + value); + } + } + public int CPUThreads { get @@ -248,7 +265,7 @@ namespace CUETools.Codecs.FlaCuda if (_IO.CanSeek) { - if (sample_count == 0 && _position != 0) + if (sample_count <= 0 && _position != 0) { BitWriter bitwriter = new BitWriter(header, 0, 4); bitwriter.writebits(32, (int)_position); @@ -289,7 +306,7 @@ namespace CUETools.Codecs.FlaCuda public void Close() { DoClose(); - if (sample_count != 0 && _position != sample_count) + if (sample_count > 0 && _position != sample_count) throw new Exception(string.Format("Samples written differs from the expected sample count. Expected {0}, got {1}.", sample_count, _position)); } @@ -492,22 +509,9 @@ namespace CUETools.Codecs.FlaCuda get { return _userProcessorTime; } } - public int BitsPerSample + public AudioPCMConfig PCM { - get { return 16; } - } - - /// - /// Copy input samples into task buffer - /// - /// - /// - /// - unsafe void copy_samples(int[,] samples, int pos, int block, FlaCudaTask task) - { - AudioSamples.FLACSamplesToBytes(samples, pos, ((byte*)task.samplesBytesPtr) + samplesInBuffer * channels * 2, - block, channels, (int)bits_per_sample); - samplesInBuffer += block; + get { return _pcm; } } unsafe void encode_residual_fixed(int* res, int* smp, int n, int order) @@ -1021,7 +1025,7 @@ namespace CUETools.Codecs.FlaCuda int pmin = get_max_p_order(eparams.min_partition_order, task.frame.blocksize, task.frame.subframes[ch].best.order); int pmax = get_max_p_order(eparams.max_partition_order, task.frame.blocksize, task.frame.subframes[ch].best.order); - uint bits = (uint)task.frame.subframes[ch].best.order * task.frame.subframes[ch].obits + 6; + uint bits = (uint)(task.frame.subframes[ch].best.order * task.frame.subframes[ch].obits) + 6; task.frame.subframes[ch].best.size = bits + calc_rice_params(task.frame.subframes[ch].best.rc, pmin, pmax, task.frame.subframes[ch].best.residual, (uint)task.frame.blocksize, (uint)task.frame.subframes[ch].best.order); } break; @@ -1031,54 +1035,32 @@ namespace CUETools.Codecs.FlaCuda ulong csum = 0; for (int i = task.frame.subframes[ch].best.order; i > 0; i--) csum += (ulong)Math.Abs(coefs[i - 1]); - if ((csum << (int)task.frame.subframes[ch].obits) >= 1UL << 32 || encode_on_cpu) + if ((csum << task.frame.subframes[ch].obits) >= 1UL << 32 || encode_on_cpu) { if (!unpacked) unpack_samples(task, task.frameSize); unpacked = true; - if ((csum << (int)task.frame.subframes[ch].obits) >= 1UL << 32) + if ((csum << task.frame.subframes[ch].obits) >= 1UL << 32) lpc.encode_residual_long(task.frame.subframes[ch].best.residual, task.frame.subframes[ch].samples, task.frame.blocksize, task.frame.subframes[ch].best.order, coefs, task.frame.subframes[ch].best.shift); else lpc.encode_residual(task.frame.subframes[ch].best.residual, task.frame.subframes[ch].samples, task.frame.blocksize, task.frame.subframes[ch].best.order, coefs, task.frame.subframes[ch].best.shift); int pmin = get_max_p_order(eparams.min_partition_order, task.frame.blocksize, task.frame.subframes[ch].best.order); int pmax = get_max_p_order(eparams.max_partition_order, task.frame.blocksize, task.frame.subframes[ch].best.order); - uint bits = (uint)task.frame.subframes[ch].best.order * task.frame.subframes[ch].obits + 4 + 5 + (uint)task.frame.subframes[ch].best.order * (uint)task.frame.subframes[ch].best.cbits + 6; + uint bits = (uint)(task.frame.subframes[ch].best.order * task.frame.subframes[ch].obits) + 4 + 5 + (uint)task.frame.subframes[ch].best.order * (uint)task.frame.subframes[ch].best.cbits + 6; //uint oldsize = task.frame.subframes[ch].best.size; task.frame.subframes[ch].best.size = bits + calc_rice_params(task.frame.subframes[ch].best.rc, pmin, pmax, task.frame.subframes[ch].best.residual, (uint)task.frame.blocksize, (uint)task.frame.subframes[ch].best.order); //if (task.frame.subframes[ch].best.size > task.frame.subframes[ch].obits * (uint)task.frame.blocksize && // oldsize <= task.frame.subframes[ch].obits * (uint)task.frame.blocksize) // throw new Exception("oops"); } -#if DEBUG - else - { - // residual - int len = task.frame.subframes[ch].best.order * (int)task.frame.subframes[ch].obits + 6 + - 4 + 5 + task.frame.subframes[ch].best.order * task.frame.subframes[ch].best.cbits + - (4 << task.frame.subframes[ch].best.rc.porder); - int j = task.frame.subframes[ch].best.order; - int psize = task.frame.blocksize >> task.frame.subframes[ch].best.rc.porder; - for (int p = 0; p < (1 << task.frame.subframes[ch].best.rc.porder); p++) - { - int k = task.frame.subframes[ch].best.rc.rparams[p]; - int cnt = p == 0 ? psize - task.frame.subframes[ch].best.order : psize; - len += (k + 1) * cnt; - for (int i = j; i < j + cnt; i++) - len += (((task.frame.subframes[ch].best.residual[i] << 1) ^ (task.frame.subframes[ch].best.residual[i] >> 31)) >> k); - j += cnt; - } - if (len != task.frame.subframes[ch].best.size) - throw new Exception(string.Format("length mismatch: {0} vs {1}", len, task.frame.subframes[ch].best.size)); - } -#endif } break; } - if (task.frame.subframes[ch].best.size > task.frame.subframes[ch].obits * (uint)task.frame.blocksize) + if (task.frame.subframes[ch].best.size > task.frame.subframes[ch].obits * task.frame.blocksize) { #if DEBUG throw new Exception("larger than verbatim"); #endif task.frame.subframes[ch].best.type = SubframeType.Verbatim; - task.frame.subframes[ch].best.size = task.frame.subframes[ch].obits * (uint)task.frame.blocksize; + task.frame.subframes[ch].best.size = (uint)(task.frame.subframes[ch].obits * task.frame.blocksize); if (!unpacked) unpack_samples(task, task.frameSize); unpacked = true; } } @@ -1109,7 +1091,7 @@ namespace CUETools.Codecs.FlaCuda int index = ch + iFrame * channels; frame.subframes[ch].best.residual = ((int*)task.residualBufferPtr) + task.BestResidualTasks[index].residualOffs; frame.subframes[ch].best.type = SubframeType.Verbatim; - frame.subframes[ch].best.size = frame.subframes[ch].obits * (uint)frame.blocksize; + frame.subframes[ch].best.size = (uint)(frame.subframes[ch].obits * frame.blocksize); frame.subframes[ch].wbits = 0; if (task.BestResidualTasks[index].size < 0) @@ -1121,12 +1103,9 @@ namespace CUETools.Codecs.FlaCuda frame.subframes[ch].best.order = task.BestResidualTasks[index].residualOrder; frame.subframes[ch].best.cbits = task.BestResidualTasks[index].cbits; frame.subframes[ch].best.shift = task.BestResidualTasks[index].shift; - frame.subframes[ch].obits -= (uint)task.BestResidualTasks[index].wbits; - frame.subframes[ch].wbits = (uint)task.BestResidualTasks[index].wbits; + frame.subframes[ch].obits -= task.BestResidualTasks[index].wbits; + frame.subframes[ch].wbits = task.BestResidualTasks[index].wbits; frame.subframes[ch].best.rc.porder = task.BestResidualTasks[index].porder; - if (frame.subframes[ch].wbits != 0) - for (int i = 0; i < frame.blocksize; i++) - frame.subframes[ch].samples[i] >>= (int)frame.subframes[ch].wbits; for (int i = 0; i < task.BestResidualTasks[index].residualOrder; i++) frame.subframes[ch].best.coefs[i] = task.BestResidualTasks[index].coefs[task.BestResidualTasks[index].residualOrder - 1 - i]; if (!encode_on_cpu && (frame.subframes[ch].best.type == SubframeType.Fixed || frame.subframes[ch].best.type == SubframeType.LPC)) @@ -1354,20 +1333,23 @@ namespace CUETools.Codecs.FlaCuda for (int ch = 0; ch < channels; ch++) { int* s = task.frame.subframes[ch].samples; + int wbits = (int)task.frame.subframes[ch].wbits; for (int i = 0; i < count; i++) - s[i] = src[i * channels + ch]; + s[i] = src[i * channels + ch] >>= wbits; } break; case ChannelMode.LeftRight: { int* left = task.frame.subframes[0].samples; int* right = task.frame.subframes[1].samples; + int lwbits = (int)task.frame.subframes[0].wbits; + int rwbits = (int)task.frame.subframes[1].wbits; for (int i = 0; i < count; i++) { int l = *(src++); int r = *(src++); - left[i] = l; - right[i] = r; + left[i] = l >> lwbits; + right[i] = r >> rwbits; } break; } @@ -1375,12 +1357,14 @@ namespace CUETools.Codecs.FlaCuda { int* left = task.frame.subframes[0].samples; int* right = task.frame.subframes[1].samples; + int lwbits = (int)task.frame.subframes[0].wbits; + int rwbits = (int)task.frame.subframes[1].wbits; for (int i = 0; i < count; i++) { int l = *(src++); int r = *(src++); - left[i] = l; - right[i] = l - r; + left[i] = l >> lwbits; + right[i] = (l - r) >> rwbits; } break; } @@ -1388,12 +1372,14 @@ namespace CUETools.Codecs.FlaCuda { int* left = task.frame.subframes[0].samples; int* right = task.frame.subframes[1].samples; + int lwbits = (int)task.frame.subframes[0].wbits; + int rwbits = (int)task.frame.subframes[1].wbits; for (int i = 0; i < count; i++) { int l = *(src++); int r = *(src++); - left[i] = l - r; - right[i] = r; + left[i] = (l - r) >> lwbits; + right[i] = r >> rwbits; } break; } @@ -1401,12 +1387,14 @@ namespace CUETools.Codecs.FlaCuda { int* left = task.frame.subframes[0].samples; int* right = task.frame.subframes[1].samples; + int lwbits = (int)task.frame.subframes[0].wbits; + int rwbits = (int)task.frame.subframes[1].wbits; for (int i = 0; i < count; i++) { int l = *(src++); int r = *(src++); - left[i] = (l + r) >> 1; - right[i] = l - r; + left[i] = (l + r) >> (1 + lwbits); + right[i] = (l - r) >> rwbits; } break; } @@ -1425,7 +1413,7 @@ namespace CUETools.Codecs.FlaCuda task.frame.subframes[ch].Init( smp + ch * FlaCudaWriter.MAX_BLOCKSIZE + iFrame * task.frameSize, ((int*)task.residualBufferPtr) + ch * FlaCudaWriter.MAX_BLOCKSIZE + iFrame * task.frameSize, - bits_per_sample + (doMidside && ch == 3 ? 1U : 0U), 0); + _pcm.BitsPerSample + (doMidside && ch == 3 ? 1 : 0), 0); select_best_methods(task.frame, channelCount, iFrame, task); //unpack_samples(task); @@ -1490,8 +1478,8 @@ namespace CUETools.Codecs.FlaCuda bool doMidside = channels == 2 && eparams.do_midside; int channelCount = doMidside ? 2 * channels : channels; - int iSample = 0; - int iByte = 0; + long iSample = 0; + long iByte = 0; task.frame.writer.Reset(); task.frame.writer_offset = 0; for (int iFrame = 0; iFrame < task.frameCount; iFrame++) @@ -1499,13 +1487,13 @@ namespace CUETools.Codecs.FlaCuda //if (0 != eparams.variable_block_size && 0 == (task.blocksize & 7) && task.blocksize >= 128) // fs = encode_frame_vbs(); //else - int fn = task.frameNumber + (eparams.variable_block_size > 0 ? iSample : iFrame); + int fn = task.frameNumber + (eparams.variable_block_size > 0 ? (int)iSample : iFrame); int fs = encode_frame(doMidside, channelCount, iFrame, task, fn); if (task.verify != null) { int decoded = task.verify.DecodeFrame(task.frame.writer.Buffer, task.frame.writer_offset, fs); - if (decoded != fs || task.verify.Remaining != (ulong)task.frameSize) + if (decoded != fs || task.verify.Remaining != task.frameSize) throw new Exception("validation failed! frame size mismatch"); fixed (int* r = task.verify.Samples) { @@ -1530,13 +1518,13 @@ namespace CUETools.Codecs.FlaCuda { if (seek_table[sp].framesize != 0) continue; - if (seek_table[sp].number >= (ulong)(task.framePos + iSample + task.frameSize)) + if (seek_table[sp].number >= task.framePos + iSample + task.frameSize) break; - if (seek_table[sp].number >= (ulong)(task.framePos + iSample)) + if (seek_table[sp].number >= task.framePos + iSample) { - seek_table[sp].number = (ulong)(task.framePos + iSample); - seek_table[sp].offset = (ulong)iByte; - seek_table[sp].framesize = (uint)task.frameSize; + seek_table[sp].number = task.framePos + iSample; + seek_table[sp].offset = iByte; + seek_table[sp].framesize = task.frameSize; } } } @@ -1546,7 +1534,7 @@ namespace CUETools.Codecs.FlaCuda iSample += task.frameSize; iByte += fs; } - task.outputSize = iByte; + task.outputSize = (int)iByte; if (iByte != task.frame.writer.Length) throw new Exception("invalid length"); } @@ -1558,17 +1546,17 @@ namespace CUETools.Codecs.FlaCuda if (seek_table != null && _IO.CanSeek) for (int sp = 0; sp < seek_table.Length; sp++) { - if (seek_table[sp].number >= (ulong)(task.framePos + iSample)) + if (seek_table[sp].number >= task.framePos + iSample) break; - if (seek_table[sp].number >= (ulong)(task.framePos)) - seek_table[sp].offset += (ulong)(_IO.Position - first_frame_offset); + if (seek_table[sp].number >= task.framePos) + seek_table[sp].offset += _IO.Position - first_frame_offset; } _IO.Write(task.outputBuffer, 0, task.outputSize); _position += iSample; _totalSize += task.outputSize; } - public unsafe void Write(int[,] buff, int pos, int sampleCount) + public unsafe void InitTasks() { bool doMidside = channels == 2 && eparams.do_midside; int channelCount = doMidside ? 2 * channels : channels; @@ -1597,29 +1585,32 @@ namespace CUETools.Codecs.FlaCuda cpu_tasks[i] = new FlaCudaTask(cuda, channelCount, channels, bits_per_sample, max_frame_size, eparams.do_verify); } cudaWindow = cuda.Allocate((uint)sizeof(float) * FlaCudaWriter.MAX_BLOCKSIZE * 2 * lpc.MAX_LPC_WINDOWS); - + inited = true; } - int len = sampleCount; - while (len > 0) + } + + public unsafe void Write(AudioBuffer buff) + { + InitTasks(); + buff.Prepare(this); + int pos = 0; + while (pos < buff.Length) { - int block = Math.Min(len, eparams.block_size * max_frames - samplesInBuffer); + int block = Math.Min(buff.Length - pos, eparams.block_size * max_frames - samplesInBuffer); - copy_samples(buff, pos, block, task1); - - if (md5 != null) - { - AudioSamples.FLACSamplesToBytes(buff, pos, md5_buffer, 0, block, channels, (int)bits_per_sample); - md5.TransformBlock(md5_buffer, 0, block * channels * ((int)bits_per_sample >> 3), null, 0); - } - - len -= block; + fixed (byte* buf = buff.Bytes) + AudioSamples.MemCpy(((byte*)task1.samplesBytesPtr) + samplesInBuffer * _pcm.BlockAlign, buf + pos * _pcm.BlockAlign, block * _pcm.BlockAlign); + + samplesInBuffer += block; pos += block; int nFrames = samplesInBuffer / eparams.block_size; if (nFrames >= max_frames) do_output_frames(nFrames); } + if (md5 != null) + md5.TransformBlock(buff.Bytes, 0, buff.ByteLength, null, 0); } public void wait_for_cpu_task() @@ -1629,25 +1620,40 @@ namespace CUETools.Codecs.FlaCuda return; lock (task) { - while (!task.done) + while (!task.done && task.exception == null) Monitor.Wait(task); + if (task.exception != null) + throw task.exception; } } public void cpu_task_thread(object param) { FlaCudaTask task = param as FlaCudaTask; - while (true) + try + { + while (true) + { + lock (task) + { + while (task.done && !task.exit) + Monitor.Wait(task); + if (task.exit) + return; + } + process_result(task); + lock (task) + { + task.done = true; + Monitor.Pulse(task); + } + } + } + catch (Exception ex) { lock (task) { - while (task.done) - Monitor.Wait(task); - } - process_result(task); - lock (task) - { - task.done = true; + task.exception = ex; Monitor.Pulse(task); } } @@ -1659,6 +1665,7 @@ namespace CUETools.Codecs.FlaCuda if (task.workThread == null) { task.done = false; + task.exit = false; task.workThread = new Thread(cpu_task_thread); task.workThread.IsBackground = true; //task.workThread.Priority = ThreadPriority.BelowNormal; @@ -1676,9 +1683,6 @@ namespace CUETools.Codecs.FlaCuda public unsafe void do_output_frames(int nFrames) { - bool doMidside = channels == 2 && eparams.do_midside; - int channelCount = doMidside ? 2 * channels : channels; - send_to_GPU(task1, nFrames, eparams.block_size); if (task2.frameCount > 0) cuda.SynchronizeStream(task2.stream); @@ -1707,9 +1711,9 @@ namespace CUETools.Codecs.FlaCuda } } int bs = eparams.block_size * nFrames; - if (bs < samplesInBuffer) - AudioSamples.MemCpy(((short*)task2.samplesBytesPtr), ((short*)task1.samplesBytesPtr) + bs * channels, (samplesInBuffer - bs) * channels); samplesInBuffer -= bs; + if (samplesInBuffer > 0) + AudioSamples.MemCpy(((byte*)task2.samplesBytesPtr), ((byte*)task1.samplesBytesPtr) + bs * _pcm.BlockAlign, samplesInBuffer * _pcm.BlockAlign); FlaCudaTask tmp = task1; task1 = task2; task2 = tmp; @@ -1718,7 +1722,7 @@ namespace CUETools.Codecs.FlaCuda public string Path { get { return _path; } } - string vendor_string = "FlaCuda#0.7"; + public static readonly string vendor_string = "FlaCuda#.91"; int select_blocksize(int samplerate, int time_ms) { @@ -1815,8 +1819,8 @@ namespace CUETools.Codecs.FlaCuda bitwriter.writebits(24, 18 * seek_table.Length); for (int i = 0; i < seek_table.Length; i++) { - bitwriter.writebits64(Flake.FLAC__STREAM_METADATA_SEEKPOINT_SAMPLE_NUMBER_LEN, seek_table[i].number); - bitwriter.writebits64(Flake.FLAC__STREAM_METADATA_SEEKPOINT_STREAM_OFFSET_LEN, seek_table[i].offset); + bitwriter.writebits64(Flake.FLAC__STREAM_METADATA_SEEKPOINT_SAMPLE_NUMBER_LEN, (ulong)seek_table[i].number); + bitwriter.writebits64(Flake.FLAC__STREAM_METADATA_SEEKPOINT_STREAM_OFFSET_LEN, (ulong)seek_table[i].offset); bitwriter.writebits(Flake.FLAC__STREAM_METADATA_SEEKPOINT_FRAME_SAMPLES_LEN, seek_table[i].framesize); } bitwriter.flush(); @@ -1926,7 +1930,7 @@ namespace CUETools.Codecs.FlaCuda else max_frame_size = 16 + ((eparams.block_size * channels * (int)bits_per_sample + 7) >> 3); - if (_IO.CanSeek && eparams.do_seektable && sample_count != 0) + if (_IO.CanSeek && eparams.do_seektable && sample_count > 0) { int seek_points_distance = sample_rate * 10; int num_seek_points = 1 + sample_count / seek_points_distance; // 1 seek point per 10 seconds @@ -1937,7 +1941,7 @@ namespace CUETools.Codecs.FlaCuda { seek_table[sp].framesize = 0; seek_table[sp].offset = 0; - seek_table[sp].number = (ulong)(sp * seek_points_distance); + seek_table[sp].number = sp * seek_points_distance; } } @@ -1946,7 +1950,7 @@ namespace CUETools.Codecs.FlaCuda header_len = write_headers(); // initialize CRC & MD5 - if (_IO.CanSeek && eparams.do_md5) + if (eparams.do_md5) md5 = new MD5CryptoServiceProvider(); return header_len; @@ -2252,7 +2256,9 @@ namespace CUETools.Codecs.FlaCuda public FlakeReader verify; public Thread workThread = null; + public Exception exception = null; public bool done = false; + public bool exit = false; unsafe public FlaCudaTask(CUDA _cuda, int channelCount, int channels, uint bits_per_sample, int max_frame_size, bool do_verify) { @@ -2328,13 +2334,23 @@ namespace CUETools.Codecs.FlaCuda if (do_verify) { - verify = new FlakeReader(channels, bits_per_sample); + verify = new FlakeReader(new AudioPCMConfig((int)bits_per_sample, channels, 44100)); verify.DoCRC = false; } } public void Dispose() { + if (workThread != null) + { + lock (this) + { + exit = true; + Monitor.Pulse(this); + } + workThread.Join(); + workThread = null; + } cuda.Free(cudaSamples); cuda.Free(cudaSamplesBytes); cuda.Free(cudaLPCData); diff --git a/CUETools.FlaCuda/flacuda.cu b/CUETools.FlaCuda/flacuda.cu index a40d99f..34c76bf 100644 --- a/CUETools.FlaCuda/flacuda.cu +++ b/CUETools.FlaCuda/flacuda.cu @@ -1324,3 +1324,17 @@ extern "C" __global__ void cudaFindPartitionOrder( } #endif + +#if 0 + if (threadIdx.x < order) + { + for (int i = 0; i < order; i++) + if (threadIdx.x >= i) + sum[threadIdx.x - i] += coefs[threadIdx.x] * sample[order - i - 1]; + fot (int i = order; i < blocksize; i++) + { + if (!threadIdx.x) sample[order + i] = s = residual[order + i] + (sum[order + i] >> shift); + sum[threadIdx.x + i + 1] += coefs[threadIdx.x] * s; + } + } +#endif \ No newline at end of file diff --git a/CUETools.FlaCuda/flacuda.cubin b/CUETools.FlaCuda/flacuda.cubin index f6251ea..29b566d 100644 --- a/CUETools.FlaCuda/flacuda.cubin +++ b/CUETools.FlaCuda/flacuda.cubin @@ -23,21 +23,21 @@ code { 0xa0000009 0x040007c0 0xa008a003 0x00000000 0x1008a003 0x00000280 0xa0000415 0x04000780 0x30810bfd 0x644107c8 0xa0015003 0x00000000 - 0x30020a11 0xc4100780 0x10015003 0x00000280 - 0x1000ca01 0x0423c780 0x40014e0d 0x00200780 - 0x3010060d 0xc4100780 0x60004e01 0x0020c780 - 0x3007000d 0xc4100780 0x30060001 0xc4100780 - 0x20008600 0x2100e800 0x20000801 0x04000780 - 0xd00e0001 0x80c00780 0x00000805 0xc0000780 + 0x10015003 0x00000280 0x1000ca01 0x0423c780 + 0x40014e0d 0x00200780 0x3010060d 0xc4100780 + 0x60004e01 0x0020c780 0x3005000d 0xc4100780 + 0x30040001 0xc4100780 0x20008600 0x20008a00 + 0x30020001 0xc4100780 0x2000c801 0x04200780 + 0xd00e0001 0x80c00780 0x00020a05 0xc0000780 0x04001601 0xe4200780 0x307c0bfd 0x640147ca 0xa0022003 0x00000000 0x10022003 0x00000280 0xa0004c0d 0x04200780 0x10004e01 0x0023c780 0x6000480d 0x0020c780 0x2101f001 0x00000003 - 0x40070019 0x00000780 0x60060219 0x00018780 - 0x30100c19 0xc4100780 0x60060001 0x00018780 + 0x40070011 0x00000780 0x60060211 0x00010780 + 0x30100811 0xc4100780 0x60060001 0x00010780 0x30050001 0xc4100780 0x00023601 0xe4200780 - 0x00000805 0xc0000782 0x213ff001 0x0fffffff - 0x30050001 0xa4000780 0x04013601 0xe4200780 + 0x00020a05 0xc0000782 0x213ff001 0x0fffffff + 0x30000a01 0xa4000780 0x04013601 0xe4200780 0x3006e40d 0xc4300780 0x20000a0d 0x0400c780 0xa000060d 0x44004780 0x0401b601 0xe420c780 0x04017601 0xe4200780 0x3006e401 0xc4300780 @@ -46,13 +46,13 @@ code { 0xa0044003 0x00000000 0x10044003 0x00000280 0xd008d805 0x20000780 0x3005d001 0xc4300780 0x2400c00d 0x04200780 0xa000e401 0x44214780 - 0x20000a0d 0x0400c780 0xa0000a1d 0x44004780 - 0x90000021 0x60000780 0x30020619 0xc4100780 - 0xc00a0e0d 0x040a3d73 0xc018101d 0x03f31723 - 0x2000ce19 0x04218780 0xd00e0c19 0x80c00780 - 0x00000805 0xc0000780 0xc007060d 0x00000780 - 0x90000c11 0x60000780 0xc0180811 0x03f31723 - 0xe0040001 0x0000c780 0x0401b601 0xe4200780 + 0x20000a0d 0x0400c780 0xa0000a11 0x44004780 + 0x90000019 0x60000780 0x3002060d 0xc4100780 + 0xc00a0811 0x040a3d73 0xc0180c19 0x03f31723 + 0x2000ce0d 0x0420c780 0xd00e060d 0x80c00780 + 0xc0060811 0x00000780 0x9000060d 0x60000780 + 0xc018060d 0x03f31723 0xe0030001 0x00010780 + 0x00020a05 0xc0000780 0x0401b601 0xe4200780 0x30010a19 0xc4100782 0x1002801d 0x00000003 0x301f0e01 0xec100780 0xd0820001 0x04400780 0x20000001 0x0401c780 0x30010001 0xec100780 @@ -173,9 +173,9 @@ code { 0x41052c0c 0x41032e18 0x3010060d 0xc4100780 0x30100c19 0xc4100780 0x60044c09 0x0020c780 0x60024e05 0x00218780 0x20018404 0x20018004 - 0x30070209 0xc4100780 0x30060205 0xc4100780 - 0x20000405 0x04004780 0x30020809 0xc4100780 - 0x2101e804 0x20018404 0x20008205 0x00000007 + 0x30050209 0xc4100780 0x30040205 0xc4100780 + 0x20018404 0x20018804 0x30020205 0xc4100780 + 0x2000c805 0x04204780 0x20008205 0x00000007 0xd00e0215 0xa0c00780 0xf0000001 0xe0000002 0x20048001 0x00000003 0x3000cdfd 0x6c2107d8 0x10096003 0x00001280 0xf0000001 0xe0000001 @@ -185,208 +185,206 @@ code { name = cudaComputeLPCLattice lmem = 0 smem = 3436 - reg = 18 + reg = 17 bar = 1 const { segname = const segnum = 1 offset = 0 - bytes = 36 + bytes = 32 mem { 0x0000000f 0xffffffff 0x0000007f 0x0000003f - 0x0000001f 0x7e800000 0x38000000 0x00000001 - 0x3e800000 + 0x0000001f 0x7e800000 0x38000000 0x3e800000 } } bincode { - 0xa000001d 0x04000780 0x30800ffd 0x644107c8 - 0xa0010003 0x00000000 0x30020e21 0xc4100780 - 0x10010003 0x00000280 0x1000ca01 0x0423c780 - 0x40014e05 0x00200780 0x30100205 0xc4100780 - 0x60004e01 0x00204780 0x30070005 0xc4100780 - 0x30060001 0xc4100780 0x20008200 0x2100e800 - 0x20001001 0x04000780 0xd00e0001 0x80c00780 - 0x00001005 0xc0000780 0x04001401 0xe4200780 - 0x307c0e01 0x640087c2 0xa00001fd 0x0c0147f8 - 0x00000025 0x20003780 0xa001c003 0x00000000 + 0xa000003d 0x04000780 0x30801ffd 0x644107c8 + 0xa0010003 0x00000000 0x10010003 0x00000280 + 0x1000ca01 0x0423c780 0x40014e05 0x00200780 + 0x30100205 0xc4100780 0x60004e01 0x00204780 + 0x30050005 0xc4100780 0x30040001 0xc4100780 + 0x20008200 0x20009e00 0x30020001 0xc4100780 + 0x2000c801 0x04200780 0xd00e0001 0x80c00780 + 0x00021e05 0xc0000780 0x04001401 0xe4200780 + 0x307c1e01 0x640087c2 0xa00001fd 0x0c0147f8 + 0x00000041 0x20003780 0xa001c003 0x00000000 0x1001c003 0x00000100 0xa0004e01 0x04200780 0x20018001 0x00000003 0x2101f005 0x00000003 0x6100ce01 0x80604780 0x40010001 0x00018780 0x30050001 0xc4100780 0x0006b401 0xe4200780 0xf0000001 0xe0000002 0x861ffe03 0x00000000 - 0x3007e3fd 0x6420c7c8 0x1000e201 0x0423c780 - 0x2000d605 0x0421c500 0x30020205 0xc4100500 + 0x300fe3fd 0x6420c7c8 0x1000e201 0x0423c780 + 0x2000d605 0x0423c500 0x30020205 0xc4100500 0x2000cc05 0x04204500 0xd00e0205 0x80c00500 - 0xa0000205 0x44014500 0xc0860209 0x00400500 - 0x1000f809 0x0403c280 0xa0035003 0x00000000 - 0x20008e05 0x00000013 0x300101fd 0x6400c7c8 - 0x10000405 0x0403c780 0x10034003 0x00000280 - 0x2000d601 0x0421c780 0x30020001 0xc4100780 + 0xa0000205 0x44014500 0xc086020d 0x00400500 + 0x1000f80d 0x0403c280 0xa0035003 0x00000000 + 0x20009e05 0x00000013 0x300101fd 0x6400c7c8 + 0x10000609 0x0403c780 0x10034003 0x00000280 + 0x2000d601 0x0423c780 0x30020001 0xc4100780 0x2000cc01 0x04200780 0x20008001 0x00000043 0xd00e0001 0x80c00780 0xa0000001 0x44014780 - 0xc000000d 0x03800003 0x10035003 0x00000780 - 0x1000f80d 0x0403c780 0x00001005 0xc0000782 - 0x04003401 0xe4208780 0x10000601 0x0403c780 - 0x04023401 0xe420c780 0x861ffe03 0x00000000 - 0xc003060d 0x00000780 0xe0020409 0x0000c780 - 0x00001005 0xc0000780 0x04047401 0xe4208780 - 0x861ffe03 0x00000000 0x30820e09 0x6440c7d0 - 0xa00005fd 0x0c0147c8 0x00001005 0xc0001680 + 0xc0000001 0x03800003 0x10035003 0x00000780 + 0x1000f801 0x0403c780 0x00021e05 0xc0000782 + 0x04003401 0xe420c780 0x10000005 0x0403c780 + 0x04023401 0xe4200780 0x861ffe03 0x00000000 + 0xc0000001 0x00000780 0xe0030601 0x00000780 + 0x00021e05 0xc0000780 0x04047401 0xe4200780 + 0x861ffe03 0x00000000 0x30821e01 0x6440c7d0 + 0xa00001fd 0x0c0147c8 0x00021e05 0xc0001680 0xd415d00d 0x20001680 0xd411d009 0x20001680 - 0x1c00c009 0x0423d680 0xb800c009 0x00209680 - 0x04047401 0xe4209680 0x861ffe03 0x00000000 - 0x30830e09 0x6440c7e0 0xa00005fd 0x0c0147d8 - 0x00001005 0xc0002680 0xd413d00d 0x20002680 - 0xd411d009 0x20002680 0x1c00c009 0x0423e680 - 0xb800c009 0x0020a680 0x04047401 0xe420a680 - 0x861ffe03 0x00000000 0x30840e09 0x6440c7f0 - 0xa00005fd 0x0c0147e8 0x00001005 0xc0003680 + 0x1c00c001 0x0423d680 0xb800c001 0x00201680 + 0x04047401 0xe4201680 0x861ffe03 0x00000000 + 0x30831e01 0x6440c7e0 0xa00001fd 0x0c0147d8 + 0x00021e05 0xc0002680 0xd413d00d 0x20002680 + 0xd411d009 0x20002680 0x1c00c001 0x0423e680 + 0xb800c001 0x00202680 0x04047401 0xe4202680 + 0x861ffe03 0x00000000 0x30841e01 0x6440c7f0 + 0xa00001fd 0x0c0147e8 0x00021e05 0xc0003680 0xd412d00d 0x20003680 0xd411d009 0x20003680 - 0x1c00c009 0x0423f680 0xb800c009 0x0020b680 - 0x04047401 0xe420b680 0x861ffe03 0x00000000 + 0x1c00c001 0x0423f680 0xb800c001 0x00203680 + 0x04047401 0xe4203680 0x861ffe03 0x00000000 0xa0069003 0x00000000 0x10069003 0x00002100 - 0x00001005 0xc0000780 0xd411d009 0x20000780 - 0x1800e009 0x0423c780 0xb800c009 0x00208780 - 0x04047401 0xe4208780 0x1900f008 0xb9026008 - 0x04047401 0xe4208780 0x1900e808 0xb9026008 - 0x04047401 0xe4208780 0x1900e408 0xb9026008 - 0x04047401 0xe4208780 0x1900e208 0xb9026008 - 0x04047401 0xe4208780 0xf0000001 0xe0000002 + 0x00021e05 0xc0000780 0xd411d009 0x20000780 + 0x1800e001 0x0423c780 0xb800c001 0x00200780 + 0x04047401 0xe4200780 0x1900f000 0xb9006000 + 0x04047401 0xe4200780 0x1900e800 0xb9006000 + 0x04047401 0xe4200780 0x1900e400 0xb9006000 + 0x04047401 0xe4200780 0x1900e200 0xb9006000 + 0x04047401 0xe4200780 0xf0000001 0xe0000002 0x861ffe03 0x00000000 0xd011d005 0x20000780 - 0x1400c009 0x0423c780 0x861ffe03 0x00000000 - 0x307cd1fd 0x6c20c7f8 0x1015f003 0x00003280 - 0x20018e29 0x00000003 0x20018e2d 0x00000013 - 0x20028e31 0x00000003 0x20028e35 0x00000013 - 0x1000f839 0x0403c780 0x20001441 0x04038780 - 0x3010e3fd 0x6c20c7f8 0x20001c0d 0x0401f500 - 0x2100060d 0x0441f500 0x00020605 0xc0003500 - 0xc401f40d 0x00203500 0x1000f80d 0x0403f280 - 0x00001005 0xc0000780 0x04047401 0xe420c780 - 0x2000163d 0x04038780 0xa008d003 0x00000000 - 0x300fe3fd 0x6c20c7f8 0x1008a003 0x00003280 - 0x20001c0d 0x0401c780 0x00001005 0xc0000780 - 0x2001860d 0x00000013 0xd411d009 0x20000780 - 0x00020605 0xc0000780 0x1800c00d 0x0423c780 - 0xe400f40d 0x0020c780 0x1008d003 0x00000780 - 0x00001005 0xc0000780 0xd411d005 0x20000780 - 0x1400c00d 0x0423c780 0x00001005 0xc0000782 - 0x04047401 0xe420c780 0x861ffe03 0x00000000 - 0x00001005 0xc0000680 0xd415d00d 0x20000680 - 0xd411d009 0x20000680 0x1c00c00d 0x0423c680 - 0xb800c00d 0x0020c680 0x04047401 0xe420c680 - 0x861ffe03 0x00000000 0x00001005 0xc0001680 - 0xd413d00d 0x20001680 0xd411d009 0x20001680 - 0x1c00c00d 0x0423d680 0xb800c00d 0x0020d680 - 0x04047401 0xe420d680 0x861ffe03 0x00000000 - 0x00001005 0xc0002680 0xd412d00d 0x20002680 - 0xd411d009 0x20002680 0x1c00c00d 0x0423e680 - 0xb800c00d 0x0020e680 0x04047401 0xe420e680 - 0x861ffe03 0x00000000 0xa00b4003 0x00000000 - 0x100b4003 0x00002100 0x00001005 0xc0000780 - 0xd411d009 0x20000780 0x1800e00d 0x0423c780 - 0xb800c00d 0x0020c780 0x04047401 0xe420c780 - 0x1900f00c 0xb903600c 0x04047401 0xe420c780 - 0x1900e80c 0xb903600c 0x04047401 0xe420c780 - 0x1900e40c 0xb903600c 0x04047401 0xe420c780 - 0x1900e20c 0xb903600c 0x04047401 0xe420c780 - 0xf0000001 0xe0000002 0x861ffe03 0x00000000 - 0xd011d005 0x20000780 0x1400c00d 0x0423c780 - 0x861ffe03 0x00000000 0xa00c3003 0x00000000 - 0x00001201 0xa00007f0 0x100c3003 0x00003100 - 0x10008610 0x10008414 0xb08505fd 0x605107f8 - 0xc0880811 0x00403680 0xc0880a15 0x00403680 - 0x90000a14 0xc0050810 0x00021c05 0xc0000780 - 0x04043401 0xe4210780 0xf0000001 0xe0000002 - 0xa00d5003 0x00000000 0x30071dfd 0x6400c7f8 - 0x100d5003 0x00003280 0x20401c11 0x0401c780 - 0x00001005 0xc0000780 0x00020809 0xc0000780 - 0xd410d005 0x20000780 0xd810c809 0x20000780 - 0x10008618 0x10008444 0x1500e014 0x1900e010 - 0xb08505fd 0x605107f8 0xc0880619 0x00403680 - 0xc0880445 0x00403680 0x90002244 0xc0110c18 - 0xe0060811 0x04014780 0x00001005 0xc0000780 - 0x04043401 0xe4210780 0xf0000001 0xe0000002 - 0xa00e2003 0x00000000 0x30071dfd 0x640047f8 - 0x100e2003 0x00003280 0x30000e11 0x04038780 - 0x00020809 0xc0000780 0xd01ad005 0x20000780 - 0x30051c11 0xc4100780 0x2504e010 0x20048e10 - 0xd810d005 0x20000780 0x30020815 0xc4100780 - 0x1500e010 0x2105f214 0xd00e0a11 0xa0c00780 - 0xf0000001 0xe0000002 0xa00f5003 0x00000000 - 0x1000e211 0x0423c780 0x3010e3fd 0x6c20c7f8 - 0x100f5003 0x00003280 0x20001c11 0x0401c780 - 0x20018811 0x00000003 0x00020805 0xc0000780 - 0x10008614 0x10008418 0x1400f411 0x0423c780 - 0xb08505fd 0x605107f8 0xc0880615 0x00403680 - 0xc0880419 0x00403680 0x90000c18 0xc0060a18 - 0x1400f415 0x0423c780 0xe0060215 0x04014780 - 0x04003401 0xe4214780 0xe0040c05 0x04004780 - 0x1000e211 0x0423c780 0xf0000001 0xe0000002 - 0xa0107003 0x00000000 0x30041ffd 0x6c0187f8 - 0x10107003 0x00003280 0x20001c11 0x0401c780 - 0x20018811 0x00000013 0x00020805 0xc0000780 - 0x10008614 0x10008418 0x1400f411 0x0423c780 - 0xb08505fd 0x605107f8 0xc0880615 0x00403680 - 0xc0880419 0x00403680 0x90000c08 0xc0020a0c - 0x1400f409 0x0423c780 0xe0030009 0x04008780 - 0x04003401 0xe4208780 0xe0040601 0x04000780 - 0x1000e211 0x0423c780 0x20001809 0x04038782 - 0x300209fd 0x6c00c7f8 0x20001c09 0x0401f500 - 0x21000409 0x0441f500 0x00020405 0xc0003500 - 0xc001020d 0x00003500 0x1400f409 0x0423f500 - 0xe402f409 0x0020f500 0x1000f809 0x0403f280 - 0x00001005 0xc0000780 0x04047401 0xe4208780 - 0x20001a09 0x04038780 0xa0123003 0x00000000 - 0x3002e3fd 0x6c20c7f8 0x10120003 0x00003280 - 0x20001c09 0x0401c780 0x20018409 0x00000013 - 0x00020405 0xc0000780 0xc000000d 0x00000780 - 0x1400f409 0x0423c780 0x00001009 0xc0000780 - 0xe402f409 0x0020c780 0xd811d005 0x20000780 - 0xb400c009 0x00208780 0x10123003 0x00000780 - 0x00001005 0xc0000780 0xd411d005 0x20000780 - 0x1400c009 0x0423c780 0x00001005 0xc0000782 - 0x04047401 0xe4208780 0x861ffe03 0x00000000 - 0x00001005 0xc0000680 0xd415d00d 0x20000680 - 0xd411d009 0x20000680 0x1c00c009 0x0423c680 - 0xb800c009 0x00208680 0x04047401 0xe4208680 - 0x861ffe03 0x00000000 0x00001005 0xc0001680 - 0xd413d00d 0x20001680 0xd411d009 0x20001680 - 0x1c00c009 0x0423d680 0xb800c009 0x00209680 - 0x04047401 0xe4209680 0x861ffe03 0x00000000 - 0x00001005 0xc0002680 0xd412d00d 0x20002680 - 0xd411d009 0x20002680 0x1c00c009 0x0423e680 - 0xb800c009 0x0020a680 0x04047401 0xe420a680 - 0x861ffe03 0x00000000 0xa014a003 0x00000000 - 0x1014a003 0x00002100 0x00001005 0xc0000780 - 0xd411d009 0x20000780 0x1800e009 0x0423c780 - 0xb800c009 0x00208780 0x04047401 0xe4208780 - 0x1900f008 0xb9026008 0x04047401 0xe4208780 - 0x1900e808 0xb9026008 0x04047401 0xe4208780 - 0x1900e408 0xb9026008 0x04047401 0xe4208780 - 0x1900e208 0xb9026008 0x04047401 0xe4208780 - 0xf0000001 0xe0000002 0x861ffe03 0x00000000 - 0xd011d005 0x20000780 0xa015a003 0x00000000 - 0xc5006009 0x03f00003 0x00001201 0xa00007f0 - 0x1015a003 0x00003100 0x2040e20d 0x04238780 - 0xa0000611 0x44014780 0x1000040d 0x0403c780 - 0xb08509fd 0x605107f8 0xc088060d 0x00403680 - 0xc0880811 0x00403680 0x90000810 0xc004060c - 0x00021c05 0xc0000780 0x04067401 0xe420c780 - 0xf0000001 0xe0000002 0x861ffe03 0x00000000 - 0x20019c39 0x00000003 0x300ed1fd 0x6c2147f8 - 0x10075003 0x00003280 0x3007d1fd 0x6420c7c8 - 0x30000003 0x00000280 0xd01ad005 0x20000780 - 0x3005d001 0xc4300780 0x2400c001 0x04200780 - 0x00001005 0xc0000780 0x20000e01 0x04000780 - 0xd419d005 0x20000780 0x30020005 0xc4100780 - 0x1500e000 0x2101f204 0xd00e0201 0xa0c00781 + 0x1400c001 0x0423c780 0x861ffe03 0x00000000 + 0x307cd1fd 0x6c20c7f8 0x1015c003 0x00003280 + 0x20019e39 0x00000003 0x20019e35 0x00000013 + 0x20029e31 0x00000003 0x20029e2d 0x00000013 + 0x1000f821 0x0403c780 0x20001c29 0x04020780 + 0x300ae3fd 0x6c20c7f8 0x2000100d 0x0403f500 + 0x00020605 0xc0003500 0xc402f60d 0x00203500 + 0x1000f80d 0x0403f280 0x00021e05 0xc0000780 + 0x04047401 0xe420c780 0x20001a25 0x04020780 + 0xa008c003 0x00000000 0x3009e3fd 0x6c20c7f8 + 0x10089003 0x00003280 0x2000100d 0x0403c780 + 0x00021e09 0xc0000780 0x00020605 0xc0000780 + 0xd811d009 0x20000780 0xd408d805 0x20000780 + 0x1800c00d 0x0423c780 0xe401c00d 0x0020c780 + 0x1008c003 0x00000780 0x00021e05 0xc0000780 + 0xd411d005 0x20000780 0x1400c00d 0x0423c780 + 0x00021e05 0xc0000782 0x04047401 0xe420c780 + 0x861ffe03 0x00000000 0x00021e05 0xc0000680 + 0xd415d00d 0x20000680 0xd411d009 0x20000680 + 0x1c00c00d 0x0423c680 0xb800c00d 0x0020c680 + 0x04047401 0xe420c680 0x861ffe03 0x00000000 + 0x00021e05 0xc0001680 0xd413d00d 0x20001680 + 0xd411d009 0x20001680 0x1c00c00d 0x0423d680 + 0xb800c00d 0x0020d680 0x04047401 0xe420d680 + 0x861ffe03 0x00000000 0x00021e05 0xc0002680 + 0xd412d00d 0x20002680 0xd411d009 0x20002680 + 0x1c00c00d 0x0423e680 0xb800c00d 0x0020e680 + 0x04047401 0xe420e680 0x861ffe03 0x00000000 + 0xa00b3003 0x00000000 0x100b3003 0x00002100 + 0x00021e05 0xc0000780 0xd411d009 0x20000780 + 0x1800e00d 0x0423c780 0xb800c00d 0x0020c780 + 0x04047401 0xe420c780 0x1900f00c 0xb903600c + 0x04047401 0xe420c780 0x1900e80c 0xb903600c + 0x04047401 0xe420c780 0x1900e40c 0xb903600c + 0x04047401 0xe420c780 0x1900e20c 0xb903600c + 0x04047401 0xe420c780 0xf0000001 0xe0000002 + 0x861ffe03 0x00000000 0xd011d005 0x20000780 + 0x1400c01d 0x0423c780 0x861ffe03 0x00000000 + 0xa00c2003 0x00000000 0x00002001 0xa00007f0 + 0x100c2003 0x00003100 0x10008e0c 0x10008010 + 0xb08501fd 0x605107f8 0xc087060d 0x00403680 + 0xc0870811 0x00403680 0x90000810 0xc004060c + 0x00021005 0xc0000780 0x04043401 0xe420c780 + 0xf0000001 0xe0000002 0xa00d4003 0x00000000 + 0x300f11fd 0x6400c7f8 0x100d4003 0x00003280 + 0x30001e0d 0x04020780 0x00021e05 0xc0000780 + 0x00020609 0xc0000780 0xd410d005 0x20000780 + 0xd810c809 0x20000780 0x10008e10 0x1000800c + 0x1500e018 0x1900e014 0xb08501fd 0x605107f8 + 0xc0870e11 0x00403680 0xc087000d 0x00403680 + 0x9000060c 0xc003080c 0xe0030a0d 0x04018780 + 0x00021e05 0xc0000780 0x04043401 0xe420c780 + 0xf0000001 0xe0000002 0xa00e1003 0x00000000 + 0x300f11fd 0x640047f8 0x100e1003 0x00003280 + 0x30001e0d 0x04020780 0x00020605 0xc0000780 + 0xd01ad009 0x20000780 0x3005100d 0xc4100780 + 0x2903e00c 0x20039e0c 0xd410d005 0x20000780 + 0x30020611 0xc4100780 0x1500e00c 0x2104f210 + 0xd00e080d 0xa0c00780 0xf0000001 0xe0000002 + 0xa00f3003 0x00000000 0x1000e20d 0x0423c780 + 0x300ae3fd 0x6c20c7f8 0x100f3003 0x00003280 + 0x2000100d 0x0403c780 0x00020605 0xc0000780 + 0x10008e10 0x10008014 0x1400f60d 0x0423c780 + 0xb08501fd 0x605107f8 0xc0870e11 0x00403680 + 0xc0870015 0x00403680 0x90000a14 0xc0050814 + 0x1400f611 0x0423c780 0xe0050411 0x04010780 + 0x04003601 0xe4210780 0xe0030a09 0x04008780 + 0x1000e20d 0x0423c780 0xf0000001 0xe0000002 + 0xa0106003 0x00000000 0x300313fd 0x6c0187f8 + 0x10106003 0x00003280 0x2000100d 0x0403c780 + 0x00020605 0xc0000780 0xd408d809 0x20000780 + 0x10008e10 0x10008014 0x1800c00d 0x0423c780 + 0xb08501fd 0x605107f8 0xc0870e11 0x00403680 + 0xc0870015 0x00403680 0x90000a01 0x00000780 + 0xd408d809 0x20000780 0xc0000810 0x1900e000 + 0xe0040201 0x04000780 0x04023601 0xe4200780 + 0xe0030805 0x04004780 0x1000e20d 0x0423c780 + 0x20001801 0x04020782 0x300007fd 0x6c00c7f8 + 0x20001001 0x0403f500 0x00020005 0xc0003500 + 0xc002040d 0x00003500 0x1400f601 0x0423f500 + 0xe400f601 0x0020f500 0x1000f801 0x0403f280 + 0x00021e05 0xc0000780 0x04047401 0xe4200780 + 0x20001601 0x04020780 0xa0120003 0x00000000 + 0x3000e3fd 0x6c20c7f8 0x1011d003 0x00003280 + 0x20001e01 0x04020780 0x00020005 0xc0000780 + 0xd408d809 0x20000780 0xc001020c 0x1900e000 + 0x00021e05 0xc0000780 0xe800c001 0x0020c780 + 0xd411d005 0x20000780 0xb400c001 0x00200780 + 0x10120003 0x00000780 0x00021e05 0xc0000780 + 0xd411d005 0x20000780 0x1400c001 0x0423c780 + 0x00021e05 0xc0000782 0x04047401 0xe4200780 + 0x861ffe03 0x00000000 0x00021e05 0xc0000680 + 0xd415d00d 0x20000680 0xd411d009 0x20000680 + 0x1c00c001 0x0423c680 0xb800c001 0x00200680 + 0x04047401 0xe4200680 0x861ffe03 0x00000000 + 0x00021e05 0xc0001680 0xd413d00d 0x20001680 + 0xd411d009 0x20001680 0x1c00c001 0x0423d680 + 0xb800c001 0x00201680 0x04047401 0xe4201680 + 0x861ffe03 0x00000000 0x00021e05 0xc0002680 + 0xd412d00d 0x20002680 0xd411d009 0x20002680 + 0x1c00c001 0x0423e680 0xb800c001 0x00202680 + 0x04047401 0xe4202680 0x861ffe03 0x00000000 + 0xa0147003 0x00000000 0x10147003 0x00002100 + 0x00021e05 0xc0000780 0xd411d009 0x20000780 + 0x1800e001 0x0423c780 0xb800c001 0x00200780 + 0x04047401 0xe4200780 0x1900f000 0xb9006000 + 0x04047401 0xe4200780 0x1900e800 0xb9006000 + 0x04047401 0xe4200780 0x1900e400 0xb9006000 + 0x04047401 0xe4200780 0x1900e200 0xb9006000 + 0x04047401 0xe4200780 0xf0000001 0xe0000002 + 0x861ffe03 0x00000000 0xd011d005 0x20000780 + 0xa0157003 0x00000000 0xc5006001 0x03f00003 + 0x00002001 0xa00007f0 0x10157003 0x00003100 + 0x2040e20d 0x04220780 0xa0000611 0x44014780 + 0x1000000d 0x0403c780 0xb08509fd 0x605107f8 + 0xc087060d 0x00403680 0xc0870811 0x00403680 + 0x90000810 0xc004060c 0x00021005 0xc0000780 + 0x04067401 0xe420c780 0xf0000001 0xe0000002 + 0x861ffe03 0x00000000 0x20019021 0x00000003 + 0x3008d1fd 0x6c2147f8 0x10075003 0x00003280 + 0x300fd1fd 0x6420c7c8 0x30000003 0x00000280 + 0xd01ad005 0x20000780 0x3005d001 0xc4300780 + 0x2400c001 0x04200780 0x00021e05 0xc0000780 + 0x20001e01 0x04000780 0xd419d005 0x20000780 + 0x30020005 0xc4100780 0x1500e000 0x2101f204 + 0xd00e0201 0xa0c00781 } } code { name = cudaComputeAutocor lmem = 0 smem = 3328 - reg = 7 + reg = 6 bar = 1 const { segname = const @@ -399,85 +397,84 @@ code { } bincode { 0x10000005 0x0403c780 0xd0800601 0x00400780 - 0xa0000001 0x04000780 0xa0000415 0x04000780 - 0x30050005 0xc4100780 0x20000a0d 0x04004780 + 0xa0000001 0x04000780 0xa0000411 0x04000780 + 0x30050005 0xc4100780 0x2000080d 0x04004780 0x308107fd 0x644107c8 0xa0015003 0x00000000 - 0x30020611 0xc4100780 0x10015003 0x00000280 - 0xa0004e09 0x04200780 0x1000d205 0x0423c780 - 0x30010405 0xe4000780 0x4001d405 0x00218780 - 0x30070209 0xc4100780 0x30060205 0xc4100780 - 0x20018404 0x2101ee04 0x20000805 0x04004780 - 0xd00e0205 0x80c00780 0x00000805 0xc0000780 + 0x10015003 0x00000280 0xa0004e09 0x04200780 + 0x1000d205 0x0423c780 0x30010405 0xe4000780 + 0x4001d405 0x00218780 0x30050209 0xc4100780 + 0x30040205 0xc4100780 0x20018404 0x20018604 + 0x30020205 0xc4100780 0x2000ce05 0x04204780 + 0xd00e0205 0x80c00780 0x00020605 0xc0000780 0x04061601 0xe4204780 0x307c07fd 0x6c0147ca 0xa002d003 0x00000000 0x1002d003 0x00000280 - 0x10018019 0x00000003 0x1000d205 0x0423c780 - 0xa0004c09 0x04200780 0x30010c19 0xc4000780 + 0x10018015 0x00000003 0x1000d205 0x0423c780 + 0xa0004c09 0x04200780 0x30010a15 0xc4000780 0x40608405 0x0000001f 0xa0004e09 0x04200780 - 0x203f8c19 0x0fffffff 0x00067801 0xe4204780 - 0xd019e009 0x20000780 0xd0060409 0x04000780 + 0x203f8a15 0x0fffffff 0x00067801 0xe4204780 + 0xd019e009 0x20000780 0xd0050409 0x04000780 0xd0186005 0x20000780 0x1800c005 0x0423c780 0x6402cc05 0x80204780 0x1400cc09 0x0423c780 0x00067c01 0xe4204780 0x1900e004 0x2501e004 - 0x00067e01 0xe4204780 0x2120f019 0x0000001f - 0x3800c005 0x04208780 0x30060205 0xac000780 + 0x00067e01 0xe4204780 0x2120f015 0x0000001f + 0x3800c005 0x04208780 0x30050205 0xac000780 0x00067a01 0xe4204780 0xf0000001 0xe0000002 0x861ffe03 0x00000000 0xd019e805 0x20000780 0x3403c1fd 0x6c20c7c8 0xa003f003 0x00000000 0x1003e003 0x00000280 0xd019f005 0x20000780 0x2503e204 0x2503e008 0x30020205 0xc4100780 - 0x30020419 0xc4100780 0x2000ca05 0x04204780 - 0xd00e0209 0x80c00780 0x2000cc05 0x04218780 + 0x30020415 0xc4100780 0x2000ca05 0x04204780 + 0xd00e0209 0x80c00780 0x2000cc05 0x04214780 0xd00e0205 0x80c00780 0xa0000409 0x44014780 0xc0010405 0x00000780 0x1003f003 0x00000780 - 0x1000f805 0x0403c780 0x00000805 0xc0000782 + 0x1000f805 0x0403c780 0x00020605 0xc0000782 0x04001601 0xe4204780 0xd019e805 0x20000780 0x20008605 0x00000013 0x3401c1fd 0x6c20c7c8 - 0x00020205 0xc0000780 0xa0055003 0x00000000 - 0x10054003 0x00000280 0xd019f009 0x20000780 - 0x2903e204 0x2903e008 0x20008205 0x00000013 - 0x20008409 0x00000013 0x30020205 0xc4100780 - 0x30020419 0xc4100780 0x2000ca05 0x04204780 - 0xd00e0209 0x80c00780 0x2000cc05 0x04218780 + 0xa0053003 0x00000000 0x10052003 0x00000280 + 0xd019f005 0x20000780 0x2503e204 0x2503e008 + 0x30020205 0xc4100780 0x30020409 0xc4100780 + 0x2101ea04 0x2102ec14 0x20008205 0x00000043 + 0xd00e0209 0x80c00780 0x20008a05 0x00000043 0xd00e0205 0x80c00780 0xa0000409 0x44014780 - 0xc0010405 0x00000780 0x10055003 0x00000780 - 0x1000f805 0x0403c780 0x04001601 0xe4204782 - 0x861ffe03 0x00000000 0x3000d1fd 0x6c2047c8 - 0xa008f003 0x00000000 0x1008f003 0x00000280 - 0x307c0bfd 0x640087c8 0x404f8a09 0x00000003 - 0x20000405 0x04000780 0x00020209 0xc0000780 - 0x00020405 0xc0000780 0x1900f814 0x1900f604 - 0xc405d815 0x00200780 0xe401d615 0x00214780 - 0x1800da05 0x0423c780 0xe401da15 0x00214780 - 0x1800dc05 0x0423c780 0xe401dc15 0x00214780 - 0x1800de05 0x0423c780 0xe401de15 0x00214780 - 0x1800e005 0x0423c780 0xe401e015 0x00214780 - 0x1800e205 0x0423c780 0xe401e215 0x00214780 - 0x1800e405 0x0423c780 0xe401e415 0x00214780 - 0x1800e605 0x0423c780 0xe401e615 0x00214780 - 0x1800e805 0x0423c780 0xe401e815 0x00214780 - 0x1800ea05 0x0423c780 0xe401ea15 0x00214780 - 0x1800ec05 0x0423c780 0xe401ec15 0x00214780 - 0x1800ee05 0x0423c780 0xe401ee15 0x00214780 - 0x1800f005 0x0423c780 0xe401f015 0x00214780 - 0x1800f205 0x0423c780 0xe401f205 0x00214780 - 0x00000805 0xc0000780 0x04041601 0xe4204780 - 0xd4105809 0x20000780 0x1900f004 0xb9016004 - 0xb800e005 0x00204780 0xb800f005 0x00204780 - 0x04041601 0xe4204780 0x1900e404 0xb9016004 - 0xb9016804 0xb9016c04 0x04041601 0xe4204780 - 0x00000805 0xc0000680 0xd4105809 0x20000680 - 0x1800c205 0x0423c680 0x00020005 0xc0000680 - 0xb800c005 0x00204680 0x04063601 0xe4204680 - 0x20088001 0x00000003 0x3000d1fd 0x6c2187d8 - 0x1005c003 0x00001280 0xf0000001 0xe0000002 - 0x861ffe03 0x00000000 0x3003d1fd 0x6c2047c8 - 0x30000003 0x00000280 0xa0004e01 0x04200780 - 0xa0004805 0x04200780 0x40010005 0x00018780 - 0xa0004c01 0x04200780 0x20000001 0x04004780 - 0x2101f005 0x00000003 0x00000805 0xc0000780 - 0x60010001 0x8000c780 0xd418d805 0x20000780 - 0x30020005 0xc4100780 0x1500e000 0x2101e804 - 0xd00e0201 0xa0c00781 + 0xc0010405 0x00000780 0x10053003 0x00000780 + 0x1000f805 0x0403c780 0x00020605 0xc0000782 + 0x04021601 0xe4204780 0x861ffe03 0x00000000 + 0x3000d1fd 0x6c2047c8 0xa008e003 0x00000000 + 0x1008e003 0x00000280 0x307c09fd 0x640087c8 + 0x404f8809 0x00000003 0x20000405 0x04000780 + 0x00020209 0xc0000780 0x00020405 0xc0000780 + 0x1900f810 0x1900f604 0xc404d811 0x00200780 + 0xe401d611 0x00210780 0x1800da05 0x0423c780 + 0xe401da11 0x00210780 0x1800dc05 0x0423c780 + 0xe401dc11 0x00210780 0x1800de05 0x0423c780 + 0xe401de11 0x00210780 0x1800e005 0x0423c780 + 0xe401e011 0x00210780 0x1800e205 0x0423c780 + 0xe401e211 0x00210780 0x1800e405 0x0423c780 + 0xe401e411 0x00210780 0x1800e605 0x0423c780 + 0xe401e611 0x00210780 0x1800e805 0x0423c780 + 0xe401e811 0x00210780 0x1800ea05 0x0423c780 + 0xe401ea11 0x00210780 0x1800ec05 0x0423c780 + 0xe401ec11 0x00210780 0x1800ee05 0x0423c780 + 0xe401ee11 0x00210780 0x1800f005 0x0423c780 + 0xe401f011 0x00210780 0x1800f205 0x0423c780 + 0xe401f205 0x00210780 0x00020605 0xc0000780 + 0x04041601 0xe4204780 0xd4105809 0x20000780 + 0x1900f004 0xb9016004 0xb800e005 0x00204780 + 0xb800f005 0x00204780 0x04041601 0xe4204780 + 0x1900e404 0xb9016004 0xb9016804 0xb9016c04 + 0x04041601 0xe4204780 0x00020605 0xc0000680 + 0xd4105809 0x20000680 0x1800c205 0x0423c680 + 0x00020005 0xc0000680 0xb800c005 0x00204680 + 0x04063601 0xe4204680 0x20088001 0x00000003 + 0x3000d1fd 0x6c2187d8 0x1005b003 0x00001280 + 0xf0000001 0xe0000002 0x861ffe03 0x00000000 + 0x3003d1fd 0x6c2047c8 0x30000003 0x00000280 + 0xa0004e01 0x04200780 0xa0004805 0x04200780 + 0x40010005 0x00018780 0xa0004c01 0x04200780 + 0x20000001 0x04004780 0x2101f005 0x00000003 + 0x00020605 0xc0000780 0x60010001 0x8000c780 + 0xd418d805 0x20000780 0x30020005 0xc4100780 + 0x1500e000 0x2101e804 0xd00e0201 0xa0c00781 } } code { @@ -499,11 +496,11 @@ code { 0x1000ca05 0x0423c780 0xa0000009 0x04000780 0x30010401 0xe40007d0 0x307c01fd 0x640087c8 0xa0014003 0x00000000 0x10013003 0x00001680 - 0x2101ea05 0x00000003 0x100f8001 0x00000003 - 0x30010001 0xc4000780 0x40014e11 0x00200780 + 0x2101ea01 0x00000003 0x100f8005 0x00000003 + 0x30000205 0xc4000780 0x40034e11 0x00200780 0xa0004c0d 0x04200780 0x30100811 0xc4100780 - 0x30010605 0xc4000780 0x60004e01 0x00210780 - 0x20018000 0x20008400 0x30020001 0xc4100780 + 0x30000601 0xc4000780 0x60024e05 0x00210780 + 0x20008200 0x20008400 0x30020001 0xc4100780 0x2000c801 0x04200780 0xd00e000d 0x80c00780 0x10014003 0x00000780 0x1000f80d 0x0403c780 0xa0004205 0x04200782 0x1100ea00 0x20018410 @@ -552,9 +549,9 @@ code { 0x30040001 0xc4000780 0x40014e19 0x00200780 0xa0004c15 0x04200780 0x30100c19 0xc4100780 0x30040a11 0xc4000780 0x60004e01 0x00218780 - 0x20048000 0x20008600 0x2003820c 0x20008200 - 0x20038404 0x20008400 0x00020205 0xc0000780 - 0x30020005 0xc4100780 0x1500ec00 0x2101e804 + 0x20048000 0x20008610 0x20038200 0x20048204 + 0x20008400 0x20018404 0x00020005 0xc0000780 + 0x30020205 0xc4100780 0x1500ec00 0x2101e804 0xd00e0201 0xa0c00781 } } @@ -574,87 +571,90 @@ code { } } bincode { - 0xd0800205 0x00400780 0xa0000019 0x04000780 - 0xa0000215 0x04000780 0x30810dfd 0x644107c8 - 0xa0013003 0x00000000 0x30060a01 0xc4100780 - 0x10013003 0x00000280 0xa0004e05 0x04200780 - 0xa0004409 0x04200780 0x40428204 0x20018a04 - 0x30070209 0xc4100780 0x30060205 0xc4100780 - 0x20000409 0x04004780 0x30020c05 0xc4100780 - 0x2102ec0c 0x20018008 0x20000205 0x0400c780 - 0xd00e0205 0x80c00780 0x00000405 0xc0000780 - 0x04045201 0xe4204780 0x00000005 0xc0000782 - 0xd4114809 0x20000780 0x3806c1fd 0x6420c7c8 - 0xa0025003 0x00000000 0x1800c001 0x0423c780 - 0x10024003 0x00000280 0xa0004e05 0x04200780 - 0xa0004409 0x04200780 0x40428204 0x20018a04 - 0x30070209 0xc4100780 0x30060205 0xc4100780 - 0x20000405 0x04004780 0x30020c09 0xc4100780 - 0x2101ec04 0x20018404 0x20008205 0x00000007 - 0xd00e0205 0x80c00780 0x10025003 0x00000780 - 0x1000f805 0x0403c780 0x30050a09 0xc4100782 - 0x2000041d 0x040187c0 0x00020e09 0xc0000780 - 0x08055201 0xe4204780 0xa0036003 0x00000000 - 0x10036003 0x00000280 0xa0004c05 0x04200780 - 0x4001d005 0x00218780 0x00075201 0xe4204780 - 0xd01d480d 0x20000780 0xd0115009 0x20000780 - 0x1100f004 0x1d00e008 0x2101ee0c 0x2942ec04 - 0x30030205 0xac000780 0x00075401 0xe4204780 - 0x1d00e004 0x2901e004 0x00075601 0xe4204780 - 0xf0000001 0xe0000002 0x861ffe03 0x00000000 - 0xd01d5009 0x20000780 0x3807c1fd 0x6c20c7c8 - 0xa0046003 0x00000000 0x10046003 0x00000280 - 0xd01d5809 0x20000780 0x2800c005 0x0421c780 - 0x30020205 0xc4100780 0xd011a009 0x20000780 - 0x2000ca05 0x04204780 0xd00e0209 0x80c00780 - 0x1800c005 0x0423c780 0x30010405 0xec000780 - 0x00020e09 0xc0000780 0x08001201 0xe4204780 - 0xd01d5009 0x20000782 0x2000d005 0x0421c780 - 0x3801c1fd 0x6c20c7c8 0x00020209 0xc0000780 - 0xa0055003 0x00000000 0x10055003 0x00000280 - 0xd01d580d 0x20000780 0x2d07e004 0x2101f004 - 0x30020205 0xc4100780 0xd011a00d 0x20000780 - 0x2000ca05 0x04204780 0xd00e0209 0x80c00780 - 0x1c00c005 0x0423c780 0x30010405 0xec000780 - 0x08001201 0xe4204780 0xf0000001 0xe0000002 + 0xa0000011 0x04000780 0xd0800201 0x00400780 + 0x308109fd 0x644107c8 0xa0012003 0x00000000 + 0xa0000015 0x04000780 0x10012003 0x00000280 + 0xa0004e01 0x04200780 0xa0004405 0x04200780 + 0x40418000 0x20008a00 0x30050005 0xc4100780 + 0x30040001 0xc4100780 0x20008200 0x20008800 + 0x30040a05 0xc4100780 0x30020001 0xc4100780 + 0x20018804 0x2100ec00 0xd00e0001 0x80c00780 + 0x00020205 0xc0000780 0x04045201 0xe4200780 + 0x00060a05 0xc0000782 0xd4114809 0x20000780 + 0x3804c1fd 0x6420c7c8 0xa0024003 0x00000000 + 0x1800c001 0x0423c780 0x10023003 0x00000280 + 0xa0004e05 0x04200780 0xa0004409 0x04200780 + 0x40428204 0x20018a04 0x30050209 0xc4100780 + 0x30040205 0xc4100780 0x20018404 0x20018804 + 0x30020205 0xc4100780 0x2000cc05 0x04204780 + 0x20008205 0x00000007 0xd00e0205 0x80c00780 + 0x10024003 0x00000780 0x1000f805 0x0403c780 + 0x30050a09 0xc4100782 0x20000419 0x040107c0 + 0x00020c09 0xc0000780 0x08055201 0xe4204780 + 0xa0035003 0x00000000 0x10035003 0x00000280 + 0xa0004c05 0x04200780 0x4001d005 0x00218780 + 0x00075201 0xe4204780 0xd01d480d 0x20000780 + 0xd0115009 0x20000780 0x1100f004 0x1d00e008 + 0x2101ee0c 0x2942ec04 0x30030205 0xac000780 + 0x00075401 0xe4204780 0x1d00e004 0x2901e004 + 0x00075601 0xe4204780 0xf0000001 0xe0000002 0x861ffe03 0x00000000 0xd01d5009 0x20000780 - 0x2840c005 0x04200780 0x3001d005 0xac200780 - 0x307c0205 0x8c000780 0x300603fd 0x6c00c7c8 - 0xa0088003 0x00000000 0x1000f821 0x0403c780 - 0x10088003 0x00000280 0x20000025 0x04018780 - 0x20098c09 0x00000003 0x2009920d 0x00000003 - 0x20000029 0x04004780 0x0002040d 0xc0000780 - 0x00020611 0xc0000780 0x00070a09 0xc0000780 - 0xd8154809 0x20000780 0x1900e204 0x1900e60c - 0x1900e000 0x1900e408 0x4d41e204 0x4d43e60c - 0x6c00c001 0x80204780 0x6c02c405 0x8020c780 - 0x20018004 0x1900e800 0x6c00c805 0x80204780 - 0x1800ca01 0x0423c780 0x6c00ca31 0x80204780 - 0x1900ee2c 0x1900ec10 0x1900f004 0x1900f200 - 0x1900f60c 0x1900f408 0x4c0bce2d 0x00218780 - 0xd4115809 0x20000780 0x6c04cc2d 0x8022c780 - 0x1900e010 0x200b982c 0x6c01d005 0x8022c780 - 0x4c03d60d 0x00218780 0x6c00d201 0x80204780 - 0x6c02d405 0x8020c780 0x20000001 0x04004780 - 0x30040001 0xec000780 0x2040c001 0x04200784 + 0x3806c1fd 0x6c20c7c8 0xa0045003 0x00000000 + 0x10045003 0x00000280 0xd01d5809 0x20000780 + 0x2800c005 0x04218780 0x30020205 0xc4100780 + 0xd011a009 0x20000780 0x2000ca05 0x04204780 + 0xd00e0209 0x80c00780 0x1800c005 0x0423c780 + 0x30010405 0xec000780 0x00020c09 0xc0000780 + 0x08001201 0xe4204780 0xd01d5009 0x20000782 + 0x2000d005 0x04218780 0x3801c1fd 0x6c20c7c8 + 0x00020209 0xc0000780 0xa0054003 0x00000000 + 0x10054003 0x00000280 0xd01d580d 0x20000780 + 0x2d06e004 0x2101f004 0x30020205 0xc4100780 + 0xd011a00d 0x20000780 0x2000ca05 0x04204780 + 0xd00e0209 0x80c00780 0x1c00c005 0x0423c780 + 0x30010405 0xec000780 0x08001201 0xe4204780 + 0xf0000001 0xe0000002 0x861ffe03 0x00000000 + 0xd01d5009 0x20000780 0x2840c005 0x04200780 + 0x3001d005 0xac200780 0x307c0205 0x8c000780 + 0x300403fd 0x6c00c7c8 0xa008f003 0x00000000 + 0x1000f81d 0x0403c780 0x1008f003 0x00000280 + 0x30020009 0xc4100780 0x30020801 0xc4100780 + 0x20000009 0x04008780 0x20248409 0x00000003 + 0x30020205 0xc4100780 0x0000040d 0xc0000780 + 0x20248225 0x00000003 0x20248021 0x00000003 + 0x00070a09 0xc0000780 0xd8154811 0x20000780 + 0x00001009 0xc0000780 0x1000c205 0x0423c784 + 0x1000c60d 0x0423c784 0x1000c001 0x0423c784 + 0x1000c409 0x0423c784 0x4941e204 0x4943e60c + 0x6800c001 0x80204780 0x6802c405 0x8020c780 + 0x20000005 0x04004780 0x1000c801 0x0423c784 + 0x6800c805 0x80204780 0x1000ca01 0x0423c784 + 0x6800ca31 0x80204780 0x1000ce2d 0x0423c784 + 0x1000cc29 0x0423c784 0x1000d005 0x0423c784 + 0x1000d201 0x0423c784 0x1000d60d 0x0423c784 + 0x1000d409 0x0423c784 0x480bce2d 0x00218780 + 0x680acc29 0x8022c780 0x20001829 0x04028780 + 0x6801d005 0x80228780 0x4803d60d 0x00218780 + 0x6800d201 0x80204780 0x6802d405 0x8020c780 + 0xd4115809 0x20000780 0x20018004 0x1900e000 + 0x30000201 0xec000780 0x2c40c001 0x04200780 0x301f0005 0xec100780 0x30010001 0xc4100780 - 0xd0000201 0x04008780 0x20209225 0x00000003 - 0x30820001 0xac400780 0x300a13fd 0x6c0047c8 - 0x20001021 0x04000780 0xdc01000d 0x20000780 - 0xd0010011 0x20000784 0x10065003 0x00000280 - 0x00020e05 0xc0000782 0x04025201 0xe4220780 - 0xd4094809 0x20000780 0x1800d001 0x0423c780 - 0x1800f005 0x0423c780 0x2800c001 0x04200780 - 0x2800e005 0x04204780 0x20000001 0x04004780 - 0x04025201 0xe4200780 0x1900e400 0x1900ec04 - 0x2900e000 0x2901e804 0x20000001 0x04004780 - 0x307c0dfd 0x640147c8 0x04025201 0xe4200780 - 0x30000003 0x00000280 0x10004401 0x0023c780 - 0x60004e05 0x00214780 0x00020e05 0xc0000780 - 0xa0004c01 0x04200780 0x30060205 0xc4100780 - 0xd4094805 0x20000780 0x20018004 0x1500e200 - 0x30020205 0xc4100780 0x2500e008 0x2101e800 - 0xd00e0009 0xa0c00781 + 0xd0000201 0x04008780 0x20009021 0x0000000b + 0x30820001 0xac400780 0x300911fd 0x640047c8 + 0x20000e1d 0x04000780 0xdc01000d 0x20000780 + 0x10066003 0x00000280 0x00020c05 0xc0000782 + 0x04025201 0xe421c780 0xd4094809 0x20000780 + 0x1800d001 0x0423c780 0x1800f005 0x0423c780 + 0x2800c001 0x04200780 0x2800e005 0x04204780 + 0x20000001 0x04004780 0x04025201 0xe4200780 + 0x1900e400 0x1900ec04 0x2900e000 0x2901e804 + 0x20000001 0x04004780 0x307c09fd 0x640147c8 + 0x04025201 0xe4200780 0x30000003 0x00000280 + 0x10004401 0x0023c780 0x60004e05 0x00214780 + 0x00020c05 0xc0000780 0xa0004c01 0x04200780 + 0x30060205 0xc4100780 0xd4094805 0x20000780 + 0x20018004 0x1500e200 0x30020205 0xc4100780 + 0x2500e008 0x2101e800 0xd00e0009 0xa0c00781 } } code { @@ -667,143 +667,132 @@ code { segname = const segnum = 1 offset = 0 - bytes = 36 + bytes = 48 mem { - 0x0000002f 0x0000001f 0x0000007f 0x0000003f - 0xffffffff 0x00000008 0x00000020 0x00000002 - 0x0fffffff + 0x0000002f 0x00000030 0x0000001f 0x0000007f + 0x0000003f 0xffffffff 0x000000c0 0x00000008 + 0x00000020 0x00000002 0x0fffffff 0x00000034 } } bincode { - 0xa000000d 0x04000780 0x308007fd 0x644107c8 - 0xa000d003 0x00000000 0x30020609 0xc4100780 - 0x1000d003 0x00000280 0xa0004e01 0x04200780 - 0x30070005 0xc4100780 0x30060001 0xc4100780 - 0x20008200 0x2100ea00 0x20000401 0x04000780 - 0xd00e0001 0x80c00780 0x00000405 0xc0000780 - 0x04069001 0xe4200780 0x1000ce01 0x0423c782 - 0x10028005 0x00000003 0x30000211 0xc4000780 - 0x300309fd 0x6400c7c8 0xa001c003 0x00000000 - 0x1001b003 0x00000280 0xa0004e01 0x04200780 - 0x2102ee05 0x00000003 0x30010001 0xc4000780 - 0x20008800 0x20008600 0x30020001 0xc4100780 + 0xa0000005 0x04000780 0x308003fd 0x644107c8 + 0x3002020d 0xc4100780 0x60824e01 0x00604500 + 0x30020001 0xc4100500 0x2000ca01 0x04200500 + 0xd00e0001 0x80c00500 0x00000605 0xc0000500 + 0x04069001 0xe4200500 0x1000ce01 0x0423c780 + 0x10028009 0x00000003 0x30000411 0xc4000780 + 0x300109fd 0x6400c7c8 0xa0018003 0x00000000 + 0x10017003 0x00000280 0xa0004e01 0x04200780 + 0x2102ee09 0x00000003 0x30020001 0xc4000780 + 0x20008800 0x20008200 0x30020001 0xc4100780 0x2000cc01 0x04200780 0xd00e0001 0x80c00780 - 0x1001c003 0x00000780 0x1000f801 0x0403c780 - 0x00000405 0xc0000782 0x20008605 0x00000013 - 0x300109fd 0x6400c7c8 0x04001001 0xe4200780 - 0xa002c003 0x00000000 0x1002b003 0x00000280 - 0xa0004e01 0x04200780 0x2102ee05 0x00000003 - 0x30010001 0xc4000780 0x20008800 0x20008600 + 0x10018003 0x00000780 0x1000f801 0x0403c780 + 0x00000605 0xc0000782 0x20008209 0x00000013 + 0x300209fd 0x6400c7c8 0x04001001 0xe4200780 + 0xa0028003 0x00000000 0x10027003 0x00000280 + 0xa0004e01 0x04200780 0x2102ee09 0x00000003 + 0x30020001 0xc4000780 0x20008800 0x20008200 0x30020001 0xc4100780 0x2000cc01 0x04200780 0x20008001 0x00000043 0xd00e0001 0x80c00780 - 0x1002c003 0x00000780 0x1000f801 0x0403c780 - 0x00000405 0xc0000782 0x04021001 0xe4200780 + 0x10028003 0x00000780 0x1000f801 0x0403c780 + 0x00000605 0xc0000782 0x04021001 0xe4200780 0x861ffe03 0x00000000 0x307ccffd 0x6c2047c8 - 0x1000ce01 0x0423c780 0x10076003 0x00000280 - 0x308207fd 0x6440c7e8 0x308307fd 0x6440c7f8 - 0x308107fd 0x6440c7c8 0x307c07fd 0x640087d8 - 0x00000015 0x20001780 0x300007fd 0xe40007d8 - 0x10000e05 0x2440d500 0x30000205 0xc4001500 - 0x20400805 0x04005500 0x20000605 0x04005500 - 0x00020205 0xc0001500 0x1400d005 0x0423d500 - 0x1000f805 0x0403d280 0x00000405 0xc0000780 - 0x04041001 0xe4204780 0x861ffe03 0x00000000 - 0x00000405 0xc0002680 0xd414400d 0x20002680 - 0xd4104009 0x20002680 0x1c00c005 0x0423e680 - 0x2800c005 0x04206680 0x04041001 0xe4206680 - 0x861ffe03 0x00000000 0x00000405 0xc0003680 + 0x1000ce01 0x0423c780 0x10072003 0x00000280 + 0x308303fd 0x6440c7e8 0x308403fd 0x6440c7f8 + 0x308203fd 0x6440c7c8 0x307c03fd 0x640087d8 + 0x00000015 0x20001780 0x300003fd 0xe40007d8 + 0x10001209 0x2440d500 0x30000409 0xc4001500 + 0x20400809 0x04009500 0x20000209 0x04009500 + 0x00020405 0xc0001500 0x1400d009 0x0423d500 + 0x1000f809 0x0403d280 0x00000605 0xc0000780 + 0x04041001 0xe4208780 0x861ffe03 0x00000000 + 0x00000605 0xc0002680 0xd414400d 0x20002680 + 0xd4104009 0x20002680 0x1c00c009 0x0423e680 + 0x2800c009 0x0420a680 0x04041001 0xe420a680 + 0x861ffe03 0x00000000 0x00000605 0xc0003680 0xd412400d 0x20003680 0xd4104009 0x20003680 - 0x1c00c005 0x0423f680 0x2800c005 0x04207680 - 0x04041001 0xe4207680 0x861ffe03 0x00000000 - 0x00000405 0xc0000680 0xd411400d 0x20000680 - 0xd4104009 0x20000680 0x1c00c005 0x0423c680 - 0x2800c005 0x04204680 0x04041001 0xe4204680 - 0x861ffe03 0x00000000 0xa0066003 0x00000000 - 0x10066003 0x00000100 0x00000405 0xc0000780 - 0xd4104009 0x20000780 0x1800e005 0x0423c780 - 0x2800c005 0x04204780 0x04041001 0xe4204780 - 0x1900f004 0x2901e004 0x04041001 0xe4204780 - 0x1900e804 0x2901e004 0x04041001 0xe4204780 - 0x1900e404 0x2901e004 0x04041001 0xe4204780 - 0x1900e204 0x2901e004 0x04041001 0xe4204780 - 0xf0000001 0xe0000002 0xa0070003 0x00000000 - 0x00000a01 0xa00007d0 0x10070003 0x00001100 - 0x10048005 0x00000003 0xd0104005 0x20000780 - 0x30000205 0xc4000780 0x00020009 0xc0000780 - 0x2400c005 0x04204780 0x08061001 0xe4204780 + 0x1c00c009 0x0423f680 0x2800c009 0x0420b680 + 0x04041001 0xe420b680 0x861ffe03 0x00000000 + 0x00000605 0xc0000680 0xd411400d 0x20000680 + 0xd4104009 0x20000680 0x1c00c009 0x0423c680 + 0x2800c009 0x04208680 0x04041001 0xe4208680 + 0x861ffe03 0x00000000 0xa0062003 0x00000000 + 0x10062003 0x00000100 0x00000605 0xc0000780 + 0xd4104009 0x20000780 0x1800e009 0x0423c780 + 0x2800c009 0x04208780 0x04041001 0xe4208780 + 0x1900f008 0x2902e008 0x04041001 0xe4208780 + 0x1900e808 0x2902e008 0x04041001 0xe4208780 + 0x1900e408 0x2902e008 0x04041001 0xe4208780 + 0x1900e208 0x2902e008 0x04041001 0xe4208780 + 0xf0000001 0xe0000002 0xa006c003 0x00000000 + 0x00000a01 0xa00007d0 0x1006c003 0x00001100 + 0x10048009 0x00000003 0xd0104005 0x20000780 + 0x30000409 0xc4000780 0x00020009 0xc0000780 + 0x2400c009 0x04208780 0x08061001 0xe4208780 0xf0000001 0xe0000002 0x861ffe03 0x00000000 - 0x203f8001 0x0fffffff 0x308401fd 0x6c4147d8 - 0x10037003 0x00001280 0x10077003 0x00000780 - 0x308107fd 0x6440c7c8 0xa00eb003 0x00000000 - 0x100eb003 0x00000100 0x00000405 0xc0000780 - 0x3003cffd 0x642187c8 0x04065001 0xe420c780 - 0x00000405 0xc0000500 0x10001001 0x2440c500 - 0x04061001 0xe4200500 0x10001001 0x2440c500 - 0x00000405 0xc0000280 0xd4184005 0x20000280 - 0x1400c001 0x0423c280 0x00000405 0xc0000780 - 0x20108605 0x00000033 0x00020209 0xc0000780 - 0x20088605 0x00000003 0x3800c1fd 0x6c2047c8 - 0x10000605 0x0403c500 0x0002020d 0xc0000780 - 0xdc19400d 0x20000780 0x3800c005 0xac200780 - 0x1c00c001 0x0423c780 0x200c8609 0x00000033 - 0x04065001 0xe4200780 0x00020409 0xc0000780 - 0x04061001 0xe4204780 0x20048601 0x00000003 - 0x3801c1fd 0x6c2047c8 0x10000601 0x0403c500 - 0x0002000d 0xc0000780 0xdc19400d 0x20000780 - 0x3801c005 0xac200780 0x1c00c001 0x0423c780 - 0x200a8609 0x00000033 0x04065001 0xe4200780 - 0x00020409 0xc0000780 0x04061001 0xe4204780 - 0x20028601 0x00000003 0x3801c1fd 0x6c2047c8 - 0x10000601 0x0403c500 0x0002000d 0xc0000780 - 0xdc19400d 0x20000780 0x3801c005 0xac200780 - 0x1c00c001 0x0423c780 0x20098609 0x00000033 - 0x04065001 0xe4200780 0x00020409 0xc0000780 - 0x04061001 0xe4204780 0x20018601 0x00000003 - 0x3801c1fd 0x6c2047c8 0x10000601 0x0403c500 - 0x0002000d 0xc0000780 0xdc19400d 0x20000780 - 0x3801c015 0xac200780 0x1c00c001 0x0423c780 - 0x307c0605 0x640087d0 0x04065001 0xe4200780 - 0xa00003fd 0x0c0147c8 0xa00bc003 0x00000000 - 0x04061001 0xe4214780 0x100bc003 0x00001100 - 0xa0004e01 0x04200780 0x30070005 0xc4100780 - 0x30060001 0xc4100780 0x20000201 0x04000780 - 0xd0194005 0x20000780 0x2100ea04 0x1500e000 - 0x20348205 0x00000003 0xd00e0201 0xa0c00780 - 0xf0000001 0xe0000002 0x100eb003 0x00000100 - 0xd01a6805 0x20000780 0x1400cc01 0x0423c780 - 0x3485c1fd 0x6c6147c8 0x2440c201 0x04200780 - 0x100cc003 0x00000280 0xd01a4005 0x20000780 - 0x1400c005 0x0423c780 0x40030009 0x00000780 - 0x60020209 0x00008780 0x30100409 0xc4100780 - 0x60020001 0x00008780 0x20000001 0x04014780 - 0x20068001 0x00000003 0x100e5003 0x00000780 - 0xd01a6805 0x20000780 0x3486c1fd 0x6c6147c8 - 0x100dc003 0x00000280 0xd01a4005 0x20000780 - 0x1400c009 0x0423c780 0x1400c605 0x0423c780 - 0x4005001c 0x40040618 0x6004021d 0x0001c780 - 0x60050419 0x00018780 0x30100e1d 0xc4100780 - 0x30100c19 0xc4100780 0x6004001d 0x0001c780 - 0x60040401 0x00018780 0x20058e04 0x20018000 - 0x200f8009 0x00000003 0x100e4003 0x00000780 - 0xd01a6805 0x20000780 0x1400c405 0x0423c780 - 0x40030009 0x00000780 0x60020215 0x00008780 - 0x10000009 0x0403c780 0x347cc1fd 0x6c2147c8 - 0x30100a15 0xc4100780 0x60020009 0x00014280 - 0x10000401 0x0403c780 0xa0004e05 0x04200780 - 0x30070209 0xc4100780 0x30060205 0xc4100780 - 0x20018404 0x2101ea04 0x20108205 0x00000003 - 0xd00e0201 0xa0c00780 0xf0000001 0xe0000002 - 0x861ffe03 0x00000000 0xd0194005 0x20000780 - 0x1400c001 0x0423c780 0x300007fd 0xe40007c8 - 0x30000003 0x00000280 0xa0004e05 0x04200780 - 0x2102ee01 0x00000003 0xd0194005 0x20000780 - 0x10028015 0x00000003 0x30000209 0xc4000780 - 0x1500e000 0x20028808 0x30000a11 0xc4000780 - 0x1100ee00 0x20448408 0x30000201 0xc4000780 - 0x20028604 0x20008600 0x30020205 0xc4100780 - 0x30020009 0xc4100780 0x2000cc01 0x04204780 - 0xd00e0001 0x80c00780 0x2000c805 0x04208780 - 0xd00e0201 0xa0c00781 + 0x203f8001 0x0fffffff 0x308501fd 0x6c4147d8 + 0x10033003 0x00001280 0x10073003 0x00000780 + 0x308203fd 0x6440c7c8 0xa00d6003 0x00000000 + 0x100d6003 0x00000100 0x00000605 0xc0000780 + 0x3001cffd 0x642187c8 0x04065001 0xe4204780 + 0x00000605 0xc0000500 0x10001401 0x2440c500 + 0x04061001 0xe4200500 0x10001401 0x2440c500 + 0x00000605 0xc0000280 0xd4184005 0x20000280 + 0x1400c001 0x0423c280 0x00000605 0xc0000780 + 0xd4184809 0x20000780 0x20208615 0x000000cb + 0x20008609 0x000000cf 0x3800cffd 0x6c2047c8 + 0x10000a09 0x0403c500 0x0000040d 0xc0000780 + 0x3800ce09 0xac200780 0x1c00c001 0x0423c780 + 0x04065001 0xe4200780 0x04061001 0xe4208780 + 0x20308601 0x000000cb 0x3802c7fd 0x6c2047c8 + 0x10000a01 0x0403c500 0x0000000d 0xc0000780 + 0x3802c609 0xac200780 0x1c00c001 0x0423c780 + 0x04065001 0xe4200780 0x04061001 0xe4208780 + 0x20288601 0x000000cb 0x3802c3fd 0x6c2047c8 + 0x10000a01 0x0403c500 0x0000000d 0xc0000780 + 0x3802c209 0xac200780 0x1c00c001 0x0423c780 + 0x04065001 0xe4200780 0x04061001 0xe4208780 + 0x20248601 0x000000cb 0x3802c1fd 0x6c2047c8 + 0x10000a01 0x0403c500 0x0000000d 0xc0000780 + 0x3802c015 0xac200780 0x1c00c001 0x0423c780 + 0x307c0209 0x640087d0 0x04065001 0xe4200780 + 0xa00005fd 0x0c0147c8 0x04061001 0xe4214780 + 0x1000ca01 0x0423d680 0xd0194005 0x20000780 + 0x608c4e01 0x00601680 0x1400c009 0x0423d680 + 0x21000001 0x0442d680 0xd00e0009 0xa0c01680 + 0x100d6003 0x00000100 0xd01a6805 0x20000780 + 0x1400cc01 0x0423c780 0x3487c1fd 0x6c6147c8 + 0x2440c201 0x04200780 0x100b9003 0x00000280 + 0xd01a4005 0x20000780 0x1400c009 0x0423c780 + 0x4005000d 0x00000780 0x6004020d 0x0000c780 + 0x3010060d 0xc4100780 0x60040001 0x0000c780 + 0x20000001 0x04014780 0x20068001 0x00000003 + 0x100d2003 0x00000780 0xd01a6805 0x20000780 + 0x3488c1fd 0x6c6147c8 0x100c9003 0x00000280 + 0xd01a4005 0x20000780 0x1400c00d 0x0423c780 + 0x1400c609 0x0423c780 0x4007001c 0x40060a18 + 0x6006021d 0x0001c780 0x60070819 0x00018780 + 0x30100e1d 0xc4100780 0x30100c19 0xc4100780 + 0x6006001d 0x0001c780 0x60060801 0x00018780 + 0x20058e08 0x20028000 0x200f800d 0x00000003 + 0x100d1003 0x00000780 0xd01a6805 0x20000780 + 0x1400c409 0x0423c780 0x4005000d 0x00000780 + 0x60040215 0x0000c780 0x1000000d 0x0403c780 + 0x347cc1fd 0x6c2147c8 0x30100a15 0xc4100780 + 0x6004000d 0x00014280 0x10000601 0x0403c780 + 0x1000ca09 0x0423c780 0x61002e09 0x0000000f + 0x20108409 0x00000003 0xd00e0401 0xa0c00780 + 0xf0000001 0xe0000002 0x861ffe03 0x00000000 + 0xd0194005 0x20000780 0x1400c001 0x0423c780 + 0x300003fd 0xe40007c8 0x30000003 0x00000280 + 0xa0004e09 0x04200780 0x2102ee01 0x00000003 + 0xd0194005 0x20000780 0x10028015 0x00000003 + 0x3000040d 0xc4000780 0x1500e000 0x2003880c + 0x30000a11 0xc4000780 0x1100ee00 0x2044860c + 0x30000409 0xc4000780 0x20038200 0x20028204 + 0x30020001 0xc4100780 0x30020205 0xc4100780 + 0x2000cc01 0x04200780 0xd00e0001 0x80c00780 + 0x2000c805 0x04204780 0xd00e0201 0xa0c00781 } } code { @@ -822,91 +811,93 @@ code { } } bincode { - 0xd0800205 0x00400780 0xa0000019 0x04000780 - 0xa0000215 0x04000780 0x30810dfd 0x644107c8 - 0xa0013003 0x00000000 0x30060a01 0xc4100780 - 0x10013003 0x00000280 0xa0004e05 0x04200780 - 0xa0004409 0x04200780 0x40428204 0x20018a04 - 0x30070209 0xc4100780 0x30060205 0xc4100780 - 0x20000409 0x04004780 0x30020c05 0xc4100780 - 0x2102ec0c 0x20018008 0x20000205 0x0400c780 - 0xd00e0205 0x80c00780 0x00000405 0xc0000780 - 0x04045201 0xe4204780 0x00000005 0xc0000782 - 0xd4114809 0x20000780 0x3806c1fd 0x6420c7c8 - 0xa0025003 0x00000000 0x1800c001 0x0423c780 - 0x10024003 0x00000280 0xa0004e05 0x04200780 - 0xa0004409 0x04200780 0x40428204 0x20018a04 - 0x30070209 0xc4100780 0x30060205 0xc4100780 - 0x20000405 0x04004780 0x30020c09 0xc4100780 - 0x2101ec04 0x20018404 0x20008205 0x00000007 - 0xd00e0205 0x80c00780 0x10025003 0x00000780 - 0x1000f805 0x0403c780 0x30050a09 0xc4100782 - 0x2000041d 0x040187c0 0x00020e09 0xc0000780 - 0x08055201 0xe4204780 0xa0036003 0x00000000 - 0x10036003 0x00000280 0xa0004c05 0x04200780 - 0x4001d005 0x00218780 0x00075201 0xe4204780 - 0xd01d480d 0x20000780 0xd0115009 0x20000780 - 0x1100f004 0x1d00e008 0x2101ee0c 0x2942ec04 - 0x30030205 0xac000780 0x00075401 0xe4204780 - 0x1d00e004 0x2901e004 0x00075601 0xe4204780 - 0xf0000001 0xe0000002 0x861ffe03 0x00000000 - 0xd01d5009 0x20000780 0x3807c1fd 0x6c20c7c8 - 0xa0046003 0x00000000 0x10046003 0x00000280 - 0xd01d5809 0x20000780 0x2800c005 0x0421c780 - 0x30020205 0xc4100780 0xd011a009 0x20000780 - 0x2000ca05 0x04204780 0xd00e0209 0x80c00780 - 0x1800c005 0x0423c780 0x30010405 0xec000780 - 0x00020e09 0xc0000780 0x08001201 0xe4204780 - 0xd01d5009 0x20000782 0x2000d005 0x0421c780 - 0x3801c1fd 0x6c20c7c8 0x00020209 0xc0000780 - 0xa0055003 0x00000000 0x10055003 0x00000280 - 0xd01d580d 0x20000780 0x2d07e004 0x2101f004 - 0x30020205 0xc4100780 0xd011a00d 0x20000780 - 0x2000ca05 0x04204780 0xd00e0209 0x80c00780 - 0x1c00c005 0x0423c780 0x30010405 0xec000780 - 0x08001201 0xe4204780 0xf0000001 0xe0000002 + 0xa0000011 0x04000780 0xd0800201 0x00400780 + 0x308109fd 0x644107c8 0xa0012003 0x00000000 + 0xa0000015 0x04000780 0x10012003 0x00000280 + 0xa0004e01 0x04200780 0xa0004405 0x04200780 + 0x40418000 0x20008a00 0x30050005 0xc4100780 + 0x30040001 0xc4100780 0x20008200 0x20008800 + 0x30040a05 0xc4100780 0x30020001 0xc4100780 + 0x20018804 0x2100ec00 0xd00e0001 0x80c00780 + 0x00020205 0xc0000780 0x04045201 0xe4200780 + 0x00060a05 0xc0000782 0xd4114809 0x20000780 + 0x3804c1fd 0x6420c7c8 0xa0024003 0x00000000 + 0x1800c001 0x0423c780 0x10023003 0x00000280 + 0xa0004e05 0x04200780 0xa0004409 0x04200780 + 0x40428204 0x20018a04 0x30050209 0xc4100780 + 0x30040205 0xc4100780 0x20018404 0x20018804 + 0x30020205 0xc4100780 0x2000cc05 0x04204780 + 0x20008205 0x00000007 0xd00e0205 0x80c00780 + 0x10024003 0x00000780 0x1000f805 0x0403c780 + 0x30050a09 0xc4100782 0x20000419 0x040107c0 + 0x00020c09 0xc0000780 0x08055201 0xe4204780 + 0xa0035003 0x00000000 0x10035003 0x00000280 + 0xa0004c05 0x04200780 0x4001d005 0x00218780 + 0x00075201 0xe4204780 0xd01d480d 0x20000780 + 0xd0115009 0x20000780 0x1100f004 0x1d00e008 + 0x2101ee0c 0x2942ec04 0x30030205 0xac000780 + 0x00075401 0xe4204780 0x1d00e004 0x2901e004 + 0x00075601 0xe4204780 0xf0000001 0xe0000002 0x861ffe03 0x00000000 0xd01d5009 0x20000780 - 0x2840c005 0x04200780 0x3001d005 0xac200780 - 0x307c0205 0x8c000780 0x300603fd 0x6c00c7c8 - 0xa0082003 0x00000000 0x1000f821 0x0403c780 - 0x10082003 0x00000280 0x20000025 0x04018780 - 0x20098c09 0x00000003 0x2009920d 0x00000003 - 0x20000029 0x04004780 0x0002040d 0xc0000780 - 0x00020611 0xc0000780 0x00070a09 0xc0000780 - 0xd8154809 0x20000780 0x1900e204 0x1900e000 - 0x4c01c205 0x00218780 0x6c00c031 0x80204780 - 0x1900e62c 0x1900e410 0x1900e804 0x1900ea00 - 0x1900ee0c 0x1900ec08 0x4c0bc62d 0x00218780 - 0xd4115809 0x20000780 0x6c04c42d 0x8022c780 - 0x1900e010 0x200b982c 0x6c01c805 0x8022c780 - 0x4c03ce0d 0x00218780 0x6c00ca01 0x80204780 - 0x6c02cc05 0x8020c780 0x20000001 0x04004780 - 0x30040001 0xec000780 0x2040c001 0x04200784 + 0x3806c1fd 0x6c20c7c8 0xa0045003 0x00000000 + 0x10045003 0x00000280 0xd01d5809 0x20000780 + 0x2800c005 0x04218780 0x30020205 0xc4100780 + 0xd011a009 0x20000780 0x2000ca05 0x04204780 + 0xd00e0209 0x80c00780 0x1800c005 0x0423c780 + 0x30010405 0xec000780 0x00020c09 0xc0000780 + 0x08001201 0xe4204780 0xd01d5009 0x20000782 + 0x2000d005 0x04218780 0x3801c1fd 0x6c20c7c8 + 0x00020209 0xc0000780 0xa0054003 0x00000000 + 0x10054003 0x00000280 0xd01d580d 0x20000780 + 0x2d06e004 0x2101f004 0x30020205 0xc4100780 + 0xd011a00d 0x20000780 0x2000ca05 0x04204780 + 0xd00e0209 0x80c00780 0x1c00c005 0x0423c780 + 0x30010405 0xec000780 0x08001201 0xe4204780 + 0xf0000001 0xe0000002 0x861ffe03 0x00000000 + 0xd01d5009 0x20000780 0x2840c005 0x04200780 + 0x3001d005 0xac200780 0x307c0205 0x8c000780 + 0x300403fd 0x6c00c7c8 0xa0087003 0x00000000 + 0x1000f825 0x0403c780 0x10087003 0x00000280 + 0x30020009 0xc4100780 0x30020801 0xc4100780 + 0x20000009 0x04008780 0x20248409 0x00000003 + 0x30020205 0xc4100780 0x0000040d 0xc0000780 + 0x2024822d 0x00000003 0x20248029 0x00000003 + 0x00070a09 0xc0000780 0xd8154811 0x20000780 + 0x00001409 0xc0000780 0x1000c205 0x0423c784 + 0x1000c001 0x0423c784 0x4801c205 0x00218780 + 0x6800c031 0x80204780 0x1000c621 0x0423c784 + 0x1000c41d 0x0423c784 0x1000c805 0x0423c784 + 0x1000ca01 0x0423c784 0x1000ce0d 0x0423c784 + 0x1000cc09 0x0423c784 0x4808c621 0x00218780 + 0x6807c41d 0x80220780 0x2000181d 0x0401c780 + 0x6801c805 0x8021c780 0x4803ce0d 0x00218780 + 0x6800ca01 0x80204780 0x6802cc05 0x8020c780 + 0xd4115809 0x20000780 0x20018004 0x1900e000 + 0x30000201 0xec000780 0x2c40c001 0x04200780 0x301f0005 0xec100780 0x30010001 0xc4100780 - 0xd0000201 0x04008780 0x20209225 0x00000003 - 0x30820001 0xac400780 0x300a13fd 0x6c0047c8 - 0x20001021 0x04000780 0xdc01000d 0x20000780 - 0xd0010011 0x20000784 0x10065003 0x00000280 - 0x00020e05 0xc0000782 0x04025201 0xe4220780 - 0xd4094809 0x20000780 0x1800d001 0x0423c780 - 0x1800f005 0x0423c780 0x2800c001 0x04200780 - 0x2800e005 0x04204780 0x20000001 0x04004780 - 0x04025201 0xe4200780 0x1900e400 0x1900ec04 - 0x2900e000 0x2901e804 0x20000001 0x04004780 - 0x307c0dfd 0x640147c8 0x04025201 0xe4200780 - 0x30000003 0x00000280 0x10004401 0x0023c780 - 0x60004e05 0x00214780 0x00020e05 0xc0000780 - 0xa0004c01 0x04200780 0x30060205 0xc4100780 - 0xd4094805 0x20000780 0x20018004 0x1500e200 - 0x30020205 0xc4100780 0x2500e008 0x2101e800 - 0xd00e0009 0xa0c00781 + 0xd0000201 0x04008780 0x20009429 0x0000000b + 0x30820001 0xac400780 0x300b15fd 0x640047c8 + 0x20001225 0x04000780 0xdc01000d 0x20000780 + 0x10066003 0x00000280 0x00020c05 0xc0000782 + 0x04025201 0xe4224780 0xd4094809 0x20000780 + 0x1800d001 0x0423c780 0x1800f005 0x0423c780 + 0x2800c001 0x04200780 0x2800e005 0x04204780 + 0x20000001 0x04004780 0x04025201 0xe4200780 + 0x1900e400 0x1900ec04 0x2900e000 0x2901e804 + 0x20000001 0x04004780 0x307c09fd 0x640147c8 + 0x04025201 0xe4200780 0x30000003 0x00000280 + 0x10004401 0x0023c780 0x60004e05 0x00214780 + 0x00020c05 0xc0000780 0xa0004c01 0x04200780 + 0x30060205 0xc4100780 0xd4094805 0x20000780 + 0x20018004 0x1500e200 0x30020205 0xc4100780 + 0x2500e008 0x2101e800 0xd00e0009 0xa0c00781 } } code { name = cudaEstimateResidual lmem = 0 smem = 3748 - reg = 12 + reg = 11 bar = 1 const { segname = const @@ -919,83 +910,84 @@ code { } } bincode { - 0xd0800205 0x00400780 0xa0000019 0x04000780 - 0xa0000211 0x04000780 0x30810dfd 0x644107c8 - 0xa0015003 0x00000000 0xa0004405 0x04200780 - 0x30060815 0xc4100780 0x10015003 0x00000280 - 0x40034e01 0x00200780 0x30100001 0xc4100780 - 0x60024e01 0x00200780 0x20000001 0x04010780 - 0x30070009 0xc4100780 0x30060001 0xc4100780 - 0x20000409 0x04000780 0x30020c01 0xc4100780 - 0x2102ec0c 0x20008a08 0x20000001 0x0400c780 - 0xd00e0001 0x80c00780 0x00000405 0xc0000780 - 0x04045201 0xe4200780 0xf0000001 0xe0000002 - 0x861ffe03 0x00000000 0xa0004c09 0x04200780 - 0x1000d001 0x0423c780 0x4004020d 0x00000780 - 0x3010060d 0xc4100780 0x6004000d 0x0000c780 - 0x1000d001 0x0423c780 0xd0118005 0x20000780 - 0x2100ee00 0x2543e01c 0x30050821 0xc4100780 - 0x3007001d 0xac000780 0x20001021 0x04018780 - 0x30080ffd 0x6c00c7c8 0xa002e003 0x00000000 - 0x1002d003 0x00000280 0xd0115005 0x20000780 - 0x2503e000 0x20009000 0x30020001 0xc4100780 - 0x2000ca01 0x04200780 0xd00e0025 0x80c00780 - 0x1400d401 0x0423c780 0x30001201 0xec000780 - 0x1002e003 0x00000780 0x1000f801 0x0403c780 - 0x00021005 0xc0000782 0x308211fd 0x6c4107c8 - 0x04001201 0xe4200780 0xa0043003 0x00000000 - 0x10043003 0x00000280 0x2000d001 0x04220780 - 0x300701fd 0x6c0187c8 0x00020009 0xc0000780 - 0xa0042003 0x00000000 0x10041003 0x00000280 - 0xd011500d 0x20000780 0x2108f020 0x2d03e000 - 0x20000001 0x04020780 0x30020001 0xc4100780 - 0x2000ca01 0x04200780 0xd00e000d 0x80c00780 - 0x1c00d401 0x0423c780 0x30000601 0xec000780 - 0x10042003 0x00000780 0x1000f801 0x0403c780 - 0x08001201 0xe4200782 0xf0000001 0xe0000002 - 0x861ffe03 0x00000000 0x04025201 0xe43f0780 - 0x00000a09 0xc0000780 0xd8114809 0x20000780 - 0x3806c1fd 0x6420c7c8 0xa0058003 0x00000000 - 0x10057003 0x00000280 0x40034e01 0x00200780 + 0xa0000011 0x04000780 0xd0800201 0x00400780 + 0x308109fd 0x644107c8 0xa0014003 0x00000000 + 0xa0004405 0x04200780 0xa000000d 0x04000780 + 0x10014003 0x00000280 0x40034e01 0x00200780 0x30100001 0xc4100780 0x60024e01 0x00200780 - 0x20000001 0x04010780 0x3007000d 0xc4100780 - 0x30060001 0xc4100780 0x2000060d 0x04000780 - 0x30020c01 0xc4100780 0x2103ec0c 0x20038000 - 0x20008001 0x00000007 0xd00e0001 0x80c00780 - 0x10058003 0x00000780 0x1000f801 0x0403c780 - 0x04055201 0xe4200782 0x00000a09 0xc0000780 - 0xd8117009 0x20000780 0x3883c001 0x6c608780 - 0xd0000221 0x04000780 0x300111fd 0x640187c8 - 0xa0089003 0x00000000 0x10089003 0x00000280 - 0x00000a09 0xc0000780 0xd8114809 0x20000780 - 0x30051001 0xc4100780 0x3900e00d 0x00000003 - 0x20000c01 0x04000780 0x307c07fd 0x6c0187c8 - 0xa0076003 0x00000000 0x1000f829 0x0403c780 - 0x2800c025 0x04200780 0x10076003 0x00000280 - 0x3007082d 0xc4100780 0x2009800d 0x00000003 - 0x2024962d 0x00000003 0x00020609 0xc0000780 - 0x0000160d 0xc0000780 0xdc150011 0x20000780 - 0x1000c00d 0x0423c784 0x20018001 0x00000003 - 0x6a03c229 0x80228780 0x300901fd 0x6c0147c8 - 0xdc00080d 0x20000780 0x1006f003 0x00000280 - 0x00000a09 0xc0000782 0xd8115809 0x20000780 - 0x1800c001 0x0423c780 0x30001401 0xec000780 - 0x00021209 0xc0000780 0x2840d20d 0x04200780 - 0x301f0601 0xec100780 0x30010629 0xc4100780 - 0x30090e0d 0x6c010780 0xd4094809 0x20000780 - 0xd00a0025 0x04008780 0xa000060d 0x2c014780 - 0x1800c001 0x0423c780 0x30841225 0xac400780 - 0x20019021 0x00000003 0x60090601 0x80000780 - 0x300111fd 0x640147c8 0x04025201 0xe4200780 - 0x10060003 0x00000280 0xd4094809 0x20000782 - 0x1800d001 0x0423c780 0x1800f00d 0x0423c780 - 0x2800c001 0x04200780 0x2800e00d 0x0420c780 - 0x20000001 0x0400c780 0x04025201 0xe4200780 - 0x1900e400 0x1900ec0c 0x2900e000 0x2903e80c - 0x20000001 0x0400c780 0x307c0dfd 0x640147c8 + 0x20000601 0x04000780 0x30050009 0xc4100780 + 0x30040001 0xc4100780 0x20008400 0x20008808 + 0x30040601 0xc4100780 0x30020415 0xc4100780 + 0x20008808 0x2105ec00 0xd00e0001 0x80c00780 + 0x00020405 0xc0000780 0x04045201 0xe4200780 + 0xf0000001 0xe0000002 0x861ffe03 0x00000000 + 0xa0004c09 0x04200780 0x1000d001 0x0423c780 + 0x40040215 0x00000780 0x30100a15 0xc4100780 + 0x60040019 0x00014780 0x1000d001 0x0423c780 + 0xd0118005 0x20000780 0x2100ee00 0x2546e014 + 0x3005061d 0xc4100780 0x30050015 0xac000780 + 0x20000e1d 0x04010780 0x30070bfd 0x6c00c7c8 + 0xa002d003 0x00000000 0x1002c003 0x00000280 + 0xd0115005 0x20000780 0x2506e000 0x20008e00 + 0x30020001 0xc4100780 0x2000ca01 0x04200780 + 0xd00e0021 0x80c00780 0x1400d401 0x0423c780 + 0x30001001 0xec000780 0x1002d003 0x00000780 + 0x1000f801 0x0403c780 0x00020e05 0xc0000782 + 0x30820ffd 0x6c4107c8 0x04001201 0xe4200780 + 0xa0042003 0x00000000 0x10042003 0x00000280 + 0x2000d001 0x0421c780 0x300501fd 0x6c0187c8 + 0x00020009 0xc0000780 0xa0041003 0x00000000 + 0x10040003 0x00000280 0xd011500d 0x20000780 + 0x2107f01c 0x2d06e000 0x20000001 0x0401c780 + 0x30020001 0xc4100780 0x2000ca01 0x04200780 + 0xd00e0019 0x80c00780 0x1c00d401 0x0423c780 + 0x30000c01 0xec000780 0x10041003 0x00000780 + 0x1000f801 0x0403c780 0x08001201 0xe4200782 + 0xf0000001 0xe0000002 0x861ffe03 0x00000000 + 0x00060609 0xc0000780 0x04025201 0xe43f0780 + 0xd811480d 0x20000780 0x3c04c1fd 0x6420c7c8 + 0xa0057003 0x00000000 0x10056003 0x00000280 + 0x40034e01 0x00200780 0x30100001 0xc4100780 + 0x60024e01 0x00200780 0x20000001 0x0400c780 + 0x30050019 0xc4100780 0x30040001 0xc4100780 + 0x20008c00 0x20008800 0x30020001 0xc4100780 + 0x2000cc01 0x04200780 0x20008001 0x00000007 + 0xd00e0001 0x80c00780 0x10057003 0x00000780 + 0x1000f801 0x0403c780 0x04055201 0xe4200782 + 0xd811700d 0x20000780 0x3c83c001 0x6c608780 + 0xd0000219 0x04000780 0x30010dfd 0x640187c8 + 0xa008b003 0x00000000 0x1008b003 0x00000280 + 0xd811480d 0x20000780 0x30050c01 0xc4100780 + 0x3d00e01d 0x00000003 0x20000801 0x04000780 + 0x307c0ffd 0x6c0187c8 0xa0079003 0x00000000 + 0x1000f81d 0x0403c780 0x2c00c021 0x04200780 + 0x10077003 0x00000280 0x30070625 0xc4100780 + 0x20249225 0x00000003 0x30020029 0xc4100780 + 0x30021001 0xc4100780 0x0000120d 0xc0000780 + 0x20249429 0x00000003 0x20248025 0x00000003 + 0xdc150011 0x20000780 0x1000c001 0x0423c784 + 0x00001411 0xc0000780 0x20049429 0x00000003 + 0x300915fd 0x640147c8 0x6000c01d 0x8021c784 + 0xdc00080d 0x20000780 0x1006e003 0x00000280 + 0x10079003 0x00000780 0x30021001 0xc4100780 + 0x20248025 0x00000003 0xd811580d 0x20000782 + 0x1c00c001 0x0423c780 0x0000120d 0xc0000780 + 0x30000e01 0xec000780 0x2c40c001 0x04200780 + 0x301f001d 0xec100780 0x30010025 0xc4100780 + 0x30080a01 0x6c010780 0xd409480d 0x20000780 + 0xd0090e21 0x04008780 0xa000001d 0x2c014780 + 0x1c00c001 0x0423c780 0x30841021 0xac400780 + 0x20018c19 0x00000003 0x60080e01 0x80000780 + 0x30010dfd 0x640147c8 0x04025201 0xe4200780 + 0x1005e003 0x00000280 0xd4094809 0x20000782 + 0x1800d001 0x0423c780 0x1800f015 0x0423c780 + 0x2800c001 0x04200780 0x2800e015 0x04214780 + 0x20000001 0x04014780 0x04025201 0xe4200780 + 0x1900e400 0x1900ec14 0x2900e000 0x2905e814 + 0x20000001 0x04014780 0x307c09fd 0x640147c8 0x04025201 0xe4200780 0x30000003 0x00000280 0x40034e01 0x00200780 0x30100001 0xc4100780 - 0x60024e01 0x00200780 0x20000001 0x04010780 + 0x60024e01 0x00200780 0x20000001 0x0400c780 0x30060001 0xc4100780 0xd4094805 0x20000780 0x20008404 0x1500e200 0x30020205 0xc4100780 0x2500e008 0x2101e800 0xd00e0009 0xa0c00781 @@ -1005,96 +997,93 @@ code { name = cudaCalcPartition16 lmem = 0 smem = 1388 - reg = 9 + reg = 10 bar = 1 const { segname = const segnum = 1 offset = 0 - bytes = 24 + bytes = 28 mem { - 0x000003ff 0x0000002f 0x0000001f 0x000fffff - 0x0000000e 0x0000000f + 0x000003ff 0x0000002f 0x00000030 0x0000001f + 0x000fffff 0x0000000e 0x0000000f } } bincode { 0x10000005 0x0403c780 0xd0800601 0x00400780 - 0xa0000001 0x04000780 0xa0000409 0x04000780 - 0x30040005 0xc4100780 0x2000040d 0x04004780 - 0x308107fd 0x644107c8 0xa0012003 0x00000000 - 0x30020619 0xc4100780 0x10012003 0x00000280 - 0xa0004e05 0x04200780 0x30070211 0xc4100780 - 0x30060205 0xc4100780 0x20018804 0x2101ee04 - 0x20000c05 0x04004780 0xd00e0205 0x80c00780 - 0x00000c05 0xc0000780 0x04025601 0xe4204780 + 0xa0000001 0x04000780 0xa0000411 0x04000780 + 0x30040005 0xc4100780 0x20000805 0x04004780 + 0x308103fd 0x644107c8 0x60844e09 0x00604500 + 0x30020409 0xc4100500 0x2000ce09 0x04208500 + 0xd00e0409 0x80c00500 0x00020205 0xc0000500 + 0x04025601 0xe4208500 0x861ffe03 0x00000000 + 0xa0004c15 0x04200780 0x30080a19 0xc4100780 + 0x308303fd 0x6c4107c8 0xa0026003 0x00000000 + 0x20000c0d 0x04004780 0x10026003 0x00000280 + 0xd0095805 0x20000780 0x2400c009 0x04204780 + 0x30020609 0xac000780 0x308305fd 0x6c40c7c8 + 0xa0024003 0x00000000 0x10023003 0x00000280 + 0xd0096005 0x20000780 0x2400c009 0x0420c780 + 0x30020409 0xc4100780 0x2000cc09 0x04208780 + 0x20008409 0x0ffffffb 0xd00e041d 0x80c00780 + 0x1400d409 0x0423c780 0x30020e09 0xec000780 + 0x10024003 0x00000780 0x1000f809 0x0403c780 + 0x00020205 0xc0000782 0x04001601 0xe4208780 + 0xd0096005 0x20000782 0x2400c009 0x0420c780 + 0x30020409 0xc4100780 0x2000cc09 0x04208780 + 0xd00e040d 0x80c00780 0x1400d409 0x0423c780 + 0x30020609 0xec000780 0x00020205 0xc0000780 + 0x04005601 0xe4208780 0x861ffe03 0x00000000 + 0xd0095805 0x20000780 0x3500e00d 0x00000003 + 0x307c07fd 0x6c0187c8 0x1000f81d 0x0403c780 + 0x1400c009 0x0423c780 0x10047003 0x00000280 + 0x20000609 0x04004780 0xd0095809 0x20000780 + 0x200b8409 0x00000003 0x3802c00d 0xc4300780 + 0x00020405 0xc0000780 0x102c8021 0x00000003 + 0x1800c009 0x0423c780 0x202c8625 0x00000003 + 0x00001009 0xc0000780 0xd809800d 0x20000780 + 0x20049021 0x00000003 0xd4010009 0x20000780 + 0x1c00c00d 0x0423c780 0x300911fd 0x640147c8 + 0x6803c01d 0x8021c780 0xd4000805 0x20000780 + 0x1003e003 0x00000280 0xd0096805 0x20000780 + 0x1400c00d 0x0423c780 0x00020205 0xc0000780 + 0x300105fd 0x6c00c7c8 0x30030e09 0xec000780 + 0xd4015805 0x20000780 0x307c0bfd 0x64014148 + 0xa0058003 0x00000000 0x2440c009 0x04208780 + 0x10057003 0x00000100 0xd009a805 0x20000780 + 0x2506e00c 0x2003820c 0x3002060d 0xc4100780 + 0x2000ca0d 0x0420c780 0xd00e0609 0xa0c00780 + 0x10058003 0x00000780 0x1000f809 0x0403c780 0xf0000001 0xe0000002 0x861ffe03 0x00000000 - 0xa0004c11 0x04200780 0x30080815 0xc4100780 - 0x308207fd 0x6c4107c8 0xa002c003 0x00000000 - 0x20000a1d 0x0400c780 0x1002c003 0x00000280 - 0xd0095805 0x20000780 0x2400c005 0x0420c780 - 0x30010e05 0xac000780 0x308203fd 0x6c40c7c8 - 0xa002a003 0x00000000 0x10029003 0x00000280 - 0xd0096005 0x20000780 0x2400c005 0x0421c780 - 0x30020205 0xc4100780 0x2000cc05 0x04204780 - 0x20008205 0x0ffffffb 0xd00e0221 0x80c00780 - 0x1400d405 0x0423c780 0x30011005 0xec000780 - 0x1002a003 0x00000780 0x1000f805 0x0403c780 - 0x00000c05 0xc0000782 0x04001601 0xe4204780 - 0xd0096005 0x20000782 0x2400c005 0x0421c780 - 0x30020205 0xc4100780 0x2000cc05 0x04204780 - 0xd00e021d 0x80c00780 0x1400d405 0x0423c780 - 0x30010e05 0xec000780 0x00000c05 0xc0000780 - 0x04005601 0xe4204780 0x861ffe03 0x00000000 - 0xd0095805 0x20000780 0x3500e01d 0x00000003 - 0x307c0ffd 0x6c0187c8 0x1000f821 0x0403c780 - 0x1400c005 0x0423c780 0x1004d003 0x00000280 - 0x20000e05 0x0400c780 0x200b821d 0x00000003 - 0x102c8005 0x00000003 0x00020e09 0xc0000780 - 0x00000205 0xc0000780 0x1000f81d 0x0403c780 - 0xd4098011 0x20000780 0xd801000d 0x20000780 - 0x20018e1d 0x00000003 0x1000c005 0x0423c784 - 0xd0095811 0x20000780 0x6c01c021 0x80220780 - 0x3007c1fd 0x6c2147cc 0xd8000809 0x20000780 - 0xd4000805 0x20000780 0x1000c005 0x0423c784 - 0x10042003 0x00000280 0xd0096805 0x20000780 - 0x1400c01d 0x0423c780 0x00000c05 0xc0000780 - 0x300303fd 0x6c00c7c8 0x30071005 0xec000780 - 0xd4015805 0x20000780 0x307c09fd 0x64014148 - 0xa005e003 0x00000000 0x2440c005 0x04204780 - 0x1005d003 0x00000100 0xd009a805 0x20000780 - 0x2505e014 0x20058614 0x30020a15 0xc4100780 - 0x2000ca15 0x04214780 0xd00e0a05 0xa0c00780 - 0x1005e003 0x00000780 0x1000f805 0x0403c780 - 0xf0000001 0xe0000002 0x861ffe03 0x00000000 - 0x301f0215 0xec100780 0x30010219 0xc4100780 - 0x20000605 0x04000780 0xd0060a0d 0x04008780 - 0x00020205 0xc0000780 0x30830605 0xac400780 + 0x301f040d 0xec100780 0x30010409 0xc4100780 + 0x20000219 0x04000780 0xd0020605 0x04008780 + 0x00020c05 0xc0000780 0x30840205 0xac400780 0x04001601 0xe4204780 0x861ffe03 0x00000000 - 0x40518405 0x00000003 0x00020205 0xc0000780 - 0x3400d605 0xec200780 0x3400d80d 0xec200780 - 0x3400da15 0xec200780 0x3400dc19 0xec200780 - 0x20038204 0x20068a0c 0x3400de15 0xec200780 - 0x3400e019 0xec200780 0x20038204 0x20068a0c - 0x3400e215 0xec200780 0x3400e419 0xec200780 - 0x20038204 0x20068a0c 0x3400e615 0xec200780 - 0x3400e819 0xec200780 0x20038204 0x20068a0c - 0x3400ea15 0xec200780 0x3400ec19 0xec200780 - 0x20038204 0x20068a0c 0x3400ee15 0xec200780 - 0x3400f019 0xec200780 0x20038204 0x20068a0c - 0x3400f215 0xec200780 0x3400f419 0xec200780 - 0x20038204 0x20068a0c 0x308401fd 0x644107c8 - 0x20000215 0x0400c780 0x30000003 0x00000280 - 0x200009fd 0x040087c8 0xa0093003 0x00000000 - 0x10090003 0x00000280 0xd0095805 0x20000780 - 0x20018005 0x00000003 0x3510e00d 0x00000003 - 0x40070419 0x00000780 0x60060619 0x00018780 - 0x30100c19 0xc4100780 0x60060405 0x00018780 - 0x20000205 0x04014780 0x10093003 0x00000780 - 0x30040005 0xc4100780 0x20000a05 0x04004780 + 0x40518805 0x00000003 0x00020205 0xc0000780 + 0x3400d605 0xec200780 0x3400d809 0xec200780 + 0x3400da0d 0xec200780 0x3400dc19 0xec200780 + 0x20028204 0x20068608 0x3400de0d 0xec200780 + 0x3400e019 0xec200780 0x20028204 0x20068608 + 0x3400e20d 0xec200780 0x3400e419 0xec200780 + 0x20028204 0x20068608 0x3400e60d 0xec200780 + 0x3400e819 0xec200780 0x20028204 0x20068608 + 0x3400ea0d 0xec200780 0x3400ec19 0xec200780 + 0x20028204 0x20068608 0x3400ee0d 0xec200780 + 0x3400f019 0xec200780 0x20028204 0x20068608 + 0x3400f20d 0xec200780 0x3400f419 0xec200780 + 0x20028204 0x20068608 0x308501fd 0x644107c8 + 0x2000020d 0x04008780 0x30000003 0x00000280 + 0x20000bfd 0x040107c8 0xa008d003 0x00000000 + 0x1008a003 0x00000280 0xd0095805 0x20000780 + 0x20018005 0x00000003 0x3510e009 0x00000003 + 0x40050419 0x00000780 0x60040619 0x00018780 + 0x30100c19 0xc4100780 0x60040405 0x00018780 + 0x20000205 0x0400c780 0x1008d003 0x00000780 + 0x30040005 0xc4100780 0x20000605 0x04004780 0x20108205 0x00000003 0xf0000001 0xe0000002 - 0x610f2e01 0x00000003 0x2101f00d 0x00000003 - 0x3003000d 0xc4000780 0x30040801 0xc4100780 - 0x20038000 0x20008400 0x30020001 0xc4100780 + 0x610f2e01 0x00000003 0x2101f009 0x00000003 + 0x30020009 0xc4000780 0x30040a01 0xc4100780 + 0x20028000 0x20008800 0x30020001 0xc4100780 0x2000c801 0x04200780 0xd00e0005 0xa0c00781 } } @@ -1102,170 +1091,167 @@ code { name = cudaChooseBestMethod lmem = 0 smem = 4132 - reg = 14 + reg = 15 bar = 1 const { segname = const segnum = 1 offset = 0 - bytes = 48 + bytes = 56 mem { - 0x000003ff 0x7e800000 0x3f000000 0x0000000e - 0x00000008 0x00000001 0x00000020 0x0000007f - 0x0000003f 0x0000001f 0x00000024 0x3e800000 + 0x000003ff 0x00000030 0x000000c0 0x7e800000 + 0x3f000000 0x0000000e 0x00000008 0x00000001 + 0x00000020 0x0000007f 0x0000003f 0x0000001f + 0x00000024 0x3e800000 } } bincode { 0xd0800205 0x00400780 0xa000020d 0x04000780 0xa0000005 0x04000780 0x30050601 0xc4100780 - 0x20000211 0x04000780 0x103f8001 0x07ffffff - 0x00020805 0xc0000780 0x307cd1fd 0x6c20c7c8 - 0x04011201 0xe4200780 0x00070609 0xc0000780 - 0x100b3003 0x00000280 0xa0004415 0x04200780 - 0x1000f819 0x0403c780 0x20000c1d 0x0400c780 - 0x3007d1fd 0x6420c7c8 0xa00b0003 0x00000000 - 0x100b0003 0x00000280 0x1000d001 0x0423c780 - 0x40014e09 0x00200780 0x30100409 0xc4100780 - 0x60004e09 0x00208780 0x30070601 0xc4100780 - 0x30070c2d 0xc4100780 0x30060c31 0xc4100780 - 0x30060629 0xc4100780 0x30070425 0xc4100780 - 0x30060421 0xc4100780 0x200c962c 0x200a8000 - 0x20089224 0x210be828 0x30020221 0xc4100780 - 0x200a802c 0x20099028 0x20088024 0x200b9420 - 0xd00e1021 0x80c00780 0x00000005 0xc0000780 - 0x0000120d 0xc0000780 0x0c051201 0xe4220780 - 0x3001cffd 0x6c20c7c8 0xa0055003 0x00000000 - 0x10000201 0x0403c780 0x1000f821 0x0403c780 - 0x10055003 0x00000280 0x30060c25 0xc4100780 - 0x30060629 0xc4100780 0x20001225 0x04028780 - 0x30060409 0xc4100780 0x20000425 0x04024780 - 0xa0004229 0x04200780 0xd414480d 0x20000780 - 0x1c00ce09 0x0423c780 0x6000cc09 0x88208780 - 0x3c7ccbfd 0x6c2147c8 0x3d02e02c 0x20009208 - 0x30020409 0xc4100780 0x2000ca09 0x04208780 - 0xd00e0409 0x80c00780 0xa003e003 0x00000000 - 0x1003b003 0x00000280 0x307c05fd 0x6c0087c8 - 0x1003d003 0x00000280 0x10018031 0x00000003 - 0x1003e003 0x00000780 0x1000f831 0x0403c780 - 0x300bcc2d 0xac200782 0x307c162d 0x8c000780 - 0x400c162d 0x00018780 0xa0001631 0x44014780 - 0xb03d1831 0x0358637b 0xa0000435 0x44014780 - 0xb08119fd 0x605107c8 0xb03d1a35 0x0358637b - 0xc08b1a35 0x00400680 0xc08b1831 0x00400680 - 0x90001831 0x00000780 0xe10c1a31 0x00408780 - 0x90001831 0x60000780 0xa0001831 0x8c064780 - 0x30831831 0xac400780 0x307c1831 0x8c000780 - 0x300c0409 0xec000780 0x20019831 0x00000003 - 0x20000001 0x04028780 0x600c1609 0x80008780 - 0x3000cffd 0x6c2107c8 0x20001021 0x04008780 - 0x1002f003 0x00000280 0x0002080d 0xc0000782 - 0x0c031201 0xe4220780 0xdc0c4811 0x20000780 - 0x1000e001 0x0423c784 0x2000c001 0x04200784 - 0x0c031201 0xe4200780 0x1000d001 0x0423c784 - 0x2000c001 0x04200784 0x0c031201 0xe4200780 - 0x1000c801 0x0423c784 0x2000c001 0x04200784 - 0x0c031201 0xe4200780 0x1000c401 0x0423c784 - 0x2000c001 0x04200784 0x0c031201 0xe4200780 - 0x1000c201 0x0423c784 0x2000c001 0x04200784 - 0x307c03fd 0x640147c8 0x0c031201 0xe4200780 - 0x100b0003 0x00000280 0xd414700d 0x20000780 - 0x1d00ec08 0x1d00e400 0x2c40c209 0x04208780 - 0x40050021 0x00000780 0x60040221 0x00020780 - 0x30101021 0xc4100780 0x3c84c1fd 0x6c6147c8 - 0x60040021 0x00020780 0xa00ad003 0x00000000 - 0x10083003 0x00000280 0xd4144805 0x20000780 - 0x1400c001 0x0423c780 0x3002ce25 0xc4300780 - 0x4005002d 0x00000780 0x301f1229 0xec100780 - 0x6004022d 0x0002c780 0xd0851429 0x04400780 - 0x3010162d 0xc4100780 0x20001425 0x04024780 - 0x60040009 0x0002c780 0x30011201 0xec100780 - 0x20000401 0x04000780 0xd80c4805 0x20000780 - 0x2400c001 0x04200780 0x20068001 0x00000003 - 0x100ad003 0x00000780 0xd414700d 0x20000780 - 0x3c86c1fd 0x6c6147c8 0xa00ac003 0x00000000 - 0x10097003 0x00000280 0xd4144805 0x20000780 - 0x2502e608 0x1500e000 0x3002ce25 0xc4300780 - 0x40050029 0x00000780 0x301f122d 0xec100780 - 0x60040229 0x00028780 0xd085162d 0x04400780 - 0x30101429 0xc4100780 0x20001625 0x04024780 - 0x60040001 0x00028780 0x30011209 0xec100780 - 0x20000001 0x04008780 0xd80c4805 0x20000780 - 0x2400c001 0x04200780 0x200f8001 0x00000003 - 0x100ac003 0x00000780 0xd414700d 0x20000780 - 0x3c7cc1fd 0x6c2147c8 0xa00ab003 0x00000000 - 0x100a5003 0x00000280 0xd80c480d 0x20000780 - 0xd4148005 0x20000780 0x3c7cc1fd 0x6c2087c8 - 0x2501e001 0x00000003 0x10000a01 0x2440c280 + 0x20000211 0x04000780 0x103f8009 0x07ffffff + 0x00020805 0xc0000780 0x30020801 0xc4100780 + 0x307cd1fd 0x6c20c7c8 0x04011201 0xe4208780 + 0x20248015 0x00000003 0x100b4003 0x00000280 + 0xa0004419 0x04200780 0x1000f81d 0x0403c780 + 0x20000e21 0x0400c780 0x3008d1fd 0x6420c7c8 + 0xa00b1003 0x00000000 0x100b1003 0x00000280 + 0x1000d001 0x0423c780 0x40014e09 0x00200780 + 0x30100409 0xc4100780 0x60004e29 0x00208780 + 0x20001401 0x04020780 0x30050009 0xc4100780 + 0x30040001 0xc4100780 0x20008400 0x20008200 + 0x30020009 0xc4100780 0x60810601 0x60404780 + 0x2000c809 0x04208780 0xd00e0409 0x80c00780 + 0x00020005 0xc0000780 0x04051201 0xe4208780 + 0x3001cffd 0x6c20c7c8 0xa0054003 0x00000000 + 0x10000201 0x0403c780 0x1000f825 0x0403c780 + 0x10054003 0x00000280 0x30060e2d 0xc4100780 + 0x30060631 0xc4100780 0x10248009 0x00000003 + 0x2000162d 0x04030780 0x60820609 0x60408780 + 0x30061429 0xc4100780 0x00000405 0xc0000780 + 0x20001429 0x0402c780 0xa000422d 0x04200780 + 0xd4140009 0x20000780 0x20009430 0x1900ee08 + 0x30021831 0xc4100780 0x6000cc35 0x88208780 + 0x2000ca09 0x04230780 0xd00e0409 0x80c00780 + 0xa003d003 0x00000000 0x387ccbfd 0x6c2147c8 + 0x3800c031 0x04234780 0x1003a003 0x00000280 + 0x307c05fd 0x6c0087c8 0x1003c003 0x00000280 + 0x10018035 0x00000003 0x1003d003 0x00000780 + 0x1000f835 0x0403c780 0x300ccc31 0xac200782 + 0x307c1831 0x8c000780 0x400d1831 0x00018780 + 0xa0001835 0x44014780 0xb03d1a39 0x0358637b + 0xa0000435 0x44014780 0xb0831dfd 0x605107c8 + 0xb03d1a35 0x0358637b 0xc08d1a35 0x00400680 + 0xc08d1c39 0x00400680 0x90001c39 0x00000780 + 0xe10e1a35 0x00410780 0x90001a35 0x60000780 + 0xa0001a35 0x8c064780 0x30851a35 0xac400780 + 0x307c1a35 0x8c000780 0x300d0409 0xec000780 + 0x20019a35 0x00000003 0x600d1809 0x80008780 + 0x20000001 0x0402c780 0x3000cffd 0x6c2107c8 + 0x20001225 0x04008780 0x1002e003 0x00000280 + 0x00000a05 0xc0000782 0x04030001 0xe4224780 + 0xd40c0009 0x20000780 0x1800e001 0x0423c780 + 0x2800c001 0x04200780 0x04030001 0xe4200780 + 0x1900f000 0x2900e000 0x04030001 0xe4200780 + 0x1900e800 0x2900e000 0x04030001 0xe4200780 + 0x1900e400 0x2900e000 0x04030001 0xe4200780 + 0x1900e200 0x2900e000 0x307c03fd 0x640147c8 + 0x04030001 0xe4200780 0x100b1003 0x00000280 + 0x10248001 0x00000003 0x60820601 0x60400780 + 0x00000005 0xc0000780 0xd4142809 0x20000780 + 0x1900ec08 0x1900e400 0x2840c209 0x04208780 0x40050025 0x00000780 0x60040225 0x00024780 - 0x30101225 0xc4100780 0x60040001 0x00024780 - 0x100ab003 0x00000780 0xd4148005 0x20000780 - 0x1400c001 0x0423c780 0x40050025 0x00000780 - 0x60040225 0x00024780 0x30101225 0xc4100780 - 0x60040001 0x00024780 0xf0000001 0xe0000002 - 0xf0000001 0xe0000002 0x30080001 0xac000782 - 0x00020e05 0xc0000780 0x04011201 0xe4200780 - 0x20000c19 0x04014782 0x3006d1fd 0x6c2107c8 - 0x1000d003 0x00000280 0x861ffe03 0x00000000 - 0x3004d1fd 0x6c20c7c8 0xa00c4003 0x00000000 - 0x100c4003 0x00000280 0x1000d001 0x0423c780 - 0x40014e05 0x00200780 0x30100205 0xc4100780 - 0x60004e01 0x00204780 0x20000001 0x04010780 - 0x30070005 0xc4100780 0x30060001 0xc4100780 - 0x00020805 0xc0000780 0x20000201 0x04000780 - 0xd4044805 0x20000780 0x2100e804 0x1500e000 - 0x20108205 0x00000003 0xd00e0201 0xa0c00780 + 0x30101225 0xc4100780 0x3886c1fd 0x6c6147c8 + 0x60040025 0x00024780 0xa00ae003 0x00000000 + 0x10082003 0x00000280 0xd4140005 0x20000780 + 0x1400c001 0x0423c780 0x3002ce29 0xc4300780 + 0x40050031 0x00000780 0x301f142d 0xec100780 + 0x60040231 0x00030780 0xd087162d 0x04400780 + 0x30101831 0xc4100780 0x20001629 0x04028780 + 0x60040009 0x00030780 0x30011401 0xec100780 + 0x00070605 0xc0000780 0x20000401 0x04000780 + 0xd40c4805 0x20000780 0x2400c001 0x04200780 + 0x20068001 0x00000003 0x100ae003 0x00000780 + 0xd4142809 0x20000780 0x3888c1fd 0x6c6147c8 + 0xa00ad003 0x00000000 0x10097003 0x00000280 + 0xd4140005 0x20000780 0x2502e608 0x1500e000 + 0x3002ce2d 0xc4300780 0x40050029 0x00000780 + 0x301f1631 0xec100780 0x60040229 0x00028780 + 0xd0871831 0x04400780 0x30101429 0xc4100780 + 0x2000182d 0x0402c780 0x60040001 0x00028780 + 0x30011609 0xec100780 0x00070605 0xc0000780 + 0x20000001 0x04008780 0xd40c4805 0x20000780 + 0x2400c001 0x04200780 0x200f8001 0x00000003 + 0x100ad003 0x00000780 0xd4142809 0x20000780 + 0x387cc1fd 0x6c2147c8 0xa00ac003 0x00000000 + 0x100a6003 0x00000280 0x00070609 0xc0000780 + 0xd4143805 0x20000780 0xd80c4809 0x20000780 + 0x2501e001 0x00000003 0x387cc1fd 0x6c2087c8 + 0x10000e01 0x2440c280 0x40050029 0x00000780 + 0x60040229 0x00028780 0x30101429 0xc4100780 + 0x60040001 0x00028780 0x100ac003 0x00000780 + 0xd4143805 0x20000780 0x1400c001 0x0423c780 + 0x40050029 0x00000780 0x60040229 0x00028780 + 0x30101429 0xc4100780 0x60040001 0x00028780 + 0xf0000001 0xe0000002 0xf0000001 0xe0000002 + 0x30090001 0xac000782 0x00021005 0xc0000780 + 0x04011201 0xe4200780 0x20000e1d 0x04018782 + 0x3007d1fd 0x6c2107c8 0x1000e003 0x00000280 + 0x861ffe03 0x00000000 0x3004d1fd 0x6c20c7c8 + 0xa00c5003 0x00000000 0x100c5003 0x00000280 + 0x1000d001 0x0423c780 0x40014e05 0x00200780 + 0x30100205 0xc4100780 0x60004e01 0x00204780 + 0x20000001 0x04010780 0x30070005 0xc4100780 + 0x30060001 0xc4100780 0x00000a05 0xc0000780 + 0x20000201 0x04000780 0xd4040005 0x20000780 + 0x2100e804 0x1500e000 0x20108205 0x00000003 + 0xd00e0201 0xa0c00780 0xf0000001 0xe0000002 + 0x861ffe03 0x00000000 0x00000a05 0xc0000780 + 0xd4040005 0x20000780 0x308909fd 0x6c4107c8 + 0xa00d8003 0x00000000 0x1400c001 0x0423c780 + 0x100d8003 0x00000280 0x00000a05 0xc0000780 + 0xd408000d 0x20000780 0xd4040009 0x20000780 + 0x1c00c001 0x0423c780 0x3800c1fd 0x6c2107c8 + 0x1c00c001 0x0423c780 0x20008805 0x0000000b + 0x3800c001 0xac200780 0x10000805 0x0403c500 + 0x04000001 0xe4204780 0x04010001 0xe4200780 0xf0000001 0xe0000002 0x861ffe03 0x00000000 - 0x00020805 0xc0000780 0xd4044805 0x20000780 - 0x308709fd 0x6c4107c8 0xa00d7003 0x00000000 - 0x1400c001 0x0423c780 0x100d7003 0x00000280 - 0x00020805 0xc0000780 0xd408480d 0x20000780 - 0xd4044809 0x20000780 0x1c00c001 0x0423c780 - 0x3800c1fd 0x6c2107c8 0x1c00c001 0x0423c780 - 0x20008805 0x0000000b 0x3800c001 0xac200780 - 0x10000805 0x0403c500 0x04001201 0xe4204780 - 0x04011201 0xe4200780 0xf0000001 0xe0000002 - 0x861ffe03 0x00000000 0x308809fd 0x6c4107c8 - 0xa00e6003 0x00000000 0x100e6003 0x00000280 - 0x00020805 0xc0000780 0xd4064809 0x20000780 - 0x20008805 0x00000007 0x3800c1fd 0x6c2047c8 - 0x10000805 0x0403c500 0x0002020d 0xc0000780 - 0x3800c001 0xac200780 0x1c00d205 0x0423c780 - 0x04001201 0xe4204780 0x04011201 0xe4200780 - 0xf0000001 0xe0000002 0x861ffe03 0x00000000 - 0x308909fd 0x6c4107c8 0x30000003 0x00000280 - 0x20298805 0x0000000b 0x00020209 0xc0000780 - 0x20208805 0x00000003 0x3800c1fd 0x6c2047c8 - 0x10000805 0x0403c500 0x0002020d 0xc0000780 - 0x00020805 0xc0000780 0x3800c005 0xac200780 - 0x1c00d201 0x0423c780 0x20198809 0x0000000b - 0x04001201 0xe4200780 0x00020409 0xc0000780 - 0x04011201 0xe4204780 0x20108801 0x00000003 - 0x3801c1fd 0x6c2047c8 0x10000801 0x0403c500 - 0x0002000d 0xc0000780 0x3801c005 0xac200780 - 0x1c00d201 0x0423c780 0x20118809 0x0000000b - 0x04001201 0xe4200780 0x00020409 0xc0000780 - 0x04011201 0xe4204780 0x20088801 0x00000003 - 0x3801c1fd 0x6c2047c8 0x10000801 0x0403c500 - 0x0002000d 0xc0000780 0x3801c005 0xac200780 - 0x1c00d201 0x0423c780 0x200d8809 0x0000000b - 0x04001201 0xe4200780 0x00020409 0xc0000780 - 0x04011201 0xe4204780 0x20048801 0x00000003 - 0x3801c1fd 0x6c2047c8 0x10000801 0x0403c500 - 0x0002000d 0xc0000780 0x3801c005 0xac200780 - 0x1c00d201 0x0423c780 0x200b8809 0x0000000b - 0x04001201 0xe4200780 0x00020409 0xc0000780 - 0x04011201 0xe4204780 0x20028801 0x00000003 - 0x3801c1fd 0x6c2047c8 0x10000801 0x0403c500 - 0x0002000d 0xc0000780 0x3801c005 0xac200780 - 0x1c00d201 0x0423c780 0x04001201 0xe4200780 - 0x307c09fd 0x6c0147c8 0x04011201 0xe4204780 + 0x308a09fd 0x6c4107c8 0xa00e7003 0x00000000 + 0x100e7003 0x00000280 0x00000a05 0xc0000780 + 0xd4060009 0x20000780 0x20008a05 0x00000013 + 0x3800c1fd 0x6c2047c8 0x10000a05 0x0403c500 + 0x0000020d 0xc0000780 0x3800c001 0xac200780 + 0x1c00c005 0x0423c780 0x04000001 0xe4204780 + 0x04010001 0xe4200780 0xf0000001 0xe0000002 + 0x861ffe03 0x00000000 0x308b09fd 0x6c4107c8 + 0x30000003 0x00000280 0x00000a05 0xc0000780 + 0xd4041009 0x20000780 0x20008a05 0x0000000b + 0x3800fdfd 0x6c2047c8 0x10000a05 0x0403c500 + 0x0000020d 0xc0000780 0x3800fc05 0xac200780 + 0x1c00c001 0x0423c780 0x04000001 0xe4200780 + 0x04010001 0xe4204780 0x20008a01 0x00000007 + 0x3801ddfd 0x6c2047c8 0x10000a01 0x0403c500 + 0x0000000d 0xc0000780 0x3801dc05 0xac200780 + 0x1c00c001 0x0423c780 0x04000001 0xe4200780 + 0x04010001 0xe4204780 0x20208a01 0x00000003 + 0x3801cdfd 0x6c2047c8 0x10000a01 0x0403c500 + 0x0000000d 0xc0000780 0x3801cc05 0xac200780 + 0x1c00c001 0x0423c780 0x04000001 0xe4200780 + 0x04010001 0xe4204780 0x20108a01 0x00000003 + 0x3801c5fd 0x6c2047c8 0x10000a01 0x0403c500 + 0x0000000d 0xc0000780 0x3801c405 0xac200780 + 0x1c00c001 0x0423c780 0x04000001 0xe4200780 + 0x04010001 0xe4204780 0x20088a01 0x00000003 + 0x3801c1fd 0x6c2047c8 0x10000a01 0x0403c500 + 0x0000000d 0xc0000780 0x3801c005 0xac200780 + 0x1c00c001 0x0423c780 0x04000001 0xe4200780 + 0x307c09fd 0x6c0147c8 0x04010001 0xe4204780 0x30000003 0x00000280 0x1000d001 0x0423c780 0x40014e05 0x00200780 0xd0044805 0x20000780 0x30100209 0xc4100780 0x1400c205 0x0423c780 0x60004e09 0x00208780 0x3401c1fd 0x6c2107c8 0x10048011 0x00000003 0x10248001 0x00000003 0x30070405 0xc4100780 0x3006040d 0xc4100780 - 0x21000801 0x04428280 0x20000205 0x0400c780 + 0x21000801 0x04430280 0x20000205 0x0400c780 0x00000005 0xc0000780 0x2101e800 0x2502e004 0x20208001 0x00000003 0xd00e0005 0xa0c00781 } @@ -1274,70 +1260,69 @@ code { name = cudaEncodeResidual lmem = 0 smem = 1372 - reg = 6 + reg = 8 bar = 1 const { segname = const segnum = 1 offset = 0 - bytes = 8 + bytes = 12 mem { - 0x0000002f 0x0000001f + 0x0000002f 0x00000030 0x0000001f } } bincode { - 0xa0000009 0x04000780 0x308005fd 0x644107c8 - 0xa000d003 0x00000000 0x1000d003 0x00000280 - 0xa0004e01 0x04200780 0x30070005 0xc4100780 - 0x30060001 0xc4100780 0x20000201 0x04000780 - 0x30020405 0xc4100780 0x2100ec00 0x20008200 - 0xd00e0001 0x80c00780 0x00020405 0xc0000780 - 0x04024e01 0xe4200780 0xf0000001 0xe0000002 - 0x861ffe03 0x00000000 0xa0004205 0x04200780 - 0x40034c01 0x00200780 0x30100001 0xc4100780 - 0xd0093805 0x20000780 0x60024c0d 0x00200780 - 0x2501e000 0x2543ee10 0x30040011 0xac000780 - 0x300209fd 0x6c00c7c8 0xa0022003 0x00000000 - 0x10021003 0x00000280 0xd0094005 0x20000780 - 0x2503e000 0x20008400 0x30020001 0xc4100780 - 0x2000ca01 0x04200780 0xd00e0015 0x80c00780 - 0x1400d401 0x0423c780 0x30000a01 0xec000780 - 0x10022003 0x00000780 0x1000f801 0x0403c780 - 0x00020405 0xc0000782 0x308105fd 0x6c4107c8 - 0x04000e01 0xe4200780 0xa0037003 0x00000000 - 0x10037003 0x00000280 0x20000201 0x04008780 - 0x300401fd 0x6c0187c8 0x00020009 0xc0000780 - 0xa0036003 0x00000000 0x10035003 0x00000280 - 0xd009400d 0x20000780 0x20028200 0x2d03e010 - 0x20000001 0x04010780 0x30020001 0xc4100780 - 0x2000ca01 0x04200780 0xd00e0011 0x80c00780 - 0x1c00d401 0x0423c780 0x30000801 0xec000780 - 0x10036003 0x00000780 0x1000f801 0x0403c780 - 0x08000e01 0xe4200782 0xd0093809 0x20000782 - 0x2943ee00 0x3900e000 0x30000201 0xac000780 - 0x307c0005 0x8c000780 0x861ffe03 0x00000000 - 0xd0093809 0x20000780 0x387cc1fd 0x6c20c7c8 - 0x1000f811 0x0403c780 0x1004d003 0x00000280 - 0x101c8001 0x00000003 0x0000000d 0xc0000780 - 0x1000f815 0x0403c780 0x20000a01 0x04008780 - 0xd0093811 0x20000780 0x20018a15 0x00000003 - 0xdc098009 0x20000780 0x3005c1fd 0x6c2147cc - 0x00020011 0xc0000780 0x1800c001 0x0423c780 - 0x6000ce11 0x80210784 0xdc00080d 0x20000780 - 0x10043003 0x00000280 0x861ffe03 0x00000000 - 0xd0093809 0x20000780 0x2902e014 0x1900e400 - 0x00020a09 0xc0000780 0x30000801 0xec000780 - 0x2840ce01 0x04200780 0x08000e01 0xe4200780 - 0x861ffe03 0x00000000 0xd0093809 0x20000780 - 0x2800c001 0x04204780 0x300201fd 0x6c0107c8 - 0x3802c1fd 0x6c20c2c8 0xa0061003 0x00000000 - 0x10061003 0x00000100 0xd0093809 0x20000780 - 0x2903f400 0x20008400 0x30020011 0xc4100780 - 0x1500ee00 0x2104e810 0xd00e0801 0xa0c00780 - 0x2800c001 0x04204780 0xf0000001 0xe0000002 - 0x20008405 0x00000013 0x300101fd 0x6c00c7c8 - 0x30000003 0x00000280 0xd0098809 0x20000780 - 0x2903e000 0x20008400 0x30020001 0xc4100780 + 0xa0000001 0x04000780 0x308001fd 0x644107c8 + 0x60824e05 0x00600500 0x30020205 0xc4100500 + 0x2000cc05 0x04204500 0xd00e0205 0x80c00500 + 0x00020005 0xc0000500 0x04024e01 0xe4204500 + 0x861ffe03 0x00000000 0xa0004209 0x04200780 + 0x40054c05 0x00200780 0x30100205 0xc4100780 + 0xd0093805 0x20000780 0x60044c0d 0x00204780 + 0x2502e004 0x2543ee10 0x30040211 0xac000780 + 0x300009fd 0x6c00c7c8 0xa001c003 0x00000000 + 0x1001b003 0x00000280 0xd0094005 0x20000780 + 0x2503e004 0x20018004 0x30020205 0xc4100780 + 0x2000ca05 0x04204780 0xd00e0215 0x80c00780 + 0x1400d405 0x0423c780 0x30010a05 0xec000780 + 0x1001c003 0x00000780 0x1000f805 0x0403c780 + 0x00020005 0xc0000782 0x308201fd 0x6c4107c8 + 0x04000e01 0xe4204780 0xa0031003 0x00000000 + 0x10031003 0x00000280 0x20000405 0x04000780 + 0x300403fd 0x6c0187c8 0x00020205 0xc0000780 + 0xa0030003 0x00000000 0x1002f003 0x00000280 + 0xd0094009 0x20000780 0x20008404 0x2903e010 + 0x20000205 0x04010780 0x30020205 0xc4100780 + 0x2000ca05 0x04204780 0xd00e0211 0x80c00780 + 0x1800d405 0x0423c780 0x30010805 0xec000780 + 0x10030003 0x00000780 0x1000f805 0x0403c780 + 0x04000e01 0xe4204782 0xd0093805 0x20000782 + 0x2543ee04 0x3501e004 0x30010405 0xac000780 + 0x307c0209 0x8c000780 0x861ffe03 0x00000000 + 0xd0093805 0x20000780 0x347cc1fd 0x6c20c7c8 + 0x1000f811 0x0403c780 0x10049003 0x00000280 + 0xd0093805 0x20000780 0x3402c005 0xc4300780 + 0x101c8015 0x00000003 0x1000f81d 0x0403c780 + 0x201c8219 0x00000003 0x00000a05 0xc0000780 + 0x20000e05 0x04000780 0xd4098009 0x20000780 + 0x20048a15 0x00000003 0x00020205 0xc0000780 + 0x1800c005 0x0423c780 0x30060bfd 0x640147c8 + 0x6401ce11 0x80210780 0x20018e1d 0x00000003 + 0x1003f003 0x00000280 0x861ffe03 0x00000000 + 0xd0093805 0x20000780 0x2500e014 0x1500e404 + 0x00020a05 0xc0000780 0x30010805 0xec000780 + 0x2440ce05 0x04204780 0x04000e01 0xe4204780 + 0x861ffe03 0x00000000 0xd0093805 0x20000780 + 0x2400c005 0x04208780 0x300003fd 0x6c0107c8 + 0x3400c1fd 0x6c20c2c8 0xa005e003 0x00000000 + 0x1005e003 0x00000100 0xd0093805 0x20000780 + 0x2503f404 0x20018004 0x00020009 0xc0000780 + 0x30020211 0xc4100780 0x1900ee04 0x2104e810 + 0xd00e0805 0xa0c00780 0x2400c005 0x04208780 + 0xf0000001 0xe0000002 0x20008009 0x00000013 + 0x300203fd 0x6c00c7c8 0x30000003 0x00000280 + 0xd0098805 0x20000780 0x2503e004 0x20018004 + 0x00020005 0xc0000780 0x30020201 0xc4100780 0xd4083805 0x20000780 0x2100e804 0x1500e000 0x20008205 0x00000043 0xd00e0201 0xa0c00781 } @@ -1346,32 +1331,31 @@ code { name = cudaCopyBestMethod lmem = 0 smem = 32 - reg = 5 + reg = 3 bar = 1 const { segname = const segnum = 1 offset = 0 - bytes = 4 + bytes = 8 mem { - 0x0000002f + 0x0000002f 0x00000030 } } bincode { - 0xa0000005 0x040007c0 0xa000d003 0x00000000 - 0x1000d003 0x00000280 0x1000cc01 0x0423c780 - 0x40014e09 0x00200780 0x30100409 0xc4100780 - 0x60004e01 0x00208780 0x30070009 0xc4100780 - 0x30060001 0xc4100780 0x20008400 0x2100ea00 - 0x20208001 0x00000003 0xd00e0001 0x80c00780 - 0x00000e01 0xe4200780 0xf0000001 0xe0000002 - 0x861ffe03 0x00000000 0x308003fd 0x644107c8 - 0x30000003 0x00000280 0xa0004e01 0x04200780 - 0x3007ce0d 0xc4300780 0x3006ce11 0xc4300780 - 0x30070009 0xc4100780 0x30060001 0xc4100780 - 0x2004860c 0x20008408 0x30020201 0xc4100780 - 0x2103ea0c 0x2102e804 0x20038008 0x20018004 - 0xd00e0401 0x80c00780 0xd00e0201 0xa0c00781 + 0xa0000001 0x040007c0 0xa000d003 0x00000000 + 0x1000d003 0x00000280 0x1000cc05 0x0423c780 + 0x40034e09 0x00200780 0x30100409 0xc4100780 + 0x60024e05 0x00208780 0x30070209 0xc4100780 + 0x30060205 0xc4100780 0x20018404 0x2101ea04 + 0x20208205 0x00000003 0xd00e0205 0x80c00780 + 0x00000e01 0xe4204780 0xf0000001 0xe0000002 + 0x861ffe03 0x00000000 0x308001fd 0x644107c8 + 0x30000003 0x00000280 0x3005ce05 0xc4300780 + 0x3004ce09 0xc4300780 0x20028204 0x20018004 + 0x61302e01 0x00000003 0x30020205 0xc4100780 + 0x30020009 0xc4100780 0x2101ea00 0x2102e804 + 0xd00e0001 0x80c00780 0xd00e0201 0xa0c00781 } } code { @@ -1384,80 +1368,78 @@ code { segname = const segnum = 1 offset = 0 - bytes = 24 + bytes = 36 mem { 0x00000020 0x000003ff 0x00000001 0x0000000e - 0x00000080 0x00000040 + 0x00000080 0x0000061c 0x00000040 0x0000051c + 0x0000049c } } bincode { 0x10028009 0x00000003 0x1000cc05 0x0423c780 - 0x30010409 0xc4000780 0x10000005 0x0403c780 - 0x30800409 0xac400780 0xa0000401 0x04000780 - 0x3000040d 0x640107d0 0xd0820609 0x00400780 - 0xa00007fd 0x0c0147c8 0xa001b003 0x00000000 - 0xa0000405 0x04000780 0x1001a003 0x00001100 - 0x2101ec11 0x00000003 0x100f800d 0x00000003 - 0x3004060d 0xc4000780 0x40074e15 0x00200780 - 0x30100a15 0xc4100780 0x60064e15 0x00214780 - 0x3004020d 0xc4000780 0x20000a11 0x0400c780 - 0x60804c0d 0x00600780 0x2000060d 0x04010780 - 0x3002060d 0xc4100780 0x2000ca0d 0x0420c780 - 0xd00e0611 0x80c00780 0x1001b003 0x00000780 - 0x103f8011 0x000fffff 0x1000f80d 0x0403c782 - 0x20088215 0x00000003 0x30830a19 0x6440c780 - 0x1000040d 0x2440c280 0xa0000c19 0x2c014780 - 0xd00607fd 0x040007c8 0xa0035003 0x00000000 - 0x10034003 0x00000100 0x2101ec19 0x00000003 - 0x100f800d 0x00000003 0x3006060d 0xc4000780 - 0x40074e1d 0x00200780 0x30100e1d 0xc4100780 - 0x60064e21 0x0021c780 0x3006021d 0xc4000780 - 0x1008800d 0x00000003 0x2000101d 0x0401c780 - 0x3006060d 0xc4000780 0x2000060d 0x0401c780 - 0x61202c0d 0x00000003 0x2000000d 0x0400c780 - 0x3002060d 0xc4100780 0x2000ca0d 0x0420c780 - 0xd00e0619 0x80c00780 0x10035003 0x00000780 - 0x103f8019 0x000fffff 0x3005020d 0xc4100782 - 0x20000601 0x04000780 0x300609fd 0x6c0107c8 - 0x1000020d 0x0403c780 0x10000a0d 0x0403c280 - 0x00020005 0xc0000780 0x30060805 0xac000780 - 0x04020e01 0xe420c780 0x04000e01 0xe4204780 - 0x861ffe03 0x00000000 0x308401fd 0x6c4187c8 - 0xa004e003 0x00000000 0x1004e003 0x00000280 - 0x20008011 0x0000000b 0x00020809 0xc0000780 - 0x1000000d 0x0403c780 0x3801cffd 0x6c2047c8 - 0x1000080d 0x0403c280 0x00020605 0xc0000780 - 0xd408380d 0x20000780 0x00020005 0xc0000780 - 0x3801ce05 0xac200780 0x1c00c00d 0x0423c780 - 0x04020e01 0xe420c780 0x04000e01 0xe4204780 + 0x30010405 0xc4000780 0x30800209 0xac400780 + 0xa0000005 0x04000780 0x3001040d 0x640107d0 + 0xd0820201 0x00400780 0xa00007fd 0x0c0147c8 + 0xa001a003 0x00000000 0xa0000001 0x04000780 + 0x10019003 0x00001100 0x2101ec11 0x00000003 + 0x100f800d 0x00000003 0x3004060d 0xc4000780 + 0x40074e15 0x00200780 0x30100a15 0xc4100780 + 0x60064e15 0x00214780 0x3004000d 0xc4000780 + 0x20000a11 0x0400c780 0x60804c0d 0x00604780 + 0x2000060d 0x04010780 0x3002060d 0xc4100780 + 0x2000ca0d 0x0420c780 0xd00e0611 0x80c00780 + 0x1001a003 0x00000780 0x103f8011 0x000fffff + 0x1000f80d 0x0403c782 0x20088015 0x00000003 + 0x30830a19 0x6440c780 0x1000040d 0x2440c280 + 0xa0000c19 0x2c014780 0xd00607fd 0x040007c8 + 0xa0034003 0x00000000 0x10033003 0x00000100 + 0x2101ec19 0x00000003 0x100f800d 0x00000003 + 0x3006060d 0xc4000780 0x40074e1d 0x00200780 + 0x30100e1d 0xc4100780 0x60064e21 0x0021c780 + 0x3006001d 0xc4000780 0x1008800d 0x00000003 + 0x2000101d 0x0401c780 0x3006060d 0xc4000780 + 0x2000060d 0x0401c780 0x61202c0d 0x00000003 + 0x2000020d 0x0400c780 0x3002060d 0xc4100780 + 0x2000ca0d 0x0420c780 0xd00e0619 0x80c00780 + 0x10034003 0x00000780 0x103f8019 0x000fffff + 0x3005000d 0xc4100782 0x2000060d 0x04004780 + 0x300609fd 0x6c0107c8 0x10000005 0x0403c780 + 0x10000a05 0x0403c280 0x00020605 0xc0000780 + 0x30060801 0xac000780 0x04020e01 0xe4204780 + 0x30020611 0xc4100780 0x04000e01 0xe4200780 + 0x861ffe03 0x00000000 0x308407fd 0x6c4187c8 + 0xa004c003 0x00000000 0x1004c003 0x00000280 + 0x00000805 0xc0000780 0xd4043809 0x20000780 + 0x201c8805 0x00000043 0x3800c1fd 0x6c2047c8 + 0x21000805 0x04414280 0x0000020d 0xc0000780 + 0x3800c001 0xac200780 0x1c00c005 0x0423c780 + 0x04020e01 0xe4204780 0x04000e01 0xe4200780 0xf0000001 0xe0000002 0x861ffe03 0x00000000 - 0x308501fd 0x6c4187c8 0xa005f003 0x00000000 - 0x1005f003 0x00000280 0x20008011 0x00000007 - 0x00020809 0xc0000780 0x1000000d 0x0403c780 - 0x3801cffd 0x6c2047c8 0x1000080d 0x0403c280 - 0x00020605 0xc0000780 0xd408380d 0x20000780 - 0x00020005 0xc0000780 0x3801ce05 0xac200780 - 0x1c00c00d 0x0423c780 0x04020e01 0xe420c780 - 0x04000e01 0xe4204780 0xf0000001 0xe0000002 - 0x861ffe03 0x00000000 0x308001fd 0x6c4187c8 - 0xa0070003 0x00000000 0x10070003 0x00000280 - 0x20208011 0x00000003 0x00020809 0xc0000780 - 0x1000000d 0x0403c780 0x3801cffd 0x6c2047c8 - 0x1000080d 0x0403c280 0x00020605 0xc0000780 - 0xd408380d 0x20000780 0x00020005 0xc0000780 - 0x3801ce0d 0xac200780 0x1c00c005 0x0423c780 - 0x04020e01 0xe4204780 0x04000e01 0xe420c780 + 0x308607fd 0x6c4187c8 0xa005b003 0x00000000 + 0x1005b003 0x00000280 0x00000805 0xc0000780 + 0xd4023809 0x20000780 0x201c8805 0x00000043 + 0x3800c1fd 0x6c2047c8 0x21000805 0x0441c280 + 0x0000020d 0xc0000780 0x3800c001 0xac200780 + 0x1c00c005 0x0423c780 0x04020e01 0xe4204780 + 0x04000e01 0xe4200780 0xf0000001 0xe0000002 + 0x861ffe03 0x00000000 0x308007fd 0x6c4187c8 + 0xa006a003 0x00000000 0x1006a003 0x00000280 + 0x00000805 0xc0000780 0xd4013809 0x20000780 + 0x201c8805 0x00000043 0x3800c1fd 0x6c2047c8 + 0x21000805 0x04420280 0x0000020d 0xc0000780 + 0x3800c005 0xac200780 0x1c00c001 0x0423c780 + 0x04020e01 0xe4200780 0x04000e01 0xe4204780 0xf0000001 0xe0000002 0x861ffe03 0x00000000 - 0x300005fd 0x6c00c7c8 0x30000003 0x00000280 - 0xa0004c0d 0x04200780 0x40060a05 0x00000780 - 0x2102ec19 0x00000003 0xa0004e15 0x04200780 - 0x30100211 0xc4100780 0x30060a05 0xc4000780 - 0x60060809 0x00010780 0x2101ec15 0x00000003 - 0x10018011 0x00000003 0x2000040d 0x04004780 - 0x30050811 0xc4000780 0x00020005 0xc0000780 - 0x2003800c 0x20028000 0x20000209 0x04010780 - 0xd4083809 0x20000780 0x30020605 0xc4100780 - 0x20028008 0x1900e000 0x2000c805 0x04204780 + 0x300305fd 0x6c00c7c8 0x30000003 0x00000280 + 0xa0004c01 0x04200780 0x40000a19 0x00000780 + 0x2102ec05 0x00000003 0xa0004e15 0x04200780 + 0x30100c19 0xc4100780 0x30010a05 0xc4000780 + 0x60000801 0x00018780 0x2101ec15 0x00000003 + 0x10018019 0x00000003 0x20000009 0x04004780 + 0x30050c15 0xc4000780 0x00000805 0xc0000780 + 0x20028608 0x2000860c 0x20000201 0x04014780 + 0xd4083809 0x20000780 0x30020405 0xc4100780 + 0x20008608 0x1900e000 0x2000c805 0x04204780 0x30020409 0xc4100780 0xd00e0201 0xa0c00780 0x1500ee00 0x2102e804 0xd00e0201 0xa0c00781 } @@ -1466,7 +1448,7 @@ code { name = cudaFindWastedBits lmem = 0 smem = 2140 - reg = 7 + reg = 6 bar = 1 const { segname = const @@ -1480,43 +1462,43 @@ code { } bincode { 0xa0000005 0x04000780 0x308003fd 0x644107c8 - 0xa0010003 0x00000000 0x30020209 0xc4100780 - 0x10010003 0x00000280 0x1000cc01 0x0423c780 - 0x40014c0d 0x00200780 0x3010060d 0xc4100780 - 0x60004c01 0x0020c780 0x3007000d 0xc4100780 - 0x30060001 0xc4100780 0x20008600 0x2100e800 - 0x20000401 0x04000780 0xd00e0001 0x80c00780 - 0x00000405 0xc0000780 0x04040e01 0xe4200780 - 0x00000405 0xc0000782 0x04000e01 0xe43f0780 + 0xa0010003 0x00000000 0x10010003 0x00000280 + 0x1000cc01 0x0423c780 0x40014c09 0x00200780 + 0x30100409 0xc4100780 0x60004c01 0x00208780 + 0x30050009 0xc4100780 0x30040001 0xc4100780 + 0x20008400 0x20008200 0x30020001 0xc4100780 + 0x2000c801 0x04200780 0xd00e0001 0x80c00780 + 0x00020205 0xc0000780 0x04040e01 0xe4200780 + 0x00020205 0xc0000782 0x04000e01 0xe43f0780 0x04020e01 0xe43f0780 0x861ffe03 0x00000000 0xd0107005 0x20000780 0x347cc1fd 0x6c20c7c8 0x1400c001 0x0423c780 0x10030003 0x00000280 - 0xa000420d 0x04200780 0x1000f811 0x0403c780 - 0x20000815 0x04004780 0x300501fd 0x6400c7c8 - 0xd0104005 0x20000780 0x2400c001 0x04210500 + 0xa0004209 0x04200780 0x1000f80d 0x0403c780 + 0x20000611 0x04004780 0x300401fd 0x6400c7c8 + 0xd0104005 0x20000780 0x2400c001 0x0420c500 0x20000201 0x04000500 0x30020001 0xc4100500 0x2000ca01 0x04200500 0xd00e0001 0x80c00500 - 0x1000f801 0x0403c280 0x00000405 0xc0000780 - 0xd400ce15 0x04204780 0x301f0019 0xec100780 - 0x04000e01 0xe4214780 0xd0060001 0x04008780 + 0x1000f801 0x0403c280 0x00020205 0xc0000780 + 0xd400ce11 0x04204780 0x301f0015 0xec100780 + 0x04000e01 0xe4210780 0xd0050001 0x04008780 0xd4083809 0x20000780 0xd800c001 0x04204780 - 0x04020e01 0xe4200780 0x20000811 0x0400c780 - 0xd0107005 0x20000780 0x3404c1fd 0x6c2107c8 + 0x04020e01 0xe4200780 0x2000060d 0x04008780 + 0xd0107005 0x20000780 0x3403c1fd 0x6c2107c8 0x1400c001 0x0423c780 0x1001a003 0x00000280 0x861ffe03 0x00000000 0x30810201 0x6440c7d0 - 0xa00001fd 0x0c0147c8 0x00000405 0xc0001680 + 0xa00001fd 0x0c0147c8 0x00020205 0xc0001680 0xd4043809 0x20001680 0x1800c001 0x0423d680 0xd400ce01 0x04205680 0x04000e01 0xe4201680 0x861ffe03 0x00000000 0x30820201 0x6440c7e0 - 0xa00001fd 0x0c0147d8 0x00000405 0xc0002680 + 0xa00001fd 0x0c0147d8 0x00020205 0xc0002680 0xd4023809 0x20002680 0x1800c001 0x0423e680 0xd400ce01 0x04206680 0x04000e01 0xe4202680 0x861ffe03 0x00000000 0x30830201 0x6440c7f0 - 0xa00001fd 0x0c0147e8 0x00000405 0xc0003680 + 0xa00001fd 0x0c0147e8 0x00020205 0xc0003680 0xd4013809 0x20003680 0x1800c001 0x0423f680 0xd400ce01 0x04207680 0x04000e01 0xe4203680 0x861ffe03 0x00000000 0xa005b003 0x00000000 - 0x1005b003 0x00002100 0x00000405 0xc0000780 + 0x1005b003 0x00002100 0x00020205 0xc0000780 0x1400ee01 0x0423c780 0xd400ce01 0x04204780 0x04000e01 0xe4200780 0x1400de01 0x0423c780 0xd400ce01 0x04204780 0x04000e01 0xe4200780 @@ -1525,18 +1507,18 @@ code { 0xd400ce01 0x04204780 0x04000e01 0xe4200780 0x1400d001 0x0423c780 0xd400ce01 0x04204780 0x04000e01 0xe4200780 0xf0000001 0xe0000002 - 0x00000405 0xc0000680 0xd40c380d 0x20000680 + 0x00020205 0xc0000680 0xd40c380d 0x20000680 0xd4083809 0x20000680 0x1c00c001 0x0423c680 0xd800c001 0x04204680 0x04020e01 0xe4200680 - 0x861ffe03 0x00000000 0x00000405 0xc0001680 + 0x861ffe03 0x00000000 0x00020205 0xc0001680 0xd40a380d 0x20001680 0xd4083809 0x20001680 0x1c00c001 0x0423d680 0xd800c001 0x04205680 0x04020e01 0xe4201680 0x861ffe03 0x00000000 - 0x00000405 0xc0002680 0xd409380d 0x20002680 + 0x00020205 0xc0002680 0xd409380d 0x20002680 0xd4083809 0x20002680 0x1c00c001 0x0423e680 0xd800c001 0x04206680 0x04020e01 0xe4202680 0x861ffe03 0x00000000 0xa0084003 0x00000000 - 0x10084003 0x00002100 0x00000405 0xc0000780 + 0x10084003 0x00002100 0x00020205 0xc0000780 0xd4083809 0x20000780 0x1800e001 0x0423c780 0xd800c001 0x04204780 0x04020e01 0xe4200780 0x1800d001 0x0423c780 0xd800c001 0x04204780 @@ -1581,7 +1563,7 @@ code { name = cudaComputeLPC lmem = 0 smem = 760 - reg = 8 + reg = 11 bar = 0 const { segname = const @@ -1598,9 +1580,9 @@ code { 0x10013003 0x00000280 0xa0004e0d 0x04200780 0x1000ca09 0x0423c780 0x40050c11 0x00000780 0x60040e11 0x00010780 0x30100811 0xc4100780 - 0x60040c09 0x00010780 0x3007040d 0xc4100780 - 0x30060409 0xc4100780 0x2000060d 0x04008780 - 0x30020009 0xc4100780 0x2103e80c 0x20038408 + 0x60040c09 0x00010780 0x3005040d 0xc4100780 + 0x30040409 0xc4100780 0x20028608 0x20028008 + 0x30020409 0xc4100780 0x2000c809 0x04208780 0xd00e0409 0x80c00780 0x00020005 0xc0000780 0x04001601 0xe4208780 0x307c01fd 0x6c0147ca 0xa0022003 0x00000000 0x10022003 0x00000280 @@ -1637,34 +1619,38 @@ code { 0x00020005 0xc0000780 0xd404e009 0x20000780 0x1900e008 0x1900e004 0x0400b601 0xe4208780 0xd004d809 0x20000780 0x04007601 0xe43f0780 - 0x307ccffd 0x6c20c7c8 0x1800c009 0x0423c780 - 0x1008b003 0x00000280 0x307c01fd 0x640087c8 - 0x213fee11 0x0fffffff 0x1000f815 0x0403c780 - 0xd002d809 0x20000780 0xb08205fd 0x605107d8 - 0x1000040d 0x0403c780 0xa800c019 0xe4204780 - 0xc0830c19 0x00401680 0xc083060d 0x00401680 - 0x9000060c 0x2045881c 0xc0030c19 0x00000780 - 0xd002d809 0x20000780 0x300701fd 0x640187d8 - 0xe806c009 0x00208780 0xd402e009 0x20001500 - 0x1800c00d 0x0423d500 0xe0010c0d 0x0000d500 - 0xe806c005 0x00205500 0x0400b601 0xe420d500 - 0x00020a09 0xc0000680 0x0800f601 0xe4208680 - 0x20400a0d 0x04000780 0x00020609 0xc0000780 - 0xd801d00d 0x20000780 0x30000bfd 0x6400c7d8 - 0xcc06c01d 0x00200780 0x1000f81d 0x0403d280 - 0x30000bfd 0x640147d8 0xb0000e0d 0x00018780 - 0x10000e0d 0x0403d280 0xd401d80d 0x20000780 - 0xbc00c00d 0x0020c780 0x30000bfd 0x640047d8 - 0x04007601 0xe420c780 0xa0087003 0x00000000 - 0x10087003 0x00001280 0xd005e00d 0x20000780 - 0x30050a0d 0xc4100780 0x2d03e00c 0x2003800c - 0xd801d809 0x20000780 0x30020619 0xc4100780 - 0xa800c00d 0xe4204780 0x2000d019 0x04218780 - 0xd00e0c0d 0xa0c00780 0xf0000001 0xe0000002 - 0x20018a15 0x00000003 0x3005cffd 0x6c2147d8 - 0x1005e003 0x00001280 0x3000cffd 0x6420c7c8 - 0x30000003 0x00000280 0xd005e009 0x20000780 - 0x3005ce05 0xc4300780 0x2901e004 0x20018000 + 0x307ccffd 0x6c20c7c8 0x30020011 0xc4100780 + 0x1800c009 0x0423c780 0x10091003 0x00000280 + 0x307c01fd 0x640087c8 0x213fee15 0x0fffffff + 0x1000f819 0x0403c780 0x3002ce1d 0xc4300780 + 0x1000f821 0x0403c780 0xd002d805 0x20000780 + 0xb08205fd 0x605107d8 0x1000040d 0x0403c780 + 0xa400c025 0xe4204780 0xc0831225 0x00401680 + 0xc083060d 0x00401680 0x90000628 0x20488a0c + 0xc00a1225 0x00000780 0xd002d805 0x20000780 + 0x300301fd 0x640187d8 0xe409c009 0x00208780 + 0x00000805 0xc0001500 0xd402e009 0x20001500 + 0x1800c00d 0x0423d500 0xe001120d 0x0000d500 + 0xe809c005 0x00205500 0x0400b601 0xe420d500 + 0x00000c05 0xc0000680 0x0400f601 0xe4208680 + 0x20400c0d 0x04010780 0x00000605 0xc0000780 + 0xd401d009 0x20000780 0x30040dfd 0x6400c7d8 + 0xc809c029 0x00200780 0x1000f829 0x0403d280 + 0x30040dfd 0x640147d8 0xb000140d 0x00024780 + 0x00000809 0xc0000780 0x1000140d 0x0403d280 + 0xd801d80d 0x20000780 0xbc00c00d 0x0020c780 + 0x30040dfd 0x640047d8 0x08007601 0xe420c780 + 0xa008c003 0x00000000 0x1008c003 0x00001280 + 0xd005e009 0x20000780 0x3005100d 0xc4100780 + 0x2903e00c 0x2003800c 0xd401d805 0x20000780 + 0x30020625 0xc4100780 0xa400c00d 0xe4204780 + 0x2000d025 0x04224780 0xd00e120d 0xa0c00780 + 0xf0000001 0xe0000002 0x20048c19 0x00000003 + 0x30070dfd 0x6c0147d8 0x20019021 0x00000003 + 0x10061003 0x00001280 0x3000cffd 0x6420c7c8 + 0x30000003 0x00000280 0xd005e005 0x20000780 + 0x3005ce05 0xc4300780 0x2400c005 0x04204780 + 0x00000805 0xc0000780 0x20000001 0x04004780 0xd403d805 0x20000780 0x30020005 0xc4100780 0x1500e000 0x2101f004 0xd00e0201 0xa0c00781 } @@ -1679,101 +1665,99 @@ code { segname = const segnum = 1 offset = 0 - bytes = 24 + bytes = 28 mem { - 0x000003ff 0x0000002f 0x0000001f 0x00000001 - 0x000fffff 0x0000000e + 0x000003ff 0x0000002f 0x00000030 0x0000001f + 0x00000001 0x000fffff 0x0000000e } } bincode { 0xd0800205 0x00400780 0xa0000215 0x04000780 0xa0000019 0x04000780 0x30040a01 0xc4100780 0x20000c05 0x04000780 0x308103fd 0x644107c8 - 0xa0011003 0x00000000 0x3002021d 0xc4100780 - 0x10011003 0x00000280 0xa0004e01 0x04200780 - 0x30070009 0xc4100780 0x30060001 0xc4100780 - 0x20008400 0x2100ee00 0x20000e01 0x04000780 - 0xd00e0001 0x80c00780 0x00000e05 0xc0000780 - 0x04025601 0xe4200780 0xf0000001 0xe0000002 - 0x861ffe03 0x00000000 0xa0004c09 0x04200780 - 0x1000d201 0x0423c780 0x4004020d 0x00000780 - 0x3010060d 0xc4100780 0x6004000d 0x0000c780 - 0x1000d401 0x0423c780 0x40010c11 0x00000780 - 0x60000e11 0x00010780 0x30100811 0xc4100780 - 0x60000c01 0x00010780 0x308203fd 0x6c4107c8 - 0xa0033003 0x00000000 0x20000025 0x04004780 - 0x10033003 0x00000280 0xd0095805 0x20000780 - 0x2400c001 0x04204780 0x30001201 0xac000780 - 0x308201fd 0x6c40c7c8 0xa0031003 0x00000000 - 0x10030003 0x00000280 0xd0096005 0x20000780 - 0x2400c001 0x04224780 0x30020001 0xc4100780 + 0x60844e01 0x00604500 0x30020001 0xc4100500 + 0x2000ce01 0x04200500 0xd00e0001 0x80c00500 + 0x00020205 0xc0000500 0x04025601 0xe4200500 + 0x861ffe03 0x00000000 0xa0004c0d 0x04200780 + 0x1000d201 0x0423c780 0x40060209 0x00000780 + 0x30100409 0xc4100780 0x60060009 0x00008780 + 0x1000d401 0x0423c780 0x40010811 0x00000780 + 0x60000a11 0x00010780 0x30100811 0xc4100780 + 0x60000801 0x00010780 0x308303fd 0x6c4107c8 + 0xa002d003 0x00000000 0x20000021 0x04004780 + 0x1002d003 0x00000280 0xd0095805 0x20000780 + 0x2400c001 0x04204780 0x30001001 0xac000780 + 0x308301fd 0x6c40c7c8 0xa002b003 0x00000000 + 0x1002a003 0x00000280 0xd0096005 0x20000780 + 0x2400c001 0x04220780 0x30020001 0xc4100780 0x2000cc01 0x04200780 0x20008001 0x0ffffffb - 0xd00e000d 0x80c00780 0x1400d401 0x0423c780 - 0x30000601 0xec000780 0x10031003 0x00000780 - 0x1000f801 0x0403c780 0x00000e05 0xc0000782 + 0xd00e0009 0x80c00780 0x1400d401 0x0423c780 + 0x30000401 0xec000780 0x1002b003 0x00000780 + 0x1000f801 0x0403c780 0x00020205 0xc0000782 0x04001601 0xe4200780 0x1000d401 0x0423c782 - 0x4005000d 0x00000780 0x60040211 0x0000c780 - 0x10018021 0x00000003 0x1000d00d 0x0423c780 - 0x30100811 0xc4100780 0x3003100d 0xc4000780 - 0x60040021 0x00010780 0x3003900c 0x1100f200 - 0x3003d411 0xa4200780 0x4001100d 0x00000780 - 0x6000120d 0x0000c780 0x3010060d 0xc4100780 - 0x60001001 0x0000c780 0x30010001 0x6c0107d0 - 0xa00001fd 0x0c0147c8 0xa004e003 0x00000000 - 0x1004d003 0x00001100 0xd0096005 0x20000780 - 0x2400c001 0x04224780 0x30020001 0xc4100780 - 0x2000cc01 0x04200780 0xd00e000d 0x80c00780 - 0x1400d401 0x0423c780 0x30000601 0xec000780 - 0x1004e003 0x00000780 0x1000f801 0x0403c780 - 0x00000e05 0xc0000782 0x04005601 0xe4200780 + 0x40070009 0x00000780 0x60060211 0x00008780 + 0x1001801d 0x00000003 0x1000d009 0x0423c780 + 0x30100811 0xc4100780 0x30020e09 0xc4000780 + 0x6006001d 0x00010780 0x30028e08 0x1100f200 + 0x3002d411 0xa4200780 0x40011009 0x00000780 + 0x60001209 0x00008780 0x30100409 0xc4100780 + 0x60001001 0x00008780 0x30010001 0x6c0107d0 + 0xa00001fd 0x0c0147c8 0xa0048003 0x00000000 + 0x10047003 0x00001100 0xd0096005 0x20000780 + 0x2400c001 0x04220780 0x30020001 0xc4100780 + 0x2000cc01 0x04200780 0xd00e0009 0x80c00780 + 0x1400d401 0x0423c780 0x30000401 0xec000780 + 0x10048003 0x00000780 0x1000f801 0x0403c780 + 0x00020205 0xc0000782 0x04005601 0xe4200780 0x861ffe03 0x00000000 0xd0095805 0x20000780 - 0x3500e029 0x00000003 0x307c15fd 0x6c0187d8 - 0x1000f80d 0x0403c780 0x1400c001 0x0423c780 - 0x10068003 0x00001280 0x20001401 0x04004780 - 0x200b8029 0x00000003 0x102c8001 0x00000003 - 0x00021409 0xc0000780 0x00000005 0xc0000780 - 0x1000f829 0x0403c780 0xd4098011 0x20000780 - 0xd801000d 0x20000780 0x20019429 0x00000003 - 0x1000c001 0x0423c784 0xd0095811 0x20000780 - 0x6c00c00d 0x8020c780 0x300ac1fd 0x6c2147dc - 0xd8000809 0x20000780 0xd4000805 0x20000780 - 0x1000c001 0x0423c784 0x1005d003 0x00001280 - 0xd0096809 0x20000780 0x3009002d 0x6c00c780 - 0x1000f829 0x0403c780 0x00000e05 0xc0000780 - 0x1800c001 0x0423c780 0xa000161d 0x2c014780 - 0x10000629 0x2440c280 0x30000601 0xec000780 - 0xd4015805 0x20000780 0xd00715fd 0x040007c8 + 0x3500e009 0x00000003 0x307c05fd 0x6c0187d8 + 0x1000f825 0x0403c780 0x1400c001 0x0423c780 + 0x10062003 0x00001280 0x20000401 0x04004780 + 0xd0095809 0x20000780 0x200b8001 0x00000003 + 0x3802c009 0xc4300780 0x00020005 0xc0000780 + 0x102c8029 0x00000003 0x1800c001 0x0423c780 + 0x202c842d 0x00000003 0x00001409 0xc0000780 + 0xd809800d 0x20000780 0x20049429 0x00000003 + 0xd4010009 0x20000780 0x1c00c009 0x0423c780 + 0x300b15fd 0x640147d8 0x6802c025 0x80224780 + 0xd4000805 0x20000780 0x10059003 0x00001280 + 0xd0096809 0x20000780 0x30080029 0x6c00c780 + 0x1000f809 0x0403c780 0x00020205 0xc0000780 + 0x1800c001 0x0423c780 0xa0001429 0x2c014780 + 0x10000809 0x2440c280 0x30001201 0xec000780 + 0xd4015805 0x20000780 0xd00a05fd 0x040007c8 0x2440c001 0x04200780 0xd009a805 0x20000780 - 0x2400c00d 0x04224680 0x3002060d 0xc4100680 - 0x2000ca0d 0x0420c680 0xd00e0601 0xa0c00680 + 0x2400c009 0x04220680 0x30020409 0xc4100680 + 0x2000ca09 0x04208680 0xd00e0401 0xa0c00680 0x1000f801 0x0403c100 0x861ffe03 0x00000000 - 0x301f001d 0xec100780 0x30010025 0xc4100780 - 0x1100f20c 0x10008200 0xd0090e1d 0x04008780 - 0x200af003 0x00000780 0x20000201 0x04000780 - 0x00020005 0xc0000780 0x30840e01 0xac400780 + 0x301f0021 0xec100780 0x30010025 0xc4100780 + 0x1100f208 0x10008200 0xd0091021 0x04008780 + 0x200ab003 0x00000780 0x20000201 0x04000780 + 0x00020005 0xc0000780 0x30851001 0xac400780 0x04001601 0xe4200780 0x861ffe03 0x00000000 - 0xd0095805 0x20000780 0x1000d20d 0x0423c780 + 0xd0095805 0x20000780 0x1000d209 0x0423c780 0x20018a05 0x00000003 0x1000d201 0x0423c780 - 0x3503e00c 0x4001041c 0x60000625 0x0001c780 - 0x4007041d 0x00000780 0x30101225 0xc4100780 - 0x6006061d 0x0001c780 0x200005fd 0x040187c8 - 0x60000401 0x00024780 0x30100e09 0xc4100780 - 0x307cd3fd 0x6c20c7d8 0x60060401 0x00008100 - 0x1009f003 0x00001280 0x2101f205 0x00000003 - 0x40010c05 0x00018780 0x200b8209 0x00000003 - 0x00020405 0xc0000780 0xa009e003 0x00000000 - 0x2000d209 0x04204780 0x20018205 0x00000003 - 0x3605c20d 0xec200780 0x300203fd 0x6c0147c8 - 0x20000001 0x0400c780 0x10099003 0x00000280 + 0x3502e008 0x40010420 0x60000625 0x00020780 + 0x40050421 0x00000780 0x30101225 0xc4100780 + 0x60040621 0x00020780 0x200007fd 0x040187c8 + 0x60000401 0x00024780 0x3010100d 0xc4100780 + 0x307cd3fd 0x6c20c7d8 0x60040401 0x0000c100 + 0x1009b003 0x00001280 0x2101f205 0x00000003 + 0x40418c04 0x2101f208 0x30020205 0xc4100780 + 0x30020409 0xc4100780 0xa009a003 0x00000000 + 0x202c8205 0x00000003 0x202c8409 0x00000003 + 0x00000205 0xc0000780 0x20048205 0x00000003 + 0x3405c00d 0xec200780 0x300203fd 0x640147c8 + 0x20000001 0x0400c780 0x10094003 0x00000280 0xf0000001 0xe0000002 0x300609fd 0x640107c8 - 0x30850bfd 0x6440c2c8 0x30000003 0x00000100 - 0x2101f009 0x00000003 0x100f8005 0x00000003 - 0x30020205 0xc4000780 0x40034e0d 0x00200780 - 0x3010060d 0xc4100780 0x30020a09 0xc4000780 - 0x60024e0d 0x0020c780 0x20069004 0x20028608 + 0x30860bfd 0x6440c2c8 0x30000003 0x00000100 + 0x2101f005 0x00000003 0x100f8009 0x00000003 + 0x30010409 0xc4000780 0x40054e0d 0x00200780 + 0x30100611 0xc4100780 0x30010a0d 0xc4000780 + 0x60044e09 0x00210780 0x20068e04 0x20038408 0x20000205 0x04008780 0x30020205 0xc4100780 0x2000c805 0x04204780 0xd00e0201 0xa0c00780 - 0x30000003 0x00000780 0xa0000625 0x04114780 + 0x30000003 0x00000780 0xa0000425 0x04114780 0xa0001229 0x44004780 0xa000002d 0x04114780 0x90001431 0x00000780 0xa0001629 0x44064780 0x203e9831 0x0fffffff 0xc00c1429 0x0000c7c0 @@ -1785,10 +1769,10 @@ code { 0x40122a31 0x00000780 0x60132831 0x00030780 0x30101831 0xc4100780 0x60122831 0x00030780 0x3000182d 0x0402c780 0x300b1225 0x6400c780 - 0xd0000601 0x04008780 0x301f0001 0xe4100780 + 0xd0000401 0x04008780 0x301f0001 0xe4100780 0x30001229 0x04028780 0xa0000025 0x2c014780 - 0xd00a1225 0x04008780 0x307c07fd 0x6c0147c8 - 0x20000001 0x04024780 0xd0030001 0x0402c500 + 0xd00a1225 0x04008780 0x307c05fd 0x6c0147c8 + 0x20000001 0x04024780 0xd0020001 0x0402c500 0x30000003 0x00000780 0xf0000001 0xe0000001 } } @@ -1796,94 +1780,90 @@ code { name = cudaEstimateResidual1 lmem = 0 smem = 2412 - reg = 7 + reg = 6 bar = 1 const { segname = const segnum = 1 offset = 0 - bytes = 32 + bytes = 36 mem { - 0x000003ff 0x00000020 0x0000002f 0x0000001f - 0x007fffff 0x0000007f 0x0000003f 0x00000040 + 0x000003ff 0x00000020 0x0000002f 0x00000030 + 0x0000001f 0x007fffff 0x0000007f 0x0000003f + 0x00000040 } } bincode { 0xd0800209 0x00400780 0xa0000001 0x04000780 - 0x60200401 0x00000003 0x308201fd 0x644107c8 - 0xa000f003 0x00000000 0x3002000d 0xc4100780 - 0x1000f003 0x00000280 0xa0004e05 0x04200780 - 0x30070209 0xc4100780 0x30060205 0xc4100780 - 0x20018404 0x2101ec04 0x20000605 0x04004780 - 0xd00e0205 0x80c00780 0x00000605 0xc0000780 - 0x04045201 0xe4204780 0x307c0005 0x6c0087d2 - 0xa00003fd 0x0c0147c8 0xa001e003 0x00000000 - 0x1001e003 0x00001100 0x1000d005 0x0423c780 + 0x60200401 0x00000003 0x20098005 0x00000003 + 0x308201fd 0x644107c8 0x00020205 0xc0000780 + 0x60864e05 0x00600500 0x30020205 0xc4100500 + 0x2000cc05 0x04204500 0xd00e0205 0x80c00500 + 0x04044001 0xe4204500 0x307c0005 0x6c0087d0 + 0xa00003fd 0x0c0147c8 0xa001a003 0x00000000 + 0x1001a003 0x00001100 0x1000d005 0x0423c780 0x40034c09 0x00200780 0x30100409 0xc4100780 0x60024c05 0x00208780 0x0004b201 0xe4204780 - 0xd012c809 0x20000780 0xd0114805 0x20000780 - 0x1100f004 0x1900e008 0x2501e010 0x2542ee04 - 0x30040205 0xac000780 0x0004b401 0xe4204780 + 0xd012c80d 0x20000780 0xd0114809 0x20000780 + 0x1100f004 0x1d00e008 0x2901e00c 0x2942ee04 + 0x30030205 0xac000780 0x0004b401 0xe4204780 0xf0000001 0xe0000002 0x861ffe03 0x00000000 - 0xd012d005 0x20000780 0x3400c1fd 0x6c20c7d8 - 0xa002f003 0x00000000 0x1002e003 0x00001280 - 0xd012c809 0x20000780 0xd0115005 0x20000780 - 0x1900e004 0x2501e004 0x20000005 0x04004780 + 0xd012d009 0x20000780 0x3800c1fd 0x6c20c7d8 + 0xa002b003 0x00000000 0x1002a003 0x00001280 + 0xd012c80d 0x20000780 0xd0115009 0x20000780 + 0x1d00e004 0x2901e004 0x20000005 0x04004780 0x30020205 0xc4100780 0x2000ca05 0x04204780 - 0xd00e0209 0x80c00780 0x1400d405 0x0423c780 - 0x30010405 0xec000780 0x1002f003 0x00000780 - 0x1000f805 0x0403c780 0x00000605 0xc0000782 - 0x30830009 0x6c40c7e0 0x04001201 0xe4204780 - 0xa00005fd 0x0c0147d8 0xa0047003 0x00000000 - 0x10047003 0x00002100 0xd012d005 0x20000780 - 0x2000d005 0x04200780 0x3401c1fd 0x6c20c7e8 - 0x00020205 0xc0000780 0xa0046003 0x00000000 - 0x10045003 0x00002280 0xd012c80d 0x20000780 - 0xd0115009 0x20000780 0x1d00e004 0x2100f008 - 0x2901e004 0x20018404 0x30020205 0xc4100780 + 0xd00e0209 0x80c00780 0x1800d405 0x0423c780 + 0x30010405 0xec000780 0x1002b003 0x00000780 + 0x1000f805 0x0403c780 0x30840009 0x6c40c7e2 + 0x04000001 0xe4204780 0xa00005fd 0x0c0147d8 + 0xa0043003 0x00000000 0x10043003 0x00002100 + 0xd012d009 0x20000780 0x2000d005 0x04200780 + 0x3801c1fd 0x6c20c7e8 0x00020209 0xc0000780 + 0xa0042003 0x00000000 0x10041003 0x00002280 + 0xd012c811 0x20000780 0xd011500d 0x20000780 + 0x1000c005 0x0423c784 0x2100f008 0x2d01e004 + 0x20000405 0x04004780 0x30020205 0xc4100780 0x2000ca05 0x04204780 0xd00e0209 0x80c00780 - 0x1800d405 0x0423c780 0x30010405 0xec000780 - 0x10046003 0x00000780 0x1000f805 0x0403c780 - 0x04001201 0xe4204782 0xf0000001 0xe0000002 - 0x861ffe03 0x00000000 0xd0114805 0x20000780 - 0x3500e005 0x00000003 0x307c03fd 0x6c0187e8 - 0x1000f811 0x0403c780 0x1005d003 0x00002280 - 0xd0114809 0x20000780 0x20098009 0x00000003 - 0x3802c005 0xc4300780 0x00020405 0xc0000780 - 0x10248015 0x00000003 0x2800c009 0x04200780 - 0x20248219 0x00000003 0x00000a09 0xc0000780 - 0xd8118009 0x20000780 0x1800c005 0x0423c780 - 0x20048a15 0x00000003 0x6601c211 0x80210780 - 0x30060bfd 0x640147e8 0x10055003 0x00002280 - 0x1005f003 0x00000780 0xd0114805 0x20000780 - 0x2400c009 0x04200780 0xd0115805 0x20000780 - 0x1400c005 0x0423c780 0x30010805 0xec000780 - 0x00020405 0xc0000780 0x2440d205 0x04204780 - 0xd012d005 0x20000780 0x301f0211 0xec100780 - 0x30010215 0xc4100780 0x3402c005 0x6c210780 - 0xd0050809 0x04008780 0xa0000205 0x2c014780 - 0x30840409 0xac400780 0x40020205 0x00018780 - 0x00000605 0xc0000780 0x04025201 0xe4204780 - 0x861ffe03 0x00000000 0x308501fd 0x6c4107e8 - 0x00000605 0xc0002500 0xd40d480d 0x20002500 - 0xd4094809 0x20002500 0x1c00c005 0x0423e500 - 0x2800c005 0x04206500 0x04025201 0xe4206500 + 0x1c00d405 0x0423c780 0x30010405 0xec000780 + 0x10042003 0x00000780 0x1000f805 0x0403c780 + 0x08001201 0xe4204782 0xf0000001 0xe0000002 + 0x861ffe03 0x00000000 0xd0114809 0x20000780 + 0x3900e005 0x00000003 0x307c03fd 0x6c0187e8 + 0x1000f80d 0x0403c780 0x10058003 0x00002280 + 0xd0114809 0x20000780 0x3802c005 0xc4300780 + 0x10248011 0x00000003 0x2800c009 0x04200780 + 0x20248215 0x00000003 0xd4000009 0x20000780 + 0x0000080d 0xc0000780 0xdc11800d 0x20000780 + 0x1c00c005 0x0423c780 0x20048811 0x00000003 + 0x6a01c20d 0x8020c780 0x300509fd 0x640147e8 + 0x10050003 0x00002280 0x1005a003 0x00000780 + 0xd0114809 0x20000780 0x2800c009 0x04200780 + 0xd0115809 0x20000780 0x1800c005 0x0423c780 + 0x30010605 0xec000780 0x00020409 0xc0000780 + 0x2840d205 0x04204780 0xd012d009 0x20000780 + 0x301f020d 0xec100780 0x30010211 0xc4100780 + 0x3802c005 0x6c210780 0xd0040609 0x04008780 + 0xa0000205 0x2c014780 0x30850409 0xac400780 + 0x40020205 0x00018780 0x04024001 0xe4204780 0x861ffe03 0x00000000 0x308601fd 0x6c4107e8 - 0x00000605 0xc0002500 0xd40b480d 0x20002500 - 0xd4094809 0x20002500 0x1c00c001 0x0423e500 - 0x2800c001 0x04202500 0x04025201 0xe4202500 - 0x861ffe03 0x00000000 0x00000605 0xc0001680 - 0xd40a480d 0x20001680 0xd4094809 0x20001680 - 0x1c00c001 0x0423d680 0x2800c001 0x04201680 - 0x04025201 0xe4201680 0x861ffe03 0x00000000 - 0xa0095003 0x00000000 0x10095003 0x00001100 - 0x00000605 0xc0000780 0xd4094809 0x20000780 + 0xd40d000d 0x20002500 0xd4090009 0x20002500 + 0x1c00c005 0x0423e500 0x2800c005 0x04206500 + 0x04024001 0xe4206500 0x861ffe03 0x00000000 + 0x308701fd 0x6c4107e8 0xd40b000d 0x20002500 + 0xd4090009 0x20002500 0x1c00c001 0x0423e500 + 0x2800c001 0x04202500 0x04024001 0xe4202500 + 0x861ffe03 0x00000000 0xd40a000d 0x20001680 + 0xd4090009 0x20001680 0x1c00c001 0x0423d680 + 0x2800c001 0x04201680 0x04024001 0xe4201680 + 0x861ffe03 0x00000000 0xa008b003 0x00000000 + 0x1008b003 0x00001100 0xd4090009 0x20000780 0x1800e001 0x0423c780 0x2800c001 0x04200780 - 0x04025201 0xe4200780 0x1900f000 0x2900e000 - 0x04025201 0xe4200780 0x1900e800 0x2900e000 - 0x04025201 0xe4200780 0x1900e400 0x2900e000 - 0x04025201 0xe4200780 0x1900e200 0x2900e000 - 0x04025201 0xe4200780 0xf0000001 0xe0000002 + 0x04024001 0xe4200780 0x1900f000 0x2900e000 + 0x04024001 0xe4200780 0x1900e800 0x2900e000 + 0x04024001 0xe4200780 0x1900e400 0x2900e000 + 0x04024001 0xe4200780 0x1900e200 0x2900e000 + 0x04024001 0xe4200780 0xf0000001 0xe0000002 0x30000003 0x00000100 0xa0004c01 0x04200780 0x61002e01 0x00000007 0xd0094805 0x20000780 0x30020005 0xc4100780 0x1500e000 0x2101e804 @@ -1916,75 +1896,72 @@ code { name = cudaCalcLargePartition lmem = 0 smem = 2284 - reg = 10 + reg = 11 bar = 1 const { segname = const segnum = 1 offset = 0 - bytes = 20 + bytes = 24 mem { - 0x000003ff 0x0000002f 0x00000100 0x000fffff - 0x0000000e + 0x000003ff 0x0000002f 0x00000030 0x00000100 + 0x000fffff 0x0000000e } } bincode { 0xd0800205 0x00400780 0xa000020d 0x04000780 - 0xa0000001 0x04000780 0x30040605 0xc4100780 - 0x20000009 0x04004780 0x308105fd 0x644107c8 - 0xa0011003 0x00000000 0x30020411 0xc4100780 - 0x10011003 0x00000280 0xa0004e05 0x04200780 - 0x30070215 0xc4100780 0x30060205 0xc4100780 - 0x20018a04 0x2101ee04 0x20000805 0x04004780 - 0xd00e0205 0x80c00780 0x00000805 0xc0000780 - 0x04041601 0xe4204780 0xf0000001 0xe0000002 + 0xa0000009 0x04000780 0x30040601 0xc4100780 + 0x20000401 0x04000780 0x308101fd 0x644107c8 + 0x60844e05 0x00600500 0x30020205 0xc4100500 + 0x2000ce05 0x04204500 0xd00e0205 0x80c00500 + 0x00020005 0xc0000500 0x04041601 0xe4204500 0x861ffe03 0x00000000 0x307cd3fd 0x6c20c7c8 - 0x1000f819 0x0403c780 0x10046003 0x00000280 + 0x1000f811 0x0403c780 0x10040003 0x00000280 0xa0004c15 0x04200780 0x1000d205 0x0423c780 - 0x400a061d 0x00000780 0x30100e1d 0xc4100780 - 0x600a0405 0x0001c780 0x3082d215 0xac600780 - 0x2000d221 0x04204780 0xa0045003 0x00000000 - 0x30000bfd 0x6c0107c8 0x2001841c 0x20088420 - 0x10000405 0x0403c780 0xd0105805 0x20000780 - 0x3407c1fd 0x6c20c7d8 0x3001d3fd 0x6c2112d8 - 0xa002d003 0x00000000 0x1002c003 0x00001100 - 0xd010a805 0x20000780 0x2400c009 0x0421c780 - 0x30020409 0xc4100780 0x2000ca09 0x04208780 - 0xd00e0425 0x80c00780 0x1002d003 0x00000780 - 0x1000f825 0x0403c780 0x301f1209 0xec100782 - 0x30011225 0xc4100780 0xd0090409 0x04008780 - 0x00000805 0xc0000780 0x30830409 0xac400780 - 0x04001601 0xe4208780 0x861ffe03 0x00000000 - 0xa003f003 0x00000000 0x10000009 0x0403c780 - 0x1003f003 0x00000100 0x200b8025 0x00000003 - 0x00021205 0xc0000780 0x20108409 0x00000003 - 0x3403c025 0xec200780 0x30020bfd 0x6c0107d8 - 0x20000c19 0x04024780 0xd4008005 0x20000780 - 0x10039003 0x00001280 0xf0000001 0xe0000002 - 0x861ffe03 0x00000000 0x20008e1d 0x00000013 - 0x30080ffd 0x6c0047d8 0x20008205 0x00000013 - 0x10021003 0x00001280 0xf0000001 0xe0000002 - 0x30830c05 0xac400780 0x00000805 0xc0000780 + 0x400a0619 0x00000780 0x30100c19 0xc4100780 + 0x600a0419 0x00018780 0x3083d215 0xac600780 + 0xa003f003 0x00000000 0x2106f21c 0x10008004 + 0x30020bfd 0x6c0107c8 0x20068018 0x2007801c + 0xd0105805 0x20000780 0x3406c1fd 0x6c20c7d8 + 0x3001d3fd 0x6c2112d8 0xa0026003 0x00000000 + 0x10025003 0x00001100 0xd010a805 0x20000780 + 0x2400c021 0x04218780 0x30021021 0xc4100780 + 0x2000ca21 0x04220780 0xd00e1021 0x80c00780 + 0x10026003 0x00000780 0x1000f821 0x0403c780 + 0x301f1025 0xec100782 0x30011021 0xc4100780 + 0xd0081221 0x04008780 0x00020005 0xc0000780 + 0x30841021 0xac400780 0x04001601 0xe4220780 + 0x861ffe03 0x00000000 0xa0039003 0x00000000 + 0x10039003 0x00000100 0x30020421 0xc4100780 + 0x30020a25 0xc4100780 0x202c9021 0x00000003 + 0x202c9225 0x00000003 0x00001005 0xc0000780 + 0x20009021 0x00000007 0x3403c029 0xec200780 + 0x300911fd 0x640047d8 0x20000811 0x04028780 + 0x10033003 0x00001280 0xf0000001 0xe0000002 + 0x861ffe03 0x00000000 0x20008c19 0x00000013 + 0x30070dfd 0x6c0047d8 0x20008205 0x00000013 + 0x1001a003 0x00001280 0xf0000001 0xe0000002 + 0x30840805 0xac400780 0x00020005 0xc0000780 0x04021601 0xe4204780 0xd4085809 0x20000780 0x1900f004 0x2901e004 0x04021601 0xe4204780 0x1900e804 0x2901e004 0x04021601 0xe4204780 0x1900e404 0x2901e004 0x04021601 0xe4204780 - 0x1800c205 0x0423c780 0x307c01fd 0x640087c8 - 0x2800c001 0x04204780 0x308407fd 0x6440c2c8 - 0x04021601 0xe4200780 0x30000003 0x00000100 + 0x1800c205 0x0423c780 0x307c05fd 0x640087c8 + 0x2800c005 0x04204780 0x308507fd 0x6440c2c8 + 0x04021601 0xe4204780 0x30000003 0x00000100 0xd0105805 0x20000780 0x2101f019 0x00000003 - 0x100f8005 0x00000003 0x20018609 0x00000003 - 0x1000d201 0x0423c780 0x30060205 0xc4000780 - 0x1100f214 0x41032e1c 0x40000a24 0x3505e014 - 0x30100e21 0xc4100780 0x6001081d 0x00024780 - 0x3006060d 0xc4000780 0x400b0819 0x00000780 - 0x60024e05 0x00220780 0x00000805 0xc0000780 - 0x30100e1d 0xc4100780 0x600a0a11 0x00018780 - 0x2000020d 0x0400c780 0xa0004c05 0x042007c0 - 0x60000801 0x0001c780 0x30100811 0xc4100780 - 0xd4085805 0x20000780 0x20000205 0x0400c780 - 0x600a0801 0x00010100 0x3483c009 0xac600780 - 0x30020205 0xc4100780 0x20028000 0x2101e804 + 0x100f8009 0x00000003 0x20018611 0x00000003 + 0x1000d205 0x0423c780 0x30060415 0xc4000780 + 0x1100f208 0x410b2e20 0x4002121c 0x3502e008 + 0x30101021 0xc4100780 0x6003101d 0x0001c780 + 0x30060619 0xc4000780 0x4005100d 0x00000780 + 0x600a4e21 0x00220780 0x00020005 0xc0000780 + 0x30100e01 0xc4100780 0x60041215 0x0000c780 + 0x20001019 0x04018780 0xa0004c0d 0x042007c0 + 0x60021001 0x00000780 0x30100a05 0xc4100780 + 0xd4085805 0x20000780 0x2000060d 0x04018780 + 0x60041001 0x00004100 0x3484c005 0xac600780 + 0x30020609 0xc4100780 0x20018000 0x2102e804 0xd00e0201 0xa0c00781 } } @@ -1992,15 +1969,16 @@ code { name = cudaCopyBestMethodStereo lmem = 0 smem = 68 - reg = 6 + reg = 4 bar = 1 const { segname = const segnum = 1 offset = 0 - bytes = 16 + bytes = 24 mem { 0x00000003 0x00000004 0x7fffffff 0x0000002f + 0x00000060 0x00000180 } } bincode { @@ -2037,35 +2015,31 @@ code { 0x00001e01 0xe4205500 0x1000d005 0x0423d500 0x00002001 0xe4205500 0xf0000001 0xe0000002 0x861ffe03 0x00000000 0x30830005 0x6440c7e0 - 0xa00003fd 0x0c0147d8 0xa0051003 0x00000000 - 0x10051003 0x00002100 0x41022e05 0x00000003 - 0x3007de0d 0xc4300780 0x3006de11 0xc4300780 - 0x30070209 0xc4100780 0x30060205 0xc4100780 - 0x2004860c 0x20018404 0x30020009 0xc4100780 - 0x2103ea10 0x2101e80c 0x20000405 0x04010780 - 0xd00e0205 0x80c00780 0x20000409 0x0400c780 + 0xa00003fd 0x0c0147d8 0xa004f003 0x00000000 + 0x1004f003 0x00002100 0x3005de05 0xc4300780 + 0x3004de09 0xc4300780 0x20028204 0x20018008 + 0x60884e05 0x00600780 0x30020409 0xc4100780 + 0x3002020d 0xc4100780 0x2000ca05 0x04208780 + 0xd00e0205 0x80c00780 0x2000c809 0x0420c780 0xd00e0405 0xa0c00780 0xf0000001 0xe0000002 - 0xa005f003 0x00000000 0x1005f003 0x00000100 - 0x41022e05 0x00000003 0x3007ce09 0xc4300780 - 0x3006ce0d 0xc4300780 0x30070211 0xc4100780 - 0x30060215 0xc4100780 0x20038404 0x20058808 - 0x2101ea04 0x2102e808 0x20288205 0x00000003 - 0xd00e0205 0x80c00780 0x20288409 0x00000003 - 0xd00e0405 0xa0c00780 0xf0000001 0xe0000002 - 0xa006e003 0x00000000 0x1006e003 0x00001100 - 0x41022e05 0x00000003 0x3007e00d 0xc4300780 - 0x30070209 0xc4100780 0x30060205 0xc4100780 - 0x3006e011 0xc4300780 0x20018404 0x20048608 - 0x30020001 0xc4100780 0x2101e804 0x2102ea08 - 0x20018004 0x20028000 0xd00e0001 0x80c00780 - 0x20008205 0x0000000f 0xd00e0201 0xa0c00780 - 0xf0000001 0xe0000002 0x30000003 0x00000100 - 0x41022e01 0x00000003 0x3007d005 0xc4300780 - 0x3006d009 0xc4300780 0x3007000d 0xc4100780 - 0x30060011 0xc4100780 0x20028200 0x20048604 - 0x2100ea00 0x2101e804 0x20288001 0x00000003 - 0xd00e0001 0x80c00780 0x20288205 0x0000000f - 0xd00e0201 0xa0c00781 + 0xa005b003 0x00000000 0x1005b003 0x00000100 + 0x3007ce05 0xc4300780 0x3006ce09 0xc4300780 + 0x20028208 0x1100e804 0x2000ca09 0x04208780 + 0x61002e05 0x0000001b 0x20288409 0x00000003 + 0xd00e0409 0x80c00780 0x20288205 0x00000003 + 0xd00e0209 0xa0c00780 0xf0000001 0xe0000002 + 0xa0069003 0x00000000 0x10069003 0x00001100 + 0x3005e005 0xc4300780 0x3004e009 0xc4300780 + 0x20028208 0x1100e804 0x20000009 0x04008780 + 0x3002000d 0xc4100780 0x61002e05 0x0000001b + 0x30020401 0xc4100780 0x20038204 0x2100ea00 + 0xd00e0001 0x80c00780 0x20008205 0x0000000f + 0xd00e0201 0xa0c00780 0xf0000001 0xe0000002 + 0x30000003 0x00000100 0x3007d001 0xc4300780 + 0x3006d005 0xc4300780 0x20018004 0x1100e800 + 0x2000ca05 0x04204780 0x61002e01 0x0000001b + 0x20288205 0x00000003 0xd00e0205 0x80c00780 + 0x20288001 0x0000000f 0xd00e0005 0xa0c00781 } } code { @@ -2076,12 +2050,12 @@ code { bar = 0 bincode { 0x10004205 0x0023c780 0xa0000005 0x04000780 - 0x60014c05 0x00204780 0x3001cdfd 0x6c20c7c8 - 0x30000003 0x00000280 0xa0004e09 0x04200780 - 0x1000cc01 0x0423c780 0x41032a0c 0x40040210 + 0x60014c09 0x00204780 0x3002cdfd 0x6c20c7c8 + 0x30000003 0x00000280 0xa0004e05 0x04200780 + 0x1000cc01 0x0423c780 0x41052a0c 0x40020210 0x3010060d 0xc4100780 0x30100811 0xc4100780 - 0x60024a0d 0x0020c780 0x60040011 0x00010780 - 0x20038400 0x20018804 0x30010001 0xc4100780 + 0x60044a0d 0x0020c780 0x60020011 0x00010780 + 0x20038200 0x20028804 0x30010001 0xc4100780 0x30020205 0xc4100780 0x2100ea00 0x2101e804 0xd00e0001 0x80600780 0xd00e0201 0xa0c00781 } diff --git a/CUETools.FlaCudaExe/CUETools.FlaCuda.csproj b/CUETools.FlaCudaExe/CUETools.FlaCuda.csproj index c46e7cf..f093ddd 100644 --- a/CUETools.FlaCudaExe/CUETools.FlaCuda.csproj +++ b/CUETools.FlaCudaExe/CUETools.FlaCuda.csproj @@ -22,7 +22,7 @@ pdbonly true - ..\bin\x64\Release\ + ..\bin\any\Release\ TRACE prompt 4 diff --git a/CUETools.FlaCudaExe/Program.cs b/CUETools.FlaCudaExe/Program.cs index ba32d97..c147f27 100644 --- a/CUETools.FlaCudaExe/Program.cs +++ b/CUETools.FlaCudaExe/Program.cs @@ -35,32 +35,32 @@ namespace CUETools.FlaCudaExe Console.WriteLine(); Console.WriteLine("Options:"); Console.WriteLine(); - Console.WriteLine(" -0 .. -11 Compression level, default 5."); - Console.WriteLine(" -o Output filename, or \"-\" for stdout, or nul."); - Console.WriteLine(" -p # Padding bytes."); - Console.WriteLine(" -q --quiet Quiet mode."); - Console.WriteLine(" --verify Verify during encoding."); - Console.WriteLine(" --no-md5 Don't compute MD5 hash."); - Console.WriteLine(" --no-seektable Don't generate a seektable."); - Console.WriteLine(" --gpu-only Do everything on GPU."); - Console.WriteLine(" --cpu-threads Use additional CPU threads."); + Console.WriteLine(" -0 .. -11 Compression level, default 7; 9..11 are non-subset"); + Console.WriteLine(" -o Output filename, or \"-\" for stdout, or nul"); + Console.WriteLine(" -p # Padding bytes"); + Console.WriteLine(" -q --quiet Quiet mode"); + Console.WriteLine(" --verify Verify during encoding"); + Console.WriteLine(" --no-md5 Don't compute MD5 hash"); + Console.WriteLine(" --no-seektable Don't generate a seektable"); + Console.WriteLine(" --slow-gpu Some encoding stages are done on CPU"); + Console.WriteLine(" --cpu-threads Use additional CPU threads"); Console.WriteLine(); Console.WriteLine("Advanced Options:"); Console.WriteLine(); - Console.WriteLine(" -b # Block size."); - Console.WriteLine(" -v # Variable block size mode (0,4)."); - Console.WriteLine(" -s Stereo decorrelation (independent,search)."); - Console.WriteLine(" -r #[,#] Rice partition order {max} or {min},{max} (0..8)."); + Console.WriteLine(" -b # Block size"); + Console.WriteLine(" -v # Variable block size mode (0,4)"); + Console.WriteLine(" -s Stereo decorrelation (independent,search)"); + Console.WriteLine(" -r #[,#] Rice partition order {max} or {min},{max} (0..8)"); Console.WriteLine(); Console.WriteLine("LPC options:"); Console.WriteLine(); - Console.WriteLine(" -w [,] One or more window functions (bartlett,welch,hann,flattop,tukey)."); - Console.WriteLine(" -l #[,#] Prediction order {max} or {min},{max} (1..32)."); - Console.WriteLine(" --max-precision Coefficients precision search (0..1)."); + Console.WriteLine(" -w [,] Window functions (bartlett,welch,hann,flattop,tukey)"); + Console.WriteLine(" -l #[,#] Prediction order {max} or {min},{max} (1..32)"); + Console.WriteLine(" --max-precision Coefficients precision search (0..1)"); Console.WriteLine(); } - static void Main(string[] args) + static int Main(string[] args) { TextWriter stdout = Console.Out; Console.SetOut(Console.Error); @@ -79,7 +79,8 @@ namespace CUETools.FlaCudaExe orders_per_window = -1, blocksize = -1; int level = -1, padding = -1, vbr_mode = -1; - bool do_md5 = true, do_seektable = true, do_verify = false, gpu_only = false, use_lattice = false; + bool do_md5 = true, do_seektable = true, do_verify = false, gpu_only = true, use_lattice = false; + bool buffered = false; int cpu_threads = 0; bool ok = true; @@ -95,12 +96,14 @@ namespace CUETools.FlaCudaExe do_verify = true; else if (args[arg] == "--no-seektable") do_seektable = false; - else if (args[arg] == "--gpu-only") - gpu_only = true; + else if (args[arg] == "--slow-gpu") + gpu_only = false; else if (args[arg] == "--use-lattice") use_lattice = true; else if (args[arg] == "--no-md5") do_md5 = false; + else if (args[arg] == "--buffered") + buffered = true; else if (args[arg] == "--cpu-threads") ok = (++arg < args.Length) && int.TryParse(args[arg], out cpu_threads); else if ((args[arg] == "-o" || args[arg] == "--output") && ++arg < args.Length) @@ -156,14 +159,14 @@ namespace CUETools.FlaCudaExe } if (!quiet) { - Console.WriteLine("CUETools.FlaCuda, Copyright (C) 2009 Gregory S. Chudov."); + Console.WriteLine("{0}, Copyright (C) 2009 Gregory S. Chudov.", FlaCudaWriter.vendor_string); Console.WriteLine("This is free software under the GNU GPLv3+ license; There is NO WARRANTY, to"); Console.WriteLine("the extent permitted by law. for details."); } if (!ok || input_file == null) { Usage(); - return; + return 1; } if (((input_file == "-" || Path.GetExtension(input_file) == ".flac") && output_file == null)) @@ -172,12 +175,12 @@ namespace CUETools.FlaCudaExe Console.WriteLine("Output file not specified."); Console.WriteLine(); Usage(); - return; + return 2; } IAudioSource audioSource; if (input_file == "-") - audioSource = new WAVReader(Console.OpenStandardInput()); + audioSource = new WAVReader("", Console.OpenStandardInput()); else if (File.Exists(input_file) && Path.GetExtension(input_file) == ".wav") audioSource = new WAVReader(input_file, null); else if (File.Exists(input_file) && Path.GetExtension(input_file) == ".flac") @@ -185,18 +188,19 @@ namespace CUETools.FlaCudaExe else { Usage(); - return; + return 2; } + if (buffered) + audioSource = new AudioPipe(audioSource, FlaCudaWriter.MAX_BLOCKSIZE); if (output_file == null) output_file = Path.ChangeExtension(input_file, "flac"); FlaCudaWriter encoder = new FlaCudaWriter((output_file == "-" || output_file == "nul") ? "" : output_file, - audioSource.BitsPerSample, audioSource.ChannelCount, audioSource.SampleRate, output_file == "-" ? Console.OpenStandardOutput() : - output_file == "nul" ? new NullStream() : null); - if (audioSource.Length != 0) - encoder.FinalSampleCount = (long)audioSource.Length; + output_file == "nul" ? new NullStream() : null, + audioSource.PCM); + encoder.FinalSampleCount = audioSource.Length; IAudioDest audioDest = encoder; - int[,] buff = new int[FlaCudaWriter.MAX_BLOCKSIZE, audioSource.ChannelCount]; + AudioBuffer buff = new AudioBuffer(audioSource, FlaCudaWriter.MAX_BLOCKSIZE); try { @@ -242,25 +246,22 @@ namespace CUETools.FlaCudaExe Usage(); Console.WriteLine(""); Console.WriteLine("Error: {0}.", ex.Message); - return; + return 3; } if (!quiet) { Console.WriteLine("Filename : {0}", input_file); - Console.WriteLine("File Info : {0}kHz; {1} channel; {2} bit; {3}", audioSource.SampleRate, audioSource.ChannelCount, audioSource.BitsPerSample, TimeSpan.FromSeconds(audioSource.Length * 1.0 / audioSource.SampleRate)); + Console.WriteLine("File Info : {0}kHz; {1} channel; {2} bit; {3}", audioSource.PCM.SampleRate, audioSource.PCM.ChannelCount, audioSource.PCM.BitsPerSample, TimeSpan.FromSeconds(audioSource.Length * 1.0 / audioSource.PCM.SampleRate)); } #if !DEBUG try #endif { - do + while (audioSource.Read(buff, -1) != 0) { - uint toRead = audioSource.Length == 0 ? (uint)buff.GetLength(0) : Math.Min((uint)buff.GetLength(0), (uint)audioSource.Remaining); - uint samplesRead = audioSource.Read(buff, toRead); - if (samplesRead == 0) break; - audioDest.Write(buff, 0, (int)samplesRead); + audioDest.Write(buff); TimeSpan elapsed = DateTime.Now - start; if (!quiet) { @@ -268,14 +269,14 @@ namespace CUETools.FlaCudaExe { Console.Error.Write("\rProgress : {0:00}%; {1:0.00}x; {2}/{3}", 100.0 * audioSource.Position / audioSource.Length, - audioSource.Position / elapsed.TotalSeconds / audioSource.SampleRate, + audioSource.Position / elapsed.TotalSeconds / audioSource.PCM.SampleRate, elapsed, TimeSpan.FromMilliseconds(elapsed.TotalMilliseconds / audioSource.Position * audioSource.Length) ); lastPrint = elapsed; } } - } while (true); + } audioDest.Close(); } #if !DEBUG @@ -285,7 +286,7 @@ namespace CUETools.FlaCudaExe Console.WriteLine("Error : {0}", ex.Message); audioDest.Delete(); audioSource.Close(); - return; + return 4; } #endif @@ -294,7 +295,7 @@ namespace CUETools.FlaCudaExe { Console.Error.Write("\r \r"); Console.WriteLine("Results : {0:0.00}x; {2} bytes in {1} seconds;", - audioSource.Position / totalElapsed.TotalSeconds / audioSource.SampleRate, + audioSource.Position / totalElapsed.TotalSeconds / audioSource.PCM.SampleRate, totalElapsed, encoder.TotalSize ); @@ -319,6 +320,7 @@ namespace CUETools.FlaCudaExe encoder.VBRMode ); } + return 0; } } } diff --git a/CUETools.Flake/CUETools.Flake.csproj b/CUETools.Flake/CUETools.Flake.csproj index b30211d..faa4c1a 100644 --- a/CUETools.Flake/CUETools.Flake.csproj +++ b/CUETools.Flake/CUETools.Flake.csproj @@ -22,7 +22,7 @@ pdbonly true - ..\bin\x64\Release\ + ..\bin\any\Release\ TRACE prompt 4 diff --git a/CUETools.Flake/Program.cs b/CUETools.Flake/Program.cs index 94ca046..fba04f2 100644 --- a/CUETools.Flake/Program.cs +++ b/CUETools.Flake/Program.cs @@ -162,7 +162,7 @@ namespace CUETools.FlakeExe IAudioSource audioSource; if (input_file == "-") - audioSource = new WAVReader(Console.OpenStandardInput()); + audioSource = new WAVReader("", Console.OpenStandardInput()); else if (File.Exists(input_file) && Path.GetExtension(input_file) == ".wav") audioSource = new WAVReader(input_file, null); else if (File.Exists(input_file) && Path.GetExtension(input_file) == ".flac") @@ -172,15 +172,17 @@ namespace CUETools.FlakeExe Usage(); return; } + if (buffered) + audioSource = new AudioPipe(audioSource, 0x10000); if (output_file == null) output_file = Path.ChangeExtension(input_file, "flac"); - FlakeWriter flake = new FlakeWriter((output_file == "-" || output_file == "nul") ? "" : output_file, - audioSource.BitsPerSample, audioSource.ChannelCount, audioSource.SampleRate, + FlakeWriter flake = new FlakeWriter((output_file == "-" || output_file == "nul") ? "" : output_file, output_file == "-" ? Console.OpenStandardOutput() : - output_file == "nul" ? new NullStream() : null); - flake.FinalSampleCount = (long)audioSource.Length; - IAudioDest audioDest = buffered ? (IAudioDest)new BufferedWriter(flake, 512 * 1024) : (IAudioDest)flake; - int[,] buff = new int[0x10000, audioSource.ChannelCount]; + output_file == "nul" ? new NullStream() : null, + audioSource.PCM); + flake.FinalSampleCount = audioSource.Length; + IAudioDest audioDest = flake; + AudioBuffer buff = new AudioBuffer(audioSource, 0x10000); try { @@ -235,14 +237,12 @@ namespace CUETools.FlakeExe if (!quiet) { Console.WriteLine("Filename : {0}", input_file); - Console.WriteLine("File Info : {0}kHz; {1} channel; {2} bit; {3}", audioSource.SampleRate, audioSource.ChannelCount, audioSource.BitsPerSample, TimeSpan.FromSeconds(audioSource.Length * 1.0 / audioSource.SampleRate)); + Console.WriteLine("File Info : {0}kHz; {1} channel; {2} bit; {3}", audioSource.PCM.SampleRate, audioSource.PCM.ChannelCount, audioSource.PCM.BitsPerSample, TimeSpan.FromSeconds(audioSource.Length * 1.0 / audioSource.PCM.SampleRate)); } - do + while (audioSource.Read(buff, -1) != 0) { - uint samplesRead = audioSource.Read(buff, Math.Min((uint)buff.GetLength(0), (uint)audioSource.Remaining)); - if (samplesRead == 0) break; - audioDest.Write(buff, 0, (int)samplesRead); + audioDest.Write(buff); TimeSpan elapsed = DateTime.Now - start; if (!quiet) { @@ -250,22 +250,22 @@ namespace CUETools.FlakeExe { Console.Error.Write("\rProgress : {0:00}%; {1:0.00}x; {2}/{3}", 100.0 * audioSource.Position / audioSource.Length, - audioSource.Position / elapsed.TotalSeconds / audioSource.SampleRate, + audioSource.Position / elapsed.TotalSeconds / audioSource.PCM.SampleRate, elapsed, TimeSpan.FromMilliseconds(elapsed.TotalMilliseconds / audioSource.Position * audioSource.Length) ); lastPrint = elapsed; } } - } while (true); - + } audioDest.Close(); + TimeSpan totalElapsed = DateTime.Now - start; if (!quiet) { Console.Error.Write("\r \r"); Console.WriteLine("Results : {0:0.00}x; {1}", - audioSource.Position / totalElapsed.TotalSeconds / audioSource.SampleRate, + audioSource.Position / totalElapsed.TotalSeconds / audioSource.PCM.SampleRate, totalElapsed ); } diff --git a/CUETools.Processor/AudioReadWrite.cs b/CUETools.Processor/AudioReadWrite.cs index 183189d..7143620 100644 --- a/CUETools.Processor/AudioReadWrite.cs +++ b/CUETools.Processor/AudioReadWrite.cs @@ -1,15 +1,10 @@ using System; using System.IO; +using CUETools.CDImage; using CUETools.Codecs; using CUETools.Codecs.ALAC; using CUETools.Codecs.FLAKE; using CUETools.Codecs.FlaCuda; -#if !MONO -using CUETools.Codecs.FLAC; -using CUETools.Codecs.WavPack; -using CUETools.Codecs.APE; -using CUETools.Codecs.TTA; -#endif using CUETools.Codecs.LossyWAV; using System.Collections.Generic; using System.Collections.Specialized; @@ -19,35 +14,33 @@ namespace CUETools.Processor public static class AudioReadWrite { public static IAudioSource GetAudioSource(string path, Stream IO, string extension, CUEConfig config) { + if (extension == ".dummy") + { + using (StreamReader sr = (IO == null ? new StreamReader(path) : new StreamReader(IO))) { + string slen = sr.ReadLine(); + long len; + if (!long.TryParse(slen, out len)) + len = CDImageLayout.TimeFromString(slen) * 588; + return new SilenceGenerator(len); + } + } + if (extension == ".bin") + return new WAVReader(path, IO, AudioPCMConfig.RedBook); CUEToolsFormat fmt; if (!extension.StartsWith(".") || !config.formats.TryGetValue(extension.Substring(1), out fmt)) throw new Exception("Unsupported audio type: " + path); CUEToolsUDC decoder; if (fmt.decoder == null || !config.decoders.TryGetValue(fmt.decoder, out decoder)) throw new Exception("Unsupported audio type: " + path); - switch (decoder.className) - { - case "WAVReader": - return new WAVReader(path, IO); - case "ALACReader": - return new ALACReader(path, IO); - case "FlakeReader": - return new FlakeReader(path, IO); -#if !MONO - case "FLACReader": - return new FLACReader(path, IO, config.disableAsm); - case "WavPackReader": - return new WavPackReader(path, IO, null); - case "APEReader": - return new APEReader(path, IO); - case "TTAReader": - return new TTAReader(path, IO); -#endif - default: - if (decoder.path == null) - throw new Exception("Unsupported audio type: " + path); - return new UserDefinedReader(path, IO, decoder.path, decoder.parameters); - } + if (decoder.path != null) + return new UserDefinedReader(path, IO, decoder.path, decoder.parameters); + if (decoder.type == null) + throw new Exception("Unsupported audio type: " + path); + + object src = Activator.CreateInstance(decoder.type, path, IO); + if (src == null || !(src is IAudioSource)) + throw new Exception("Unsupported audio type: " + path + ": " + decoder.type.FullName); + return src as IAudioSource; } public static IAudioSource GetAudioSource(string path, Stream IO, CUEConfig config) @@ -73,12 +66,12 @@ namespace CUETools.Processor return new LossyWAVReader(lossySource, lwcdfSource); } - public static IAudioDest GetAudioDest(AudioEncoderType audioEncoderType, string path, int bitsPerSample, int channelCount, int sampleRate, long finalSampleCount, int padding, string extension, CUEConfig config) + public static IAudioDest GetAudioDest(AudioEncoderType audioEncoderType, string path, AudioPCMConfig pcm, long finalSampleCount, int padding, string extension, CUEConfig config) { IAudioDest dest; if (audioEncoderType == AudioEncoderType.NoAudio || extension == ".dummy") { - dest = new DummyWriter(path, bitsPerSample, channelCount, sampleRate); + dest = new DummyWriter(path, pcm); dest.FinalSampleCount = finalSampleCount; return dest; } @@ -90,59 +83,44 @@ namespace CUETools.Processor null; if (encoder == null) throw new Exception("Unsupported audio type: " + path); - switch (encoder.className) + if (encoder.path != null) + dest = new UserDefinedWriter(path, null, pcm, encoder.path, encoder.parameters, encoder.default_mode, padding); + else if (encoder.type != null) { - case "WAVWriter": - dest = new WAVWriter(path, bitsPerSample, channelCount, sampleRate, null); - break; - case "FlakeWriter": - dest = new FlakeWriter(path, bitsPerSample, channelCount, sampleRate, null); + object o = Activator.CreateInstance(encoder.type, path, pcm); + if (o == null || !(o is IAudioDest)) + throw new Exception("Unsupported audio type: " + path + ": " + encoder.type.FullName); + dest = o as IAudioDest; + } else + throw new Exception("Unsupported audio type: " + path); + dest.CompressionLevel = encoder.DefaultModeIndex; + dest.FinalSampleCount = finalSampleCount; + switch (encoder.type.FullName) + { + case "CUETools.Codecs.FLAKE.FlakeWriter": ((FlakeWriter)dest).PaddingLength = padding; - ((FlakeWriter)dest).CompressionLevel = encoder.DefaultModeIndex; - //dest = new BufferedWriter(dest, 128 * 1024); break; - case "FlaCudaWriter": - dest = new FlaCudaWriter(path, bitsPerSample, channelCount, sampleRate, null); + case "CUETools.Codecs.FlaCuda.FlaCudaWriter": ((FlaCudaWriter)dest).PaddingLength = padding; - ((FlaCudaWriter)dest).CompressionLevel = encoder.DefaultModeIndex; ((FlaCudaWriter)dest).DoVerify = config.flaCudaVerify; ((FlaCudaWriter)dest).GPUOnly = config.flaCudaGPUOnly; - break; - case "ALACWriter": - dest = new ALACWriter(path, bitsPerSample, channelCount, sampleRate, null); + ((FlaCudaWriter)dest).CPUThreads = config.FlaCudaThreads ? 1 : 0; + break; + case "CUETools.Codecs.ALAC.ALACWriter": ((ALACWriter)dest).PaddingLength = padding; - ((ALACWriter)dest).CompressionLevel = encoder.DefaultModeIndex; - //dest = new BufferedWriter(dest, 128 * 1024); break; -#if !MONO - case "FLACWriter": - dest = new FLACWriter(path, bitsPerSample, channelCount, sampleRate); - ((FLACWriter)dest).PaddingLength = padding; - ((FLACWriter)dest).CompressionLevel = encoder.DefaultModeIndex; - ((FLACWriter)dest).Verify = config.flacVerify; - ((FLACWriter)dest).DisableAsm = config.disableAsm; + case "CUETools.Codecs.FLAC.FLACWriter": + dest.Options = string.Format("{0}{1}--padding-length {2}", + config.disableAsm ? "--disable-asm " : "", + config.flacVerify ? "--verify " : "", + padding); break; - case "WavPackWriter": - dest = new WavPackWriter(path, bitsPerSample, channelCount, sampleRate); - ((WavPackWriter)dest).CompressionMode = encoder.DefaultModeIndex; - ((WavPackWriter)dest).ExtraMode = config.wvExtraMode; - ((WavPackWriter)dest).MD5Sum = config.wvStoreMD5; - break; - case "APEWriter": - dest = new APEWriter(path, bitsPerSample, channelCount, sampleRate); - ((APEWriter)dest).CompressionLevel = encoder.DefaultModeIndex; - break; - case "TTAWriter": - dest = new TTAWriter(path, bitsPerSample, channelCount, sampleRate); - break; -#endif - default: - if (encoder.path == null) - throw new Exception("Unsupported audio type: " + path); - dest = new UserDefinedWriter(path, bitsPerSample, channelCount, sampleRate, null, encoder.path, encoder.parameters, encoder.default_mode, padding); + case "CUETools.Codecs.WavPack.WavPackWriter": + dest.Options = string.Format("{0}--extra-mode {1}", + config.wvStoreMD5 ? "--md5 " : "", + config.wvExtraMode); break; } - dest.FinalSampleCount = finalSampleCount; return dest; } @@ -150,14 +128,15 @@ namespace CUETools.Processor { string extension = Path.GetExtension(path).ToLower(); string filename = Path.GetFileNameWithoutExtension(path); + AudioPCMConfig pcm = new AudioPCMConfig(bitsPerSample, 2, sampleRate); if (audioEncoderType == AudioEncoderType.NoAudio || audioEncoderType == AudioEncoderType.Lossless || Path.GetExtension(filename).ToLower() != ".lossy") - return GetAudioDest(audioEncoderType, path, bitsPerSample, 2, sampleRate, finalSampleCount, padding, extension, config); + return GetAudioDest(audioEncoderType, path, pcm, finalSampleCount, padding, extension, config); string lwcdfPath = Path.Combine(Path.GetDirectoryName(path), Path.GetFileNameWithoutExtension(filename) + ".lwcdf" + extension); - int lossyBitsPerSample = (config.detectHDCD && config.decodeHDCD && !config.decodeHDCDtoLW16) ? 24 : 16; - IAudioDest lossyDest = GetAudioDest(AudioEncoderType.Lossless, path, lossyBitsPerSample, 2, sampleRate, finalSampleCount, padding, extension, config); - IAudioDest lwcdfDest = audioEncoderType == AudioEncoderType.Hybrid ? GetAudioDest(AudioEncoderType.Lossless, lwcdfPath, bitsPerSample, 2, sampleRate, finalSampleCount, padding, extension, config) : null; - return new LossyWAVWriter(lossyDest, lwcdfDest, bitsPerSample, 2, sampleRate, config.lossyWAVQuality); + AudioPCMConfig lossypcm = new AudioPCMConfig((config.detectHDCD && config.decodeHDCD && !config.decodeHDCDtoLW16) ? 24 : 16, 2, sampleRate); + IAudioDest lossyDest = GetAudioDest(AudioEncoderType.Lossless, path, lossypcm, finalSampleCount, padding, extension, config); + IAudioDest lwcdfDest = audioEncoderType == AudioEncoderType.Hybrid ? GetAudioDest(AudioEncoderType.Lossless, lwcdfPath, lossypcm, finalSampleCount, padding, extension, config) : null; + return new LossyWAVWriter(lossyDest, lwcdfDest, config.lossyWAVQuality, pcm); } } } \ No newline at end of file diff --git a/CUETools.Processor/CUETools.Processor.csproj b/CUETools.Processor/CUETools.Processor.csproj index 1649375..2c6b66c 100644 --- a/CUETools.Processor/CUETools.Processor.csproj +++ b/CUETools.Processor/CUETools.Processor.csproj @@ -23,7 +23,7 @@ pdbonly true - bin\Release\ + ..\bin\any\Release\ TRACE prompt 4 @@ -116,18 +116,10 @@ {F2EC7193-D5E5-4252-9803-5CEB407E910F} CUETools.Codecs.ALAC - - {9AE965C4-301E-4C01-B90F-297AF341ACC6} - CUETools.Codecs.APE - {082D6B9E-326E-4D15-9798-EDAE9EDE70A6} CUETools.Codecs.FLAKE - - {1D1E99BC-6D22-41C0-BD94-FF4DD5EC725B} - CUETools.Codecs.TTA - {6458A13A-30EF-45A9-9D58-E5031B17BEE2} CUETools.Codecs @@ -148,10 +140,6 @@ {8CF07381-BEA2-4AFC-B3DD-9B2F21C65A3A} CUETools.Ripper.SCSI - - {E70FA90A-7012-4A52-86B5-362B699D1540} - CUETools.Codecs.FLAC - {5ADCFD6D-BFEA-4B10-BB45-9083BBB56AF4} Freedb @@ -168,10 +156,6 @@ {74C2036B-2C9B-4FC8-B7BD-AE81A8DCE533} MusicBrainz - - {CC2E74B6-534A-43D8-9F16-AC03FE955000} - CUETools.Codecs.WavPack - {8427CAA5-80B8-4952-9A68-5F3DFCFBDF40} UnRarDotNet diff --git a/CUETools.Processor/Processor.cs b/CUETools.Processor/Processor.cs index 1c3b42a..1d56098 100644 --- a/CUETools.Processor/Processor.cs +++ b/CUETools.Processor/Processor.cs @@ -28,12 +28,15 @@ using System.Text; using System.Globalization; using System.IO; using System.Net; +using System.Security.Policy; using System.Security.Cryptography; using System.Threading; using System.Xml; using System.Drawing; using System.Drawing.Drawing2D; using System.Drawing.Imaging; +using System.Reflection; +using System.Runtime.InteropServices; using HDCDDotNet; using CUETools.Codecs; using CUETools.Codecs.LossyWAV; @@ -44,7 +47,6 @@ using MusicBrainz; using Freedb; #if !MONO using UnRarDotNet; -using CUETools.Codecs.FLAC; #endif using ICSharpCode.SharpZipLib.Zip; using CSScriptLibrary; @@ -616,24 +618,30 @@ namespace CUETools.Processor default_mode = _default_mode; path = _path; parameters = _parameters; - className = null; + type = null; } - public CUEToolsUDC( - string _name, - string _extension, - bool _lossless, - string _supported_modes, - string _default_mode, - string _className) + public CUEToolsUDC(AudioEncoderClass enc, Type enctype) { - name = _name; - extension = _extension; - lossless = _lossless; - supported_modes = _supported_modes; - default_mode = _default_mode; + name = enc.EncoderName; + extension = enc.Extension; + lossless = enc.Lossless; + supported_modes = enc.SupportedModes; + default_mode = enc.DefaultMode; + priority = enc.Priority; path = null; parameters = null; - className = _className; + type = enctype; + } + public CUEToolsUDC(AudioDecoderClass enc, Type dectype) + { + name = enc.DecoderName; + extension = enc.Extension; + lossless = true; + supported_modes = ""; + default_mode = ""; + path = null; + parameters = null; + type = dectype; } public override string ToString() { @@ -643,10 +651,11 @@ namespace CUETools.Processor public string extension = "wav"; public string path = ""; public string parameters = ""; - public string className = ""; + public Type type = null; public string supported_modes = ""; public string default_mode = ""; public bool lossless = false; + public int priority = 0; public string Name { @@ -760,6 +769,15 @@ namespace CUETools.Processor return false; } + public CUEToolsUDC GetDefault(string extension, bool lossless) + { + CUEToolsUDC result = null; + foreach (CUEToolsUDC udc in this) + if (udc.extension == extension && udc.lossless == lossless && (result == null || result.priority < udc.priority)) + result = udc; + return result; + } + public CUEToolsUDC this[string name] { get @@ -788,6 +806,7 @@ namespace CUETools.Processor public bool flacVerify; public bool flaCudaVerify; public bool flaCudaGPUOnly; + public bool flaCudaThreads; public bool preserveHTOA; public int wvExtraMode; public bool wvStoreMD5; @@ -838,6 +857,9 @@ namespace CUETools.Processor public CUEStyle gapsHandling; public bool CopyAlbumArt { get { return copyAlbumArt; } set { copyAlbumArt = value; } } + public bool FlaCudaThreads { get { return flaCudaThreads; } set { flaCudaThreads = value; } } + public bool FlaCudaGPUOnly { get { return flaCudaGPUOnly; } set { flaCudaGPUOnly = value; } } + public bool FlaCudaVerify { get { return flaCudaVerify; } set { flaCudaVerify = value; } } public string ArLogFilenameFormat { get { return arLogFilenameFormat; } set { arLogFilenameFormat = value; } } public string AlArtFilenameFormat { get { return alArtFilenameFormat; } set { alArtFilenameFormat = value; } } public CUEToolsUDCList Encoders @@ -863,6 +885,7 @@ namespace CUETools.Processor flacVerify = false; flaCudaVerify = false; flaCudaGPUOnly = false; + flaCudaThreads = true; preserveHTOA = true; wvExtraMode = 0; wvStoreMD5 = false; @@ -912,17 +935,53 @@ namespace CUETools.Processor language = Thread.CurrentThread.CurrentUICulture.Name; + List encs = new List(); + List decs = new List(); + + encs.Add(typeof(CUETools.Codecs.WAVWriter)); + encs.Add(typeof(CUETools.Codecs.FLAKE.FlakeWriter)); + encs.Add(typeof(CUETools.Codecs.FlaCuda.FlaCudaWriter)); + encs.Add(typeof(CUETools.Codecs.ALAC.ALACWriter)); + + decs.Add(typeof(CUETools.Codecs.WAVReader)); + decs.Add(typeof(CUETools.Codecs.FLAKE.FlakeReader)); + decs.Add(typeof(CUETools.Codecs.ALAC.ALACReader)); + + //ApplicationSecurityInfo asi = new ApplicationSecurityInfo(AppDomain.CurrentDomain.ActivationContext); + //string arch = asi.ApplicationId.ProcessorArchitecture; + //ActivationContext is null most of the time :( + + string arch = Marshal.SizeOf(typeof(IntPtr)) == 8 ? "x64" : "x86"; + string plugins_path = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "plugins (" + arch + ")"); + if (Directory.Exists(plugins_path)) + foreach (string plugin_path in Directory.GetFiles(plugins_path, "*.dll", SearchOption.TopDirectoryOnly)) + { + AssemblyName name = AssemblyName.GetAssemblyName(plugin_path); + Assembly assembly = Assembly.Load(name); + foreach (Type type in assembly.GetExportedTypes()) + { + try + { + if (Attribute.GetCustomAttribute(type, typeof(AudioDecoderClass)) != null) + decs.Add(type); + //if (type.IsClass && !type.IsAbstract && typeof(IAudioDest).IsAssignableFrom(type)) + if (Attribute.GetCustomAttribute(type, typeof(AudioEncoderClass)) != null) + encs.Add(type); + } + catch (Exception ex) + { + System.Diagnostics.Debug.WriteLine(ex.Message); + } + } + } + encoders = new CUEToolsUDCList(); -#if !MONO - encoders.Add(new CUEToolsUDC("libFLAC", "flac", true, "0 1 2 3 4 5 6 7 8", "5", "FLACWriter")); - encoders.Add(new CUEToolsUDC("libwavpack", "wv", true, "fast normal high high+", "normal", "WavPackWriter")); - encoders.Add(new CUEToolsUDC("MAC_SDK", "ape", true, "fast normal high extra insane", "high", "APEWriter")); - encoders.Add(new CUEToolsUDC("ttalib", "tta", true, "", "", "TTAWriter")); -#endif - encoders.Add(new CUEToolsUDC("libFlake", "flac", true, "0 1 2 3 4 5 6 7 8 9 10 11", "7", "FlakeWriter")); - encoders.Add(new CUEToolsUDC("FlaCuda", "flac", true, "0 1 2 3 4 5 6 7 8 9 10 11", "8", "FlaCudaWriter")); - encoders.Add(new CUEToolsUDC("libALAC", "m4a", true, "0 1 2 3 4 5 6 7 8 9 10", "3", "ALACWriter")); - encoders.Add(new CUEToolsUDC("builtin wav", "wav", true, "", "", "WAVWriter")); + foreach (Type type in encs) + { + AudioEncoderClass enc = Attribute.GetCustomAttribute(type, typeof(AudioEncoderClass)) as AudioEncoderClass; + //if (!encoders.TryGetValue(enc.EncoderName)) + encoders.Add(new CUEToolsUDC(enc, type)); + } encoders.Add(new CUEToolsUDC("flake", "flac", true, "0 1 2 3 4 5 6 7 8 9 10 11", "10", "flake.exe", "-%M - -o %O -p %P")); encoders.Add(new CUEToolsUDC("takc", "tak", true, "0 1 2 2e 2m 3 3e 3m 4 4e 4m", "2", "takc.exe", "-e -p%M -overwrite - %O")); encoders.Add(new CUEToolsUDC("ffmpeg alac", "m4a", true, "", "", "ffmpeg.exe", "-i - -f ipod -acodec alac -y %O")); @@ -932,28 +991,24 @@ namespace CUETools.Processor encoders.Add(new CUEToolsUDC("nero aac", "m4a", false, "0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9", "0.4", "neroAacEnc.exe", "-q %M -if - -of %O")); decoders = new Dictionary(); -#if !MONO - decoders.Add("libFLAC", new CUEToolsUDC("libFLAC", "flac", true, "", "", "FLACReader")); - decoders.Add("libwavpack", new CUEToolsUDC("libwavpack", "wv", true, "", "", "WavPackReader")); - decoders.Add("MAC_SDK", new CUEToolsUDC("MAC_SDK", "ape", true, "", "", "APEReader")); - decoders.Add("ttalib", new CUEToolsUDC("ttalib", "tta", true, "", "", "TTAReader")); -#endif - decoders.Add("libFlake", new CUEToolsUDC("libFlake", "flac", true, "", "", "FlakeReader")); - decoders.Add("builtin wav", new CUEToolsUDC("builtin wav", "wav", true, "", "", "WAVReader")); - decoders.Add("builtin alac", new CUEToolsUDC("builtin alac", "m4a", true, "", "", "ALACReader")); + foreach (Type type in decs) + { + AudioDecoderClass dec = Attribute.GetCustomAttribute(type, typeof(AudioDecoderClass)) as AudioDecoderClass; + decoders.Add(dec.DecoderName, new CUEToolsUDC(dec, type)); + } decoders.Add("takc", new CUEToolsUDC("takc", "tak", true, "", "", "takc.exe", "-d %I -")); decoders.Add("ffmpeg alac", new CUEToolsUDC("ffmpeg alac", "m4a", true, "", "", "ffmpeg.exe", "%I -f wav -")); formats = new Dictionary(); - formats.Add("flac", new CUEToolsFormat("flac", CUEToolsTagger.TagLibSharp, true, false, true, true, true, encoders["libFLAC"], null, "libFLAC")); - formats.Add("wv", new CUEToolsFormat("wv", CUEToolsTagger.TagLibSharp, true, false, true, true, true, encoders["libwavpack"], null, "libwavpack")); - formats.Add("ape", new CUEToolsFormat("ape", CUEToolsTagger.TagLibSharp, true, false, false, true, true, encoders["MAC_SDK"], null, "MAC_SDK")); - formats.Add("tta", new CUEToolsFormat("tta", CUEToolsTagger.APEv2, true, false, false, false, true, encoders["ttalib"], null, "ttalib")); - formats.Add("wav", new CUEToolsFormat("wav", CUEToolsTagger.TagLibSharp, true, false, true, false, true, encoders["builtin wav"], null, "builtin wav")); - formats.Add("tak", new CUEToolsFormat("tak", CUEToolsTagger.APEv2, true, false, true, true, true, encoders["takc"], null, "takc")); - formats.Add("m4a", new CUEToolsFormat("m4a", CUEToolsTagger.TagLibSharp, true, true, false, false, true, encoders["ffmpeg alac"], encoders["nero aac"], "builtin alac")); - formats.Add("mp3", new CUEToolsFormat("mp3", CUEToolsTagger.TagLibSharp, false, true, false, false, true, null, encoders["lame vbr"], null)); - formats.Add("ogg", new CUEToolsFormat("ogg", CUEToolsTagger.TagLibSharp, false, true, false, false, true, null, encoders["oggenc"], null)); + formats.Add("flac", new CUEToolsFormat("flac", CUEToolsTagger.TagLibSharp, true, false, true, true, true, encoders.GetDefault("flac", true), null, "libFLAC")); + formats.Add("wv", new CUEToolsFormat("wv", CUEToolsTagger.TagLibSharp, true, false, true, true, true, encoders.GetDefault("wv", true), null, "libwavpack")); + formats.Add("ape", new CUEToolsFormat("ape", CUEToolsTagger.TagLibSharp, true, false, false, true, true, encoders.GetDefault("ape", true), null, "MAC_SDK")); + formats.Add("tta", new CUEToolsFormat("tta", CUEToolsTagger.APEv2, true, false, false, false, true, encoders.GetDefault("tta", true), null, "ttalib")); + formats.Add("wav", new CUEToolsFormat("wav", CUEToolsTagger.TagLibSharp, true, false, true, false, true, encoders.GetDefault("wav", true), null, "builtin wav")); + formats.Add("tak", new CUEToolsFormat("tak", CUEToolsTagger.APEv2, true, false, true, true, true, encoders.GetDefault("tak", true), null, "takc")); + formats.Add("m4a", new CUEToolsFormat("m4a", CUEToolsTagger.TagLibSharp, true, true, false, false, true, encoders.GetDefault("m4a", true), encoders.GetDefault("m4a", false), "builtin alac")); + formats.Add("mp3", new CUEToolsFormat("mp3", CUEToolsTagger.TagLibSharp, false, true, false, false, true, null, encoders.GetDefault("mp3", false), null)); + formats.Add("ogg", new CUEToolsFormat("ogg", CUEToolsTagger.TagLibSharp, false, true, false, false, true, null, encoders.GetDefault("ogg", false), null)); scripts = new Dictionary(); scripts.Add("default", new CUEToolsScript("default", true, @@ -1019,6 +1074,7 @@ return processor.Go(); sw.Save("FLACVerify", flacVerify); sw.Save("FlaCudaVerify", flaCudaVerify); sw.Save("FlaCudaGPUOnly", flaCudaGPUOnly); + sw.Save("FlaCudaThreads", flaCudaThreads); sw.Save("WVExtraMode", wvExtraMode); sw.Save("WVStoreMD5", wvStoreMD5); sw.Save("KeepOriginalFilenames", keepOriginalFilenames); @@ -1148,6 +1204,7 @@ return processor.Go(); flacVerify = sr.LoadBoolean("FLACVerify") ?? false; flaCudaVerify = sr.LoadBoolean("FlaCudaVerify") ?? false; flaCudaGPUOnly = sr.LoadBoolean("FlaCudaGPUOnly") ?? false; + flaCudaThreads = sr.LoadBoolean("FlaCudaThreads") ?? true; wvExtraMode = sr.LoadInt32("WVExtraMode", 0, 6) ?? 0; wvStoreMD5 = sr.LoadBoolean("WVStoreMD5") ?? false; keepOriginalFilenames = sr.LoadBoolean("KeepOriginalFilenames") ?? false; @@ -1566,11 +1623,27 @@ return processor.Go(); } } + public void CopyMetadata(CUESheet metadata) + { + TotalDiscs = metadata.TotalDiscs; + DiscNumber = metadata.DiscNumber; + Year = metadata.Year; + Genre = metadata.Genre; + Artist = metadata.Artist; + Title = metadata.Title; + for (int i = 0; i < Tracks.Count; i++) + { + Tracks[i].Title = metadata.Tracks[i].Title; + Tracks[i].Artist = metadata.Tracks[i].Artist; + } + } + public void FillFromMusicBrainz(MusicBrainz.Release release) { Year = release.GetEvents().Count > 0 ? release.GetEvents()[0].Date.Substring(0, 4) : ""; Artist = release.GetArtist(); Title = release.GetTitle(); + // How to get Genre: http://mm.musicbrainz.org/ws/1/release/6fe1e218-2aee-49ac-94f0-7910ba2151df.html?type=xml&inc=tags //Catalog = release.GetEvents().Count > 0 ? release.GetEvents()[0].Barcode : ""; for (int i = 1; i <= _toc.AudioTracks; i++) { @@ -2025,21 +2098,35 @@ return processor.Go(); if (command == "FILE") { fileType = line.Params[2].ToUpper(); - if ((fileType == "BINARY") || (fileType == "MOTOROLA")) - fileIsBinary = true; - else + fileIsBinary = (fileType == "BINARY") || (fileType == "MOTOROLA"); + if (fileIsBinary) + { + if (!_hasEmbeddedCUESheet && _sourcePaths.Count == 0) + { + try + { + if (_isArchive) + pathAudio = LocateFile(_archiveCUEpath, line.Params[1], _archiveContents); + else + pathAudio = LocateFile(_inputDir, line.Params[1], null); + fileIsBinary = (pathAudio == null); + } + catch { } + } + } + if (!fileIsBinary) { - fileIsBinary = false; if (!_hasEmbeddedCUESheet) { if (_isArchive) pathAudio = LocateFile(_archiveCUEpath, line.Params[1], _archiveContents); - else + else pathAudio = LocateFile(_inputDir, line.Params[1], null); - } else + } + else { pathAudio = _inputPath; - if (_sourcePaths.Count > 0 ) + if (_sourcePaths.Count > 0) throw new Exception("Extra file in embedded CUE sheet: \"" + line.Params[1] + "\"."); } _sourcePaths.Add(pathAudio); @@ -2116,11 +2203,14 @@ return processor.Go(); { if (fileIsBinary) { + // THIS CODE NEVER EXECUTES!!! + fileTimeLengthFrames = timeRelativeToFileStart + 150; sourceInfo.Path = null; sourceInfo.Offset = 0; sourceInfo.Length = 150 * 588; _sources.Add(sourceInfo); + throw new Exception("unexpected BINARY directive"); } else { @@ -2688,7 +2778,7 @@ return processor.Go(); public string GetCommonTag(GetStringTagProvider provider) { if (_hasEmbeddedCUESheet || _hasSingleFilename) - return General.EmptyStringToNull(provider(_fileInfo)); + return _fileInfo == null ? null : General.EmptyStringToNull(provider(_fileInfo)); if (_hasTrackFilenames) { string tagValue = null; @@ -2713,7 +2803,8 @@ return processor.Go(); return GetCommonTag(delegate(TagLib.File file) { return Tagging.TagListToSingleValue(Tagging.GetMiscTag(file, tagName)); }); } - private static string LocateFile(string dir, string file, List contents) { + private static string LocateFile(string dir, string file, List contents) + { List dirList, fileList; string altDir; @@ -2951,19 +3042,23 @@ return processor.Go(); private int GetSampleLength(string path, out TagLib.File fileInfo) { ShowProgress("Analyzing input file...", 0.0, 0.0, path, null); - - TagLib.UserDefined.AdditionalFileTypes.Config = _config; - TagLib.File.IFileAbstraction file = _isArchive - ? (TagLib.File.IFileAbstraction) new ArchiveFileAbstraction(this, path) - : (TagLib.File.IFileAbstraction) new TagLib.File.LocalFileAbstraction(path); - fileInfo = TagLib.File.Create(file); + + if (Path.GetExtension(path) == ".dummy" || Path.GetExtension(path) == ".bin") + { + fileInfo = null; + } else + { + TagLib.UserDefined.AdditionalFileTypes.Config = _config; + TagLib.File.IFileAbstraction file = _isArchive + ? (TagLib.File.IFileAbstraction)new ArchiveFileAbstraction(this, path) + : (TagLib.File.IFileAbstraction)new TagLib.File.LocalFileAbstraction(path); + fileInfo = TagLib.File.Create(file); + } IAudioSource audioSource = AudioReadWrite.GetAudioSource(path, _isArchive ? OpenArchive(path, true) : null, _config); - if ((audioSource.BitsPerSample != 16) || - (audioSource.ChannelCount != 2) || - (audioSource.SampleRate != 44100) || - (audioSource.Length == 0) || - (audioSource.Length >= Int32.MaxValue)) + if (!audioSource.PCM.IsRedBook || + audioSource.Length <= 0 || + audioSource.Length >= Int32.MaxValue) { audioSource.Close(); throw new Exception("Audio format is invalid."); @@ -3979,26 +4074,25 @@ return processor.Go(); public void WriteAudioFilesPass(string dir, CUEStyle style, int[] destLengths, bool htoaToFile, bool noOutput) { - const int buffLen = 0x8000; int iTrack, iIndex; - int[,] sampleBuffer = new int[buffLen, 2]; + AudioBuffer sampleBuffer = new AudioBuffer(AudioPCMConfig.RedBook, 0x10000); TrackInfo track; IAudioSource audioSource = null; IAudioDest audioDest = null; bool discardOutput; int iSource = -1; int iDest = -1; - uint samplesRemSource = 0; + int samplesRemSource = 0; //CDImageLayout updatedTOC = null; if (_writeOffset != 0) { - uint absOffset = (uint)Math.Abs(_writeOffset); + int absOffset = Math.Abs(_writeOffset); SourceInfo sourceInfo; sourceInfo.Path = null; sourceInfo.Offset = 0; - sourceInfo.Length = absOffset; + sourceInfo.Length = (uint)absOffset; if (_writeOffset < 0) { @@ -4007,11 +4101,11 @@ return processor.Go(); int last = _sources.Count - 1; while (absOffset >= _sources[last].Length) { - absOffset -= _sources[last].Length; + absOffset -= (int)_sources[last].Length; _sources.RemoveAt(last--); } sourceInfo = _sources[last]; - sourceInfo.Length -= absOffset; + sourceInfo.Length -= (uint)absOffset; _sources[last] = sourceInfo; } else @@ -4020,12 +4114,12 @@ return processor.Go(); while (absOffset >= _sources[0].Length) { - absOffset -= _sources[0].Length; + absOffset -= (int)_sources[0].Length; _sources.RemoveAt(0); } sourceInfo = _sources[0]; - sourceInfo.Offset += absOffset; - sourceInfo.Length -= absOffset; + sourceInfo.Offset += (uint)absOffset; + sourceInfo.Length -= (uint)absOffset; _sources[0] = sourceInfo; } @@ -4045,10 +4139,10 @@ return processor.Go(); audioDest = GetAudioDest(_destPaths[iDest], destLengths[iDest], hdcdDecoder != null && hdcdDecoder.Decoding ? hdcdDecoder.BitsPerSample : 16, _padding, noOutput); } - uint currentOffset = 0, previousOffset = 0; - uint trackLength = _toc.Pregap * 588; - uint diskLength = 588 * _toc.AudioLength; - uint diskOffset = 0; + int currentOffset = 0, previousOffset = 0; + int trackLength = (int)_toc.Pregap * 588; + int diskLength = 588 * (int)_toc.AudioLength; + int diskOffset = 0; if (_useAccurateRip) _arVerify.Init(); @@ -4075,13 +4169,13 @@ return processor.Go(); for (iIndex = 0; iIndex <= _toc[_toc.FirstAudio + iTrack].LastIndex; iIndex++) { - uint samplesRemIndex = _toc.IndexLength(_toc.FirstAudio + iTrack, iIndex) * 588; + int samplesRemIndex = (int)_toc.IndexLength(_toc.FirstAudio + iTrack, iIndex) * 588; if (iIndex == 1) { previousOffset = currentOffset; currentOffset = 0; - trackLength = _toc[_toc.FirstAudio + iTrack].Length * 588; + trackLength = (int)_toc[_toc.FirstAudio + iTrack].Length * 588; } if ((style == CUEStyle.GapsAppended) && (iIndex == 1)) @@ -4122,10 +4216,10 @@ return processor.Go(); //#endif if (audioSource != null && !_isCD) audioSource.Close(); audioSource = GetAudioSource(++iSource); - samplesRemSource = (uint)_sources[iSource].Length; + samplesRemSource = (int)_sources[iSource].Length; } - uint copyCount = (uint)Math.Min(Math.Min(samplesRemIndex, samplesRemSource), buffLen); + int copyCount = Math.Min(samplesRemIndex, samplesRemSource); if (trackLength > 0 && !_isCD) { @@ -4135,12 +4229,11 @@ return processor.Go(); _isCD ? string.Format("{0}: {1:00} - {2}", audioSource.Path, iTrack + 1, _tracks[iTrack].Title) : audioSource.Path, discardOutput ? null : audioDest.Path); } - if (audioSource.Read(sampleBuffer, copyCount) != copyCount) - throw new Exception("samples read != samples expected"); + copyCount = audioSource.Read(sampleBuffer, copyCount); if (!discardOutput) { if (!_config.detectHDCD || !_config.decodeHDCD) - audioDest.Write(sampleBuffer, 0, (int)copyCount); + audioDest.Write(sampleBuffer); if (_config.detectHDCD && hdcdDecoder != null) { if (_config.wait750FramesForHDCD && diskOffset > 750 * 588 && !hdcdDecoder.Detected) @@ -4158,15 +4251,15 @@ return processor.Go(); { if (_config.decodeHDCD) hdcdDecoder.AudioDest = (discardOutput || noOutput) ? null : audioDest; - hdcdDecoder.Process(sampleBuffer, copyCount); + hdcdDecoder.Process(sampleBuffer.Samples, copyCount); } } } if (_useAccurateRip) { - _arVerify.Write(sampleBuffer, 0, (int)copyCount); + _arVerify.Write(sampleBuffer); if (iTrack > 0 || iIndex > 0) - Tracks[iTrack + (iIndex == 0 ? -1 : 0)].MeasurePeakLevel(sampleBuffer, copyCount); + Tracks[iTrack + (iIndex == 0 ? -1 : 0)].MeasurePeakLevel(sampleBuffer.Samples, copyCount); } currentOffset += copyCount; @@ -4466,12 +4559,24 @@ return processor.Go(); { return _toc; } + set + { + _toc = new CDImageLayout(value); + if (Tracks.Count == 0) + { + for (int iTrack = 0; iTrack < _toc.AudioTracks; iTrack++) + { + //_trackFilenames.Add(string.Format("{0:00}.wav", iTrack + 1)); + _tracks.Add(new TrackInfo()); + } + } + } } private IAudioDest GetAudioDest(string path, int finalSampleCount, int bps, int padding, bool noOutput) { if (noOutput) - return new DummyWriter(path, bps, 2, 44100); + return new DummyWriter(path, new AudioPCMConfig(bps, 2, 44100)); return AudioReadWrite.GetAudioDest(_audioEncoderType, path, finalSampleCount, bps, 44100, padding, _config); } @@ -4488,7 +4593,7 @@ return processor.Go(); { _ripper.Position = 0; //audioSource = _ripper; - audioSource = new AudioPipe(_ripper, 3); + audioSource = new AudioPipe(_ripper, 0x100000); } else #endif if (_isArchive) @@ -4500,6 +4605,8 @@ return processor.Go(); if (sourceInfo.Offset != 0) audioSource.Position = sourceInfo.Offset; + //audioSource = new AudioPipe(audioSource, 0x10000); + return audioSource; } @@ -5224,7 +5331,7 @@ return processor.Go(); _peakLevel = 0; } - public unsafe void MeasurePeakLevel(int[,] samplesBuffer, uint sampleCount) + public unsafe void MeasurePeakLevel(int[,] samplesBuffer, int sampleCount) { fixed (int* s = samplesBuffer) { diff --git a/CUETools.Ripper.Console/CUETools.ConsoleRipper.csproj b/CUETools.Ripper.Console/CUETools.ConsoleRipper.csproj index 0a2b8fe..c21f3bc 100644 --- a/CUETools.Ripper.Console/CUETools.ConsoleRipper.csproj +++ b/CUETools.Ripper.Console/CUETools.ConsoleRipper.csproj @@ -22,7 +22,7 @@ pdbonly true - bin\Release\ + ..\bin\any\Release\ TRACE prompt 4 diff --git a/CUETools.Ripper.Console/Program.cs b/CUETools.Ripper.Console/Program.cs index 40220b7..0ae0cb5 100644 --- a/CUETools.Ripper.Console/Program.cs +++ b/CUETools.Ripper.Console/Program.cs @@ -175,7 +175,7 @@ namespace CUETools.ConsoleRipper } AccurateRipVerify arVerify = new AccurateRipVerify(audioSource.TOC); - int[,] buff = new int[audioSource.BestBlockSize, audioSource.ChannelCount]; + AudioBuffer buff = new AudioBuffer(audioSource, 0x10000); string CDDBId = AccurateRipVerify.CalculateCDDBId(audioSource.TOC); string ArId = AccurateRipVerify.CalculateAccurateRipId(audioSource.TOC); Release release; @@ -207,27 +207,22 @@ namespace CUETools.ConsoleRipper Console.WriteLine("MusicBrainz : {0}", release == null ? "not found" : release.GetArtist() + " - " + release.GetTitle()); //IAudioDest audioDest = new FLACWriter(destFile, audioSource.BitsPerSample, audioSource.ChannelCount, audioSource.SampleRate); - IAudioDest audioDest = new WAVWriter(destFile, audioSource.BitsPerSample, audioSource.ChannelCount, audioSource.SampleRate, null); - audioDest.FinalSampleCount = (long)audioSource.Length; + IAudioDest audioDest = new WAVWriter(destFile, null, audioSource.PCM); + audioDest.FinalSampleCount = audioSource.Length; ProgressMeter meter = new ProgressMeter(); audioSource.ReadProgress += new EventHandler(meter.ReadProgress); - do + while (audioSource.Read(buff, -1) != 0) { - uint toRead = Math.Min((uint)buff.GetLength(0), (uint)audioSource.Remaining); - uint samplesRead = audioSource.Read(buff, toRead); - if (samplesRead == 0) break; - if (samplesRead != toRead) - throw new Exception("samples read != samples requested"); - arVerify.Write(buff, 0, (int)samplesRead); - audioDest.Write(buff, 0, (int)samplesRead); - } while (true); + arVerify.Write(buff); + audioDest.Write(buff); + } TimeSpan totalElapsed = DateTime.Now - meter.realStart; Console.Write("\r \r"); Console.WriteLine("Results : {0:0.00}x; {1:d5} errors; {2:d2}:{3:d2}:{4:d2}", - audioSource.Length / totalElapsed.TotalSeconds / audioSource.SampleRate, + audioSource.Length / totalElapsed.TotalSeconds / audioSource.PCM.SampleRate, audioSource.ErrorsCount, totalElapsed.Hours, totalElapsed.Minutes, totalElapsed.Seconds ); diff --git a/CUETools.Ripper.SCSI/CUETools.Ripper.SCSI.csproj b/CUETools.Ripper.SCSI/CUETools.Ripper.SCSI.csproj index 438e24b..253ba3f 100644 --- a/CUETools.Ripper.SCSI/CUETools.Ripper.SCSI.csproj +++ b/CUETools.Ripper.SCSI/CUETools.Ripper.SCSI.csproj @@ -22,7 +22,7 @@ pdbonly true - bin\Release\ + ..\bin\any\Release\ TRACE prompt 4 diff --git a/CUETools.Ripper.SCSI/SCSIDrive.cs b/CUETools.Ripper.SCSI/SCSIDrive.cs index d43ec20..3dc9228 100644 --- a/CUETools.Ripper.SCSI/SCSIDrive.cs +++ b/CUETools.Ripper.SCSI/SCSIDrive.cs @@ -960,114 +960,50 @@ namespace CUETools.Ripper.SCSI } } - public int[,] Read(int[,] buff) + public unsafe int Read(AudioBuffer buff, int maxLength) { if (_toc == null) throw new Exception("Read: invalid TOC"); - if (_sampleOffset - _driveOffset >= (uint)Length) - return null; - if (_sampleOffset >= (int)Length) - return new int[_driveOffset - (_sampleOffset - (int)Length), ChannelCount]; - if (_sampleOffset < 0) - return new int[-_sampleOffset, ChannelCount]; - PrefetchSector((int)_sampleOffset / 588); - int samplesRead = Math.Min(_currentEnd * 588, (int)Length + _driveOffset) - _sampleOffset; - buff = new int[samplesRead, ChannelCount]; - AudioSamples.BytesToFLACSamples_16(_currentData, (_sampleOffset - _currentStart * 588) * 4, buff, 0, (uint) samplesRead, 2); - _sampleOffset = _currentEnd * 588; - return buff; - } - - public uint Read(int[,] buff, uint sampleCount) - { - if (_toc == null) - throw new Exception("Read: invalid TOC"); - if (_sampleOffset - _driveOffset >= (uint)Length) - return 0; - if (_sampleOffset >= (uint)Length) + buff.Prepare(this, maxLength); + if (Position >= Length) + return 0; + if (_sampleOffset >= Length) { - int samplesRead = _driveOffset - (_sampleOffset - (int)Length); - for (int i = 0; i < samplesRead; i++) - for (int c = 0; c < ChannelCount; c++) - buff[i, c] = 0; - _sampleOffset += samplesRead; - return (uint) samplesRead; + for (int i = 0; i < buff.ByteLength; i++) + buff.Bytes[i] = 0; + return buff.Length; // == Remaining } - if ((uint)(_sampleOffset - _driveOffset + sampleCount) > Length) - sampleCount = (uint)((int)Length + _driveOffset - _sampleOffset); - int silenceCount = 0; - if ((uint)(_sampleOffset + sampleCount) > Length) - { - silenceCount = _sampleOffset + (int)sampleCount - (int)Length; - sampleCount -= (uint) silenceCount; - } - uint pos = 0; if (_sampleOffset < 0) { - uint nullSamplesRead = Math.Min((uint)-_sampleOffset, sampleCount); - for (int i = 0; i < nullSamplesRead; i++) - for (int c = 0; c < ChannelCount; c++) - buff[i, c] = 0; - pos += nullSamplesRead; - sampleCount -= nullSamplesRead; - _sampleOffset += (int)nullSamplesRead; - if (sampleCount == 0) - return pos; + buff.Length = Math.Min(buff.Length, -_sampleOffset); + for (int i = 0; i < buff.ByteLength; i++) + buff.Bytes[i] = 0; + return buff.Length; } - int firstSector = (int)_sampleOffset / 588; - int lastSector = Math.Min((int)(_sampleOffset + sampleCount + 587)/588, (int)_toc.AudioLength); - for (int sector = firstSector; sector < lastSector; sector ++) - { - PrefetchSector(sector); - uint samplesRead = (uint) (Math.Min((int)sampleCount, 588 - (_sampleOffset % 588))); - AudioSamples.BytesToFLACSamples_16(_currentData, (sector - _currentStart) * 4 * 588 + ((int)_sampleOffset % 588) * 4, buff, (int)pos, samplesRead, 2); - pos += samplesRead; - sampleCount -= samplesRead; - _sampleOffset += (int) samplesRead; - } - if (silenceCount > 0) - { - uint nullSamplesRead = (uint)silenceCount; - for (int i = 0; i < nullSamplesRead; i++) - for (int c = 0; c < ChannelCount; c++) - buff[pos + i, c] = 0; - pos += nullSamplesRead; - _sampleOffset += (int)nullSamplesRead; - } - return pos; + PrefetchSector(_sampleOffset / 588); + buff.Length = Math.Min(buff.Length, (int)Length - _sampleOffset); + buff.Length = Math.Min(buff.Length, _currentEnd * 588 - _sampleOffset); + fixed (byte* dest = buff.Bytes, src = &_currentData[(_sampleOffset - _currentStart * 588) * 4]) + AudioSamples.MemCpy(dest, src, buff.ByteLength); + _sampleOffset += buff.Length; + return buff.Length; } - public ulong Length + public long Length { get { if (_toc == null) throw new Exception("invalid TOC"); - return (ulong)588 * _toc.AudioLength; + return 588 * (int)_toc.AudioLength; } } - public int BitsPerSample + public AudioPCMConfig PCM { get { - return 16; - } - } - - public int ChannelCount - { - get - { - return 2; - } - } - - public int SampleRate - { - get - { - return 44100; + return AudioPCMConfig.RedBook; } } @@ -1099,11 +1035,11 @@ namespace CUETools.Ripper.SCSI } } - public ulong Position + public long Position { get { - return (ulong)(_sampleOffset - _driveOffset); + return _sampleOffset - _driveOffset; } set { @@ -1118,7 +1054,7 @@ namespace CUETools.Ripper.SCSI } } - public ulong Remaining + public long Remaining { get { diff --git a/CUETools/CUETools.TestCodecs/ALACWriterTest.cs b/CUETools/CUETools.TestCodecs/ALACWriterTest.cs new file mode 100644 index 0000000..1c9cfb7 --- /dev/null +++ b/CUETools/CUETools.TestCodecs/ALACWriterTest.cs @@ -0,0 +1,103 @@ +// The following code was generated by Microsoft Visual Studio 2005. +// The test owner should check each test for validity. +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System; +using System.Text; +using System.Collections.Generic; +using System.IO; +using CUETools.Codecs; +using CUETools.Codecs.ALAC; +namespace CUETools.TestCodecs +{ + /// + ///This is a test class for CUETools.Codecs.ALAC.ALACWriter and is intended + ///to contain all CUETools.Codecs.ALAC.ALACWriter Unit Tests + /// + [TestClass()] + public class ALACWriterTest + { + + + private TestContext testContextInstance; + + /// + ///Gets or sets the test context which provides + ///information about and functionality for the current test run. + /// + public TestContext TestContext + { + get + { + return testContextInstance; + } + set + { + testContextInstance = value; + } + } + #region Additional test attributes + // + //You can use the following additional attributes as you write your tests: + // + //Use ClassInitialize to run code before running the first test in the class + // + //[ClassInitialize()] + //public static void MyClassInitialize(TestContext testContext) + //{ + //} + // + //Use ClassCleanup to run code after all tests in a class have run + // + //[ClassCleanup()] + //public static void MyClassCleanup() + //{ + //} + // + //Use TestInitialize to run code before running each test + // + //[TestInitialize()] + //public void MyTestInitialize() + //{ + //} + // + //Use TestCleanup to run code after each test has run + // + //[TestCleanup()] + //public void MyTestCleanup() + //{ + //} + // + #endregion + + + /// + ///A test for ALACWriter (string, int, int, int, Stream) + /// + [TestMethod()] + public void ConstructorTest() + { + AudioBuffer buff = WAVReader.ReadAllSamples("test.wav", null); + ALACWriter target; + + target = new ALACWriter("alacwriter0.m4a", null, buff.PCM); + target.PaddingLength = 1; + target.Vendor = "CUETools"; + target.CreationTime = DateTime.Parse("15 Aug 1976"); + target.Write(buff); + target.Close(); + CollectionAssert.AreEqual(File.ReadAllBytes("alac.m4a"), File.ReadAllBytes("alacwriter0.m4a"), "alacwriter0.m4a doesn't match."); + + target = new ALACWriter("alacwriter1.m4a", null, buff.PCM); + target.PaddingLength = 1; + target.Vendor = "CUETools"; + target.CreationTime = DateTime.Parse("15 Aug 1976"); + target.FinalSampleCount = buff.Length; + target.Write(buff); + target.Close(); + CollectionAssert.AreEqual(File.ReadAllBytes("alac.m4a"), File.ReadAllBytes("alacwriter1.m4a"), "alacwriter1.m4a doesn't match."); + } + + } + + +} diff --git a/CUETools/CUETools.TestCodecs/AccurateRipTest.cs b/CUETools/CUETools.TestCodecs/AccurateRipTest.cs new file mode 100644 index 0000000..acf92e8 --- /dev/null +++ b/CUETools/CUETools.TestCodecs/AccurateRipTest.cs @@ -0,0 +1,96 @@ +// The following code was generated by Microsoft Visual Studio 2005. +// The test owner should check each test for validity. +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System; +using System.Text; +using System.Collections.Generic; +using CUETools.CDImage; +using CUETools.AccurateRip; +using CUETools.Codecs; +namespace CUETools.TestCodecs +{ + /// + ///This is a test class for CUETools.AccurateRip.AccurateRipVerify and is intended + ///to contain all CUETools.AccurateRip.AccurateRipVerify Unit Tests + /// + [TestClass()] + public class AccurateRipVerifyTest + { + + + private TestContext testContextInstance; + + private int[,] testSamples = new int[,] { { 0, 0 }, { -2, -3 }, { 32767, 32766 }, { -32765, -32764 } }; + + /// + ///Gets or sets the test context which provides + ///information about and functionality for the current test run. + /// + public TestContext TestContext + { + get + { + return testContextInstance; + } + set + { + testContextInstance = value; + } + } + #region Additional test attributes + // + //You can use the following additional attributes as you write your tests: + // + //Use ClassInitialize to run code before running the first test in the class + // + //[ClassInitialize()] + //public static void MyClassInitialize(TestContext testContext) + //{ + //} + // + //Use ClassCleanup to run code after all tests in a class have run + // + //[ClassCleanup()] + //public static void MyClassCleanup() + //{ + //} + // + //Use TestInitialize to run code before running each test + // + //[TestInitialize()] + //public void MyTestInitialize() + //{ + //} + // + //Use TestCleanup to run code after each test has run + // + //[TestCleanup()] + //public void MyTestCleanup() + //{ + //} + // + #endregion + + + /// + ///A test for CalculateCRCs (AudioBuffer, int, int) + /// + [TestMethod()] + public void CalculateCRCsTest() + { + CDImageLayout toc = new CDImageLayout(); + toc.AddTrack(new CDTrack(1, 0, 10, true, false)); + AccurateRipVerify target = new AccurateRipVerify(toc); + AudioBuffer buff = new AudioBuffer(AudioPCMConfig.RedBook, testSamples, testSamples.GetLength(0)); + target.CalculateCRCs(buff, 0, testSamples.GetLength(0)); + Crc32 crc32 = new Crc32(); + uint crc1 = crc32.ComputeChecksum(0xffffffff, buff.Bytes, 0, buff.ByteLength) ^ 0xffffffff; + Assert.AreEqual(3856971150, crc1, "CRC32 was not set correctly."); + Assert.AreEqual(3856971150, target.CRC32(0), "CRC32 was not set correctly."); + Assert.AreEqual(1921661108, target.CRCWONULL(0), "CRC32WONULL was not set correctly."); + } + + } + + +} diff --git a/CUETools/CUETools.TestCodecs/CUETools.TestCodecs.csproj b/CUETools/CUETools.TestCodecs/CUETools.TestCodecs.csproj new file mode 100644 index 0000000..ddf6fb5 --- /dev/null +++ b/CUETools/CUETools.TestCodecs/CUETools.TestCodecs.csproj @@ -0,0 +1,67 @@ + + + + Debug + AnyCPU + 8.0.50727 + 2.0 + {04945FB2-8410-4F14-8262-2ED18DCDACD6} + Library + CUETools.TestCodecs + CUETools.TestCodecs + 4 + {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + + + true + full + false + .\bin\Debug\ + DEBUG;TRACE + + + false + true + .\bin\Release\ + TRACE + + + + False + ..\..\..\..\Windows\assembly\GAC_MSIL\Microsoft.VisualStudio.QualityTools.UnitTestFramework\8.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll + + + + + + + + + + + + + + + {5802C7E9-157E-4124-946D-70B5AE48A5A1} + CUETools.AccurateRip + + + {1DD41038-D885-46C5-8DDE-E0B82F066584} + CUETools.CDImage + + + {F2EC7193-D5E5-4252-9803-5CEB407E910F} + CUETools.Codecs.ALAC + + + {082D6B9E-326E-4D15-9798-EDAE9EDE70A6} + CUETools.Codecs.FLAKE + + + {6458A13A-30EF-45A9-9D58-E5031B17BEE2} + CUETools.Codecs + + + + \ No newline at end of file diff --git a/CUETools/CUETools.TestCodecs/CodecsTest.cs b/CUETools/CUETools.TestCodecs/CodecsTest.cs new file mode 100644 index 0000000..5b12dc2 --- /dev/null +++ b/CUETools/CUETools.TestCodecs/CodecsTest.cs @@ -0,0 +1,345 @@ +// The following code was generated by Microsoft Visual Studio 2005. +// The test owner should check each test for validity. +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System; +using System.Text; +using System.Collections.Generic; +using CUETools.Codecs; +using System.IO; + +namespace CUETools.TestCodecs +{ + /// + ///This is a test class for CUETools.Codecs.AudioBuffer and is intended + ///to contain all CUETools.Codecs.AudioBuffer Unit Tests + /// + [TestClass()] + public class AudioBufferTest + { + + + private TestContext testContextInstance; + + private int[,] testSamples = new int[,] { { 0, 1 }, { -2, -3 }, { 32767, 32766 }, { -32765, -32764 } }; + private byte[] testBytes = new byte[] { 0, 0, 1, 0, 254, 255, 253, 255, 255, 127, 254, 127, 3, 128, 4, 128 }; + + private int[,] testSamples2 = new int[,] { { 0, 1 }, { -2, -3 }, { 32767, 32766 }, { -32765, -32764 }, { 42, 42 } }; + private byte[] testBytes2 = new byte[] { 0, 0, 1, 0, 254, 255, 253, 255, 255, 127, 254, 127, 3, 128, 4, 128, 42, 0, 42, 0 }; + + /// + ///Gets or sets the test context which provides + ///information about and functionality for the current test run. + /// + public TestContext TestContext + { + get + { + return testContextInstance; + } + set + { + testContextInstance = value; + } + } + #region Additional test attributes + // + //You can use the following additional attributes as you write your tests: + // + //Use ClassInitialize to run code before running the first test in the class + // + //[ClassInitialize()] + //public static void MyClassInitialize(TestContext testContext) + //{ + //} + // + //Use ClassCleanup to run code after all tests in a class have run + // + //[ClassCleanup()] + //public static void MyClassCleanup() + //{ + //} + // + //Use TestInitialize to run code before running each test + // + //[TestInitialize()] + //public void MyTestInitialize() + //{ + //} + // + //Use TestCleanup to run code after each test has run + // + //[TestCleanup()] + //public void MyTestCleanup() + //{ + //} + // + #endregion + + + /// + ///A test for Bytes + /// + [TestMethod()] + public void BytesTest() + { + AudioBuffer target = new AudioBuffer(AudioPCMConfig.RedBook, 1); + target.Prepare(testSamples, testSamples.GetLength(0)); + CollectionAssert.AreEqual(testBytes, target.Bytes, "CUETools.Codecs.AudioBuffer.Bytes was not set correctly."); + target.Prepare(testSamples2, testSamples2.GetLength(0)); + CollectionAssert.AreEqual(testBytes2, target.Bytes, "CUETools.Codecs.AudioBuffer.Bytes was not set correctly."); + } + + /// + ///A test for Samples + /// + [TestMethod()] + public void SamplesTest() + { + AudioBuffer target = new AudioBuffer(AudioPCMConfig.RedBook, 1); + target.Prepare(testBytes, testSamples.GetLength(0)); + CollectionAssert.AreEqual(testSamples, target.Samples, "CUETools.Codecs.AudioBuffer.Samples was not set correctly."); + target.Prepare(testBytes2, testSamples2.GetLength(0)); + CollectionAssert.AreEqual(testSamples2, target.Samples, "CUETools.Codecs.AudioBuffer.Samples was not set correctly."); + } + + } + + + /// + ///This is a test class for CUETools.Codecs.WAVReader and is intended + ///to contain all CUETools.Codecs.WAVReader Unit Tests + /// + [TestClass()] + public class WAVReaderTest + { + + + private TestContext testContextInstance; + private WAVReader pipe = null; + private WAVReader wave = null; + + public readonly static int[,] pipeSamples = new int[,] { { -1, 1 }, { 0, -1 }, { -1, 0 }, { 0, -1 }, { -1, -1 }, { -1, -1 }, { 1, 0 }, { -3, -2 }, { 3, 1 }, { -4, -3 }, { 3, 2 }, { -4, -3 }, { 3, 1 }, { -3, -1 }, { 1, -1 }, { -1, 1 }, { -1, -3 }, { 0, 3 }, { -2, -4 }, { 0, 3 }, { -1, -4 }, { -1, 3 }, { 0, -3 }, { -2, 1 }, { 1, -1 }, { -2, -1 }, { 0, 1 }, { -1, -2 }, { -1, 1 }, { 1, -2 }, { -3, 1 }, { 3, -2 }, { -4, 0 }, { 3, -1 }, { -4, -1 }, { 3, -1 }, { -3, 0 }, { 1, -1 }, { -1, 1 }, { -1, -2 }, { 0, 2 }, { -1, -3 }, { 0, 2 }, { 0, -3 }, { -1, 1 }, { 1, -1 }, { -2, -1 }, { 2, 1 }, { -2, -3 }, { 1, 3 }, { -1, -4 }, { -1, 3 }, { 1, -4 }, { 0, 0 } }; + public readonly static int[,] testSamples = new int[,] { { -1, 1 }, { 0, -1 }, { -1, 0 }, { 0, -1 }, { -1, -1 }, { -1, -1 }, { 1, 0 }, { -3, -2 }, { 3, 1 }, { -4, -3 }, { 3, 2 }, { -4, -3 }, { 3, 1 }, { -3, -1 }, { 1, -1 }, { -1, 1 }, { -1, -3 }, { 0, 3 }, { -2, -4 }, { 0, 3 }, { -1, -4 }, { -1, 3 }, { 0, -3 }, { -2, 1 }, { 1, -1 }, { -2, -1 }, { 0, 1 }, { -1, -2 }, { -1, 1 }, { 1, -2 }, { -3, 1 }, { 3, -2 }, { -4, 0 }, { 3, -1 }, { -4, -1 }, { 3, -1 }, { -3, 0 }, { 1, -1 }, { -1, 1 }, { -1, -2 }, { 0, 2 }, { -1, -3 }, { 0, 2 }, { 0, -3 }, { -1, 1 }, { 1, -1 }, { -2, -1 }, { 2, 1 }, { -2, -3 }, { 1, 3 }, { -1, -4 }, { -1, 3 }, { 1, -4 }}; + + /// + ///Gets or sets the test context which provides + ///information about and functionality for the current test run. + /// + public TestContext TestContext + { + get + { + return testContextInstance; + } + set + { + testContextInstance = value; + } + } + #region Additional test attributes + // + //You can use the following additional attributes as you write your tests: + // + //Use ClassInitialize to run code before running the first test in the class + // + [ClassInitialize()] + public static void MyClassInitialize(TestContext testContext) + { + } + + // + //Use ClassCleanup to run code after all tests in a class have run + // + [ClassCleanup()] + public static void MyClassCleanup() + { + } + // + //Use TestInitialize to run code before running each test + // + [TestInitialize()] + public void MyTestInitialize() + { + pipe = new WAVReader("pipe.wav", null); + wave = new WAVReader("test.wav", null); + } + // + //Use TestCleanup to run code after each test has run + // + [TestCleanup()] + public void MyTestCleanup() + { + pipe.Close(); + pipe = null; + wave.Close(); + wave = null; + } + // + #endregion + + private void DumpSamples(int[,] samples) + { + StringWriter sw = new StringWriter(); + for (int i = 0; i < samples.GetLength(0); i++) + sw.Write(" {0}{1}, {2}{3},", "{", samples[i, 0], samples[i, 1], "}"); + TestContext.WriteLine("{0}", sw.ToString()); + } + + /// + ///A test for Read (AudioBuffer, int) + /// + [TestMethod()] + public void ReadTest() + { + Assert.AreEqual(-1L, pipe.Length, "CUETools.Codecs.WAVReader.Length did not return the expected value."); + AudioBuffer buff = new AudioBuffer(pipe, 54); + int actual = pipe.Read(buff, -1); + Assert.AreEqual(53, actual, "CUETools.Codecs.WAVReader.Read did not return the expected value."); + Assert.AreEqual(actual, buff.Length, "CUETools.Codecs.WAVReader.Read did not return the expected value."); + CollectionAssert.AreEqual(pipeSamples, buff.Samples, "AudioBuffer.Samples was not set correctly."); + actual = pipe.Read(buff, -1); + Assert.AreEqual(0, actual, "CUETools.Codecs.WAVReader.Read did not return the expected value."); + } + + + /// + ///A test for BitsPerSample + /// + [TestMethod()] + public void BitsPerSampleTest() + { + Assert.AreEqual(16, pipe.PCM.BitsPerSample, "CUETools.Codecs.WAVReader.BitsPerSample was not set correctly."); + } + + /// + ///A test for BlockAlign + /// + [TestMethod()] + public void BlockAlignTest() + { + Assert.AreEqual(4, pipe.PCM.BlockAlign, "CUETools.Codecs.WAVReader.BlockAlign was not set correctly."); + } + + /// + ///A test for ChannelCount + /// + [TestMethod()] + public void ChannelCountTest() + { + Assert.AreEqual(2, pipe.PCM.ChannelCount, "CUETools.Codecs.WAVReader.ChannelCount was not set correctly."); + } + + /// + ///A test for Length + /// + [TestMethod()] + public void LengthTest() + { + Assert.AreEqual(-1L, pipe.Length, "CUETools.Codecs.WAVReader.Length was not set correctly."); + Assert.AreEqual(53L, wave.Length, "CUETools.Codecs.WAVReader.Length was not set correctly."); + } + + /// + ///A test for SampleRate + /// + [TestMethod()] + public void SampleRateTest() + { + Assert.AreEqual(44100, pipe.PCM.SampleRate, "CUETools.Codecs.WAVReader.SampleRate was not set correctly."); + } + + /// + ///A test for ReadAllSamples (string, Stream) + /// + [TestMethod()] + public void ReadAllSamplesTest() + { + AudioBuffer buff = WAVReader.ReadAllSamples("test.wav", null); + CollectionAssert.AreEqual(testSamples, buff.Samples, "AudioBuffer.Samples was not set correctly."); + } + } + /// + ///This is a test class for CUETools.Codecs.WAVWriter and is intended + ///to contain all CUETools.Codecs.WAVWriter Unit Tests + /// + [TestClass()] + public class WAVWriterTest + { + + + private TestContext testContextInstance; + + /// + ///Gets or sets the test context which provides + ///information about and functionality for the current test run. + /// + public TestContext TestContext + { + get + { + return testContextInstance; + } + set + { + testContextInstance = value; + } + } + #region Additional test attributes + // + //You can use the following additional attributes as you write your tests: + // + //Use ClassInitialize to run code before running the first test in the class + // + //[ClassInitialize()] + //public static void MyClassInitialize(TestContext testContext) + //{ + //} + // + //Use ClassCleanup to run code after all tests in a class have run + // + //[ClassCleanup()] + //public static void MyClassCleanup() + //{ + //} + // + //Use TestInitialize to run code before running each test + // + //[TestInitialize()] + //public void MyTestInitialize() + //{ + //} + // + //Use TestCleanup to run code after each test has run + // + //[TestCleanup()] + //public void MyTestCleanup() + //{ + //} + // + #endregion + + + /// + ///A test for WAVWriter (string, int, int, int, Stream) + /// + [TestMethod()] + public void ConstructorTest() + { + AudioBuffer buff = WAVReader.ReadAllSamples("test.wav", null); + WAVWriter target; + + target = new WAVWriter("wavwriter0.wav", null, buff.PCM); + //target.FinalSampleCount = buff.Length; + target.Write(buff); + target.Close(); + CollectionAssert.AreEqual(File.ReadAllBytes("test.wav"), File.ReadAllBytes("wavwriter0.wav"), "wavwriter0.wav doesn't match."); + + target = new WAVWriter("wavwriter1.wav", null, buff.PCM); + target.FinalSampleCount = buff.Length; + target.Write(buff); + target.Close(); + CollectionAssert.AreEqual(File.ReadAllBytes("test.wav"), File.ReadAllBytes("wavwriter1.wav"), "wavwriter1.wav doesn't match."); + } + + } +} diff --git a/CUETools/CUETools.TestCodecs/FlakeWriterTest.cs b/CUETools/CUETools.TestCodecs/FlakeWriterTest.cs new file mode 100644 index 0000000..e026692 --- /dev/null +++ b/CUETools/CUETools.TestCodecs/FlakeWriterTest.cs @@ -0,0 +1,105 @@ +// The following code was generated by Microsoft Visual Studio 2005. +// The test owner should check each test for validity. +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System; +using System.Text; +using System.Collections.Generic; +using System.IO; +using CUETools.Codecs; +using CUETools.Codecs.FLAKE; +namespace CUETools.TestCodecs +{ + /// + ///This is a test class for CUETools.Codecs.FLAKE.FlakeWriter and is intended + ///to contain all CUETools.Codecs.FLAKE.FlakeWriter Unit Tests + /// + [TestClass()] + public class FlakeWriterTest + { + + + private TestContext testContextInstance; + + /// + ///Gets or sets the test context which provides + ///information about and functionality for the current test run. + /// + public TestContext TestContext + { + get + { + return testContextInstance; + } + set + { + testContextInstance = value; + } + } + #region Additional test attributes + // + //You can use the following additional attributes as you write your tests: + // + //Use ClassInitialize to run code before running the first test in the class + // + //[ClassInitialize()] + //public static void MyClassInitialize(TestContext testContext) + //{ + //} + // + //Use ClassCleanup to run code after all tests in a class have run + // + //[ClassCleanup()] + //public static void MyClassCleanup() + //{ + //} + // + //Use TestInitialize to run code before running each test + // + //[TestInitialize()] + //public void MyTestInitialize() + //{ + //} + // + //Use TestCleanup to run code after each test has run + // + //[TestCleanup()] + //public void MyTestCleanup() + //{ + //} + // + #endregion + + + /// + ///A test for FlakeWriter (string, int, int, int, Stream) + /// + [TestMethod()] + public void ConstructorTest() + { + AudioBuffer buff = WAVReader.ReadAllSamples("test.wav", null); + FlakeWriter target; + + target = new FlakeWriter("flakewriter0.flac", null, buff.PCM); + target.PaddingLength = 1; + target.DoSeekTable = false; + //target.Vendor = "CUETools"; + //target.CreationTime = DateTime.Parse("15 Aug 1976"); + target.FinalSampleCount = buff.Length; + target.Write(buff); + target.Close(); + CollectionAssert.AreEqual(File.ReadAllBytes("flake.flac"), File.ReadAllBytes("flakewriter0.flac"), "flakewriter0.flac doesn't match."); + + target = new FlakeWriter("flakewriter1.flac", null, buff.PCM); + target.PaddingLength = 1; + target.DoSeekTable = false; + //target.Vendor = "CUETools"; + //target.CreationTime = DateTime.Parse("15 Aug 1976"); + target.Write(buff); + target.Close(); + CollectionAssert.AreEqual(File.ReadAllBytes("flake.flac"), File.ReadAllBytes("flakewriter1.flac"), "flakewriter1.flac doesn't match."); + } + + } + + +} diff --git a/CUETools/CUETools.TestCodecs/Properties/AssemblyInfo.cs b/CUETools/CUETools.TestCodecs/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..0794533 --- /dev/null +++ b/CUETools/CUETools.TestCodecs/Properties/AssemblyInfo.cs @@ -0,0 +1,35 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("CUETools.TestCodecs")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Microsoft")] +[assembly: AssemblyProduct("CUETools.TestCodecs")] +[assembly: AssemblyCopyright("Copyright © Microsoft 2010")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM componenets. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("62e9c766-721e-4dba-8187-f9d87449920e")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Revision and Build Numbers +// by using the '*' as shown below: +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/CUETools/CUETools.TestCodecs/alac.m4a b/CUETools/CUETools.TestCodecs/alac.m4a new file mode 100644 index 0000000..2ca355d Binary files /dev/null and b/CUETools/CUETools.TestCodecs/alac.m4a differ diff --git a/CUETools/CUETools.TestCodecs/flake.flac b/CUETools/CUETools.TestCodecs/flake.flac new file mode 100644 index 0000000..0eb2875 Binary files /dev/null and b/CUETools/CUETools.TestCodecs/flake.flac differ diff --git a/CUETools/CUETools.TestCodecs/pipe.wav b/CUETools/CUETools.TestCodecs/pipe.wav new file mode 100644 index 0000000..aceb4a3 Binary files /dev/null and b/CUETools/CUETools.TestCodecs/pipe.wav differ diff --git a/CUETools/CUETools.TestCodecs/test.wav b/CUETools/CUETools.TestCodecs/test.wav new file mode 100644 index 0000000..92ef971 Binary files /dev/null and b/CUETools/CUETools.TestCodecs/test.wav differ diff --git a/CUETools/CUETools.csproj b/CUETools/CUETools.csproj index 46ea11a..b0270ef 100644 --- a/CUETools/CUETools.csproj +++ b/CUETools/CUETools.csproj @@ -49,7 +49,7 @@ pdbonly true - ..\bin\mono\Release\ + ..\bin\any\Release\ TRACE prompt 4 diff --git a/CUETools/CUETools.sln b/CUETools/CUETools.sln index 09e6817..9fc135f 100644 --- a/CUETools/CUETools.sln +++ b/CUETools/CUETools.sln @@ -31,11 +31,6 @@ EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ArCueDotNet", "..\ArCueDotNet\ArCueDotNet.csproj", "{A5A8D8FA-9E32-4010-8AAF-AE580C5AF728}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CUETools.Processor", "..\CUETools.Processor\CUETools.Processor.csproj", "{4911BD82-49EF-4858-8B51-5394F86739A4}" - ProjectSection(ProjectDependencies) = postProject - {E70FA90A-7012-4A52-86B5-362B699D1540} = {E70FA90A-7012-4A52-86B5-362B699D1540} - {CC2E74B6-534A-43D8-9F16-AC03FE955000} = {CC2E74B6-534A-43D8-9F16-AC03FE955000} - {9AE965C4-301E-4C01-B90F-297AF341ACC6} = {9AE965C4-301E-4C01-B90F-297AF341ACC6} - EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HDCDDotNet", "..\HDCDDotNet\HDCDDotNet.csproj", "{32338A04-5B6B-4C63-8EE7-C6400F73B5D7}" EndProject @@ -77,8 +72,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TTALib", "..\ttalib-1.1\TTA EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CUETools.Codecs.TTA", "..\CUETools.Codecs.TTA\CUETools.Codecs.TTA.vcproj", "{1D1E99BC-6D22-41C0-BD94-FF4DD5EC725B}" ProjectSection(ProjectDependencies) = postProject - {6458A13A-30EF-45A9-9D58-E5031B17BEE2} = {6458A13A-30EF-45A9-9D58-E5031B17BEE2} {B3DF599C-1C8F-451D-91E4-DD766210DA1F} = {B3DF599C-1C8F-451D-91E4-DD766210DA1F} + {6458A13A-30EF-45A9-9D58-E5031B17BEE2} = {6458A13A-30EF-45A9-9D58-E5031B17BEE2} EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CUETools.Converter", "..\CUETools.Converter\CUETools.Converter.csproj", "{115CC5B0-0385-41CD-8A23-6A7EA4C51926}" @@ -95,636 +90,402 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CUETools.Flake", "..\CUEToo EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CUETools.ALACEnc", "..\CUETools.ALACEnc\CUETools.ALACEnc.csproj", "{8E6E1763-39AE-491D-A10F-44C8844ABA5B}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CUETools.Codecs.FlaCuda", "..\CUETools.FlaCuda\CUETools.Codecs.FlaCuda.csproj", "{DFE50673-906C-4B8F-993B-A24CAD1CA17D}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CUETools.FlaCuda", "..\CUETools.FlaCudaExe\CUETools.FlaCuda.csproj", "{1FCA8834-34E6-47CF-B53F-D8DF49F0819E}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CUETools.Codecs.CLAC", "..\CUETools.Codecs.CLAC\CUETools.Codecs.CLAC.csproj", "{DDE1EA77-637C-4D5F-96F3-1328BC45CE80}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CUETools.CLACEncoder", "..\CUETools.CLACEncoder\CUETools.CLACEncoder.csproj", "{FC4BCF9B-F4C7-41AD-8A16-2A90A082954A}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CUETools.TestCodecs", "CUETools.TestCodecs\CUETools.TestCodecs.csproj", "{04945FB2-8410-4F14-8262-2ED18DCDACD6}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{366B7C6D-3A2C-4767-9121-4FBB550B5DE2}" + ProjectSection(SolutionItems) = preProject + CUETools1.vsmdi = CUETools1.vsmdi + localtestrun.testrunconfig = localtestrun.testrunconfig + EndProjectSection +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CUETools.TestProcessor", "CUETools.TestProcessor\CUETools.TestProcessor.csproj", "{A430AD28-B76A-4ED0-AF7D-D13B8969297F}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Plugins", "Plugins", "{39A17A65-E893-44B8-A312-DDCDD990D9D1}" +EndProject Global + GlobalSection(TestCaseManagementSettings) = postSolution + CategoryFile = CUETools1.vsmdi + EndGlobalSection GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU - Debug|Mixed Platforms = Debug|Mixed Platforms Debug|Win32 = Debug|Win32 Debug|x64 = Debug|x64 - Debug|x86 = Debug|x86 Release|Any CPU = Release|Any CPU - Release|Mixed Platforms = Release|Mixed Platforms Release|Win32 = Release|Win32 Release|x64 = Release|x64 - Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {EF351583-A9CD-4530-92C3-20AC02136BC2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {EF351583-A9CD-4530-92C3-20AC02136BC2}.Debug|Any CPU.Build.0 = Debug|Any CPU - {EF351583-A9CD-4530-92C3-20AC02136BC2}.Debug|Mixed Platforms.ActiveCfg = Debug|x64 - {EF351583-A9CD-4530-92C3-20AC02136BC2}.Debug|Mixed Platforms.Build.0 = Debug|x64 - {EF351583-A9CD-4530-92C3-20AC02136BC2}.Debug|Win32.ActiveCfg = Debug|x64 - {EF351583-A9CD-4530-92C3-20AC02136BC2}.Debug|x64.ActiveCfg = Debug|x64 - {EF351583-A9CD-4530-92C3-20AC02136BC2}.Debug|x64.Build.0 = Debug|x64 - {EF351583-A9CD-4530-92C3-20AC02136BC2}.Debug|x86.ActiveCfg = Debug|x86 - {EF351583-A9CD-4530-92C3-20AC02136BC2}.Debug|x86.Build.0 = Debug|x86 + {EF351583-A9CD-4530-92C3-20AC02136BC2}.Debug|Win32.ActiveCfg = Debug|Any CPU + {EF351583-A9CD-4530-92C3-20AC02136BC2}.Debug|x64.ActiveCfg = Debug|Any CPU {EF351583-A9CD-4530-92C3-20AC02136BC2}.Release|Any CPU.ActiveCfg = Release|Any CPU {EF351583-A9CD-4530-92C3-20AC02136BC2}.Release|Any CPU.Build.0 = Release|Any CPU - {EF351583-A9CD-4530-92C3-20AC02136BC2}.Release|Mixed Platforms.ActiveCfg = Release|x64 - {EF351583-A9CD-4530-92C3-20AC02136BC2}.Release|Mixed Platforms.Build.0 = Release|x64 - {EF351583-A9CD-4530-92C3-20AC02136BC2}.Release|Win32.ActiveCfg = Release|x64 - {EF351583-A9CD-4530-92C3-20AC02136BC2}.Release|x64.ActiveCfg = Release|x64 - {EF351583-A9CD-4530-92C3-20AC02136BC2}.Release|x64.Build.0 = Release|x64 - {EF351583-A9CD-4530-92C3-20AC02136BC2}.Release|x86.ActiveCfg = Release|x86 - {EF351583-A9CD-4530-92C3-20AC02136BC2}.Release|x86.Build.0 = Release|x86 + {EF351583-A9CD-4530-92C3-20AC02136BC2}.Release|Win32.ActiveCfg = Release|Any CPU + {EF351583-A9CD-4530-92C3-20AC02136BC2}.Release|x64.ActiveCfg = Release|Any CPU {E70FA90A-7012-4A52-86B5-362B699D1540}.Debug|Any CPU.ActiveCfg = Debug|x64 - {E70FA90A-7012-4A52-86B5-362B699D1540}.Debug|Mixed Platforms.ActiveCfg = Debug|x64 - {E70FA90A-7012-4A52-86B5-362B699D1540}.Debug|Mixed Platforms.Build.0 = Debug|x64 {E70FA90A-7012-4A52-86B5-362B699D1540}.Debug|Win32.ActiveCfg = Debug|Win32 {E70FA90A-7012-4A52-86B5-362B699D1540}.Debug|Win32.Build.0 = Debug|Win32 {E70FA90A-7012-4A52-86B5-362B699D1540}.Debug|x64.ActiveCfg = Debug|x64 {E70FA90A-7012-4A52-86B5-362B699D1540}.Debug|x64.Build.0 = Debug|x64 - {E70FA90A-7012-4A52-86B5-362B699D1540}.Debug|x86.ActiveCfg = Debug|Win32 - {E70FA90A-7012-4A52-86B5-362B699D1540}.Debug|x86.Build.0 = Debug|Win32 {E70FA90A-7012-4A52-86B5-362B699D1540}.Release|Any CPU.ActiveCfg = Release|x64 - {E70FA90A-7012-4A52-86B5-362B699D1540}.Release|Mixed Platforms.ActiveCfg = Release|x64 - {E70FA90A-7012-4A52-86B5-362B699D1540}.Release|Mixed Platforms.Build.0 = Release|x64 {E70FA90A-7012-4A52-86B5-362B699D1540}.Release|Win32.ActiveCfg = Release|Win32 {E70FA90A-7012-4A52-86B5-362B699D1540}.Release|Win32.Build.0 = Release|Win32 {E70FA90A-7012-4A52-86B5-362B699D1540}.Release|x64.ActiveCfg = Release|x64 {E70FA90A-7012-4A52-86B5-362B699D1540}.Release|x64.Build.0 = Release|x64 - {E70FA90A-7012-4A52-86B5-362B699D1540}.Release|x86.ActiveCfg = Release|Win32 - {E70FA90A-7012-4A52-86B5-362B699D1540}.Release|x86.Build.0 = Release|Win32 {9AE965C4-301E-4C01-B90F-297AF341ACC6}.Debug|Any CPU.ActiveCfg = Debug|x64 - {9AE965C4-301E-4C01-B90F-297AF341ACC6}.Debug|Mixed Platforms.ActiveCfg = Debug|x64 - {9AE965C4-301E-4C01-B90F-297AF341ACC6}.Debug|Mixed Platforms.Build.0 = Debug|x64 {9AE965C4-301E-4C01-B90F-297AF341ACC6}.Debug|Win32.ActiveCfg = Debug|Win32 {9AE965C4-301E-4C01-B90F-297AF341ACC6}.Debug|Win32.Build.0 = Debug|Win32 {9AE965C4-301E-4C01-B90F-297AF341ACC6}.Debug|x64.ActiveCfg = Debug|x64 {9AE965C4-301E-4C01-B90F-297AF341ACC6}.Debug|x64.Build.0 = Debug|x64 - {9AE965C4-301E-4C01-B90F-297AF341ACC6}.Debug|x86.ActiveCfg = Debug|Win32 - {9AE965C4-301E-4C01-B90F-297AF341ACC6}.Debug|x86.Build.0 = Debug|Win32 {9AE965C4-301E-4C01-B90F-297AF341ACC6}.Release|Any CPU.ActiveCfg = Release|x64 - {9AE965C4-301E-4C01-B90F-297AF341ACC6}.Release|Mixed Platforms.ActiveCfg = Release|x64 - {9AE965C4-301E-4C01-B90F-297AF341ACC6}.Release|Mixed Platforms.Build.0 = Release|x64 {9AE965C4-301E-4C01-B90F-297AF341ACC6}.Release|Win32.ActiveCfg = Release|Win32 {9AE965C4-301E-4C01-B90F-297AF341ACC6}.Release|Win32.Build.0 = Release|Win32 {9AE965C4-301E-4C01-B90F-297AF341ACC6}.Release|x64.ActiveCfg = Release|x64 {9AE965C4-301E-4C01-B90F-297AF341ACC6}.Release|x64.Build.0 = Release|x64 - {9AE965C4-301E-4C01-B90F-297AF341ACC6}.Release|x86.ActiveCfg = Release|Win32 - {9AE965C4-301E-4C01-B90F-297AF341ACC6}.Release|x86.Build.0 = Release|Win32 {CC2E74B6-534A-43D8-9F16-AC03FE955000}.Debug|Any CPU.ActiveCfg = Debug|x64 - {CC2E74B6-534A-43D8-9F16-AC03FE955000}.Debug|Mixed Platforms.ActiveCfg = Debug|x64 - {CC2E74B6-534A-43D8-9F16-AC03FE955000}.Debug|Mixed Platforms.Build.0 = Debug|x64 {CC2E74B6-534A-43D8-9F16-AC03FE955000}.Debug|Win32.ActiveCfg = Debug|Win32 {CC2E74B6-534A-43D8-9F16-AC03FE955000}.Debug|Win32.Build.0 = Debug|Win32 {CC2E74B6-534A-43D8-9F16-AC03FE955000}.Debug|x64.ActiveCfg = Debug|x64 {CC2E74B6-534A-43D8-9F16-AC03FE955000}.Debug|x64.Build.0 = Debug|x64 - {CC2E74B6-534A-43D8-9F16-AC03FE955000}.Debug|x86.ActiveCfg = Debug|Win32 - {CC2E74B6-534A-43D8-9F16-AC03FE955000}.Debug|x86.Build.0 = Debug|Win32 {CC2E74B6-534A-43D8-9F16-AC03FE955000}.Release|Any CPU.ActiveCfg = Release|Win32 - {CC2E74B6-534A-43D8-9F16-AC03FE955000}.Release|Mixed Platforms.ActiveCfg = Release|x64 - {CC2E74B6-534A-43D8-9F16-AC03FE955000}.Release|Mixed Platforms.Build.0 = Release|x64 {CC2E74B6-534A-43D8-9F16-AC03FE955000}.Release|Win32.ActiveCfg = Release|Win32 {CC2E74B6-534A-43D8-9F16-AC03FE955000}.Release|Win32.Build.0 = Release|Win32 {CC2E74B6-534A-43D8-9F16-AC03FE955000}.Release|x64.ActiveCfg = Release|x64 {CC2E74B6-534A-43D8-9F16-AC03FE955000}.Release|x64.Build.0 = Release|x64 - {CC2E74B6-534A-43D8-9F16-AC03FE955000}.Release|x86.ActiveCfg = Release|Win32 - {CC2E74B6-534A-43D8-9F16-AC03FE955000}.Release|x86.Build.0 = Release|Win32 {0B9C97D4-61B8-4294-A1DF-BA90752A1779}.Debug|Any CPU.ActiveCfg = Debug|x64 - {0B9C97D4-61B8-4294-A1DF-BA90752A1779}.Debug|Mixed Platforms.ActiveCfg = Debug|x64 - {0B9C97D4-61B8-4294-A1DF-BA90752A1779}.Debug|Mixed Platforms.Build.0 = Debug|x64 {0B9C97D4-61B8-4294-A1DF-BA90752A1779}.Debug|Win32.ActiveCfg = Debug|Win32 {0B9C97D4-61B8-4294-A1DF-BA90752A1779}.Debug|Win32.Build.0 = Debug|Win32 {0B9C97D4-61B8-4294-A1DF-BA90752A1779}.Debug|x64.ActiveCfg = Debug|x64 {0B9C97D4-61B8-4294-A1DF-BA90752A1779}.Debug|x64.Build.0 = Debug|x64 - {0B9C97D4-61B8-4294-A1DF-BA90752A1779}.Debug|x86.ActiveCfg = Debug|Win32 - {0B9C97D4-61B8-4294-A1DF-BA90752A1779}.Debug|x86.Build.0 = Debug|Win32 {0B9C97D4-61B8-4294-A1DF-BA90752A1779}.Release|Any CPU.ActiveCfg = Release|x64 - {0B9C97D4-61B8-4294-A1DF-BA90752A1779}.Release|Mixed Platforms.ActiveCfg = Release|x64 - {0B9C97D4-61B8-4294-A1DF-BA90752A1779}.Release|Mixed Platforms.Build.0 = Release|x64 {0B9C97D4-61B8-4294-A1DF-BA90752A1779}.Release|Win32.ActiveCfg = Release|Win32 {0B9C97D4-61B8-4294-A1DF-BA90752A1779}.Release|Win32.Build.0 = Release|Win32 {0B9C97D4-61B8-4294-A1DF-BA90752A1779}.Release|x64.ActiveCfg = Release|x64 {0B9C97D4-61B8-4294-A1DF-BA90752A1779}.Release|x64.Build.0 = Release|x64 - {0B9C97D4-61B8-4294-A1DF-BA90752A1779}.Release|x86.ActiveCfg = Release|Win32 - {0B9C97D4-61B8-4294-A1DF-BA90752A1779}.Release|x86.Build.0 = Release|Win32 {4CEFBC84-C215-11DB-8314-0800200C9A66}.Debug|Any CPU.ActiveCfg = Debug|x64 - {4CEFBC84-C215-11DB-8314-0800200C9A66}.Debug|Mixed Platforms.ActiveCfg = Debug|x64 - {4CEFBC84-C215-11DB-8314-0800200C9A66}.Debug|Mixed Platforms.Build.0 = Debug|x64 {4CEFBC84-C215-11DB-8314-0800200C9A66}.Debug|Win32.ActiveCfg = Debug|Win32 {4CEFBC84-C215-11DB-8314-0800200C9A66}.Debug|Win32.Build.0 = Debug|Win32 {4CEFBC84-C215-11DB-8314-0800200C9A66}.Debug|x64.ActiveCfg = Debug|x64 {4CEFBC84-C215-11DB-8314-0800200C9A66}.Debug|x64.Build.0 = Debug|x64 - {4CEFBC84-C215-11DB-8314-0800200C9A66}.Debug|x86.ActiveCfg = Debug|Win32 - {4CEFBC84-C215-11DB-8314-0800200C9A66}.Debug|x86.Build.0 = Debug|Win32 {4CEFBC84-C215-11DB-8314-0800200C9A66}.Release|Any CPU.ActiveCfg = Release|x64 - {4CEFBC84-C215-11DB-8314-0800200C9A66}.Release|Mixed Platforms.ActiveCfg = Release|x64 - {4CEFBC84-C215-11DB-8314-0800200C9A66}.Release|Mixed Platforms.Build.0 = Release|x64 {4CEFBC84-C215-11DB-8314-0800200C9A66}.Release|Win32.ActiveCfg = Release|Win32 {4CEFBC84-C215-11DB-8314-0800200C9A66}.Release|Win32.Build.0 = Release|Win32 {4CEFBC84-C215-11DB-8314-0800200C9A66}.Release|x64.ActiveCfg = Release|x64 {4CEFBC84-C215-11DB-8314-0800200C9A66}.Release|x64.Build.0 = Release|x64 - {4CEFBC84-C215-11DB-8314-0800200C9A66}.Release|x86.ActiveCfg = Release|Win32 - {4CEFBC84-C215-11DB-8314-0800200C9A66}.Release|x86.Build.0 = Release|Win32 {5CCCB9CF-0384-458F-BA08-72B73866840F}.Debug|Any CPU.ActiveCfg = Debug|x64 - {5CCCB9CF-0384-458F-BA08-72B73866840F}.Debug|Mixed Platforms.ActiveCfg = Debug|x64 - {5CCCB9CF-0384-458F-BA08-72B73866840F}.Debug|Mixed Platforms.Build.0 = Debug|x64 {5CCCB9CF-0384-458F-BA08-72B73866840F}.Debug|Win32.ActiveCfg = Debug|Win32 {5CCCB9CF-0384-458F-BA08-72B73866840F}.Debug|Win32.Build.0 = Debug|Win32 {5CCCB9CF-0384-458F-BA08-72B73866840F}.Debug|x64.ActiveCfg = Debug|x64 {5CCCB9CF-0384-458F-BA08-72B73866840F}.Debug|x64.Build.0 = Debug|x64 - {5CCCB9CF-0384-458F-BA08-72B73866840F}.Debug|x86.ActiveCfg = Debug|Win32 - {5CCCB9CF-0384-458F-BA08-72B73866840F}.Debug|x86.Build.0 = Debug|Win32 {5CCCB9CF-0384-458F-BA08-72B73866840F}.Release|Any CPU.ActiveCfg = Release|x64 - {5CCCB9CF-0384-458F-BA08-72B73866840F}.Release|Mixed Platforms.ActiveCfg = Release|x64 - {5CCCB9CF-0384-458F-BA08-72B73866840F}.Release|Mixed Platforms.Build.0 = Release|x64 {5CCCB9CF-0384-458F-BA08-72B73866840F}.Release|Win32.ActiveCfg = Release|Win32 {5CCCB9CF-0384-458F-BA08-72B73866840F}.Release|Win32.Build.0 = Release|Win32 {5CCCB9CF-0384-458F-BA08-72B73866840F}.Release|x64.ActiveCfg = Release|x64 {5CCCB9CF-0384-458F-BA08-72B73866840F}.Release|x64.Build.0 = Release|x64 - {5CCCB9CF-0384-458F-BA08-72B73866840F}.Release|x86.ActiveCfg = Release|Win32 - {5CCCB9CF-0384-458F-BA08-72B73866840F}.Release|x86.Build.0 = Release|Win32 {A5A8D8FA-9E32-4010-8AAF-AE580C5AF728}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {A5A8D8FA-9E32-4010-8AAF-AE580C5AF728}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A5A8D8FA-9E32-4010-8AAF-AE580C5AF728}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 - {A5A8D8FA-9E32-4010-8AAF-AE580C5AF728}.Debug|Mixed Platforms.Build.0 = Debug|x86 - {A5A8D8FA-9E32-4010-8AAF-AE580C5AF728}.Debug|Win32.ActiveCfg = Debug|x86 - {A5A8D8FA-9E32-4010-8AAF-AE580C5AF728}.Debug|x64.ActiveCfg = Debug|x64 - {A5A8D8FA-9E32-4010-8AAF-AE580C5AF728}.Debug|x64.Build.0 = Debug|x64 - {A5A8D8FA-9E32-4010-8AAF-AE580C5AF728}.Debug|x86.ActiveCfg = Debug|x86 - {A5A8D8FA-9E32-4010-8AAF-AE580C5AF728}.Debug|x86.Build.0 = Debug|x86 + {A5A8D8FA-9E32-4010-8AAF-AE580C5AF728}.Debug|Win32.ActiveCfg = Debug|Any CPU + {A5A8D8FA-9E32-4010-8AAF-AE580C5AF728}.Debug|x64.ActiveCfg = Debug|Any CPU {A5A8D8FA-9E32-4010-8AAF-AE580C5AF728}.Release|Any CPU.ActiveCfg = Release|Any CPU {A5A8D8FA-9E32-4010-8AAF-AE580C5AF728}.Release|Any CPU.Build.0 = Release|Any CPU - {A5A8D8FA-9E32-4010-8AAF-AE580C5AF728}.Release|Mixed Platforms.ActiveCfg = Release|x86 - {A5A8D8FA-9E32-4010-8AAF-AE580C5AF728}.Release|Mixed Platforms.Build.0 = Release|x86 - {A5A8D8FA-9E32-4010-8AAF-AE580C5AF728}.Release|Win32.ActiveCfg = Release|x86 - {A5A8D8FA-9E32-4010-8AAF-AE580C5AF728}.Release|x64.ActiveCfg = Release|x64 - {A5A8D8FA-9E32-4010-8AAF-AE580C5AF728}.Release|x64.Build.0 = Release|x64 - {A5A8D8FA-9E32-4010-8AAF-AE580C5AF728}.Release|x86.ActiveCfg = Release|x86 - {A5A8D8FA-9E32-4010-8AAF-AE580C5AF728}.Release|x86.Build.0 = Release|x86 + {A5A8D8FA-9E32-4010-8AAF-AE580C5AF728}.Release|Win32.ActiveCfg = Release|Any CPU + {A5A8D8FA-9E32-4010-8AAF-AE580C5AF728}.Release|x64.ActiveCfg = Release|Any CPU {4911BD82-49EF-4858-8B51-5394F86739A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {4911BD82-49EF-4858-8B51-5394F86739A4}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4911BD82-49EF-4858-8B51-5394F86739A4}.Debug|Mixed Platforms.ActiveCfg = Debug|x64 - {4911BD82-49EF-4858-8B51-5394F86739A4}.Debug|Mixed Platforms.Build.0 = Debug|x64 - {4911BD82-49EF-4858-8B51-5394F86739A4}.Debug|Win32.ActiveCfg = Debug|x64 - {4911BD82-49EF-4858-8B51-5394F86739A4}.Debug|x64.ActiveCfg = Debug|x64 - {4911BD82-49EF-4858-8B51-5394F86739A4}.Debug|x64.Build.0 = Debug|x64 - {4911BD82-49EF-4858-8B51-5394F86739A4}.Debug|x86.ActiveCfg = Debug|x86 - {4911BD82-49EF-4858-8B51-5394F86739A4}.Debug|x86.Build.0 = Debug|x86 + {4911BD82-49EF-4858-8B51-5394F86739A4}.Debug|Win32.ActiveCfg = Debug|Any CPU + {4911BD82-49EF-4858-8B51-5394F86739A4}.Debug|x64.ActiveCfg = Debug|Any CPU + {4911BD82-49EF-4858-8B51-5394F86739A4}.Debug|x64.Build.0 = Debug|Any CPU {4911BD82-49EF-4858-8B51-5394F86739A4}.Release|Any CPU.ActiveCfg = Release|Any CPU {4911BD82-49EF-4858-8B51-5394F86739A4}.Release|Any CPU.Build.0 = Release|Any CPU - {4911BD82-49EF-4858-8B51-5394F86739A4}.Release|Mixed Platforms.ActiveCfg = Release|x64 - {4911BD82-49EF-4858-8B51-5394F86739A4}.Release|Mixed Platforms.Build.0 = Release|x64 - {4911BD82-49EF-4858-8B51-5394F86739A4}.Release|Win32.ActiveCfg = Release|x64 + {4911BD82-49EF-4858-8B51-5394F86739A4}.Release|Win32.ActiveCfg = Release|Any CPU {4911BD82-49EF-4858-8B51-5394F86739A4}.Release|x64.ActiveCfg = Release|Any CPU - {4911BD82-49EF-4858-8B51-5394F86739A4}.Release|x64.Build.0 = Release|Any CPU - {4911BD82-49EF-4858-8B51-5394F86739A4}.Release|x86.ActiveCfg = Release|x86 - {4911BD82-49EF-4858-8B51-5394F86739A4}.Release|x86.Build.0 = Release|x86 {32338A04-5B6B-4C63-8EE7-C6400F73B5D7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {32338A04-5B6B-4C63-8EE7-C6400F73B5D7}.Debug|Any CPU.Build.0 = Debug|Any CPU - {32338A04-5B6B-4C63-8EE7-C6400F73B5D7}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 - {32338A04-5B6B-4C63-8EE7-C6400F73B5D7}.Debug|Mixed Platforms.Build.0 = Debug|x86 - {32338A04-5B6B-4C63-8EE7-C6400F73B5D7}.Debug|Win32.ActiveCfg = Debug|x86 + {32338A04-5B6B-4C63-8EE7-C6400F73B5D7}.Debug|Win32.ActiveCfg = Debug|Any CPU {32338A04-5B6B-4C63-8EE7-C6400F73B5D7}.Debug|x64.ActiveCfg = Debug|x64 {32338A04-5B6B-4C63-8EE7-C6400F73B5D7}.Debug|x64.Build.0 = Debug|x64 - {32338A04-5B6B-4C63-8EE7-C6400F73B5D7}.Debug|x86.ActiveCfg = Debug|x86 - {32338A04-5B6B-4C63-8EE7-C6400F73B5D7}.Debug|x86.Build.0 = Debug|x86 - {32338A04-5B6B-4C63-8EE7-C6400F73B5D7}.Release|Any CPU.ActiveCfg = Release|x64 - {32338A04-5B6B-4C63-8EE7-C6400F73B5D7}.Release|Mixed Platforms.ActiveCfg = Release|x86 - {32338A04-5B6B-4C63-8EE7-C6400F73B5D7}.Release|Mixed Platforms.Build.0 = Release|x86 - {32338A04-5B6B-4C63-8EE7-C6400F73B5D7}.Release|Win32.ActiveCfg = Release|x86 - {32338A04-5B6B-4C63-8EE7-C6400F73B5D7}.Release|x64.ActiveCfg = Release|x64 - {32338A04-5B6B-4C63-8EE7-C6400F73B5D7}.Release|x64.Build.0 = Release|x64 - {32338A04-5B6B-4C63-8EE7-C6400F73B5D7}.Release|x86.ActiveCfg = Release|x86 - {32338A04-5B6B-4C63-8EE7-C6400F73B5D7}.Release|x86.Build.0 = Release|x86 + {32338A04-5B6B-4C63-8EE7-C6400F73B5D7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {32338A04-5B6B-4C63-8EE7-C6400F73B5D7}.Release|Any CPU.Build.0 = Release|Any CPU + {32338A04-5B6B-4C63-8EE7-C6400F73B5D7}.Release|Win32.ActiveCfg = Release|Any CPU + {32338A04-5B6B-4C63-8EE7-C6400F73B5D7}.Release|x64.ActiveCfg = Release|Any CPU {6458A13A-30EF-45A9-9D58-E5031B17BEE2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {6458A13A-30EF-45A9-9D58-E5031B17BEE2}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6458A13A-30EF-45A9-9D58-E5031B17BEE2}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 - {6458A13A-30EF-45A9-9D58-E5031B17BEE2}.Debug|Mixed Platforms.Build.0 = Debug|x86 - {6458A13A-30EF-45A9-9D58-E5031B17BEE2}.Debug|Win32.ActiveCfg = Debug|x86 + {6458A13A-30EF-45A9-9D58-E5031B17BEE2}.Debug|Win32.ActiveCfg = Debug|Any CPU {6458A13A-30EF-45A9-9D58-E5031B17BEE2}.Debug|x64.ActiveCfg = Debug|Any CPU {6458A13A-30EF-45A9-9D58-E5031B17BEE2}.Debug|x64.Build.0 = Debug|Any CPU - {6458A13A-30EF-45A9-9D58-E5031B17BEE2}.Debug|x86.ActiveCfg = Debug|x86 - {6458A13A-30EF-45A9-9D58-E5031B17BEE2}.Debug|x86.Build.0 = Debug|x86 {6458A13A-30EF-45A9-9D58-E5031B17BEE2}.Release|Any CPU.ActiveCfg = Release|Any CPU {6458A13A-30EF-45A9-9D58-E5031B17BEE2}.Release|Any CPU.Build.0 = Release|Any CPU - {6458A13A-30EF-45A9-9D58-E5031B17BEE2}.Release|Mixed Platforms.ActiveCfg = Release|x86 - {6458A13A-30EF-45A9-9D58-E5031B17BEE2}.Release|Mixed Platforms.Build.0 = Release|x86 - {6458A13A-30EF-45A9-9D58-E5031B17BEE2}.Release|Win32.ActiveCfg = Release|x86 + {6458A13A-30EF-45A9-9D58-E5031B17BEE2}.Release|Win32.ActiveCfg = Release|Any CPU {6458A13A-30EF-45A9-9D58-E5031B17BEE2}.Release|x64.ActiveCfg = Release|Any CPU - {6458A13A-30EF-45A9-9D58-E5031B17BEE2}.Release|x64.Build.0 = Release|Any CPU - {6458A13A-30EF-45A9-9D58-E5031B17BEE2}.Release|x86.ActiveCfg = Release|x86 - {6458A13A-30EF-45A9-9D58-E5031B17BEE2}.Release|x86.Build.0 = Release|x86 {F2EC7193-D5E5-4252-9803-5CEB407E910F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {F2EC7193-D5E5-4252-9803-5CEB407E910F}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F2EC7193-D5E5-4252-9803-5CEB407E910F}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 - {F2EC7193-D5E5-4252-9803-5CEB407E910F}.Debug|Mixed Platforms.Build.0 = Debug|x86 - {F2EC7193-D5E5-4252-9803-5CEB407E910F}.Debug|Win32.ActiveCfg = Debug|x86 + {F2EC7193-D5E5-4252-9803-5CEB407E910F}.Debug|Win32.ActiveCfg = Debug|Any CPU {F2EC7193-D5E5-4252-9803-5CEB407E910F}.Debug|x64.ActiveCfg = Debug|Any CPU {F2EC7193-D5E5-4252-9803-5CEB407E910F}.Debug|x64.Build.0 = Debug|Any CPU - {F2EC7193-D5E5-4252-9803-5CEB407E910F}.Debug|x86.ActiveCfg = Debug|x86 - {F2EC7193-D5E5-4252-9803-5CEB407E910F}.Debug|x86.Build.0 = Debug|x86 {F2EC7193-D5E5-4252-9803-5CEB407E910F}.Release|Any CPU.ActiveCfg = Release|Any CPU {F2EC7193-D5E5-4252-9803-5CEB407E910F}.Release|Any CPU.Build.0 = Release|Any CPU - {F2EC7193-D5E5-4252-9803-5CEB407E910F}.Release|Mixed Platforms.ActiveCfg = Release|x86 - {F2EC7193-D5E5-4252-9803-5CEB407E910F}.Release|Mixed Platforms.Build.0 = Release|x86 - {F2EC7193-D5E5-4252-9803-5CEB407E910F}.Release|Win32.ActiveCfg = Release|x86 - {F2EC7193-D5E5-4252-9803-5CEB407E910F}.Release|x64.ActiveCfg = Release|x64 - {F2EC7193-D5E5-4252-9803-5CEB407E910F}.Release|x64.Build.0 = Release|x64 - {F2EC7193-D5E5-4252-9803-5CEB407E910F}.Release|x86.ActiveCfg = Release|x86 - {F2EC7193-D5E5-4252-9803-5CEB407E910F}.Release|x86.Build.0 = Release|x86 + {F2EC7193-D5E5-4252-9803-5CEB407E910F}.Release|Win32.ActiveCfg = Release|Any CPU + {F2EC7193-D5E5-4252-9803-5CEB407E910F}.Release|x64.ActiveCfg = Release|Any CPU {8427CAA5-80B8-4952-9A68-5F3DFCFBDF40}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8427CAA5-80B8-4952-9A68-5F3DFCFBDF40}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 - {8427CAA5-80B8-4952-9A68-5F3DFCFBDF40}.Debug|Mixed Platforms.Build.0 = Debug|x86 - {8427CAA5-80B8-4952-9A68-5F3DFCFBDF40}.Debug|Win32.ActiveCfg = Debug|x86 + {8427CAA5-80B8-4952-9A68-5F3DFCFBDF40}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8427CAA5-80B8-4952-9A68-5F3DFCFBDF40}.Debug|Win32.ActiveCfg = Debug|Any CPU {8427CAA5-80B8-4952-9A68-5F3DFCFBDF40}.Debug|x64.ActiveCfg = Debug|x64 {8427CAA5-80B8-4952-9A68-5F3DFCFBDF40}.Debug|x64.Build.0 = Debug|x64 - {8427CAA5-80B8-4952-9A68-5F3DFCFBDF40}.Debug|x86.ActiveCfg = Debug|x86 - {8427CAA5-80B8-4952-9A68-5F3DFCFBDF40}.Debug|x86.Build.0 = Debug|x86 - {8427CAA5-80B8-4952-9A68-5F3DFCFBDF40}.Release|Any CPU.ActiveCfg = Release|x64 - {8427CAA5-80B8-4952-9A68-5F3DFCFBDF40}.Release|Mixed Platforms.ActiveCfg = Release|x86 - {8427CAA5-80B8-4952-9A68-5F3DFCFBDF40}.Release|Mixed Platforms.Build.0 = Release|x86 - {8427CAA5-80B8-4952-9A68-5F3DFCFBDF40}.Release|Win32.ActiveCfg = Release|x86 - {8427CAA5-80B8-4952-9A68-5F3DFCFBDF40}.Release|x64.ActiveCfg = Release|x64 - {8427CAA5-80B8-4952-9A68-5F3DFCFBDF40}.Release|x64.Build.0 = Release|x64 - {8427CAA5-80B8-4952-9A68-5F3DFCFBDF40}.Release|x86.ActiveCfg = Release|x86 - {8427CAA5-80B8-4952-9A68-5F3DFCFBDF40}.Release|x86.Build.0 = Release|x86 + {8427CAA5-80B8-4952-9A68-5F3DFCFBDF40}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8427CAA5-80B8-4952-9A68-5F3DFCFBDF40}.Release|Any CPU.Build.0 = Release|Any CPU + {8427CAA5-80B8-4952-9A68-5F3DFCFBDF40}.Release|Win32.ActiveCfg = Release|Any CPU + {8427CAA5-80B8-4952-9A68-5F3DFCFBDF40}.Release|x64.ActiveCfg = Release|Any CPU {8A0426FA-0BC2-4C49-A6E5-1F9A68156F19}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8A0426FA-0BC2-4C49-A6E5-1F9A68156F19}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8A0426FA-0BC2-4C49-A6E5-1F9A68156F19}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 - {8A0426FA-0BC2-4C49-A6E5-1F9A68156F19}.Debug|Mixed Platforms.Build.0 = Debug|x86 - {8A0426FA-0BC2-4C49-A6E5-1F9A68156F19}.Debug|Win32.ActiveCfg = Debug|x86 - {8A0426FA-0BC2-4C49-A6E5-1F9A68156F19}.Debug|x64.ActiveCfg = Debug|x64 - {8A0426FA-0BC2-4C49-A6E5-1F9A68156F19}.Debug|x64.Build.0 = Debug|x64 - {8A0426FA-0BC2-4C49-A6E5-1F9A68156F19}.Debug|x86.ActiveCfg = Debug|x86 - {8A0426FA-0BC2-4C49-A6E5-1F9A68156F19}.Debug|x86.Build.0 = Debug|x86 + {8A0426FA-0BC2-4C49-A6E5-1F9A68156F19}.Debug|Win32.ActiveCfg = Debug|Any CPU + {8A0426FA-0BC2-4C49-A6E5-1F9A68156F19}.Debug|x64.ActiveCfg = Debug|Any CPU + {8A0426FA-0BC2-4C49-A6E5-1F9A68156F19}.Debug|x64.Build.0 = Debug|Any CPU {8A0426FA-0BC2-4C49-A6E5-1F9A68156F19}.Release|Any CPU.ActiveCfg = Release|Any CPU {8A0426FA-0BC2-4C49-A6E5-1F9A68156F19}.Release|Any CPU.Build.0 = Release|Any CPU - {8A0426FA-0BC2-4C49-A6E5-1F9A68156F19}.Release|Mixed Platforms.ActiveCfg = Release|x86 - {8A0426FA-0BC2-4C49-A6E5-1F9A68156F19}.Release|Mixed Platforms.Build.0 = Release|x86 - {8A0426FA-0BC2-4C49-A6E5-1F9A68156F19}.Release|Win32.ActiveCfg = Release|x86 - {8A0426FA-0BC2-4C49-A6E5-1F9A68156F19}.Release|x64.ActiveCfg = Release|x64 - {8A0426FA-0BC2-4C49-A6E5-1F9A68156F19}.Release|x64.Build.0 = Release|x64 - {8A0426FA-0BC2-4C49-A6E5-1F9A68156F19}.Release|x86.ActiveCfg = Release|x86 - {8A0426FA-0BC2-4C49-A6E5-1F9A68156F19}.Release|x86.Build.0 = Release|x86 + {8A0426FA-0BC2-4C49-A6E5-1F9A68156F19}.Release|Win32.ActiveCfg = Release|Any CPU + {8A0426FA-0BC2-4C49-A6E5-1F9A68156F19}.Release|x64.ActiveCfg = Release|Any CPU {A574F3B1-E38B-4EE4-9394-49D6E2DF52EA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {A574F3B1-E38B-4EE4-9394-49D6E2DF52EA}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A574F3B1-E38B-4EE4-9394-49D6E2DF52EA}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 - {A574F3B1-E38B-4EE4-9394-49D6E2DF52EA}.Debug|Mixed Platforms.Build.0 = Debug|x86 - {A574F3B1-E38B-4EE4-9394-49D6E2DF52EA}.Debug|Win32.ActiveCfg = Debug|x86 + {A574F3B1-E38B-4EE4-9394-49D6E2DF52EA}.Debug|Win32.ActiveCfg = Debug|Any CPU {A574F3B1-E38B-4EE4-9394-49D6E2DF52EA}.Debug|x64.ActiveCfg = Debug|x64 {A574F3B1-E38B-4EE4-9394-49D6E2DF52EA}.Debug|x64.Build.0 = Debug|x64 - {A574F3B1-E38B-4EE4-9394-49D6E2DF52EA}.Debug|x86.ActiveCfg = Debug|x86 - {A574F3B1-E38B-4EE4-9394-49D6E2DF52EA}.Debug|x86.Build.0 = Debug|x86 {A574F3B1-E38B-4EE4-9394-49D6E2DF52EA}.Release|Any CPU.ActiveCfg = Release|Any CPU {A574F3B1-E38B-4EE4-9394-49D6E2DF52EA}.Release|Any CPU.Build.0 = Release|Any CPU - {A574F3B1-E38B-4EE4-9394-49D6E2DF52EA}.Release|Mixed Platforms.ActiveCfg = Release|x86 - {A574F3B1-E38B-4EE4-9394-49D6E2DF52EA}.Release|Mixed Platforms.Build.0 = Release|x86 - {A574F3B1-E38B-4EE4-9394-49D6E2DF52EA}.Release|Win32.ActiveCfg = Release|x86 - {A574F3B1-E38B-4EE4-9394-49D6E2DF52EA}.Release|x64.ActiveCfg = Release|x64 - {A574F3B1-E38B-4EE4-9394-49D6E2DF52EA}.Release|x64.Build.0 = Release|x64 - {A574F3B1-E38B-4EE4-9394-49D6E2DF52EA}.Release|x86.ActiveCfg = Release|x86 - {A574F3B1-E38B-4EE4-9394-49D6E2DF52EA}.Release|x86.Build.0 = Release|x86 + {A574F3B1-E38B-4EE4-9394-49D6E2DF52EA}.Release|Win32.ActiveCfg = Release|Any CPU + {A574F3B1-E38B-4EE4-9394-49D6E2DF52EA}.Release|x64.ActiveCfg = Release|Any CPU {B75FA7AD-968E-4990-B342-1B4B17C850DF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B75FA7AD-968E-4990-B342-1B4B17C850DF}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B75FA7AD-968E-4990-B342-1B4B17C850DF}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 - {B75FA7AD-968E-4990-B342-1B4B17C850DF}.Debug|Mixed Platforms.Build.0 = Debug|x86 - {B75FA7AD-968E-4990-B342-1B4B17C850DF}.Debug|Win32.ActiveCfg = Debug|x86 - {B75FA7AD-968E-4990-B342-1B4B17C850DF}.Debug|x64.ActiveCfg = Debug|x64 - {B75FA7AD-968E-4990-B342-1B4B17C850DF}.Debug|x64.Build.0 = Debug|x64 - {B75FA7AD-968E-4990-B342-1B4B17C850DF}.Debug|x86.ActiveCfg = Debug|x86 - {B75FA7AD-968E-4990-B342-1B4B17C850DF}.Debug|x86.Build.0 = Debug|x86 + {B75FA7AD-968E-4990-B342-1B4B17C850DF}.Debug|Win32.ActiveCfg = Debug|Any CPU + {B75FA7AD-968E-4990-B342-1B4B17C850DF}.Debug|x64.ActiveCfg = Debug|Any CPU {B75FA7AD-968E-4990-B342-1B4B17C850DF}.Release|Any CPU.ActiveCfg = Release|Any CPU {B75FA7AD-968E-4990-B342-1B4B17C850DF}.Release|Any CPU.Build.0 = Release|Any CPU - {B75FA7AD-968E-4990-B342-1B4B17C850DF}.Release|Mixed Platforms.ActiveCfg = Release|x86 - {B75FA7AD-968E-4990-B342-1B4B17C850DF}.Release|Mixed Platforms.Build.0 = Release|x86 - {B75FA7AD-968E-4990-B342-1B4B17C850DF}.Release|Win32.ActiveCfg = Release|x86 - {B75FA7AD-968E-4990-B342-1B4B17C850DF}.Release|x64.ActiveCfg = Release|x64 - {B75FA7AD-968E-4990-B342-1B4B17C850DF}.Release|x64.Build.0 = Release|x64 - {B75FA7AD-968E-4990-B342-1B4B17C850DF}.Release|x86.ActiveCfg = Release|x86 - {B75FA7AD-968E-4990-B342-1B4B17C850DF}.Release|x86.Build.0 = Release|x86 + {B75FA7AD-968E-4990-B342-1B4B17C850DF}.Release|Win32.ActiveCfg = Release|Any CPU + {B75FA7AD-968E-4990-B342-1B4B17C850DF}.Release|x64.ActiveCfg = Release|Any CPU {F2DFEB00-BB35-4665-85EA-CB8C7729A6B7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {F2DFEB00-BB35-4665-85EA-CB8C7729A6B7}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F2DFEB00-BB35-4665-85EA-CB8C7729A6B7}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 - {F2DFEB00-BB35-4665-85EA-CB8C7729A6B7}.Debug|Mixed Platforms.Build.0 = Debug|x86 - {F2DFEB00-BB35-4665-85EA-CB8C7729A6B7}.Debug|Win32.ActiveCfg = Debug|x86 - {F2DFEB00-BB35-4665-85EA-CB8C7729A6B7}.Debug|x64.ActiveCfg = Debug|x64 - {F2DFEB00-BB35-4665-85EA-CB8C7729A6B7}.Debug|x64.Build.0 = Debug|x64 - {F2DFEB00-BB35-4665-85EA-CB8C7729A6B7}.Debug|x86.ActiveCfg = Debug|x86 - {F2DFEB00-BB35-4665-85EA-CB8C7729A6B7}.Debug|x86.Build.0 = Debug|x86 + {F2DFEB00-BB35-4665-85EA-CB8C7729A6B7}.Debug|Win32.ActiveCfg = Debug|Any CPU + {F2DFEB00-BB35-4665-85EA-CB8C7729A6B7}.Debug|x64.ActiveCfg = Debug|Any CPU {F2DFEB00-BB35-4665-85EA-CB8C7729A6B7}.Release|Any CPU.ActiveCfg = Release|Any CPU {F2DFEB00-BB35-4665-85EA-CB8C7729A6B7}.Release|Any CPU.Build.0 = Release|Any CPU - {F2DFEB00-BB35-4665-85EA-CB8C7729A6B7}.Release|Mixed Platforms.ActiveCfg = Release|x86 - {F2DFEB00-BB35-4665-85EA-CB8C7729A6B7}.Release|Mixed Platforms.Build.0 = Release|x86 - {F2DFEB00-BB35-4665-85EA-CB8C7729A6B7}.Release|Win32.ActiveCfg = Release|x86 - {F2DFEB00-BB35-4665-85EA-CB8C7729A6B7}.Release|x64.ActiveCfg = Release|x64 - {F2DFEB00-BB35-4665-85EA-CB8C7729A6B7}.Release|x64.Build.0 = Release|x64 - {F2DFEB00-BB35-4665-85EA-CB8C7729A6B7}.Release|x86.ActiveCfg = Release|x86 - {F2DFEB00-BB35-4665-85EA-CB8C7729A6B7}.Release|x86.Build.0 = Release|x86 + {F2DFEB00-BB35-4665-85EA-CB8C7729A6B7}.Release|Win32.ActiveCfg = Release|Any CPU + {F2DFEB00-BB35-4665-85EA-CB8C7729A6B7}.Release|x64.ActiveCfg = Release|Any CPU {A05B6AA6-0EC3-495D-BCC4-ECE1210071A8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {A05B6AA6-0EC3-495D-BCC4-ECE1210071A8}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A05B6AA6-0EC3-495D-BCC4-ECE1210071A8}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 - {A05B6AA6-0EC3-495D-BCC4-ECE1210071A8}.Debug|Mixed Platforms.Build.0 = Debug|x86 - {A05B6AA6-0EC3-495D-BCC4-ECE1210071A8}.Debug|Win32.ActiveCfg = Debug|x86 - {A05B6AA6-0EC3-495D-BCC4-ECE1210071A8}.Debug|x64.ActiveCfg = Debug|x64 - {A05B6AA6-0EC3-495D-BCC4-ECE1210071A8}.Debug|x64.Build.0 = Debug|x64 - {A05B6AA6-0EC3-495D-BCC4-ECE1210071A8}.Debug|x86.ActiveCfg = Debug|x86 - {A05B6AA6-0EC3-495D-BCC4-ECE1210071A8}.Debug|x86.Build.0 = Debug|x86 + {A05B6AA6-0EC3-495D-BCC4-ECE1210071A8}.Debug|Win32.ActiveCfg = Debug|Any CPU + {A05B6AA6-0EC3-495D-BCC4-ECE1210071A8}.Debug|x64.ActiveCfg = Debug|Any CPU {A05B6AA6-0EC3-495D-BCC4-ECE1210071A8}.Release|Any CPU.ActiveCfg = Release|Any CPU {A05B6AA6-0EC3-495D-BCC4-ECE1210071A8}.Release|Any CPU.Build.0 = Release|Any CPU - {A05B6AA6-0EC3-495D-BCC4-ECE1210071A8}.Release|Mixed Platforms.ActiveCfg = Release|x86 - {A05B6AA6-0EC3-495D-BCC4-ECE1210071A8}.Release|Mixed Platforms.Build.0 = Release|x86 - {A05B6AA6-0EC3-495D-BCC4-ECE1210071A8}.Release|Win32.ActiveCfg = Release|x86 - {A05B6AA6-0EC3-495D-BCC4-ECE1210071A8}.Release|x64.ActiveCfg = Release|x64 - {A05B6AA6-0EC3-495D-BCC4-ECE1210071A8}.Release|x64.Build.0 = Release|x64 - {A05B6AA6-0EC3-495D-BCC4-ECE1210071A8}.Release|x86.ActiveCfg = Release|x86 - {A05B6AA6-0EC3-495D-BCC4-ECE1210071A8}.Release|x86.Build.0 = Release|x86 + {A05B6AA6-0EC3-495D-BCC4-ECE1210071A8}.Release|Win32.ActiveCfg = Release|Any CPU + {A05B6AA6-0EC3-495D-BCC4-ECE1210071A8}.Release|x64.ActiveCfg = Release|Any CPU {8CF07381-BEA2-4AFC-B3DD-9B2F21C65A3A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8CF07381-BEA2-4AFC-B3DD-9B2F21C65A3A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8CF07381-BEA2-4AFC-B3DD-9B2F21C65A3A}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 - {8CF07381-BEA2-4AFC-B3DD-9B2F21C65A3A}.Debug|Mixed Platforms.Build.0 = Debug|x86 - {8CF07381-BEA2-4AFC-B3DD-9B2F21C65A3A}.Debug|Win32.ActiveCfg = Debug|x86 + {8CF07381-BEA2-4AFC-B3DD-9B2F21C65A3A}.Debug|Win32.ActiveCfg = Debug|Any CPU {8CF07381-BEA2-4AFC-B3DD-9B2F21C65A3A}.Debug|x64.ActiveCfg = Debug|x64 {8CF07381-BEA2-4AFC-B3DD-9B2F21C65A3A}.Debug|x64.Build.0 = Debug|x64 - {8CF07381-BEA2-4AFC-B3DD-9B2F21C65A3A}.Debug|x86.ActiveCfg = Debug|x86 - {8CF07381-BEA2-4AFC-B3DD-9B2F21C65A3A}.Debug|x86.Build.0 = Debug|x86 {8CF07381-BEA2-4AFC-B3DD-9B2F21C65A3A}.Release|Any CPU.ActiveCfg = Release|Any CPU {8CF07381-BEA2-4AFC-B3DD-9B2F21C65A3A}.Release|Any CPU.Build.0 = Release|Any CPU - {8CF07381-BEA2-4AFC-B3DD-9B2F21C65A3A}.Release|Mixed Platforms.ActiveCfg = Release|x86 - {8CF07381-BEA2-4AFC-B3DD-9B2F21C65A3A}.Release|Mixed Platforms.Build.0 = Release|x86 - {8CF07381-BEA2-4AFC-B3DD-9B2F21C65A3A}.Release|Win32.ActiveCfg = Release|x86 - {8CF07381-BEA2-4AFC-B3DD-9B2F21C65A3A}.Release|x64.ActiveCfg = Release|x64 - {8CF07381-BEA2-4AFC-B3DD-9B2F21C65A3A}.Release|x64.Build.0 = Release|x64 - {8CF07381-BEA2-4AFC-B3DD-9B2F21C65A3A}.Release|x86.ActiveCfg = Release|x86 - {8CF07381-BEA2-4AFC-B3DD-9B2F21C65A3A}.Release|x86.Build.0 = Release|x86 + {8CF07381-BEA2-4AFC-B3DD-9B2F21C65A3A}.Release|Win32.ActiveCfg = Release|Any CPU + {8CF07381-BEA2-4AFC-B3DD-9B2F21C65A3A}.Release|x64.ActiveCfg = Release|Any CPU {9253A314-1821-42BF-B02F-2BF986B1765D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {9253A314-1821-42BF-B02F-2BF986B1765D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {9253A314-1821-42BF-B02F-2BF986B1765D}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 - {9253A314-1821-42BF-B02F-2BF986B1765D}.Debug|Mixed Platforms.Build.0 = Debug|x86 - {9253A314-1821-42BF-B02F-2BF986B1765D}.Debug|Win32.ActiveCfg = Debug|x86 + {9253A314-1821-42BF-B02F-2BF986B1765D}.Debug|Win32.ActiveCfg = Debug|Any CPU {9253A314-1821-42BF-B02F-2BF986B1765D}.Debug|x64.ActiveCfg = Debug|x64 {9253A314-1821-42BF-B02F-2BF986B1765D}.Debug|x64.Build.0 = Debug|x64 - {9253A314-1821-42BF-B02F-2BF986B1765D}.Debug|x86.ActiveCfg = Debug|x86 - {9253A314-1821-42BF-B02F-2BF986B1765D}.Debug|x86.Build.0 = Debug|x86 {9253A314-1821-42BF-B02F-2BF986B1765D}.Release|Any CPU.ActiveCfg = Release|Any CPU {9253A314-1821-42BF-B02F-2BF986B1765D}.Release|Any CPU.Build.0 = Release|Any CPU - {9253A314-1821-42BF-B02F-2BF986B1765D}.Release|Mixed Platforms.ActiveCfg = Release|x86 - {9253A314-1821-42BF-B02F-2BF986B1765D}.Release|Mixed Platforms.Build.0 = Release|x86 - {9253A314-1821-42BF-B02F-2BF986B1765D}.Release|Win32.ActiveCfg = Release|x86 - {9253A314-1821-42BF-B02F-2BF986B1765D}.Release|x64.ActiveCfg = Release|x64 - {9253A314-1821-42BF-B02F-2BF986B1765D}.Release|x64.Build.0 = Release|x64 - {9253A314-1821-42BF-B02F-2BF986B1765D}.Release|x86.ActiveCfg = Release|x86 - {9253A314-1821-42BF-B02F-2BF986B1765D}.Release|x86.Build.0 = Release|x86 + {9253A314-1821-42BF-B02F-2BF986B1765D}.Release|Win32.ActiveCfg = Release|Any CPU + {9253A314-1821-42BF-B02F-2BF986B1765D}.Release|x64.ActiveCfg = Release|Any CPU {1DD41038-D885-46C5-8DDE-E0B82F066584}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1DD41038-D885-46C5-8DDE-E0B82F066584}.Debug|Any CPU.Build.0 = Debug|Any CPU - {1DD41038-D885-46C5-8DDE-E0B82F066584}.Debug|Mixed Platforms.ActiveCfg = Debug|x64 - {1DD41038-D885-46C5-8DDE-E0B82F066584}.Debug|Mixed Platforms.Build.0 = Debug|x64 - {1DD41038-D885-46C5-8DDE-E0B82F066584}.Debug|Win32.ActiveCfg = Debug|x64 - {1DD41038-D885-46C5-8DDE-E0B82F066584}.Debug|x64.ActiveCfg = Debug|x64 - {1DD41038-D885-46C5-8DDE-E0B82F066584}.Debug|x64.Build.0 = Debug|x64 - {1DD41038-D885-46C5-8DDE-E0B82F066584}.Debug|x86.ActiveCfg = Debug|x86 - {1DD41038-D885-46C5-8DDE-E0B82F066584}.Debug|x86.Build.0 = Debug|x86 + {1DD41038-D885-46C5-8DDE-E0B82F066584}.Debug|Win32.ActiveCfg = Debug|Any CPU + {1DD41038-D885-46C5-8DDE-E0B82F066584}.Debug|x64.ActiveCfg = Debug|Any CPU {1DD41038-D885-46C5-8DDE-E0B82F066584}.Release|Any CPU.ActiveCfg = Release|Any CPU {1DD41038-D885-46C5-8DDE-E0B82F066584}.Release|Any CPU.Build.0 = Release|Any CPU - {1DD41038-D885-46C5-8DDE-E0B82F066584}.Release|Mixed Platforms.ActiveCfg = Release|x64 - {1DD41038-D885-46C5-8DDE-E0B82F066584}.Release|Mixed Platforms.Build.0 = Release|x64 - {1DD41038-D885-46C5-8DDE-E0B82F066584}.Release|Win32.ActiveCfg = Release|x64 - {1DD41038-D885-46C5-8DDE-E0B82F066584}.Release|x64.ActiveCfg = Release|x64 - {1DD41038-D885-46C5-8DDE-E0B82F066584}.Release|x64.Build.0 = Release|x64 - {1DD41038-D885-46C5-8DDE-E0B82F066584}.Release|x86.ActiveCfg = Release|x86 - {1DD41038-D885-46C5-8DDE-E0B82F066584}.Release|x86.Build.0 = Release|x86 + {1DD41038-D885-46C5-8DDE-E0B82F066584}.Release|Win32.ActiveCfg = Release|Any CPU + {1DD41038-D885-46C5-8DDE-E0B82F066584}.Release|x64.ActiveCfg = Release|Any CPU {5802C7E9-157E-4124-946D-70B5AE48A5A1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5802C7E9-157E-4124-946D-70B5AE48A5A1}.Debug|Any CPU.Build.0 = Debug|Any CPU - {5802C7E9-157E-4124-946D-70B5AE48A5A1}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 - {5802C7E9-157E-4124-946D-70B5AE48A5A1}.Debug|Mixed Platforms.Build.0 = Debug|x86 - {5802C7E9-157E-4124-946D-70B5AE48A5A1}.Debug|Win32.ActiveCfg = Debug|x86 - {5802C7E9-157E-4124-946D-70B5AE48A5A1}.Debug|x64.ActiveCfg = Debug|x64 - {5802C7E9-157E-4124-946D-70B5AE48A5A1}.Debug|x64.Build.0 = Debug|x64 - {5802C7E9-157E-4124-946D-70B5AE48A5A1}.Debug|x86.ActiveCfg = Debug|x86 - {5802C7E9-157E-4124-946D-70B5AE48A5A1}.Debug|x86.Build.0 = Debug|x86 + {5802C7E9-157E-4124-946D-70B5AE48A5A1}.Debug|Win32.ActiveCfg = Debug|Any CPU + {5802C7E9-157E-4124-946D-70B5AE48A5A1}.Debug|x64.ActiveCfg = Debug|Any CPU {5802C7E9-157E-4124-946D-70B5AE48A5A1}.Release|Any CPU.ActiveCfg = Release|Any CPU {5802C7E9-157E-4124-946D-70B5AE48A5A1}.Release|Any CPU.Build.0 = Release|Any CPU - {5802C7E9-157E-4124-946D-70B5AE48A5A1}.Release|Mixed Platforms.ActiveCfg = Release|x86 - {5802C7E9-157E-4124-946D-70B5AE48A5A1}.Release|Mixed Platforms.Build.0 = Release|x86 - {5802C7E9-157E-4124-946D-70B5AE48A5A1}.Release|Win32.ActiveCfg = Release|x86 - {5802C7E9-157E-4124-946D-70B5AE48A5A1}.Release|x64.ActiveCfg = Release|x64 - {5802C7E9-157E-4124-946D-70B5AE48A5A1}.Release|x64.Build.0 = Release|x64 - {5802C7E9-157E-4124-946D-70B5AE48A5A1}.Release|x86.ActiveCfg = Release|x86 - {5802C7E9-157E-4124-946D-70B5AE48A5A1}.Release|x86.Build.0 = Release|x86 + {5802C7E9-157E-4124-946D-70B5AE48A5A1}.Release|Win32.ActiveCfg = Release|Any CPU + {5802C7E9-157E-4124-946D-70B5AE48A5A1}.Release|x64.ActiveCfg = Release|Any CPU {74C2036B-2C9B-4FC8-B7BD-AE81A8DCE533}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {74C2036B-2C9B-4FC8-B7BD-AE81A8DCE533}.Debug|Any CPU.Build.0 = Debug|Any CPU - {74C2036B-2C9B-4FC8-B7BD-AE81A8DCE533}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {74C2036B-2C9B-4FC8-B7BD-AE81A8DCE533}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU {74C2036B-2C9B-4FC8-B7BD-AE81A8DCE533}.Debug|Win32.ActiveCfg = Debug|Any CPU {74C2036B-2C9B-4FC8-B7BD-AE81A8DCE533}.Debug|x64.ActiveCfg = Debug|Any CPU {74C2036B-2C9B-4FC8-B7BD-AE81A8DCE533}.Debug|x64.Build.0 = Debug|Any CPU - {74C2036B-2C9B-4FC8-B7BD-AE81A8DCE533}.Debug|x86.ActiveCfg = Debug|Any CPU - {74C2036B-2C9B-4FC8-B7BD-AE81A8DCE533}.Debug|x86.Build.0 = Debug|Any CPU {74C2036B-2C9B-4FC8-B7BD-AE81A8DCE533}.Release|Any CPU.ActiveCfg = Release|Any CPU {74C2036B-2C9B-4FC8-B7BD-AE81A8DCE533}.Release|Any CPU.Build.0 = Release|Any CPU - {74C2036B-2C9B-4FC8-B7BD-AE81A8DCE533}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {74C2036B-2C9B-4FC8-B7BD-AE81A8DCE533}.Release|Mixed Platforms.Build.0 = Release|Any CPU {74C2036B-2C9B-4FC8-B7BD-AE81A8DCE533}.Release|Win32.ActiveCfg = Release|Any CPU {74C2036B-2C9B-4FC8-B7BD-AE81A8DCE533}.Release|x64.ActiveCfg = Release|Any CPU - {74C2036B-2C9B-4FC8-B7BD-AE81A8DCE533}.Release|x64.Build.0 = Release|Any CPU - {74C2036B-2C9B-4FC8-B7BD-AE81A8DCE533}.Release|x86.ActiveCfg = Release|Any CPU - {74C2036B-2C9B-4FC8-B7BD-AE81A8DCE533}.Release|x86.Build.0 = Release|Any CPU {39B43BBB-BAFC-4D85-9BEA-3BCB7EFED89C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {39B43BBB-BAFC-4D85-9BEA-3BCB7EFED89C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {39B43BBB-BAFC-4D85-9BEA-3BCB7EFED89C}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 - {39B43BBB-BAFC-4D85-9BEA-3BCB7EFED89C}.Debug|Mixed Platforms.Build.0 = Debug|x86 - {39B43BBB-BAFC-4D85-9BEA-3BCB7EFED89C}.Debug|Win32.ActiveCfg = Debug|x86 - {39B43BBB-BAFC-4D85-9BEA-3BCB7EFED89C}.Debug|x64.ActiveCfg = Debug|x64 - {39B43BBB-BAFC-4D85-9BEA-3BCB7EFED89C}.Debug|x64.Build.0 = Debug|x64 - {39B43BBB-BAFC-4D85-9BEA-3BCB7EFED89C}.Debug|x86.ActiveCfg = Debug|x86 - {39B43BBB-BAFC-4D85-9BEA-3BCB7EFED89C}.Debug|x86.Build.0 = Debug|x86 + {39B43BBB-BAFC-4D85-9BEA-3BCB7EFED89C}.Debug|Win32.ActiveCfg = Debug|Any CPU + {39B43BBB-BAFC-4D85-9BEA-3BCB7EFED89C}.Debug|x64.ActiveCfg = Debug|Any CPU {39B43BBB-BAFC-4D85-9BEA-3BCB7EFED89C}.Release|Any CPU.ActiveCfg = Release|Any CPU {39B43BBB-BAFC-4D85-9BEA-3BCB7EFED89C}.Release|Any CPU.Build.0 = Release|Any CPU - {39B43BBB-BAFC-4D85-9BEA-3BCB7EFED89C}.Release|Mixed Platforms.ActiveCfg = Release|x86 - {39B43BBB-BAFC-4D85-9BEA-3BCB7EFED89C}.Release|Mixed Platforms.Build.0 = Release|x86 - {39B43BBB-BAFC-4D85-9BEA-3BCB7EFED89C}.Release|Win32.ActiveCfg = Release|x86 - {39B43BBB-BAFC-4D85-9BEA-3BCB7EFED89C}.Release|x64.ActiveCfg = Release|x64 - {39B43BBB-BAFC-4D85-9BEA-3BCB7EFED89C}.Release|x64.Build.0 = Release|x64 - {39B43BBB-BAFC-4D85-9BEA-3BCB7EFED89C}.Release|x86.ActiveCfg = Release|x86 - {39B43BBB-BAFC-4D85-9BEA-3BCB7EFED89C}.Release|x86.Build.0 = Release|x86 + {39B43BBB-BAFC-4D85-9BEA-3BCB7EFED89C}.Release|Win32.ActiveCfg = Release|Any CPU + {39B43BBB-BAFC-4D85-9BEA-3BCB7EFED89C}.Release|x64.ActiveCfg = Release|Any CPU {5ADCFD6D-BFEA-4B10-BB45-9083BBB56AF4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5ADCFD6D-BFEA-4B10-BB45-9083BBB56AF4}.Debug|Any CPU.Build.0 = Debug|Any CPU - {5ADCFD6D-BFEA-4B10-BB45-9083BBB56AF4}.Debug|Mixed Platforms.ActiveCfg = Debug|x64 - {5ADCFD6D-BFEA-4B10-BB45-9083BBB56AF4}.Debug|Mixed Platforms.Build.0 = Debug|x64 - {5ADCFD6D-BFEA-4B10-BB45-9083BBB56AF4}.Debug|Win32.ActiveCfg = Debug|x64 - {5ADCFD6D-BFEA-4B10-BB45-9083BBB56AF4}.Debug|x64.ActiveCfg = Debug|x64 - {5ADCFD6D-BFEA-4B10-BB45-9083BBB56AF4}.Debug|x64.Build.0 = Debug|x64 - {5ADCFD6D-BFEA-4B10-BB45-9083BBB56AF4}.Debug|x86.ActiveCfg = Debug|Any CPU - {5ADCFD6D-BFEA-4B10-BB45-9083BBB56AF4}.Debug|x86.Build.0 = Debug|Any CPU + {5ADCFD6D-BFEA-4B10-BB45-9083BBB56AF4}.Debug|Win32.ActiveCfg = Debug|Any CPU + {5ADCFD6D-BFEA-4B10-BB45-9083BBB56AF4}.Debug|x64.ActiveCfg = Debug|Any CPU + {5ADCFD6D-BFEA-4B10-BB45-9083BBB56AF4}.Debug|x64.Build.0 = Debug|Any CPU {5ADCFD6D-BFEA-4B10-BB45-9083BBB56AF4}.Release|Any CPU.ActiveCfg = Release|Any CPU {5ADCFD6D-BFEA-4B10-BB45-9083BBB56AF4}.Release|Any CPU.Build.0 = Release|Any CPU - {5ADCFD6D-BFEA-4B10-BB45-9083BBB56AF4}.Release|Mixed Platforms.ActiveCfg = Release|x64 - {5ADCFD6D-BFEA-4B10-BB45-9083BBB56AF4}.Release|Mixed Platforms.Build.0 = Release|x64 - {5ADCFD6D-BFEA-4B10-BB45-9083BBB56AF4}.Release|Win32.ActiveCfg = Release|x64 - {5ADCFD6D-BFEA-4B10-BB45-9083BBB56AF4}.Release|x64.ActiveCfg = Release|x64 - {5ADCFD6D-BFEA-4B10-BB45-9083BBB56AF4}.Release|x64.Build.0 = Release|x64 - {5ADCFD6D-BFEA-4B10-BB45-9083BBB56AF4}.Release|x86.ActiveCfg = Release|Any CPU - {5ADCFD6D-BFEA-4B10-BB45-9083BBB56AF4}.Release|x86.Build.0 = Release|Any CPU + {5ADCFD6D-BFEA-4B10-BB45-9083BBB56AF4}.Release|Win32.ActiveCfg = Release|Any CPU + {5ADCFD6D-BFEA-4B10-BB45-9083BBB56AF4}.Release|x64.ActiveCfg = Release|Any CPU {B3DF599C-1C8F-451D-91E4-DD766210DA1F}.Debug|Any CPU.ActiveCfg = Debug|Win32 - {B3DF599C-1C8F-451D-91E4-DD766210DA1F}.Debug|Mixed Platforms.ActiveCfg = Debug|x64 - {B3DF599C-1C8F-451D-91E4-DD766210DA1F}.Debug|Mixed Platforms.Build.0 = Debug|x64 {B3DF599C-1C8F-451D-91E4-DD766210DA1F}.Debug|Win32.ActiveCfg = Debug|Win32 {B3DF599C-1C8F-451D-91E4-DD766210DA1F}.Debug|Win32.Build.0 = Debug|Win32 {B3DF599C-1C8F-451D-91E4-DD766210DA1F}.Debug|x64.ActiveCfg = Debug|x64 {B3DF599C-1C8F-451D-91E4-DD766210DA1F}.Debug|x64.Build.0 = Debug|x64 - {B3DF599C-1C8F-451D-91E4-DD766210DA1F}.Debug|x86.ActiveCfg = Debug|Win32 - {B3DF599C-1C8F-451D-91E4-DD766210DA1F}.Debug|x86.Build.0 = Debug|Win32 {B3DF599C-1C8F-451D-91E4-DD766210DA1F}.Release|Any CPU.ActiveCfg = Release|Win32 - {B3DF599C-1C8F-451D-91E4-DD766210DA1F}.Release|Mixed Platforms.ActiveCfg = Release|x64 - {B3DF599C-1C8F-451D-91E4-DD766210DA1F}.Release|Mixed Platforms.Build.0 = Release|x64 {B3DF599C-1C8F-451D-91E4-DD766210DA1F}.Release|Win32.ActiveCfg = Release|Win32 {B3DF599C-1C8F-451D-91E4-DD766210DA1F}.Release|Win32.Build.0 = Release|Win32 {B3DF599C-1C8F-451D-91E4-DD766210DA1F}.Release|x64.ActiveCfg = Release|x64 {B3DF599C-1C8F-451D-91E4-DD766210DA1F}.Release|x64.Build.0 = Release|x64 - {B3DF599C-1C8F-451D-91E4-DD766210DA1F}.Release|x86.ActiveCfg = Release|Win32 - {B3DF599C-1C8F-451D-91E4-DD766210DA1F}.Release|x86.Build.0 = Release|Win32 {1D1E99BC-6D22-41C0-BD94-FF4DD5EC725B}.Debug|Any CPU.ActiveCfg = Debug|Win32 - {1D1E99BC-6D22-41C0-BD94-FF4DD5EC725B}.Debug|Mixed Platforms.ActiveCfg = Debug|x64 - {1D1E99BC-6D22-41C0-BD94-FF4DD5EC725B}.Debug|Mixed Platforms.Build.0 = Debug|x64 {1D1E99BC-6D22-41C0-BD94-FF4DD5EC725B}.Debug|Win32.ActiveCfg = Debug|Win32 {1D1E99BC-6D22-41C0-BD94-FF4DD5EC725B}.Debug|Win32.Build.0 = Debug|Win32 {1D1E99BC-6D22-41C0-BD94-FF4DD5EC725B}.Debug|x64.ActiveCfg = Debug|x64 {1D1E99BC-6D22-41C0-BD94-FF4DD5EC725B}.Debug|x64.Build.0 = Debug|x64 - {1D1E99BC-6D22-41C0-BD94-FF4DD5EC725B}.Debug|x86.ActiveCfg = Debug|Win32 - {1D1E99BC-6D22-41C0-BD94-FF4DD5EC725B}.Debug|x86.Build.0 = Debug|Win32 {1D1E99BC-6D22-41C0-BD94-FF4DD5EC725B}.Release|Any CPU.ActiveCfg = Release|Win32 - {1D1E99BC-6D22-41C0-BD94-FF4DD5EC725B}.Release|Mixed Platforms.ActiveCfg = Release|x64 - {1D1E99BC-6D22-41C0-BD94-FF4DD5EC725B}.Release|Mixed Platforms.Build.0 = Release|x64 {1D1E99BC-6D22-41C0-BD94-FF4DD5EC725B}.Release|Win32.ActiveCfg = Release|Win32 {1D1E99BC-6D22-41C0-BD94-FF4DD5EC725B}.Release|Win32.Build.0 = Release|Win32 {1D1E99BC-6D22-41C0-BD94-FF4DD5EC725B}.Release|x64.ActiveCfg = Release|x64 {1D1E99BC-6D22-41C0-BD94-FF4DD5EC725B}.Release|x64.Build.0 = Release|x64 - {1D1E99BC-6D22-41C0-BD94-FF4DD5EC725B}.Release|x86.ActiveCfg = Release|Win32 - {1D1E99BC-6D22-41C0-BD94-FF4DD5EC725B}.Release|x86.Build.0 = Release|Win32 {115CC5B0-0385-41CD-8A23-6A7EA4C51926}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {115CC5B0-0385-41CD-8A23-6A7EA4C51926}.Debug|Any CPU.Build.0 = Debug|Any CPU - {115CC5B0-0385-41CD-8A23-6A7EA4C51926}.Debug|Mixed Platforms.ActiveCfg = Debug|x64 - {115CC5B0-0385-41CD-8A23-6A7EA4C51926}.Debug|Mixed Platforms.Build.0 = Debug|x64 - {115CC5B0-0385-41CD-8A23-6A7EA4C51926}.Debug|Win32.ActiveCfg = Debug|x64 + {115CC5B0-0385-41CD-8A23-6A7EA4C51926}.Debug|Win32.ActiveCfg = Debug|Any CPU {115CC5B0-0385-41CD-8A23-6A7EA4C51926}.Debug|x64.ActiveCfg = Debug|x64 {115CC5B0-0385-41CD-8A23-6A7EA4C51926}.Debug|x64.Build.0 = Debug|x64 - {115CC5B0-0385-41CD-8A23-6A7EA4C51926}.Debug|x86.ActiveCfg = Debug|x86 - {115CC5B0-0385-41CD-8A23-6A7EA4C51926}.Debug|x86.Build.0 = Debug|x86 {115CC5B0-0385-41CD-8A23-6A7EA4C51926}.Release|Any CPU.ActiveCfg = Release|Any CPU {115CC5B0-0385-41CD-8A23-6A7EA4C51926}.Release|Any CPU.Build.0 = Release|Any CPU - {115CC5B0-0385-41CD-8A23-6A7EA4C51926}.Release|Mixed Platforms.ActiveCfg = Release|x64 - {115CC5B0-0385-41CD-8A23-6A7EA4C51926}.Release|Mixed Platforms.Build.0 = Release|x64 - {115CC5B0-0385-41CD-8A23-6A7EA4C51926}.Release|Win32.ActiveCfg = Release|x64 - {115CC5B0-0385-41CD-8A23-6A7EA4C51926}.Release|x64.ActiveCfg = Release|x64 - {115CC5B0-0385-41CD-8A23-6A7EA4C51926}.Release|x64.Build.0 = Release|x64 - {115CC5B0-0385-41CD-8A23-6A7EA4C51926}.Release|x86.ActiveCfg = Release|x86 - {115CC5B0-0385-41CD-8A23-6A7EA4C51926}.Release|x86.Build.0 = Release|x86 + {115CC5B0-0385-41CD-8A23-6A7EA4C51926}.Release|Win32.ActiveCfg = Release|Any CPU + {115CC5B0-0385-41CD-8A23-6A7EA4C51926}.Release|x64.ActiveCfg = Release|Any CPU {4CC18776-125E-4318-9D24-D60110AD9697}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {4CC18776-125E-4318-9D24-D60110AD9697}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4CC18776-125E-4318-9D24-D60110AD9697}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {4CC18776-125E-4318-9D24-D60110AD9697}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU {4CC18776-125E-4318-9D24-D60110AD9697}.Debug|Win32.ActiveCfg = Debug|Any CPU {4CC18776-125E-4318-9D24-D60110AD9697}.Debug|x64.ActiveCfg = Debug|Any CPU {4CC18776-125E-4318-9D24-D60110AD9697}.Debug|x64.Build.0 = Debug|Any CPU - {4CC18776-125E-4318-9D24-D60110AD9697}.Debug|x86.ActiveCfg = Debug|Any CPU - {4CC18776-125E-4318-9D24-D60110AD9697}.Debug|x86.Build.0 = Debug|Any CPU {4CC18776-125E-4318-9D24-D60110AD9697}.Release|Any CPU.ActiveCfg = Release|Any CPU {4CC18776-125E-4318-9D24-D60110AD9697}.Release|Any CPU.Build.0 = Release|Any CPU - {4CC18776-125E-4318-9D24-D60110AD9697}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {4CC18776-125E-4318-9D24-D60110AD9697}.Release|Mixed Platforms.Build.0 = Release|Any CPU {4CC18776-125E-4318-9D24-D60110AD9697}.Release|Win32.ActiveCfg = Release|Any CPU {4CC18776-125E-4318-9D24-D60110AD9697}.Release|x64.ActiveCfg = Release|Any CPU - {4CC18776-125E-4318-9D24-D60110AD9697}.Release|x64.Build.0 = Release|Any CPU - {4CC18776-125E-4318-9D24-D60110AD9697}.Release|x86.ActiveCfg = Release|Any CPU - {4CC18776-125E-4318-9D24-D60110AD9697}.Release|x86.Build.0 = Release|Any CPU {CA4D64E6-6544-4A29-8BA5-7DB08D50D072}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {CA4D64E6-6544-4A29-8BA5-7DB08D50D072}.Debug|Any CPU.Build.0 = Debug|Any CPU - {CA4D64E6-6544-4A29-8BA5-7DB08D50D072}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {CA4D64E6-6544-4A29-8BA5-7DB08D50D072}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU {CA4D64E6-6544-4A29-8BA5-7DB08D50D072}.Debug|Win32.ActiveCfg = Debug|Any CPU {CA4D64E6-6544-4A29-8BA5-7DB08D50D072}.Debug|x64.ActiveCfg = Debug|Any CPU - {CA4D64E6-6544-4A29-8BA5-7DB08D50D072}.Debug|x64.Build.0 = Debug|Any CPU - {CA4D64E6-6544-4A29-8BA5-7DB08D50D072}.Debug|x86.ActiveCfg = Debug|Any CPU - {CA4D64E6-6544-4A29-8BA5-7DB08D50D072}.Debug|x86.Build.0 = Debug|Any CPU {CA4D64E6-6544-4A29-8BA5-7DB08D50D072}.Release|Any CPU.ActiveCfg = Release|Any CPU {CA4D64E6-6544-4A29-8BA5-7DB08D50D072}.Release|Any CPU.Build.0 = Release|Any CPU - {CA4D64E6-6544-4A29-8BA5-7DB08D50D072}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {CA4D64E6-6544-4A29-8BA5-7DB08D50D072}.Release|Mixed Platforms.Build.0 = Release|Any CPU {CA4D64E6-6544-4A29-8BA5-7DB08D50D072}.Release|Win32.ActiveCfg = Release|Any CPU {CA4D64E6-6544-4A29-8BA5-7DB08D50D072}.Release|x64.ActiveCfg = Release|Any CPU - {CA4D64E6-6544-4A29-8BA5-7DB08D50D072}.Release|x64.Build.0 = Release|Any CPU - {CA4D64E6-6544-4A29-8BA5-7DB08D50D072}.Release|x86.ActiveCfg = Release|Any CPU - {CA4D64E6-6544-4A29-8BA5-7DB08D50D072}.Release|x86.Build.0 = Release|Any CPU {082D6B9E-326E-4D15-9798-EDAE9EDE70A6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {082D6B9E-326E-4D15-9798-EDAE9EDE70A6}.Debug|Any CPU.Build.0 = Debug|Any CPU - {082D6B9E-326E-4D15-9798-EDAE9EDE70A6}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {082D6B9E-326E-4D15-9798-EDAE9EDE70A6}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU {082D6B9E-326E-4D15-9798-EDAE9EDE70A6}.Debug|Win32.ActiveCfg = Debug|Any CPU {082D6B9E-326E-4D15-9798-EDAE9EDE70A6}.Debug|x64.ActiveCfg = Debug|Any CPU {082D6B9E-326E-4D15-9798-EDAE9EDE70A6}.Debug|x64.Build.0 = Debug|Any CPU - {082D6B9E-326E-4D15-9798-EDAE9EDE70A6}.Debug|x86.ActiveCfg = Debug|Any CPU - {082D6B9E-326E-4D15-9798-EDAE9EDE70A6}.Debug|x86.Build.0 = Debug|Any CPU {082D6B9E-326E-4D15-9798-EDAE9EDE70A6}.Release|Any CPU.ActiveCfg = Release|Any CPU {082D6B9E-326E-4D15-9798-EDAE9EDE70A6}.Release|Any CPU.Build.0 = Release|Any CPU - {082D6B9E-326E-4D15-9798-EDAE9EDE70A6}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {082D6B9E-326E-4D15-9798-EDAE9EDE70A6}.Release|Mixed Platforms.Build.0 = Release|Any CPU {082D6B9E-326E-4D15-9798-EDAE9EDE70A6}.Release|Win32.ActiveCfg = Release|Any CPU {082D6B9E-326E-4D15-9798-EDAE9EDE70A6}.Release|x64.ActiveCfg = Release|Any CPU - {082D6B9E-326E-4D15-9798-EDAE9EDE70A6}.Release|x64.Build.0 = Release|Any CPU - {082D6B9E-326E-4D15-9798-EDAE9EDE70A6}.Release|x86.ActiveCfg = Release|Any CPU - {082D6B9E-326E-4D15-9798-EDAE9EDE70A6}.Release|x86.Build.0 = Release|Any CPU {F53335A2-C013-4354-98CC-83E612EAEB60}.Debug|Any CPU.ActiveCfg = Debug|Win32 - {F53335A2-C013-4354-98CC-83E612EAEB60}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 - {F53335A2-C013-4354-98CC-83E612EAEB60}.Debug|Mixed Platforms.Build.0 = Debug|Win32 {F53335A2-C013-4354-98CC-83E612EAEB60}.Debug|Win32.ActiveCfg = Debug|Win32 - {F53335A2-C013-4354-98CC-83E612EAEB60}.Debug|Win32.Build.0 = Debug|Win32 {F53335A2-C013-4354-98CC-83E612EAEB60}.Debug|x64.ActiveCfg = Debug|x64 - {F53335A2-C013-4354-98CC-83E612EAEB60}.Debug|x86.ActiveCfg = Debug|x64 {F53335A2-C013-4354-98CC-83E612EAEB60}.Release|Any CPU.ActiveCfg = Release|Win32 - {F53335A2-C013-4354-98CC-83E612EAEB60}.Release|Mixed Platforms.ActiveCfg = Release|Win32 - {F53335A2-C013-4354-98CC-83E612EAEB60}.Release|Mixed Platforms.Build.0 = Release|Win32 {F53335A2-C013-4354-98CC-83E612EAEB60}.Release|Win32.ActiveCfg = Release|Win32 - {F53335A2-C013-4354-98CC-83E612EAEB60}.Release|Win32.Build.0 = Release|Win32 {F53335A2-C013-4354-98CC-83E612EAEB60}.Release|x64.ActiveCfg = Release|x64 - {F53335A2-C013-4354-98CC-83E612EAEB60}.Release|x64.Build.0 = Release|x64 - {F53335A2-C013-4354-98CC-83E612EAEB60}.Release|x86.ActiveCfg = Release|Win32 {2379BAAF-A406-4477-BF53-2D6A326C24C8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2379BAAF-A406-4477-BF53-2D6A326C24C8}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2379BAAF-A406-4477-BF53-2D6A326C24C8}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {2379BAAF-A406-4477-BF53-2D6A326C24C8}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU {2379BAAF-A406-4477-BF53-2D6A326C24C8}.Debug|Win32.ActiveCfg = Debug|Any CPU {2379BAAF-A406-4477-BF53-2D6A326C24C8}.Debug|x64.ActiveCfg = Debug|Any CPU {2379BAAF-A406-4477-BF53-2D6A326C24C8}.Debug|x64.Build.0 = Debug|Any CPU - {2379BAAF-A406-4477-BF53-2D6A326C24C8}.Debug|x86.ActiveCfg = Debug|x86 - {2379BAAF-A406-4477-BF53-2D6A326C24C8}.Debug|x86.Build.0 = Debug|x86 {2379BAAF-A406-4477-BF53-2D6A326C24C8}.Release|Any CPU.ActiveCfg = Release|Any CPU {2379BAAF-A406-4477-BF53-2D6A326C24C8}.Release|Any CPU.Build.0 = Release|Any CPU - {2379BAAF-A406-4477-BF53-2D6A326C24C8}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {2379BAAF-A406-4477-BF53-2D6A326C24C8}.Release|Mixed Platforms.Build.0 = Release|Any CPU {2379BAAF-A406-4477-BF53-2D6A326C24C8}.Release|Win32.ActiveCfg = Release|Any CPU {2379BAAF-A406-4477-BF53-2D6A326C24C8}.Release|x64.ActiveCfg = Release|Any CPU - {2379BAAF-A406-4477-BF53-2D6A326C24C8}.Release|x64.Build.0 = Release|Any CPU - {2379BAAF-A406-4477-BF53-2D6A326C24C8}.Release|x86.ActiveCfg = Release|x86 - {2379BAAF-A406-4477-BF53-2D6A326C24C8}.Release|x86.Build.0 = Release|x86 {8E6E1763-39AE-491D-A10F-44C8844ABA5B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8E6E1763-39AE-491D-A10F-44C8844ABA5B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8E6E1763-39AE-491D-A10F-44C8844ABA5B}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {8E6E1763-39AE-491D-A10F-44C8844ABA5B}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU {8E6E1763-39AE-491D-A10F-44C8844ABA5B}.Debug|Win32.ActiveCfg = Debug|Any CPU {8E6E1763-39AE-491D-A10F-44C8844ABA5B}.Debug|x64.ActiveCfg = Debug|Any CPU - {8E6E1763-39AE-491D-A10F-44C8844ABA5B}.Debug|x64.Build.0 = Debug|Any CPU - {8E6E1763-39AE-491D-A10F-44C8844ABA5B}.Debug|x86.ActiveCfg = Debug|Any CPU {8E6E1763-39AE-491D-A10F-44C8844ABA5B}.Release|Any CPU.ActiveCfg = Release|Any CPU {8E6E1763-39AE-491D-A10F-44C8844ABA5B}.Release|Any CPU.Build.0 = Release|Any CPU - {8E6E1763-39AE-491D-A10F-44C8844ABA5B}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {8E6E1763-39AE-491D-A10F-44C8844ABA5B}.Release|Mixed Platforms.Build.0 = Release|Any CPU {8E6E1763-39AE-491D-A10F-44C8844ABA5B}.Release|Win32.ActiveCfg = Release|Any CPU {8E6E1763-39AE-491D-A10F-44C8844ABA5B}.Release|x64.ActiveCfg = Release|Any CPU - {8E6E1763-39AE-491D-A10F-44C8844ABA5B}.Release|x64.Build.0 = Release|Any CPU - {8E6E1763-39AE-491D-A10F-44C8844ABA5B}.Release|x86.ActiveCfg = Release|Any CPU + {DFE50673-906C-4B8F-993B-A24CAD1CA17D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DFE50673-906C-4B8F-993B-A24CAD1CA17D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DFE50673-906C-4B8F-993B-A24CAD1CA17D}.Debug|Win32.ActiveCfg = Debug|Any CPU + {DFE50673-906C-4B8F-993B-A24CAD1CA17D}.Debug|x64.ActiveCfg = Debug|Any CPU + {DFE50673-906C-4B8F-993B-A24CAD1CA17D}.Debug|x64.Build.0 = Debug|Any CPU + {DFE50673-906C-4B8F-993B-A24CAD1CA17D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DFE50673-906C-4B8F-993B-A24CAD1CA17D}.Release|Any CPU.Build.0 = Release|Any CPU + {DFE50673-906C-4B8F-993B-A24CAD1CA17D}.Release|Win32.ActiveCfg = Release|Any CPU + {DFE50673-906C-4B8F-993B-A24CAD1CA17D}.Release|x64.ActiveCfg = Release|Any CPU + {1FCA8834-34E6-47CF-B53F-D8DF49F0819E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1FCA8834-34E6-47CF-B53F-D8DF49F0819E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1FCA8834-34E6-47CF-B53F-D8DF49F0819E}.Debug|Win32.ActiveCfg = Debug|Any CPU + {1FCA8834-34E6-47CF-B53F-D8DF49F0819E}.Debug|x64.ActiveCfg = Debug|Any CPU + {1FCA8834-34E6-47CF-B53F-D8DF49F0819E}.Debug|x64.Build.0 = Debug|Any CPU + {1FCA8834-34E6-47CF-B53F-D8DF49F0819E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1FCA8834-34E6-47CF-B53F-D8DF49F0819E}.Release|Any CPU.Build.0 = Release|Any CPU + {1FCA8834-34E6-47CF-B53F-D8DF49F0819E}.Release|Win32.ActiveCfg = Release|Any CPU + {1FCA8834-34E6-47CF-B53F-D8DF49F0819E}.Release|x64.ActiveCfg = Release|Any CPU + {DDE1EA77-637C-4D5F-96F3-1328BC45CE80}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DDE1EA77-637C-4D5F-96F3-1328BC45CE80}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DDE1EA77-637C-4D5F-96F3-1328BC45CE80}.Debug|Win32.ActiveCfg = Debug|Any CPU + {DDE1EA77-637C-4D5F-96F3-1328BC45CE80}.Debug|x64.ActiveCfg = Debug|Any CPU + {DDE1EA77-637C-4D5F-96F3-1328BC45CE80}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DDE1EA77-637C-4D5F-96F3-1328BC45CE80}.Release|Any CPU.Build.0 = Release|Any CPU + {DDE1EA77-637C-4D5F-96F3-1328BC45CE80}.Release|Win32.ActiveCfg = Release|Any CPU + {DDE1EA77-637C-4D5F-96F3-1328BC45CE80}.Release|x64.ActiveCfg = Release|Any CPU + {FC4BCF9B-F4C7-41AD-8A16-2A90A082954A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FC4BCF9B-F4C7-41AD-8A16-2A90A082954A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FC4BCF9B-F4C7-41AD-8A16-2A90A082954A}.Debug|Win32.ActiveCfg = Debug|Any CPU + {FC4BCF9B-F4C7-41AD-8A16-2A90A082954A}.Debug|x64.ActiveCfg = Debug|Any CPU + {FC4BCF9B-F4C7-41AD-8A16-2A90A082954A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FC4BCF9B-F4C7-41AD-8A16-2A90A082954A}.Release|Any CPU.Build.0 = Release|Any CPU + {FC4BCF9B-F4C7-41AD-8A16-2A90A082954A}.Release|Win32.ActiveCfg = Release|Any CPU + {FC4BCF9B-F4C7-41AD-8A16-2A90A082954A}.Release|x64.ActiveCfg = Release|Any CPU + {04945FB2-8410-4F14-8262-2ED18DCDACD6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {04945FB2-8410-4F14-8262-2ED18DCDACD6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {04945FB2-8410-4F14-8262-2ED18DCDACD6}.Debug|Win32.ActiveCfg = Debug|Any CPU + {04945FB2-8410-4F14-8262-2ED18DCDACD6}.Debug|x64.ActiveCfg = Debug|Any CPU + {04945FB2-8410-4F14-8262-2ED18DCDACD6}.Debug|x64.Build.0 = Debug|Any CPU + {04945FB2-8410-4F14-8262-2ED18DCDACD6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {04945FB2-8410-4F14-8262-2ED18DCDACD6}.Release|Any CPU.Build.0 = Release|Any CPU + {04945FB2-8410-4F14-8262-2ED18DCDACD6}.Release|Win32.ActiveCfg = Release|Any CPU + {04945FB2-8410-4F14-8262-2ED18DCDACD6}.Release|x64.ActiveCfg = Release|Any CPU + {A430AD28-B76A-4ED0-AF7D-D13B8969297F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A430AD28-B76A-4ED0-AF7D-D13B8969297F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A430AD28-B76A-4ED0-AF7D-D13B8969297F}.Debug|Win32.ActiveCfg = Debug|Any CPU + {A430AD28-B76A-4ED0-AF7D-D13B8969297F}.Debug|x64.ActiveCfg = Debug|Any CPU + {A430AD28-B76A-4ED0-AF7D-D13B8969297F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A430AD28-B76A-4ED0-AF7D-D13B8969297F}.Release|Any CPU.Build.0 = Release|Any CPU + {A430AD28-B76A-4ED0-AF7D-D13B8969297F}.Release|Win32.ActiveCfg = Release|Any CPU + {A430AD28-B76A-4ED0-AF7D-D13B8969297F}.Release|x64.ActiveCfg = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution - {9AE965C4-301E-4C01-B90F-297AF341ACC6} = {85F88959-C9E9-4989-ACB1-67BA9D1BEFE7} - {CC2E74B6-534A-43D8-9F16-AC03FE955000} = {85F88959-C9E9-4989-ACB1-67BA9D1BEFE7} - {E70FA90A-7012-4A52-86B5-362B699D1540} = {85F88959-C9E9-4989-ACB1-67BA9D1BEFE7} {F2EC7193-D5E5-4252-9803-5CEB407E910F} = {85F88959-C9E9-4989-ACB1-67BA9D1BEFE7} {8A0426FA-0BC2-4C49-A6E5-1F9A68156F19} = {85F88959-C9E9-4989-ACB1-67BA9D1BEFE7} - {1D1E99BC-6D22-41C0-BD94-FF4DD5EC725B} = {85F88959-C9E9-4989-ACB1-67BA9D1BEFE7} {082D6B9E-326E-4D15-9798-EDAE9EDE70A6} = {85F88959-C9E9-4989-ACB1-67BA9D1BEFE7} + {DFE50673-906C-4B8F-993B-A24CAD1CA17D} = {85F88959-C9E9-4989-ACB1-67BA9D1BEFE7} + {DDE1EA77-637C-4D5F-96F3-1328BC45CE80} = {85F88959-C9E9-4989-ACB1-67BA9D1BEFE7} + {39A17A65-E893-44B8-A312-DDCDD990D9D1} = {85F88959-C9E9-4989-ACB1-67BA9D1BEFE7} {0B9C97D4-61B8-4294-A1DF-BA90752A1779} = {8B179853-B7D6-479C-B8B2-6CBCE835D040} {4CEFBC84-C215-11DB-8314-0800200C9A66} = {8B179853-B7D6-479C-B8B2-6CBCE835D040} {5CCCB9CF-0384-458F-BA08-72B73866840F} = {8B179853-B7D6-479C-B8B2-6CBCE835D040} @@ -735,8 +496,14 @@ Global {115CC5B0-0385-41CD-8A23-6A7EA4C51926} = {4B59E09C-A51F-4B80-91BE-987904DCEF7D} {2379BAAF-A406-4477-BF53-2D6A326C24C8} = {4B59E09C-A51F-4B80-91BE-987904DCEF7D} {8E6E1763-39AE-491D-A10F-44C8844ABA5B} = {4B59E09C-A51F-4B80-91BE-987904DCEF7D} + {1FCA8834-34E6-47CF-B53F-D8DF49F0819E} = {4B59E09C-A51F-4B80-91BE-987904DCEF7D} + {FC4BCF9B-F4C7-41AD-8A16-2A90A082954A} = {4B59E09C-A51F-4B80-91BE-987904DCEF7D} {B75FA7AD-968E-4990-B342-1B4B17C850DF} = {B36BE134-D85A-437E-AB61-2DA1CCDE06C1} {F2DFEB00-BB35-4665-85EA-CB8C7729A6B7} = {B36BE134-D85A-437E-AB61-2DA1CCDE06C1} {A05B6AA6-0EC3-495D-BCC4-ECE1210071A8} = {B36BE134-D85A-437E-AB61-2DA1CCDE06C1} + {9AE965C4-301E-4C01-B90F-297AF341ACC6} = {39A17A65-E893-44B8-A312-DDCDD990D9D1} + {E70FA90A-7012-4A52-86B5-362B699D1540} = {39A17A65-E893-44B8-A312-DDCDD990D9D1} + {1D1E99BC-6D22-41C0-BD94-FF4DD5EC725B} = {39A17A65-E893-44B8-A312-DDCDD990D9D1} + {CC2E74B6-534A-43D8-9F16-AC03FE955000} = {39A17A65-E893-44B8-A312-DDCDD990D9D1} EndGlobalSection EndGlobal diff --git a/CUETools/app.config b/CUETools/app.config index 3201f86..c8d467d 100644 --- a/CUETools/app.config +++ b/CUETools/app.config @@ -1,3 +1,8 @@ + + + + + \ No newline at end of file diff --git a/CUETools/cue2.ico b/CUETools/cue2.ico new file mode 100644 index 0000000..5212447 Binary files /dev/null and b/CUETools/cue2.ico differ diff --git a/CUETools/frmChoice.Designer.cs b/CUETools/frmChoice.Designer.cs index 739aa12..95b5ba0 100644 --- a/CUETools/frmChoice.Designer.cs +++ b/CUETools/frmChoice.Designer.cs @@ -30,7 +30,7 @@ namespace JDP { this.components = new System.ComponentModel.Container(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmChoice)); - this.button1 = new System.Windows.Forms.Button(); + this.buttonOk = new System.Windows.Forms.Button(); this.listChoices = new System.Windows.Forms.ListView(); this.columnHeader1 = new System.Windows.Forms.ColumnHeader(); this.imageList1 = new System.Windows.Forms.ImageList(this.components); @@ -40,25 +40,30 @@ namespace JDP this.TrackNo = new System.Windows.Forms.ColumnHeader(); this.Start = new System.Windows.Forms.ColumnHeader(); this.Length = new System.Windows.Forms.ColumnHeader(); - this.btnEdit = new System.Windows.Forms.Button(); - this.chkFixEncoding = new System.Windows.Forms.CheckBox(); + this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); + this.listMetadata = new System.Windows.Forms.ListView(); + this.columnHeader2 = new System.Windows.Forms.ColumnHeader(); + this.columnHeader3 = new System.Windows.Forms.ColumnHeader(); + this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel(); + this.tableLayoutPanel1.SuspendLayout(); + this.tableLayoutPanel2.SuspendLayout(); this.SuspendLayout(); // - // button1 + // buttonOk // - this.button1.DialogResult = System.Windows.Forms.DialogResult.OK; - resources.ApplyResources(this.button1, "button1"); - this.button1.Name = "button1"; - this.button1.UseVisualStyleBackColor = true; + this.buttonOk.DialogResult = System.Windows.Forms.DialogResult.OK; + resources.ApplyResources(this.buttonOk, "buttonOk"); + this.buttonOk.Name = "buttonOk"; + this.buttonOk.UseVisualStyleBackColor = true; // // listChoices // this.listChoices.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { this.columnHeader1}); + resources.ApplyResources(this.listChoices, "listChoices"); this.listChoices.FullRowSelect = true; this.listChoices.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None; this.listChoices.HideSelection = false; - resources.ApplyResources(this.listChoices, "listChoices"); this.listChoices.MultiSelect = false; this.listChoices.Name = "listChoices"; this.listChoices.ShowItemToolTips = true; @@ -89,12 +94,12 @@ namespace JDP // // listTracks // - resources.ApplyResources(this.listTracks, "listTracks"); this.listTracks.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { this.Title, this.TrackNo, this.Start, this.Length}); + resources.ApplyResources(this.listTracks, "listTracks"); this.listTracks.FullRowSelect = true; this.listTracks.GridLines = true; this.listTracks.LabelEdit = true; @@ -123,45 +128,69 @@ namespace JDP // resources.ApplyResources(this.Length, "Length"); // - // btnEdit + // tableLayoutPanel1 // - resources.ApplyResources(this.btnEdit, "btnEdit"); - this.btnEdit.Name = "btnEdit"; - this.btnEdit.UseVisualStyleBackColor = true; - this.btnEdit.Click += new System.EventHandler(this.btnEdit_Click); + resources.ApplyResources(this.tableLayoutPanel1, "tableLayoutPanel1"); + this.tableLayoutPanel1.Controls.Add(this.listMetadata, 0, 2); + this.tableLayoutPanel1.Controls.Add(this.tableLayoutPanel2, 0, 4); + this.tableLayoutPanel1.Controls.Add(this.textBox1, 0, 1); + this.tableLayoutPanel1.Controls.Add(this.listTracks, 0, 3); + this.tableLayoutPanel1.Controls.Add(this.listChoices, 0, 0); + this.tableLayoutPanel1.Name = "tableLayoutPanel1"; // - // chkFixEncoding + // listMetadata // - resources.ApplyResources(this.chkFixEncoding, "chkFixEncoding"); - this.chkFixEncoding.Name = "chkFixEncoding"; - this.chkFixEncoding.UseVisualStyleBackColor = true; - this.chkFixEncoding.CheckedChanged += new System.EventHandler(this.chkFixEncoding_CheckedChanged); + this.listMetadata.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { + this.columnHeader2, + this.columnHeader3}); + resources.ApplyResources(this.listMetadata, "listMetadata"); + this.listMetadata.FullRowSelect = true; + this.listMetadata.GridLines = true; + this.listMetadata.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None; + this.listMetadata.LabelEdit = true; + this.listMetadata.Name = "listMetadata"; + this.listMetadata.UseCompatibleStateImageBehavior = false; + this.listMetadata.View = System.Windows.Forms.View.Details; + this.listMetadata.AfterLabelEdit += new System.Windows.Forms.LabelEditEventHandler(this.listMetadata_AfterLabelEdit); + this.listMetadata.DoubleClick += new System.EventHandler(this.listMetadata_DoubleClick); + this.listMetadata.KeyDown += new System.Windows.Forms.KeyEventHandler(this.listMetadata_KeyDown); + // + // columnHeader2 + // + resources.ApplyResources(this.columnHeader2, "columnHeader2"); + // + // columnHeader3 + // + resources.ApplyResources(this.columnHeader3, "columnHeader3"); + // + // tableLayoutPanel2 + // + resources.ApplyResources(this.tableLayoutPanel2, "tableLayoutPanel2"); + this.tableLayoutPanel2.Controls.Add(this.buttonOk, 3, 0); + this.tableLayoutPanel2.Name = "tableLayoutPanel2"; // // frmChoice // - this.AcceptButton = this.button1; + this.AcceptButton = this.buttonOk; resources.ApplyResources(this, "$this"); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.Controls.Add(this.chkFixEncoding); - this.Controls.Add(this.btnEdit); - this.Controls.Add(this.listTracks); - this.Controls.Add(this.textBox1); - this.Controls.Add(this.listChoices); - this.Controls.Add(this.button1); + this.Controls.Add(this.tableLayoutPanel1); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; this.MaximizeBox = false; this.Name = "frmChoice"; this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide; this.Load += new System.EventHandler(this.frmChoice_Load); this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.frmChoice_FormClosing); + this.tableLayoutPanel1.ResumeLayout(false); + this.tableLayoutPanel1.PerformLayout(); + this.tableLayoutPanel2.ResumeLayout(false); this.ResumeLayout(false); - this.PerformLayout(); } #endregion - private System.Windows.Forms.Button button1; + private System.Windows.Forms.Button buttonOk; private System.Windows.Forms.ColumnHeader columnHeader1; private System.Windows.Forms.ImageList imageList1; private System.Windows.Forms.TextBox textBox1; @@ -170,8 +199,11 @@ namespace JDP private System.Windows.Forms.ColumnHeader Title; private System.Windows.Forms.ColumnHeader TrackNo; private System.Windows.Forms.ColumnHeader Length; - private System.Windows.Forms.Button btnEdit; private System.Windows.Forms.ColumnHeader Start; - private System.Windows.Forms.CheckBox chkFixEncoding; + private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; + private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2; + private System.Windows.Forms.ListView listMetadata; + private System.Windows.Forms.ColumnHeader columnHeader2; + private System.Windows.Forms.ColumnHeader columnHeader3; } } \ No newline at end of file diff --git a/CUETools/frmChoice.cs b/CUETools/frmChoice.cs index 52c4e9c..726cad7 100644 --- a/CUETools/frmChoice.cs +++ b/CUETools/frmChoice.cs @@ -23,60 +23,82 @@ namespace JDP private void frmChoice_Load(object sender, EventArgs e) { - button1.Select(); + buttonOk.Select(); } - private ListViewItem ToItem(object i) + private void AddItem(object i) { - string text = ""; - int image = -1; - if (i is string) - text = i as string; - else if (i is CUEToolsSourceFile) + if (i is CUEToolsSourceFile) { - text = (i as CUEToolsSourceFile).path; - image = 0; + CUEToolsSourceFile sf = i as CUEToolsSourceFile; + ListViewItem item = new ListViewItem(sf.path, 0); + item.Tag = sf; + listChoices.Items.Add(item); } else if (i is MusicBrainz.Release) { ReleaseInfo r = new ReleaseInfo(CUE, i as MusicBrainz.Release); - text = r.Text; - image = 2; - i = r; + ListViewItem item = new ListViewItem(r.Text, 2); + item.Tag = r; + listChoices.Items.Add(item); } else if (i is Freedb.CDEntry) { ReleaseInfo r = new ReleaseInfo(CUE, i as Freedb.CDEntry); - text = r.Text; - image = 1; - i = r; + ListViewItem item = new ListViewItem(r.Text, 1); + item.Tag = r; + listChoices.Items.Add(item); + + // check if the entry contains non-iso characters, + // and add a second one if it does + ReleaseInfo r2 = new ReleaseInfo(CUE, i as Freedb.CDEntry); + r2.FixEncoding(); + if (!r.Equals(r2)) + { + item = new ListViewItem(r2.Text, 1); + item.Tag = r2; + listChoices.Items.Add(item); + } + return; + } + else if (i is CUESheet) + { + ReleaseInfo r = new ReleaseInfo(CUE); + ListViewItem item = new ListViewItem(r.Text, 3); + item.Tag = r; + listChoices.Items.Add(item); + } + else + { + ListViewItem item = new ListViewItem(i.ToString(), -1); + item.Tag = i; + listChoices.Items.Add(item); } - ListViewItem item = new ListViewItem(text, image); - item.Tag = i; - return item; } public IEnumerable Choices { set { - foreach(object i in value) - { - ListViewItem item = ToItem(i); - listChoices.Items.Add(item); - } + if (CUE != null) + AddItem(CUE); + foreach (object i in value) + AddItem(i); if (CUE != null) { - string text = String.Format("{0}: {1} - {2}", - CUE.Year == "" ? "YYYY" : CUE.Year, - CUE.Artist == "" ? "Unknown Artist" : CUE.Artist, - CUE.Title == "" ? "Unknown Title" : CUE.Title); - ListViewItem item = new ListViewItem(text, 3); - item.Tag = CUE; - listChoices.Items.Insert(0, item); textBox1.Hide(); listTracks.Show(); - btnEdit.Show(); + listMetadata.Show(); + tableLayoutPanel1.SetRowSpan(listChoices, 2); + tableLayoutPanel1.PerformLayout(); + } + else + { + listTracks.Hide(); + tableLayoutPanel1.SetRowSpan(textBox1, 3); + //tableLayoutPanel1.RowStyles[2].Height = 0; + //tableLayoutPanel1.RowStyles[3].Height = 0; + tableLayoutPanel1.PerformLayout(); } if (listChoices.Items.Count > 0) listChoices.Items[0].Selected = true; @@ -99,12 +121,29 @@ namespace JDP } } + private ReleaseInfo ChosenRelease + { + get + { + object o = ChosenObject; + return o != null && o is ReleaseInfo ? o as ReleaseInfo : null; + } + } + + private ListViewItem ChosenItem + { + get + { + return listChoices.SelectedItems.Count > 0 ? listChoices.SelectedItems[0] : null; + } + } + private void frmChoice_FormClosing(object sender, FormClosingEventArgs e) { - object item = ChosenObject; - if (e.CloseReason != CloseReason.None || DialogResult != DialogResult.OK || item == null || !(item is ReleaseInfo)) + ReleaseInfo ri = ChosenRelease; + if (e.CloseReason != CloseReason.None || DialogResult != DialogResult.OK || ri == null || CUE == null) return; - (item as ReleaseInfo).FillCUE(); + CUE.CopyMetadata(ri.metadata); } private void AutoResizeTracks() @@ -123,84 +162,37 @@ namespace JDP if (item != null && item is CUEToolsSourceFile) { textBox1.Text = (item as CUEToolsSourceFile).contents.Replace("\r\n", "\n").Replace("\r", "\n").Replace("\n", "\r\n"); - chkFixEncoding.Visible = false; } else if (item != null && item is ReleaseInfo) { ReleaseInfo r = (item as ReleaseInfo); listTracks.Items.Clear(); - if (r.musicbrainz != null) - foreach (MusicBrainz.Track track in r.musicbrainz.GetTracks()) - { - listTracks.Items.Add(new ListViewItem(new string[] { - track.GetTitle(), - (listTracks.Items.Count + 1).ToString(), - CUE == null ? "" : CUE.TOC[listTracks.Items.Count + CUE.TOC.FirstAudio].StartMSF, - CUE == null ? "" : CUE.TOC[listTracks.Items.Count + CUE.TOC.FirstAudio].LengthMSF - })); - } - if (r.freedb != null) - for (int i = 0; i < r.freedb.Tracks.Count; i++) - { - listTracks.Items.Add(new ListViewItem(new string[] { - r.freedb.Tracks[i].Title, - (i + 1).ToString(), - CDImageLayout.TimeToString((uint)r.freedb.Tracks[i].FrameOffset - 150), - CDImageLayout.TimeToString((i + 1 < r.freedb.Tracks.Count) ? (uint) (r.freedb.Tracks[i + 1].FrameOffset - r.freedb.Tracks[i].FrameOffset) : - (CUE == null || i >= CUE.TOC.TrackCount) ? 0 : CUE.TOC[i + CUE.TOC.FirstAudio].Length) - })); - } - AutoResizeTracks(); - chkFixEncoding.Visible = r.freedb != null; - chkFixEncoding.Checked = r.freedb_latin1 != null; - } - else if (item != null && item is CUESheet) - { - CUESheet cueSheet = item as CUESheet; - listTracks.Items.Clear(); - foreach (TrackInfo track in cueSheet.Tracks) + foreach (TrackInfo track in r.metadata.Tracks) { listTracks.Items.Add(new ListViewItem(new string[] { - track.Title, + track.Title, (listTracks.Items.Count + 1).ToString(), - CUE == null ? "" : CUE.TOC[listTracks.Items.Count + 1].StartMSF, - CUE == null ? "" : CUE.TOC[listTracks.Items.Count + 1].LengthMSF + r.metadata.TOC[listTracks.Items.Count + r.metadata.TOC.FirstAudio].StartMSF, + r.metadata.TOC[listTracks.Items.Count + r.metadata.TOC.FirstAudio].LengthMSF })); } AutoResizeTracks(); - chkFixEncoding.Visible = false; + listMetadata.Items.Clear(); + listMetadata.Items.Add(new ListViewItem(new string[] { r.metadata.Artist, "Artist" })); + listMetadata.Items.Add(new ListViewItem(new string[] { r.metadata.Title, "Album" })); + listMetadata.Items.Add(new ListViewItem(new string[] { r.metadata.Year, "Date" })); + listMetadata.Items.Add(new ListViewItem(new string[] { r.metadata.Genre, "Genre" })); + listMetadata.Items.Add(new ListViewItem(new string[] { r.metadata.DiscNumber, "Disc Number" })); + listMetadata.Items.Add(new ListViewItem(new string[] { r.metadata.TotalDiscs, "Total Discs" })); } else { + listMetadata.Items.Clear(); listTracks.Items.Clear(); - chkFixEncoding.Visible = false; textBox1.Text = ""; } } - private void btnEdit_Click(object sender, EventArgs e) - { - object item = ChosenObject; - if (item == null || CUE == null) - return; - if (item is ReleaseInfo) - (item as ReleaseInfo).FillCUE(); - else if (!(item is CUESheet)) - return; - listChoices.Items[0].Selected = true; - listChoices.Items[0].Text = String.Format("{0}: {1} - {2}", - CUE.Year == "" ? "YYYY" : CUE.Year, - CUE.Artist == "" ? "Unknown Artist" : CUE.Artist, - CUE.Title == "" ? "Unknown Title" : CUE.Title); - frmProperties frm = new frmProperties(); - frm.CUE = CUE; - if (frm.ShowDialog(this) == DialogResult.OK) - listChoices.Items[0].Text = String.Format("{0}: {1} - {2}", - CUE.Year == "" ? "YYYY" : CUE.Year, - CUE.Artist == "" ? "Unknown Artist" : CUE.Artist, - CUE.Title == "" ? "Unknown Title" : CUE.Title); - } - private void listTracks_DoubleClick(object sender, EventArgs e) { listTracks.FocusedItem.BeginEdit(); @@ -214,8 +206,7 @@ namespace JDP private void listTracks_BeforeLabelEdit(object sender, LabelEditEventArgs e) { - object item = ChosenObject; - if (item == null || !(item is CUESheet)) + if (ChosenRelease == null) { e.CancelEdit = true; return; @@ -224,10 +215,9 @@ namespace JDP private void listTracks_AfterLabelEdit(object sender, LabelEditEventArgs e) { - if (e.Label != null) - { - CUE.Tracks[e.Item].Title = e.Label; - } + ReleaseInfo ri = ChosenRelease; + if (ri != null && e.Label != null) + ri.metadata.Tracks[e.Item].Title = e.Label; } private void listTracks_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e) @@ -244,51 +234,70 @@ namespace JDP } } - private void chkFixEncoding_CheckedChanged(object sender, EventArgs e) + private void listMetadata_DoubleClick(object sender, EventArgs e) { - if (listChoices.SelectedItems.Count > 0) + listMetadata.FocusedItem.BeginEdit(); + } + + private void listMetadata_KeyDown(object sender, KeyEventArgs e) + { + if (e.KeyCode == Keys.F2) + listMetadata.FocusedItem.BeginEdit(); + } + + private void listMetadata_AfterLabelEdit(object sender, LabelEditEventArgs e) + { + ListViewItem item = ChosenItem; + ReleaseInfo r = ChosenRelease; + if (e.Label != null && item != null && r != null) { - ListViewItem item = listChoices.Items[listChoices.SelectedItems[0].Index]; - if (item.Tag is ReleaseInfo) + switch (e.Item) { - ReleaseInfo r = item.Tag as ReleaseInfo; - if ((r.freedb_latin1 == null) == chkFixEncoding.Checked) - { - r.FixEncoding(); - item.Text = r.Text; - for (int i = 0; i < r.freedb.Tracks.Count; i++) - listTracks.Items[i].Text = r.freedb.Tracks[i].Title; - } + case 0: + foreach (TrackInfo track in r.metadata.Tracks) + if (track.Artist == r.metadata.Artist) + track.Artist = e.Label; + r.metadata.Artist = e.Label; + break; + case 1: r.metadata.Title = e.Label; break; + case 2: r.metadata.Year = e.Label; break; + case 3: r.metadata.Genre = e.Label; break; + case 4: r.metadata.DiscNumber = e.Label; break; + case 5: r.metadata.TotalDiscs = e.Label; break; } + item.Text = r.Text; } } } sealed class ReleaseInfo { - public Freedb.CDEntry freedb_latin1; - public Freedb.CDEntry freedb; - public MusicBrainz.Release musicbrainz; - public CUESheet CUE; - private Encoding iso; + public CUESheet metadata; + + public ReleaseInfo(CUESheet cue) + { + metadata = new CUESheet(cue.Config); + metadata.TOC = cue.TOC; + metadata.CopyMetadata(cue); + } public ReleaseInfo(CUESheet cue, Freedb.CDEntry release) { - CUE = cue; - iso = Encoding.GetEncoding("iso-8859-1"); - freedb_latin1 = null; - freedb = release; + metadata = new CUESheet(cue.Config); + metadata.TOC = cue.TocFromCDEntry(release); + metadata.FillFromFreedb(release); } public ReleaseInfo(CUESheet cue, MusicBrainz.Release release) { - CUE = cue; - iso = Encoding.GetEncoding("iso-8859-1"); - musicbrainz = release; + metadata = new CUESheet(cue.Config); + metadata.TOC = cue.TOC; + metadata.FillFromMusicBrainz(release); } private string FixEncoding(string src) { + Encoding iso = Encoding.GetEncoding("iso-8859-1"); return Encoding.Default.GetString(iso.GetBytes(src)); } @@ -296,44 +305,31 @@ namespace JDP { get { - if (musicbrainz != null) - return string.Format("{0}: {1} - {2}", - musicbrainz.GetEvents().Count > 0 ? musicbrainz.GetEvents()[0].Date.Substring(0, 4) : "YYYY", - musicbrainz.GetArtist(), - musicbrainz.GetTitle()); - if (freedb != null) - return string.Format("{0}: {1} - {2}", - freedb.Year, - freedb.Artist, - freedb.Title); - return null; + return string.Format("{0}: {1} - {2}", + metadata.Year == "" ? "YYYY" : metadata.Year, + metadata.Artist == "" ? "Unknown Artist" : metadata.Artist, + metadata.Title == "" ? "Unknown Title" : metadata.Title); } } public void FixEncoding() { - if (freedb == null) - return; - if (freedb_latin1 != null) + metadata.Artist = FixEncoding(metadata.Artist); + metadata.Title = FixEncoding(metadata.Title); + foreach (TrackInfo track in metadata.Tracks) { - freedb = freedb_latin1; - freedb_latin1 = null; - return; + track.Title = FixEncoding(track.Title); + track.Artist = FixEncoding(track.Artist); } - freedb_latin1 = freedb; - freedb = new Freedb.CDEntry(freedb_latin1); - freedb.Artist = FixEncoding(freedb.Artist); - freedb.Title = FixEncoding(freedb.Title); - foreach (Freedb.Track tr in freedb.Tracks) - tr.Title = FixEncoding(tr.Title); } - public void FillCUE() + public bool Equals(ReleaseInfo r) { - if (musicbrainz != null) - CUE.FillFromMusicBrainz(musicbrainz); - else if (freedb != null) - CUE.FillFromFreedb(freedb); + bool equal = metadata.Title == r.metadata.Title && metadata.Artist == r.metadata.Artist; + for (int t = 0; t < metadata.TrackCount; t++) + if (r.metadata.Tracks[t].Title != metadata.Tracks[t].Title || r.metadata.Tracks[t].Artist != metadata.Tracks[t].Artist) + equal = false; + return equal; } } } \ No newline at end of file diff --git a/CUETools/frmChoice.resx b/CUETools/frmChoice.resx index 1e4af5c..67b05c3 100644 --- a/CUETools/frmChoice.resx +++ b/CUETools/frmChoice.resx @@ -117,40 +117,47 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 488, 293 + + + Fill - - 75, 23 + + + 437, 3 + + + 105, 23 - - 23 + + 0 - + Ok - - button1 + + buttonOk - + System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - $this + + tableLayoutPanel2 - - 5 + + 0 520 + + Fill + - 12, 12 + 3, 3 - 551, 72 + 545, 77 17, 17 @@ -159,88 +166,87 @@ AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj0yLjAuMC4w LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 - ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAADY + ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAACg EQAAAk1TRnQBSQFMAgEBBAEAAQwBAAEEAQABEAEAARABAAT/ASEBAAj/AUIBTQE2BwABNgMAASgDAAFA - AwABIAMAAQEBAAEgBgABIP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8ALgADAgEDAxQBHAMs - AUwDNAF5AzIBmgMwAaQDMgGaAzQBeQMsAUwDFAEcAwMBBAgAA5YB/wEyAgAB/wEyAgAB/wEyAgAB/wEy - AgAB/wEyAgAB/wEyAgAB/wEyAgAB/wEyAgAB/wEyAgAB/wEyAgAB/wEyAgAB/wEyAgAB/wEyAgAB/wEy - AgAB/wEyAgAB/wQAAWUBzAL/ATICmQH/ATICmQH/AWUBzAL/AWUBzAL/AWUBzAL/AWUBzAL/AWUBzAL/ - AWUBzAL/AWUBzAL/AWUBzAL/AWUBzAL/AWUBzAL/AWUBzAL/EAADAgEDAxQBHAMsAUwDNAF5AzIBmgMw - AaQDMgGaAzQBeQMsAUwDFAEcAwMBBBAAAwQBBgMjATYDRwGwAWMCXwHlAZECiQH7AbMCqQH/AZECjAH7 - AWECYAHrAzwB0wMuAawDNAGCAyUBPAMHAQkEAAHMApkB/wGAAgAB/wGAAgAB/wGAAgAB/wGAAgAB/wPq - Af8D6gH/A+oB/wGAAgAB/wPqAf8D6gH/A+oB/wGAAgAB/wGAAgAB/wFlAgAB/wEyAgAB/wEyApkB/wMA - Af8DKAH/A0wB/wMAAf8DGwH/AWUBzAL/AWUBzAL/AWUBzAL/AWUBzAL/AWUBzAL/AWUBzAL/AWUBzAL/ - AWUBzAL/AWUBzAL/AWUBzAL/CAADBAEGAyMBNgNHAbABYwJfAeUBkQKJAfsBswKpAf8BkQKMAfsBYQJg - AesDPAHTAy4BrAM0AYIDJQE8AwcBCQgAAwIBAwMxAU8BbQJnAeoBzwK0Av8C3QL/AuIC/wLoAv8C7gL/ - AvMB/wPPAf8DcgHzAzMBxgMzAZIDJQE8AwMBBAHMApkB/wGAAgAB/wGAAgAB/wGAAgAB/wPxAf8BgAIA - Af8BgAIAAf8D8QH/AYACAAH/A/EB/wGAAgAB/wGAAgAB/wPxAf8BgAIAAf8BgAIAAf8BMgIAAf8DAAH/ - A8wN/wNMAf8DGwH/AWUBzAL/AWUBzAL/AWUBzAL/AWUBzAL/AWUBzAL/AWUBzAL/AWUBzAL/AWUBzAL/ - AWUBzAL/BAADAgEDAzEBTwFtAmcB6gHPArQC/wLdAv8C4gL/AugC/wLuAv8C8wH/A88B/wNyAfMDMwHG - AzMBkgMlATwDAwEEBAADJwE4AYACdQH3AfUCxwL/AtIC/wLYAv8C3QL/AuIC/wLoAv8C9AX/A/UB/wOZ - AfsDMwHGAzQBggMUARwBzAKZAf8BmQEAATIB/wGAAgAB/wGAAgAF/wGAAgAB/wGAAgAF/wGAAgAF/wGA - AgAB/wGAAgAF/wGAAgAB/wGAAgAB/wEyAgAB/wMAAf8DzBH/AwAB/wFlAcwC/wFlAcwC/wFlAcwC/wFl - AcwC/wFlAcwC/wFlAcwC/wFlAcwC/wFlAcwC/wFlAcwC/wQAAycBOAGAAnUB9wH1AscC/wLSAv8C2AL/ - At0C/wLiAv8C6AL/AvQF/wP1Af8DmQH7AzMBxgM0AYIDFAEcAwcBCQFxAmsB3QH1As0C/wLPAv8CzQL/ - AtIC/wLYAv8C3QL/AuIC/wL6Cf8D9QH/A3IB8wMuAawDLAFMAcwCmQH/AZkBAAEyAf8BgAIAAf8BgAIA - Af8BgAIADf8BgAIADf8BgAIAAf8BgAIAAf8BgAIAAf8BMgIAAf8BMgKZAf8DGwH/A3YB/wPAAf8DwAH/ - A8wB/wMAAf8DKAH/AwAB/wMAAf8DAAH/AwAB/wMoAf8BZQHMAv8BZQHMAv8BZQHMAv8DBwEJAXECawHd - AfUCzQL/As8C/wLNAv8C0gL/AtgC/wLdAv8C4gL/AvoJ/wP1Af8DcgHzAy4BrAMsAUwDQwFqAcYCsQL/ - AtkC/wLUAv8CzwL/As0C/wHUAdsC/wHXAeIC/wHkAeoR/wHSAswB/wM8AdMDNAF3AcwCmQH/AZkBAAEy - Af8BgAIAAf8BgAIAAf8BgAIAAf8BgAIAAf8BgAIABf8BgAIABf8BgAIAAf8BgAIAAf8BgAIAAf8BgAIA - Af8BgAIAAf8BMgIAAf8BZQHMAv8BMgKZAf8DGwH/AwAB/wMABf8DAAH/AxsB/wGkAqAJ/wOZAf8DKAH/ - AygB/wFlAcwC/wFlAcwC/wNDAWoBxgKxAv8C2QL/AtQC/wLPAv8CzQL/AdQB2wL/AdcB4gL/AeQB6hH/ - AdICzAH/AzwB0wM0AXcDYwG2Af8C4wH/AQABLQEuAf8BAAEtAS4B/wEAAS0BLgL/Ad4B5wH/AQABLQEu - Av8B0QHzAf8BAAEtAS4C/wH4Av8BbQJzAf8BAAEtAS4B/wFtAnMB/wHMApkB/wFcAlUB6gMzAZQBzAKZ - Af8BmQEAATIB/wGAAgAB/wGAAgAB/wGAAgAB/wGAAgAB/wGAAgAF/wGAAgAF/wGAAgAB/wGAAgAB/wGA - AgAB/wGAAgAB/wGAAgAB/wEyAgAB/wFlAcwC/wFlAcwC/wFlAcwC/wFlAcwC/wMABf8DAAH/AygR/wPM - Af8DAAH/AWUBzAL/AWUBzAL/A2MBtgH/AuMB/wFtAnMB/wEAAS0BLgH/AW0CcwL/Ad4B5wH/AW0CcwH/ - AQABLQEuAf8BbQJzAv8B+AL/AQABLQEuAf8BAAEtAS4B/wEAAS0BLgH/AcwCmQH/AVwCVQHqAzMBlAGH - AoEB4gH/AucB/wEAAS0BLgL/At4C/wLgAv8B7wH8Af8BAAEtAS4C/wHiAfwB/wEAAS0BLgH/AfwB8AH5 - Af8BAAEtAS4B/wHMApkB/wEAAS0BLgH/AcwCmQH/AXoCbAH3AzEBoQHMApkB/wGZAQABMgH/AYACAAH/ - AYACAAH/AYACAAH/AYACAAH/AYACAAH/AYACAAH/AYACAAH/AYACAAH/AYACAAH/AYACAAH/AYACAAH/ - AYACAAH/AYACAAH/ATICAAH/AZkCZQH/AZkCZQH/AZkCZQH/AZkCZQH/AwAF/wMAAf8DAAH/A0wB/wPM - Df8DAAH/AZkCZQH/AZkCZQH/AYcCgQHiAf8C5wH/AQABLQEuAv8C3gH/AQABLQEuAv8B7wH8Af8BAAEt - AS4C/wHiAfwB/wEAAS0BLgH/AfwB8AH5Af8BAAEtAS4B/wHMApkB/wHMApkB/wHMApkB/wF6AmwB9wMx - AaEBngKMAf8B6QK+Af8BAAEtAS4B/wEAAS0BLgH/AfkC1gL/AekB8wH/AQABLQEuAf8BAAEtAS4B/wEA - AS0BLgH/AfkB6AHsAf8BAAEtAS4B/wHmAroB/wHmAr0B/wHmAsAB/wGmApQB/wMzAZQ0/wPxAf8D6gH/ - A4AB/wGZAmUB/wGZAmUB/wGZAmUB/wGZAmUB/wMABf8DAAH/A1QB/wMbAf8DAAH/AwAB/wMABf8DAAH/ - AZkCZQH/AZkCZQH/AZ4CjAH/AekCvgH/AQABLQEuAf8B8wLFAf8B+QLWAv8B6QHzAf8BAAEtAS4C/wHp - AfMB/wEAAS0BLgH/AfkB6AHsAf8BAAEtAS4B/wEAAS0BLgH/AeYCvQH/AeYCwAH/AaYClAH/AzMBlAF6 - Am8B0gHbAqgB/wEAAS0BLgH/AeoCtwH/AfMCzQL/Ae4B/AH/AQABLQEuAv8B0gH1Af8BAAEtAS4C/wH0 - AfwB/wEAAS0BLgL/AtgB/wEAAS0BLgL/AuIB/wGBAnwB9gM0AXcE/wGZAQABMgn/AYACAA3/AYACAAH/ - AYACAA3/AYACAAH/AYACAAH/A4AB/wGZAmUB/wGZAmUB/wGZAmUB/wGZAmUB/wMABf8DGwH/AwAB/wMo - Af8DVAH/A1QB/wMABf8DAAH/AZkCZQH/AZkCZQH/AXoCbwHSAdsCqAH/AQABLQEuAf8B6gK3Af8BAAEt - AS4C/wHuAfwB/wEAAS0BLgL/AdIB9QH/AQABLQEuAv8B9AH8Af8BAAEtAS4C/wLYAv8C3QL/AuIB/wGB - AnwB9gM0AXcBYgJgAbEB1QKiAf8BAAEtAS4B/wEAAS0BLgH/AQABLQEuAv8B9gL/AW0CcwH/AQABLQEu - Af8BbQJzAv8B4AHnAf8BbQJzAf8BAAEtAS4B/wFtAnMC/wLdAf8BWgJZAeQDLAFMBP8BmQEAATIJ/wGA - AgAJ/wGAAgAR/wGAAgAB/wPxAf8D6gH/A4AB/wGZAmUB/wGZAmUB/wGZAmUB/wGZAmUB/wMACf8DmQH/ - AygB/wMAAf8DGwH/AwAF/wMAAf8BmQJlAf8BmQJlAf8BYgJgAbEB1QKiAf8BbQJzAf8BAAEtAS4B/wFt - AnMC/wH2Av8BAAEtAS4C/wHSAfUB/wEAAS0BLgL/AeAB5wH/AQABLQEuAf8BAAEtAS4B/wEAAS0BLgL/ - At0B/wFaAlkB5AMsAUwDNwFQAcMCvxL/AewB8QL/AdsB5wL/AdkB3gL/AtQC/wLPAv8CzQL/AtIB/wHG - Aq0B/wNHAawDFAEbBP8BmQEAATIJ/wGAAgAJ/wGAAgAB/wGAAgAB/wGAAgAB/wGAAgAF/wGAAgAB/wGA - AgAB/wGAAgAB/wEyAgAB/wGZAmUB/wGZAmUB/wGZAmUB/wGZAmUB/wMAAf8DwA3/A8wB/wNeAf8DAAX/ - AwAB/wGZAmUB/wGZAmUB/wM3AVABwwK/Ev8B7AHxAv8B2wHnAv8B2QHeAv8C1AL/As8C/wLNAv8C0gH/ - AcYCrQH/A0cBrAMUARsEAANpAcAD9Qr/Av4C/wLnAv8C4wL/At4C/wLZAv8C1AL/As8B/wH1AscB/wFp - AmQB4wMiATQDAgEDBP8BmQEAATIB/wGAAgAF/wGAAgAJ/wGAAgAJ/wGAAgAF/wGAAgAB/wPxAf8D6gH/ - ATICAAH/AZkCZQH/AZkCZQH/AZkCZQH/AZkCZQH/AygB/wNMAf8DwBn/AwAB/wGZAmUB/wGZAmUB/wQA - A2kBwAP1Cv8C/gL/AucC/wLjAv8C3gL/AtkC/wLUAv8CzwH/AfUCxwH/AWkCZAHjAyIBNAMCAQMEAAMY - ASADgQHvA/UG/wL4Av8C7AL/AucC/wLjAv8C3gL/AtkB/wH1As0B/wGAAnUB9wMwAU0DBAEGBAAE/wGZ - AjIJ/wGAAgAB/wGAAgAJ/wGAAgAB/wGAAgAN/wGAAgAB/wGAAgAB/wOGAf8BmQJlAf8BmQJlAf8BmQJl - Af8BmQJlAf8BmQJlAf8DKAH/AwAB/wMoAf8DmRH/AwAB/wGZAmUB/wGZAmUB/wQAAxgBIAOBAe8D9Qb/ - AvgC/wLsAv8C5wL/AuMC/wLeAv8C2QH/AfUCzQH/AYACdQH3AzABTQMEAQYMAAMYASADaQHAA8YC/wL3 - Av8C8gL/AuwC/wLnAv8C4wH/AcYCsQH/AW0CagHQAyUBNgMCAQMIAAT/AZkCMi3/A/EB/wPqAf8DhgH/ - AZkCZQH/AZkCZQH/AZkCZQH/AZkCZQH/AZkCZQH/AZkCZQH/AZkCZQH/AygB/wMAAf8DGwH/A3YB/wPM - Bf8DAAH/AZkCZQH/AZkCZQH/CAADGAEgA2kBwAPGAv8C9wL/AvIC/wLsAv8C5wL/AuMB/wHGArEB/wFt - AmoB0AMlATYDAgEDGAADNwFQA18BogGCAoAB0gGMAokB/wGCAn4B1ANfAaYDOwFaAwUBBxAACP8BzAKZ - Lf8D8QH/A8AB/wQAAZkCZQH/AZkCZQH/AZkCZQH/AZkCZQH/AZkCZQH/AZkCZQH/AZkCZQH/AZkCZQH/ - AZkCZQH/AxsB/wMAAf8DTAH/AygB/wGZAmUB/xQAAzcBUANfAaIBggKAAdIBjAKJAf8BggJ+AdQDXwGm - AzsBWgMFAQcQAAFCAU0BPgcAAT4DAAEoAwABQAMAASADAAEBAQABAQYAAQEWAAP/gQAB4AEDAgABgAEB - AeABAwHAAQEEAAHAAQEBgAUAAYABAAGABQABgEEAAYAFAAGAAQABgAEBBAABgAEBAcABAwQAAcABAwHw - AQ8CAAGAAQEB8AEPCw== + AwABIAMAAQEBAAEgBgABIP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8ALgADAgEDAxQBHAMw + AUwDRAF5A1ABmgNQAaQDUAGaA0QBeQMwAUwDFAEcAwMBBAgAA5YB/wEkAgAB/wEkAgAB/wEkAgAB/wEk + AgAB/wEkAgAB/wEkAgAB/wEkAgAB/wEkAgAB/wEkAgAB/wEkAgAB/wEkAgAB/wEkAgAB/wEkAgAB/wEk + AgAB/wEkAgAB/wQAAVcBzAL/ASQCmQH/ASQCmQH/AVcBzAL/AVcBzAL/AVcBzAL/AVcBzAL/AVcBzAL/ + AVcBzAL/AVcBzAL/AVcBzAL/AVcBzAL/AVcBzAL/AVcBzAL/EAADAgEDAxQBHAMwAUwDRAF5A1ABmgNQ + AaQDUAGaA0QBeQMwAUwDFAEcAwMBBBAAAwQBBgMkATYDUwGwAWMCXgHlAYMCcwH7AbMCqQH/AYMCfAH7 + A2AB6wNaAdMDUwGsA0cBggMoATwDBwEJBAABzAKZAf8BgAIAAf8BgAIAAf8BgAIAAf8BgAIAAf8D6gH/ + A+oB/wPqAf8BgAIAAf8D6gH/A+oB/wPqAf8BgAIAAf8BgAIAAf8BVwIAAf8BJAIAAf8BJAKZAf8DAAH/ + AxoB/wM+Af8DAAH/Aw0B/wFXAcwC/wFXAcwC/wFXAcwC/wFXAcwC/wFXAcwC/wFXAcwC/wFXAcwC/wFX + AcwC/wFXAcwC/wFXAcwC/wgAAwQBBgMkATYDUwGwAWMCXgHlAYMCcwH7AbMCqQH/AYMCfAH7A2AB6wNa + AdMDUwGsA0cBggMoATwDBwEJCAADAgEDAzEBTwNcAeoBzwK0Av8C3QL/AuIC/wLoAv8C7gL/AvMB/wPP + Af8DXwHzA1gBxgNMAZIDKAE8AwMBBAHMApkB/wGAAgAB/wGAAgAB/wGAAgAB/wPxAf8BgAIAAf8BgAIA + Af8D8QH/AYACAAH/A/EB/wGAAgAB/wGAAgAB/wPxAf8BgAIAAf8BgAIAAf8BJAIAAf8DAAH/A8wN/wM+ + Af8DDQH/AVcBzAL/AVcBzAL/AVcBzAL/AVcBzAL/AVcBzAL/AVcBzAL/AVcBzAL/AVcBzAL/AVcBzAL/ + BAADAgEDAzEBTwNcAeoBzwK0Av8C3QL/AuIC/wLoAv8C7gL/AvMB/wPPAf8DXwHzA1gBxgNMAZIDKAE8 + AwMBBAQAAyYBOANtAfcB9QLHAv8C0gL/AtgC/wLdAv8C4gL/AugC/wL0Bf8D9QH/A4oB+wNYAcYDRwGC + AxQBHAHMApkB/wGZAQABJAH/AYACAAH/AYACAAX/AYACAAH/AYACAAX/AYACAAX/AYACAAH/AYACAAX/ + AYACAAH/AYACAAH/ASQCAAH/AwAB/wPMEf8DAAH/AVcBzAL/AVcBzAL/AVcBzAL/AVcBzAL/AVcBzAL/ + AVcBzAL/AVcBzAL/AVcBzAL/AVcBzAL/BAADJgE4A20B9wH1AscC/wLSAv8C2AL/At0C/wLiAv8C6AL/ + AvQF/wP1Af8DigH7A1gBxgNHAYIDFAEcAwcBCQNeAd0B9QLNAv8CzwL/As0C/wLSAv8C2AL/At0C/wLi + Av8C+gn/A/UB/wNfAfMDUwGsAzABTAHMApkB/wGZAQABJAH/AYACAAH/AYACAAH/AYACAA3/AYACAA3/ + AYACAAH/AYACAAH/AYACAAH/ASQCAAH/ASQCmQH/Aw0B/wNoAf8DwAH/A8AB/wPMAf8DAAH/AxoB/wMA + Af8DAAH/AwAB/wMAAf8DGgH/AVcBzAL/AVcBzAL/AVcBzAL/AwcBCQNeAd0B9QLNAv8CzwL/As0C/wLS + Av8C2AL/At0C/wLiAv8C+gn/A/UB/wNfAfMDUwGsAzABTAM+AWoBxgKxAv8C2QL/AtQC/wLPAv8CzQL/ + AdQB2wL/AdcB4gL/AeQB6hH/AdICzAH/A1oB0wNDAXcBzAKZAf8BmQEAASQB/wGAAgAB/wGAAgAB/wGA + AgAB/wGAAgAB/wGAAgAF/wGAAgAF/wGAAgAB/wGAAgAB/wGAAgAB/wGAAgAB/wGAAgAB/wEkAgAB/wFX + AcwC/wEkApkB/wMNAf8DAAH/AwAF/wMAAf8DDQH/AaQCoAn/A5kB/wMaAf8DGgH/AVcBzAL/AVcBzAL/ + Az4BagHGArEC/wLZAv8C1AL/As8C/wLNAv8B1AHbAv8B1wHiAv8B5AHqEf8B0gLMAf8DWgHTA0MBdwNW + AbYB/wLjAf8BAAEfASAB/wEAAR8BIAH/AQABHwEgAv8B3gHnAf8BAAEfASAC/wHRAfMB/wEAAR8BIAL/ + AfgC/wFfAmUB/wEAAR8BIAH/AV8CZQH/AcwCmQH/AVwCVQHqA04BlAHMApkB/wGZAQABJAH/AYACAAH/ + AYACAAH/AYACAAH/AYACAAH/AYACAAX/AYACAAX/AYACAAH/AYACAAH/AYACAAH/AYACAAH/AYACAAH/ + ASQCAAH/AVcBzAL/AVcBzAL/AVcBzAL/AVcBzAL/AwAF/wMAAf8DGhH/A8wB/wMAAf8BVwHMAv8BVwHM + Av8DVgG2Af8C4wH/AV8CZQH/AQABHwEgAf8BXwJlAv8B3gHnAf8BXwJlAf8BAAEfASAB/wFfAmUC/wH4 + Av8BAAEfASAB/wEAAR8BIAH/AQABHwEgAf8BzAKZAf8BXAJVAeoDTgGUA2EB4gH/AucB/wEAAR8BIAL/ + At4C/wLgAv8B7wH8Af8BAAEfASAC/wHiAfwB/wEAAR8BIAH/AfwB8AH5Af8BAAEfASAB/wHMApkB/wEA + AR8BIAH/AcwCmQH/AW0CbAH3A1EBoQHMApkB/wGZAQABJAH/AYACAAH/AYACAAH/AYACAAH/AYACAAH/ + AYACAAH/AYACAAH/AYACAAH/AYACAAH/AYACAAH/AYACAAH/AYACAAH/AYACAAH/AYACAAH/ASQCAAH/ + AZkCVwH/AZkCVwH/AZkCVwH/AZkCVwH/AwAF/wMAAf8DAAH/Az4B/wPMDf8DAAH/AZkCVwH/AZkCVwH/ + A2EB4gH/AucB/wEAAR8BIAL/At4B/wEAAR8BIAL/Ae8B/AH/AQABHwEgAv8B4gH8Af8BAAEfASAB/wH8 + AfAB+QH/AQABHwEgAf8BzAKZAf8BzAKZAf8BzAKZAf8BbQJsAfcDUQGhAZ4CjAH/AekCvgH/AQABHwEg + Af8BAAEfASAB/wH5AtYC/wHpAfMB/wEAAR8BIAH/AQABHwEgAf8BAAEfASAB/wH5AegB7AH/AQABHwEg + Af8B5gK6Af8B5gK9Af8B5gLAAf8BpgKUAf8DTgGUNP8D8QH/A+oB/wOAAf8BmQJXAf8BmQJXAf8BmQJX + Af8BmQJXAf8DAAX/AwAB/wNGAf8DDQH/AwAB/wMAAf8DAAX/AwAB/wGZAlcB/wGZAlcB/wGeAowB/wHp + Ar4B/wEAAR8BIAH/AfMCxQH/AfkC1gL/AekB8wH/AQABHwEgAv8B6QHzAf8BAAEfASAB/wH5AegB7AH/ + AQABHwEgAf8BAAEfASAB/wHmAr0B/wHmAsAB/wGmApQB/wNOAZQDXQHSAdsCqAH/AQABHwEgAf8B6gK3 + Af8B8wLNAv8B7gH8Af8BAAEfASAC/wHSAfUB/wEAAR8BIAL/AfQB/AH/AQABHwEgAv8C2AH/AQABHwEg + Av8C4gH/A2IB9gNDAXcE/wGZAQABJAn/AYACAA3/AYACAAH/AYACAA3/AYACAAH/AYACAAH/A4AB/wGZ + AlcB/wGZAlcB/wGZAlcB/wGZAlcB/wMABf8DDQH/AwAB/wMaAf8DRgH/A0YB/wMABf8DAAH/AZkCVwH/ + AZkCVwH/A10B0gHbAqgB/wEAAR8BIAH/AeoCtwH/AQABHwEgAv8B7gH8Af8BAAEfASAC/wHSAfUB/wEA + AR8BIAL/AfQB/AH/AQABHwEgAv8C2AL/At0C/wLiAf8DYgH2A0MBdwNWAbEB1QKiAf8BAAEfASAB/wEA + AR8BIAH/AQABHwEgAv8B9gL/AV8CZQH/AQABHwEgAf8BXwJlAv8B4AHnAf8BXwJlAf8BAAEfASAB/wFf + AmUC/wLdAf8DWgHkAzABTAT/AZkBAAEkCf8BgAIACf8BgAIAEf8BgAIAAf8D8QH/A+oB/wOAAf8BmQJX + Af8BmQJXAf8BmQJXAf8BmQJXAf8DAAn/A5kB/wMaAf8DAAH/Aw0B/wMABf8DAAH/AZkCVwH/AZkCVwH/ + A1YBsQHVAqIB/wFfAmUB/wEAAR8BIAH/AV8CZQL/AfYC/wEAAR8BIAL/AdIB9QH/AQABHwEgAv8B4AHn + Af8BAAEfASAB/wEAAR8BIAH/AQABHwEgAv8C3QH/A1oB5AMwAUwDMgFQAcMCvxL/AewB8QL/AdsB5wL/ + AdkB3gL/AtQC/wLPAv8CzQL/AtIB/wHGAq0B/wNTAawDFAEbBP8BmQEAASQJ/wGAAgAJ/wGAAgAB/wGA + AgAB/wGAAgAB/wGAAgAF/wGAAgAB/wGAAgAB/wGAAgAB/wEkAgAB/wGZAlcB/wGZAlcB/wGZAlcB/wGZ + AlcB/wMAAf8DwA3/A8wB/wNQAf8DAAX/AwAB/wGZAlcB/wGZAlcB/wMyAVABwwK/Ev8B7AHxAv8B2wHn + Av8B2QHeAv8C1AL/As8C/wLNAv8C0gH/AcYCrQH/A1MBrAMUARsEAANaAcAD9Qr/Av4C/wLnAv8C4wL/ + At4C/wLZAv8C1AL/As8B/wH1AscB/wNfAeMDIwE0AwIBAwT/AZkBAAEkAf8BgAIABf8BgAIACf8BgAIA + Cf8BgAIABf8BgAIAAf8D8QH/A+oB/wEkAgAB/wGZAlcB/wGZAlcB/wGZAlcB/wGZAlcB/wMaAf8DPgH/ + A8AZ/wMAAf8BmQJXAf8BmQJXAf8EAANaAcAD9Qr/Av4C/wLnAv8C4wL/At4C/wLZAv8C1AL/As8B/wH1 + AscB/wNfAeMDIwE0AwIBAwQAAxcBIANiAe8D9Qb/AvgC/wLsAv8C5wL/AuMC/wLeAv8C2QH/AfUCzQH/ + A20B9wMwAU0DBAEGBAAE/wGZAiQJ/wGAAgAB/wGAAgAJ/wGAAgAB/wGAAgAN/wGAAgAB/wGAAgAB/wOG + Af8BmQJXAf8BmQJXAf8BmQJXAf8BmQJXAf8BmQJXAf8DGgH/AwAB/wMaAf8DmRH/AwAB/wGZAlcB/wGZ + AlcB/wQAAxcBIANiAe8D9Qb/AvgC/wLsAv8C5wL/AuMC/wLeAv8C2QH/AfUCzQH/A20B9wMwAU0DBAEG + DAADFwEgA1oBwAPGAv8C9wL/AvIC/wLsAv8C5wL/AuMB/wHGArEB/wNeAdADJAE2AwIBAwgABP8BmQIk + Lf8D8QH/A+oB/wOGAf8BmQJXAf8BmQJXAf8BmQJXAf8BmQJXAf8BmQJXAf8BmQJXAf8BmQJXAf8DGgH/ + AwAB/wMNAf8DaAH/A8wF/wMAAf8BmQJXAf8BmQJXAf8IAAMXASADWgHAA8YC/wL3Av8C8gL/AuwC/wLn + Av8C4wH/AcYCsQH/A14B0AMkATYDAgEDGAADMgFQA1EBogNdAdIBjAKJAf8DYAHUA1QBpgM3AVoDBQEH + EAAI/wHMApkt/wPxAf8DwAH/BAABmQJXAf8BmQJXAf8BmQJXAf8BmQJXAf8BmQJXAf8BmQJXAf8BmQJX + Af8BmQJXAf8BmQJXAf8DDQH/AwAB/wM+Af8DGgH/AZkCVwH/FAADMgFQA1EBogNdAdIBjAKJAf8DYAHU + A1QBpgM3AVoDBQEHEAABQgFNAT4HAAE+AwABKAMAAUADAAEgAwABAQEAAQEGAAEBFgAD/4EAAeABAwIA + AYABAQHgAQMBwAEBBAABwAEBAYAFAAGAAQABgAUAAYBBAAGABQABgAEAAYABAQQAAYABAQHAAQMEAAHA + AQMB8AEPAgABgAEBAfABDws= - 24 + 0 listChoices @@ -249,29 +255,31 @@ System.Windows.Forms.ListView, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - $this + tableLayoutPanel1 4 + + Fill + Courier New, 8pt - 12, 90 + 3, 86 True - Vertical - 551, 197 + 545, 35 - 25 + 1 textBox1 @@ -280,36 +288,9 @@ System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - $this + tableLayoutPanel1 - 3 - - - Top, Left, Right - - - 12, 90 - - - 551, 197 - - - 26 - - - False - - - listTracks - - - System.Windows.Forms.ListView, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - 2 @@ -342,68 +323,152 @@ Right - - 407, 293 + + Fill - - 75, 23 + + 3, 243 - - 27 + + 545, 137 - - Edit + + 3 - + False - - btnEdit + + listTracks - - System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + System.Windows.Forms.ListView, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - $this + + tableLayoutPanel1 - + + 3 + + 1 - - True + + 1 - - 315, 297 + + Value - - 86, 17 + + 400 - - 28 + + 0 - - Fix encoding + + Name - - chkFixEncoding + + 120 - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Fill - + + 3, 127 + + + 545, 110 + + + 2 + + + False + + + listMetadata + + + System.Windows.Forms.ListView, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tableLayoutPanel1 + + + 0 + + + 4 + + + Fill + + + 3, 386 + + + 1 + + + 545, 29 + + + 30 + + + tableLayoutPanel2 + + + System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tableLayoutPanel1 + + + 1 + + + <?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="buttonOk" Row="0" RowSpan="1" Column="3" ColumnSpan="1" /></Controls><Columns Styles="Percent,37,59399,Percent,22,93233,Percent,19,17293,Percent,20,11278" /><Rows Styles="Percent,100" /></TableLayoutSettings> + + + 12, 12 + + + 5 + + + 551, 418 + + + 29 + + + tableLayoutPanel1 + + + System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + $this - + 0 + + <?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="listMetadata" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="tableLayoutPanel2" Row="4" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="textBox1" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="listTracks" Row="3" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="listChoices" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /></Controls><Columns Styles="Percent,100" /><Rows Styles="Percent,19,79167,Percent,9,895833,Percent,27,86458,Percent,34,11458,Percent,8,000021,Absolute,20" /></TableLayoutSettings> + True + + 51 + 6, 13 - 575, 328 + 575, 442 CenterParent @@ -447,6 +512,18 @@ System.Windows.Forms.ColumnHeader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + columnHeader2 + + + System.Windows.Forms.ColumnHeader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + columnHeader3 + + + System.Windows.Forms.ColumnHeader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + frmChoice diff --git a/CUETools/frmSettings.Designer.cs b/CUETools/frmSettings.Designer.cs index 05b95dd..5459460 100644 --- a/CUETools/frmSettings.Designer.cs +++ b/CUETools/frmSettings.Designer.cs @@ -126,14 +126,14 @@ namespace JDP { this.listViewFormats = new System.Windows.Forms.ListView(); this.columnHeader1 = new System.Windows.Forms.ColumnHeader(); this.tabPage10 = new System.Windows.Forms.TabPage(); + this.groupBoxFlaCudaOptions = new System.Windows.Forms.GroupBox(); + this.checkBoxFlaCudaGPUOnly = new System.Windows.Forms.CheckBox(); + this.checkBoxFlaCudaVerify = new System.Windows.Forms.CheckBox(); this.groupBoxExternalEncoder = new System.Windows.Forms.GroupBox(); this.labelEncoderName = new System.Windows.Forms.Label(); this.labelEncoderModes = new System.Windows.Forms.Label(); this.labelEncoderPath = new System.Windows.Forms.Label(); this.labelEncoderParameters = new System.Windows.Forms.Label(); - this.groupBoxFlaCudaOptions = new System.Windows.Forms.GroupBox(); - this.checkBoxFlaCudaGPUOnly = new System.Windows.Forms.CheckBox(); - this.checkBoxFlaCudaVerify = new System.Windows.Forms.CheckBox(); this.buttonEncoderDelete = new System.Windows.Forms.Button(); this.buttonEncoderAdd = new System.Windows.Forms.Button(); this.listBoxEncoders = new System.Windows.Forms.ListBox(); @@ -174,6 +174,7 @@ namespace JDP { this.labelFormatEncoder = new System.Windows.Forms.Label(); this.columnHeader2 = new System.Windows.Forms.ColumnHeader(); this.checkBox1 = new System.Windows.Forms.CheckBox(); + this.checkBoxFlaCudaMultithread = new System.Windows.Forms.CheckBox(); btnCancel = new System.Windows.Forms.Button(); this.grpGeneral.SuspendLayout(); this.groupBox1.SuspendLayout(); @@ -202,8 +203,8 @@ namespace JDP { this.tabPage3.SuspendLayout(); this.groupBoxFormat.SuspendLayout(); this.tabPage10.SuspendLayout(); - this.groupBoxExternalEncoder.SuspendLayout(); this.groupBoxFlaCudaOptions.SuspendLayout(); + this.groupBoxExternalEncoder.SuspendLayout(); this.groupBoxLibWavpack.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.numWVExtraMode)).BeginInit(); this.groupBoxLibFLAC.SuspendLayout(); @@ -1056,6 +1057,7 @@ namespace JDP { // resources.ApplyResources(this.tabPage10, "tabPage10"); this.tabPage10.BackColor = System.Drawing.SystemColors.Control; + this.tabPage10.Controls.Add(this.groupBoxFlaCudaOptions); this.tabPage10.Controls.Add(this.groupBoxExternalEncoder); this.tabPage10.Controls.Add(this.buttonEncoderDelete); this.tabPage10.Controls.Add(this.buttonEncoderAdd); @@ -1065,9 +1067,31 @@ namespace JDP { this.tabPage10.Controls.Add(this.groupBoxLibWavpack); this.tabPage10.Controls.Add(this.labelEncoderExtension); this.tabPage10.Controls.Add(this.groupBoxLibFLAC); - this.tabPage10.Controls.Add(this.groupBoxFlaCudaOptions); this.tabPage10.Name = "tabPage10"; // + // groupBoxFlaCudaOptions + // + this.groupBoxFlaCudaOptions.Controls.Add(this.checkBoxFlaCudaMultithread); + this.groupBoxFlaCudaOptions.Controls.Add(this.checkBoxFlaCudaGPUOnly); + this.groupBoxFlaCudaOptions.Controls.Add(this.checkBoxFlaCudaVerify); + resources.ApplyResources(this.groupBoxFlaCudaOptions, "groupBoxFlaCudaOptions"); + this.groupBoxFlaCudaOptions.Name = "groupBoxFlaCudaOptions"; + this.groupBoxFlaCudaOptions.TabStop = false; + // + // checkBoxFlaCudaGPUOnly + // + resources.ApplyResources(this.checkBoxFlaCudaGPUOnly, "checkBoxFlaCudaGPUOnly"); + this.checkBoxFlaCudaGPUOnly.DataBindings.Add(new System.Windows.Forms.Binding("Checked", this.cUEConfigBindingSource, "FlaCudaGPUOnly", true)); + this.checkBoxFlaCudaGPUOnly.Name = "checkBoxFlaCudaGPUOnly"; + this.checkBoxFlaCudaGPUOnly.UseVisualStyleBackColor = true; + // + // checkBoxFlaCudaVerify + // + resources.ApplyResources(this.checkBoxFlaCudaVerify, "checkBoxFlaCudaVerify"); + this.checkBoxFlaCudaVerify.DataBindings.Add(new System.Windows.Forms.Binding("Checked", this.cUEConfigBindingSource, "FlaCudaVerify", true)); + this.checkBoxFlaCudaVerify.Name = "checkBoxFlaCudaVerify"; + this.checkBoxFlaCudaVerify.UseVisualStyleBackColor = true; + // // groupBoxExternalEncoder // resources.ApplyResources(this.groupBoxExternalEncoder, "groupBoxExternalEncoder"); @@ -1103,26 +1127,6 @@ namespace JDP { resources.ApplyResources(this.labelEncoderParameters, "labelEncoderParameters"); this.labelEncoderParameters.Name = "labelEncoderParameters"; // - // groupBoxFlaCudaOptions - // - this.groupBoxFlaCudaOptions.Controls.Add(this.checkBoxFlaCudaGPUOnly); - this.groupBoxFlaCudaOptions.Controls.Add(this.checkBoxFlaCudaVerify); - resources.ApplyResources(this.groupBoxFlaCudaOptions, "groupBoxFlaCudaOptions"); - this.groupBoxFlaCudaOptions.Name = "groupBoxFlaCudaOptions"; - this.groupBoxFlaCudaOptions.TabStop = false; - // - // checkBoxFlaCudaGPUOnly - // - resources.ApplyResources(this.checkBoxFlaCudaGPUOnly, "checkBoxFlaCudaGPUOnly"); - this.checkBoxFlaCudaGPUOnly.Name = "checkBoxFlaCudaGPUOnly"; - this.checkBoxFlaCudaGPUOnly.UseVisualStyleBackColor = true; - // - // checkBoxFlaCudaVerify - // - resources.ApplyResources(this.checkBoxFlaCudaVerify, "checkBoxFlaCudaVerify"); - this.checkBoxFlaCudaVerify.Name = "checkBoxFlaCudaVerify"; - this.checkBoxFlaCudaVerify.UseVisualStyleBackColor = true; - // // buttonEncoderDelete // this.buttonEncoderDelete.DataBindings.Add(new System.Windows.Forms.Binding("Enabled", this.encodersBindingSource, "CanBeDeleted", true)); @@ -1451,6 +1455,13 @@ namespace JDP { this.checkBox1.Name = "checkBox1"; this.checkBox1.UseVisualStyleBackColor = true; // + // checkBoxFlaCudaMultithread + // + resources.ApplyResources(this.checkBoxFlaCudaMultithread, "checkBoxFlaCudaMultithread"); + this.checkBoxFlaCudaMultithread.DataBindings.Add(new System.Windows.Forms.Binding("Checked", this.cUEConfigBindingSource, "FlaCudaThreads", true)); + this.checkBoxFlaCudaMultithread.Name = "checkBoxFlaCudaMultithread"; + this.checkBoxFlaCudaMultithread.UseVisualStyleBackColor = true; + // // frmSettings // this.AcceptButton = this.btnOK; @@ -1507,10 +1518,10 @@ namespace JDP { this.groupBoxFormat.PerformLayout(); this.tabPage10.ResumeLayout(false); this.tabPage10.PerformLayout(); - this.groupBoxExternalEncoder.ResumeLayout(false); - this.groupBoxExternalEncoder.PerformLayout(); this.groupBoxFlaCudaOptions.ResumeLayout(false); this.groupBoxFlaCudaOptions.PerformLayout(); + this.groupBoxExternalEncoder.ResumeLayout(false); + this.groupBoxExternalEncoder.PerformLayout(); this.groupBoxLibWavpack.ResumeLayout(false); this.groupBoxLibWavpack.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.numWVExtraMode)).EndInit(); @@ -1683,6 +1694,7 @@ namespace JDP { private System.Windows.Forms.CheckBox checkBoxFlaCudaGPUOnly; private System.Windows.Forms.CheckBox checkBoxFlaCudaVerify; private System.Windows.Forms.CheckBox checkBox1; + private System.Windows.Forms.CheckBox checkBoxFlaCudaMultithread; } } \ No newline at end of file diff --git a/CUETools/frmSettings.cs b/CUETools/frmSettings.cs index 3b57721..bcca793 100644 --- a/CUETools/frmSettings.cs +++ b/CUETools/frmSettings.cs @@ -45,8 +45,6 @@ namespace JDP { numEncodeWhenPercent.Value = _config.encodeWhenPercent; chkEncodeWhenZeroOffset.Checked = _config.encodeWhenZeroOffset; chkFLACVerify.Checked = _config.flacVerify; - checkBoxFlaCudaVerify.Checked = _config.flaCudaVerify; - checkBoxFlaCudaGPUOnly.Checked = _config.flaCudaGPUOnly; chkWriteArTagsOnConvert.Checked = _config.writeArTagsOnEncode; chkWriteARTagsOnVerify.Checked = _config.writeArTagsOnVerify; chkWVExtraMode.Checked = (_config.wvExtraMode != 0); @@ -209,8 +207,6 @@ namespace JDP { _config.encodeWhenConfidence = (uint)numEncodeWhenConfidence.Value; _config.encodeWhenZeroOffset = chkEncodeWhenZeroOffset.Checked; _config.flacVerify = chkFLACVerify.Checked; - _config.flaCudaVerify = checkBoxFlaCudaVerify.Checked; - _config.flaCudaGPUOnly = checkBoxFlaCudaGPUOnly.Checked; _config.writeArTagsOnEncode = chkWriteArTagsOnConvert.Checked; _config.writeArTagsOnVerify = chkWriteARTagsOnVerify.Checked; if (!chkWVExtraMode.Checked) _config.wvExtraMode = 0; @@ -493,10 +489,10 @@ namespace JDP { comboBoxEncoderExtension.Visible = encoder != null; comboBoxEncoderExtension.Enabled = encoder != null && encoder.path != null; groupBoxExternalEncoder.Visible = encoder != null && encoder.path != null; - groupBoxFlaCudaOptions.Visible = encoder != null && encoder.path == null && encoder.className == "FlaCudaWriter"; - groupBoxLibFLAC.Visible = encoder != null && encoder.path == null && encoder.className == "FLACWriter"; - groupBoxLibWavpack.Visible = encoder != null && encoder.path == null && encoder.className == "WavPackWriter"; - groupBoxLibMAC_SDK.Visible = encoder != null && encoder.path == null && encoder.className == "APEWriter"; + groupBoxFlaCudaOptions.Visible = encoder != null && encoder.path == null && encoder.type.Name == "FlaCudaWriter"; + groupBoxLibFLAC.Visible = encoder != null && encoder.path == null && encoder.type.Name == "FLACWriter"; + groupBoxLibWavpack.Visible = encoder != null && encoder.path == null && encoder.type.Name == "WavPackWriter"; + groupBoxLibMAC_SDK.Visible = encoder != null && encoder.path == null && encoder.type.Name == "APEWriter"; checkBoxEncoderLossless.Enabled = encoder != null && format != null && format.allowLossless && format.allowLossy; if (!checkBoxEncoderLossless.Enabled && encoder != null && format != null && encoder.Lossless != format.allowLossless) encoder.Lossless = format.allowLossless; diff --git a/CUETools/frmSettings.resx b/CUETools/frmSettings.resx index ded84c8..1437aa0 100644 --- a/CUETools/frmSettings.resx +++ b/CUETools/frmSettings.resx @@ -2928,6 +2928,123 @@ True + + True + + + NoControl + + + 9, 68 + + + 80, 17 + + + 22 + + + Multithread + + + checkBoxFlaCudaMultithread + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBoxFlaCudaOptions + + + 0 + + + True + + + NoControl + + + 10, 26 + + + 69, 17 + + + 21 + + + GPU only + + + checkBoxFlaCudaGPUOnly + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBoxFlaCudaOptions + + + 1 + + + True + + + NoControl + + + 9, 46 + + + 54, 17 + + + 20 + + + Verify + + + checkBoxFlaCudaVerify + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBoxFlaCudaOptions + + + 2 + + + 136, 39 + + + 390, 100 + + + 30 + + + FlaCuda options + + + False + + + groupBoxFlaCudaOptions + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabPage10 + + + 0 + None @@ -3073,7 +3190,7 @@ tabPage10 - 0 + 1 @@ -3114,7 +3231,7 @@ tabPage10 - 1 + 2 @@ -3152,7 +3269,7 @@ tabPage10 - 2 + 3 6, 7 @@ -3173,7 +3290,7 @@ tabPage10 - 3 + 4 459, 12 @@ -3197,7 +3314,7 @@ tabPage10 - 4 + 5 136, 39 @@ -3224,7 +3341,7 @@ tabPage10 - 5 + 6 True @@ -3335,7 +3452,7 @@ tabPage10 - 6 + 7 True @@ -3371,7 +3488,7 @@ tabPage10 - 7 + 8 True @@ -3428,93 +3545,6 @@ tabPage10 - 8 - - - True - - - NoControl - - - 10, 26 - - - 69, 17 - - - 21 - - - GPU only - - - checkBoxFlaCudaGPUOnly - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBoxFlaCudaOptions - - - 0 - - - True - - - NoControl - - - 9, 46 - - - 54, 17 - - - 20 - - - Verify - - - checkBoxFlaCudaVerify - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBoxFlaCudaOptions - - - 1 - - - 136, 39 - - - 390, 74 - - - 30 - - - FlaCuda options - - - False - - - groupBoxFlaCudaOptions - - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabPage10 - - 9 diff --git a/CUETools/hdcd.dll b/CUETools/hdcd.dll new file mode 100644 index 0000000..ae565f6 Binary files /dev/null and b/CUETools/hdcd.dll differ diff --git a/CUETools/unrar.dll b/CUETools/unrar.dll new file mode 100644 index 0000000..909ded8 Binary files /dev/null and b/CUETools/unrar.dll differ diff --git a/CUETools/user_profiles_enabled b/CUETools/user_profiles_enabled new file mode 100644 index 0000000..e69de29 diff --git a/Freedb/Freedb.csproj b/Freedb/Freedb.csproj index 18f70b0..532c8b0 100644 --- a/Freedb/Freedb.csproj +++ b/Freedb/Freedb.csproj @@ -51,13 +51,14 @@ prompt - ..\bin\win32\Release\ + ..\bin\any\Release\ false 285212672 false - TRACE + + false diff --git a/HDCDDotNet/HDCDDotNet.cs b/HDCDDotNet/HDCDDotNet.cs index fccb9ed..0293d1e 100644 --- a/HDCDDotNet/HDCDDotNet.cs +++ b/HDCDDotNet/HDCDDotNet.cs @@ -32,6 +32,8 @@ namespace HDCDDotNet { _decoder = IntPtr.Zero; #if !MONO + if (decode) + _audioBuffer = new AudioBuffer(new AudioPCMConfig(output_bps, channels, 44100), 256); _decoder = hdcd_decoder_new(); _channelCount = channels; _bitsPerSample = output_bps; @@ -121,19 +123,19 @@ namespace HDCDDotNet stats = (hdcd_decoder_statistics) Marshal.PtrToStructure(_statsPtr, typeof(hdcd_decoder_statistics)); } - public void Process(int[,] sampleBuffer, uint sampleCount) + public void Process(int[,] sampleBuffer, int sampleCount) { #if !MONO - if (!hdcd_decoder_process_buffer_interleaved(_decoder, sampleBuffer, (int) sampleCount)) + if (!hdcd_decoder_process_buffer_interleaved(_decoder, sampleBuffer, sampleCount)) throw new Exception("HDCD processing error."); #endif } - public void Process(byte[] buff, uint sampleCount) + public void Process(byte[] buff, int sampleCount) { if (_inSampleBuffer == null || _inSampleBuffer.GetLength(0) < sampleCount) _inSampleBuffer = new int[sampleCount, _channelCount]; - AudioSamples.BytesToFLACSamples_16(buff, 0, _inSampleBuffer, 0, sampleCount, _channelCount); + AudioBuffer.BytesToFLACSamples_16(buff, 0, _inSampleBuffer, 0, sampleCount, _channelCount); Process(_inSampleBuffer, sampleCount); } @@ -198,6 +200,7 @@ namespace HDCDDotNet /**< Processing failed due to a memory allocation error. */ }; + private AudioBuffer _audioBuffer; private IntPtr _decoder; private int[,] _inSampleBuffer; private int[,] _outSampleBuffer; @@ -234,7 +237,8 @@ namespace HDCDDotNet for (int i = 0; i < loopCount; i++) *(pOutSamples++) = *(pInSamples++); } - AudioDest.Write(_outSampleBuffer, 0, samples); + _audioBuffer.Prepare(_outSampleBuffer, samples); + AudioDest.Write(_audioBuffer); return true; } diff --git a/HDCDDotNet/HDCDDotNet.csproj b/HDCDDotNet/HDCDDotNet.csproj index f017e79..1da8f19 100644 --- a/HDCDDotNet/HDCDDotNet.csproj +++ b/HDCDDotNet/HDCDDotNet.csproj @@ -22,10 +22,11 @@ pdbonly true - bin\Release\ + ..\bin\any\Release\ TRACE prompt 4 + true true diff --git a/LossyWAVSharp/LossyWAVSharp.csproj b/LossyWAVSharp/LossyWAVSharp.csproj index d514f50..55f5bbe 100644 --- a/LossyWAVSharp/LossyWAVSharp.csproj +++ b/LossyWAVSharp/LossyWAVSharp.csproj @@ -22,7 +22,7 @@ pdbonly true - bin\Release\ + ..\bin\any\Release\ TRACE prompt 4 diff --git a/LossyWAVSharp/Program.cs b/LossyWAVSharp/Program.cs index 456d0b8..20f9f31 100644 --- a/LossyWAVSharp/Program.cs +++ b/LossyWAVSharp/Program.cs @@ -92,39 +92,38 @@ namespace LossyWAVSharp { WAVReader audioSource = new WAVReader(sourceFile, (sourceFile == "-" ? Console.OpenStandardInput() : null)); if (sourceFile == "-" && stdinName != null) sourceFile = stdinName; - WAVWriter audioDest = new WAVWriter(Path.ChangeExtension(sourceFile, ".lossy.wav"), outputBPS == 0 ? audioSource.BitsPerSample : outputBPS, audioSource.ChannelCount, audioSource.SampleRate, toStdout ? Console.OpenStandardOutput() : null); - WAVWriter lwcdfDest = createCorrection ? new WAVWriter(Path.ChangeExtension(sourceFile, ".lwcdf.wav"), audioSource.BitsPerSample, audioSource.ChannelCount, audioSource.SampleRate, null) : null; - LossyWAVWriter lossyWAV = new LossyWAVWriter(audioDest, lwcdfDest, audioSource.BitsPerSample, audioSource.ChannelCount, audioSource.SampleRate, quality); - int[,] buff = new int[0x1000, audioSource.ChannelCount]; + AudioPCMConfig pcm = outputBPS == 0 ? audioSource.PCM : new AudioPCMConfig(outputBPS, audioSource.PCM.ChannelCount, audioSource.PCM.SampleRate); + WAVWriter audioDest = new WAVWriter(Path.ChangeExtension(sourceFile, ".lossy.wav"), toStdout ? Console.OpenStandardOutput() : null, pcm); + WAVWriter lwcdfDest = createCorrection ? new WAVWriter(Path.ChangeExtension(sourceFile, ".lwcdf.wav"), null, audioSource.PCM) : null; + LossyWAVWriter lossyWAV = new LossyWAVWriter(audioDest, lwcdfDest, quality, audioSource.PCM); + AudioBuffer buff = new AudioBuffer(audioSource, 0x10000); Console.WriteLine("Filename : {0}", sourceFile); - Console.WriteLine("File Info : {0}kHz; {1} channel; {2} bit; {3}", audioSource.SampleRate, audioSource.ChannelCount, audioSource.BitsPerSample, TimeSpan.FromSeconds(audioSource.Length * 1.0 / audioSource.SampleRate)); - lossyWAV.FinalSampleCount = (long) audioSource.Length; + Console.WriteLine("File Info : {0}kHz; {1} channel; {2} bit; {3}", audioSource.PCM.SampleRate, audioSource.PCM.ChannelCount, audioSource.PCM.BitsPerSample, TimeSpan.FromSeconds(audioSource.Length * 1.0 / audioSource.PCM.SampleRate)); + lossyWAV.FinalSampleCount = audioSource.Length; - do + while (audioSource.Read(buff, -1) != 0) { - uint samplesRead = audioSource.Read(buff, Math.Min((uint)buff.GetLength(0), (uint)audioSource.Remaining)); - if (samplesRead == 0) break; - lossyWAV.Write(buff, 0, (int)samplesRead); + lossyWAV.Write(buff); TimeSpan elapsed = DateTime.Now - start; if ((elapsed - lastPrint).TotalMilliseconds > 60) { Console.Error.Write("\rProgress : {0:00}%; {1:0.0000} bits; {2:0.00}x; {3}/{4}", 100.0 * audioSource.Position / audioSource.Length, - 1.0 * lossyWAV.OverallBitsRemoved / audioSource.ChannelCount / lossyWAV.BlocksProcessed, - lossyWAV.SamplesProcessed / elapsed.TotalSeconds / audioSource.SampleRate, + 1.0 * lossyWAV.OverallBitsRemoved / audioSource.PCM.ChannelCount / lossyWAV.BlocksProcessed, + lossyWAV.SamplesProcessed / elapsed.TotalSeconds / audioSource.PCM.SampleRate, elapsed, TimeSpan.FromMilliseconds(elapsed.TotalMilliseconds / lossyWAV.SamplesProcessed * audioSource.Length) ); lastPrint = elapsed; } - } while (true); + } TimeSpan totalElapsed = DateTime.Now - start; Console.Error.Write("\r \r"); Console.WriteLine("Results : {0:0.0000} bits; {1:0.00}x; {2}", - (1.0 * lossyWAV.OverallBitsRemoved) / audioSource.ChannelCount / lossyWAV.BlocksProcessed, - lossyWAV.SamplesProcessed / totalElapsed.TotalSeconds / audioSource.SampleRate, + (1.0 * lossyWAV.OverallBitsRemoved) / audioSource.PCM.ChannelCount / lossyWAV.BlocksProcessed, + lossyWAV.SamplesProcessed / totalElapsed.TotalSeconds / audioSource.PCM.SampleRate, totalElapsed ); audioSource.Close(); diff --git a/MAC_SDK/Source/MACLib/Assembly/Assembly.obj b/MAC_SDK/Source/MACLib/Assembly/Assembly.obj index 123adbe..2917adc 100644 Binary files a/MAC_SDK/Source/MACLib/Assembly/Assembly.obj and b/MAC_SDK/Source/MACLib/Assembly/Assembly.obj differ diff --git a/MAC_SDK/Source/MACLib/Assembly/Assembly64.obj b/MAC_SDK/Source/MACLib/Assembly/Assembly64.obj index ef8a4e3..dbb4198 100644 Binary files a/MAC_SDK/Source/MACLib/Assembly/Assembly64.obj and b/MAC_SDK/Source/MACLib/Assembly/Assembly64.obj differ diff --git a/MusicBrainz/MusicBrainz.csproj b/MusicBrainz/MusicBrainz.csproj index 09d0e3c..46c9af9 100644 --- a/MusicBrainz/MusicBrainz.csproj +++ b/MusicBrainz/MusicBrainz.csproj @@ -30,7 +30,7 @@ none true - . + ..\bin\any\Release\ prompt 4 . diff --git a/UnRarDotNet/UnRarDotNet.csproj b/UnRarDotNet/UnRarDotNet.csproj index a15809d..48bdfdd 100644 --- a/UnRarDotNet/UnRarDotNet.csproj +++ b/UnRarDotNet/UnRarDotNet.csproj @@ -22,7 +22,7 @@ pdbonly true - bin\Release\ + ..\bin\any\Release\ TRACE prompt 4